Migration Gates
LiveData 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 has been inserted into a migration.SCHEDULED
: All events in the gate have been processed, and the gate will close unless there are pending regions inside of the gate path.AWAITING_DEPENDENT_REGIONS
: The gate is waiting for the completion of all pending regions inside the path the gate corresponds to. It will enter theCOMPLETED
stage afterward.COMPLETED
: Data migration within the gate has finished. The gate is closed.
#
API usageLiveData Migrator creates and processes gates automatically. To create, modify and close gates, use the LiveData Migrator API. To generate curl
commands or find out more information, access the LiveData API documentation.
#
Create a migration gateCreate 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 examplecurl -X 'PUT' \ 'http://localhost:18080/gates/gate?path=%2Ffiles%2Fpath%2F&sourceFilesystemId=mySourceSystem&targetFilesystemId=myTarget&gateId=myNewGate' \ -H 'accept: application/json'
#
Close a migration gateClose 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 Examplecurl -X 'PUT' \ 'http://localhost:18080/gates/gate/close?gateId=myGateId' \ -H 'accept: */*'
#
Check a migration gate's statusCheck 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 examplecurl -X 'GET' \ 'http://localhost:18080/gates/gate?gateIds=myCreatedGate' \ -H 'accept: application/json'
#
Check for closed migration gatesCheck 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 examplecurl -X 'GET' \ 'http://localhost:18080/gates/gate/check?gateIds=myFirstGate&gateIds=anotherGate&gateIds=oneMoreGate' \ -H 'accept: application/json'
#
Delete a migration gateDelete 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 examplecurl -X 'DELETE' \ 'http://localhost:18080/gates/gate?gateIds=myCreatedGate' \ -H 'accept: */*'
#
Delete all migration gatesDelete all migration gates with a DELETE query sent to /gates/gate/deleteAll
. This query has no parameters.
#
Curl command examplecurl -X 'DELETE' \ 'http://localhost:18080/gates/gate/deleteAll' \ -H 'accept: */*'