After creating remote cluster, users can create sync relationship for table in source cluster. During this process, Hippo will clone the source table into target cluster firstly, then all the incoming write operations against source table will be synced to target table in remote cluster in real-time.
Kindly note
- All existing tables will be copied to target table.
- Sync relationship has nothing to do with the indexes of tables in source and remote clusters. Indexes will be maintained separately, thus all add/drop operations against source table will not be synced to remote table, vice versa.
curl -u shiva:shiva -XPUT 'localhost:8902/hippo/v1/_ccr/create_relation?pretty' -H 'Content-Type: application/json' -d'{
"ccr_relation_name" : "book_ccr",
"remote_cluster_name" : "cluster1",
"source_table" : {
"database_name" : "default",
"table_name" : "book"
},
"dest_table" : {
"database_name" : "default",
"table_name" : "book_backup"
}
}';
Result:
{
"acknowledged" : true
}
Parameter description:
Parameters | Description | Required |
---|---|---|
ccr_relation_name | Relationship name | Yes |
remote_cluster_name | Remote cluster name | Yes |
database_name (source_table) | Source database name | No, defaults to "default" database |
table_name (source_table) | Source table name | Yes |
database_name (dest_table) | Destination database name | No, defaults to "default" database |
table_name (dest_table) | Destination table name | Yes |