table replica autosetupSets up and starts replication between a source HPE Ezmeral Data Fabric Database binary or JSON table to a replica HPE Ezmeral Data Fabric Database binary or JSON table.
The maprcli table replica autosetup command performs the following
steps to set up replication:
For more information about the automatic setup process, see Replica Autosetup for HPE Ezmeral Data Fabric Database Tables.
Before you set up replication for a table, verify that the cluster is setup for replication. For more information, see Preparing Clusters for Table Replication.
To run this command, your user ID must have the following permissions:
readAce and writeAce on both the source volume and the target
volumelookupdir on directories in the paths of both
tablesreadperm and replperm permissions on the source
tablemapr user is not treated as a superuser. HPE Ezmeral Data Fabric Database does not allow the mapr user to run
this command unless that user is given the relevant permission or permissions with
Access Control Expression (ACE)./opt/mapr/bin/maprcli table replica autosetup
-path <table path>
-replica <replica table path>
[ -columns <comma separated list of <family>[:<column>]> ]
[ -synchronous <is synchronous replication> default: false ]
[ -multimaster <is multi master replication> default: false ]
[ -throttle <throttle replication ops> default: false ]
[ -networkencryption <enable on-wire encryption> default: false ]
[ -networkcompression <on-wire compression type: off|on|lzf|lz4|zlib> default: on ]
[ -directcopy <enable directcopy> default: true ]
[ -useexistingreplica <use existing replica table if present> default: false ]
curl -k -X POST
'http[s]://<host>:<port>/rest/table/replica/autosetup?path=<path>&replica=<path>&<parameters>'
-u <username>:<password>
| path |
The path to the source table that you want to replicate.
|
| replica |
The path to the replica.
Note: For replication to a table, the command will fail if the replica path
you specify points to table that already exists.
|
| columns |
By default, all columns in the source table are replicated. If you do not want to replicate all columns in the table, you can
specify specific columns to replicate:
|
| synchronous | A Boolean value that specifies whether replication is synchronous or
asynchronous. The value is either true or
false. Asynchronous (false) is the
default. |
| multimaster | A Boolean value that specifies whether or not to set up a multi-master
topology. The value is either true or
false. Basic primary-secondary topology
(false) is the default. |
| throttle | A Boolean value that specifies whether or not to throttle replication
operations. Throttle the replication stream to minimize the impact of the
replication process on incoming operations during periods of heavy load. The
value is either true or false. No throttle
(false) is the default. |
| networkencryption | A Boolean value that specifies whether or not to enable on-wire
encryption. The value is either true or
false. No encryption (false) is the
default. If you set this to true, the
local cluster and any other cluster that is part of the replication process
must be enabled for security. |
| networkcompression |
The type of on-wire compression. The types are:
lz4 is the default compression which it set by parameter values |
| directcopy | A Boolean value that specifies whether or not autosetup will use the
directcopy option . The value is either true or
false. Autosetup with direct copy
(true) is the default. If you set this parameter to
false, the cluster will run autosetup without the
directcopy option. For more information, see Replica Autosetup for HPE Ezmeral Data Fabric Database Tables. Note: If a table was originally
created in MapR 5.x and the
maprcli table replica
autosetup command is specified with
directcopy=false, then an error, “Copy Table failed
for tables”, occurs. This is due to the introduction of new table meta
information in 6.0. It is recommended that replication be setup using
directcopy=true (which is the default). If the
default method is not desired, then replication should be setup
manually. |
| useexistingreplica | When the directcopy parameter is set to true (default),
this Boolean value specifies whether or not an existing table can be used as
the replica table. The value is either true or
false. No reuse of existing tables
(false) is the default. If a table exists with the
specified name, and this parameter is set to false, the create table
operation will fail. |
/opt/mapr/bin/maprcli table replica autosetup -path /volume1/custBsrc -replica /volume2/custBdst
curl -k -X POST \
'https://r1n1.sj.us:8443/rest/table/replica/autosetup?path=%2Fvolume2%2FcustBsrc&replica=%2Fvolume2%2FcustBdst' \
-u mapr:mapr