Replication Microservices
Use the CDAP Replication Microservices to manage replication jobs.
All methods or endpoints described in this API have a base URL (typically http://<host>:11015
or https://<host>:10443
) that precedes the resource identifier, as described in the Microservices Conventions. These methods return a status code, as listed in the Microservices Status Codes.
Assess a Draft Replication Job
To assess a replication job in draft mode based on the source and target tables, submit an HTTP POST request:
POST /v3/namespaces/system/apps/delta/services/assessor/methods/v1/contexts/<namespace>/drafts/<draft-id>/assessPipeline
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
Assess a Table in a Draft Replication Job
To assess a specific table in a replication job in draft mode, submit an HTTP POST request:
POST /v3/namespaces/system/apps/delta/services/assessor/methods/v1/contexts/<namespace>/drafts/<draft-id>/assessPipeline
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
The request body is a JSON object specifying the database and table name in the draft replication job.
For example:
{
"database": "db1",
"table": "table1"
}
Create or Update a Draft Replication Job
To add a new replication job in draft mode or overwrite an existing one, submit an HTTP PUT request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
The request body is a JSON object specifying the draft replication job configuration.
For example:
Delete a Draft Replication Job
To delete an existing replication job in draft mode, submit an HTTP DELETE request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
Details of a Source Table in a Replication Job Draft
To list the details of a source table in replication job draft, submit an HTTP POST request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
The request body is a JSON object specifying the database and table name in the draft replication job.
For example:
Details of a Replication Job Draft
To list the details of a replication job draft, submit an HTTP GET request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
Draft Replication Jobs
To list all replication jobs in Draft mode in a namespace, submit an HTTP GET request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
The information will be returned in the body of the response. It list the draft objects, where a draft contains the full job configuration. For example:
Generation Number for the Replication Job (CDAP 6.7+)
To get the generation number for a replication job, submit an HTTP GET request:
Parameter | Description |
---|---|
| The namespace for your application. |
| The name of the replication job. |
Offset Information for each Task Instance (CDAP 6.7+)
The offset is maintained at for every task instance. When you configure a replication job, there is an option to set the number of tasks and each task has its own offset information.
To get the offset information for each task instance for a replication job, submit an HTTP GET request:
Parameter | Description |
---|---|
| The namespace for the deployed replication job. |
| The name of the deployed replication job. |
| The generation number for the deployed replication job. It’s generally a LONG type value. |
| The ID of the task. |
Replication Tables Mapped to each Task / Instance_id (CDAP 6.7+)
Each Task/instance handles a particular set of tables. It is responsible to snapshot and replication process for those tables.
To list the replication tables mapped to an Instance_id
for a deployed replication job, submit an HTTP GET request:
Parameter | Description |
---|---|
| The name of the deployed replication job. |
In the Response body, look for properties
. table.assignments
.
Source Tables for a Draft Replication Job
To list the source tables in a replication job in draft mode, submit an HTTP POST request:
Parameter | Description |
---|---|
| The namespace for the draft replication jobs. |
| The Draft ID of the replication job. The Draft ID can be any alphanumeric string. It must be unique in the namespace. |
Created in 2020 by Google Inc.