Skip to main content
Version: 2.4.3

Migration gates

note

Migration gates apply to live sources only.

Data Migrator uses progress indicators called migration gates to track the successful migration of individual paths on the target filesystem. Gates enter the COMPLETED state and close when all scheduled migration activities taking place within the gate finish.

Gates have the following states:

  • CREATED: The gate is created.
  • INJECTED: The gate is created and is added to a migration.
  • SCHEDULED: All events in the gate have been processed, and the gate closes unless there are paths to be rescanned.
  • AWAITING_DEPENDENT_REGIONS: The gate is waiting for all paths to be rescanned. It changes status to COMPLETED after all the paths are rescanned.
  • COMPLETED: Data migration in the gate has finished. The gate is closed.

API usage

Data Migrator creates and processes gates automatically. To create, modify and close gates, use the Data Migrator API. To generate curl commands or find out more information, see the API documentation.

Create a migration gate

Create a migration gate and insert it into a migration with a PUT query sent to /gates/gate.

Required parameters

  • Path: The path to create the migration gate in. This must be a path available to an existing migration. For example, a path /myfolder/files/extra/ within a migration migrating /myfolder/.
  • sourceFilesystemId: The identifier of the source filesystem for which you want to create the migration gate. For example, myHDFSsource.
  • targetFilesystemId: The identifier of the target filesystem for which you want to create the migration gate. For example, myAWStarget.
  • gateId: An identifier of your choice to be used as the reference for the migration gate. For example, myGate1.

Curl command example

Example
curl -X 'PUT' \
'http://localhost:18080/gates/gate?path=%2Ffiles%2Fpath%2F&sourceFilesystemId=mySourceSystem&targetFilesystemId=myTarget&gateId=myNewGate' \
-H 'accept: application/json'

Close a migration gate

Close a migration gate with a PUT query sent to /gates/gate/close.

Required parameters

  • gateId: An identifier of the gate you want to close. For example, myGate1.

Curl command example

Example
curl -X 'PUT' \
'http://localhost:18080/gates/gate/close?gateId=myGateId' \
-H 'accept: */*'

Check a migration gate's status

Check the current status of a migration gate or multiple migration gates with a GET query sent to /gates/gate. If successful, the query will return data such as the gate's status, number of dependent regions, time created, time of last update and closure status.

Required parameters

  • gateIds: An array of identifiers for migration gates you want to query. For example, mygate1,mygate2,mygate3.

Curl command example

Example
curl -X 'GET' \
'http://localhost:18080/gates/gate?gateIds=myCreatedGate' \
-H 'accept: application/json'

Check for closed migration gates

Check for closed migration gates in bulk with a GET query sent to /gates/gate/check. If successful, the query will return a list of which gates queried are closed.

Required parameters

  • gateIds: An array of identifiers for migration gates you want to query. For example, mygate1,mygate2,mygate3.

Curl command example

Example
curl -X 'GET' \
'http://localhost:18080/gates/gate/check?gateIds=myFirstGate&gateIds=anotherGate&gateIds=oneMoreGate' \
-H 'accept: application/json'

Delete a migration gate

Delete the migration gate of a specified identifier with a DELETE query sent to /gates/gate/.

Required parameters

  • gateIds: An array of identifiers for migration gates you want to delete. For example, mygate1,mygate2,mygate3.

Curl command example

Example
curl -X 'DELETE' \
'http://localhost:18080/gates/gate?gateIds=myCreatedGate' \
-H 'accept: */*'

Delete all migration gates

Delete all migration gates with a DELETE query sent to /gates/gate/deleteAll. This query has no parameters.

Curl command example

Example
curl -X 'DELETE' \
'http://localhost:18080/gates/gate/deleteAll' \
-H 'accept: */*'