table replica edit

Edits the properties of a replica of a binary table.

Syntax

CLI
maprcli table replica edit
-path table path
-replica replica table path
[ -newreplica renamed table path ]
[ -columns comma separated list of <family>[:<column>] ]
[ -throttle throttle replication ops ]
[ -networkencryption enable on-wire encryption ]
[ -synchronous is synchronous replication ]
[ -networkcompression on-wire compression type: off|on|lzf|lz4|zlib ]
REST
http[s]://<host>:<port>/rest/table/replica/edit?path=<path>&replica=<path>...
NOTE: The mapr user is not treated as a superuser. MapR-DB does not allow the mapr user to run this command unless that user is given the relevant permission or permissions with access-control expressions.

Parameters

Parameter Description
path

The path to the source table that you want to replicate.

  • For a path on the local cluster, start the path at the volume mount point. For example, for a table named testsrc under a volume with a mount point at /volume1, specify the following path: /volume1/testsrc
  • For a path on a remote cluster, you must also specify the cluster name in the path. For example, for a table named customersrc under volume1 in the sanfrancisco cluster, specify the following path:/mapr/sanfrancisco/volume1/customersrc
replica

The path to the replica.

  • For a table on the local cluster, start the path at the volume mount point. For example, for a table named testdst under a volume with a mount point at /volume1, specify the following path: /volume1/testdst
  • For a table on a remote cluster, you must also specify the cluster name in the path. For example, for a table named customerdst under volume1 in the sanfrancisco cluster, specify the following path: /mapr/sanfrancisco/volume1/customerdst
newreplica

The updated replica path due to a renamed replica table, renamed cluster, or changed table path. The table specified in the replica parameter and the table specified in the newreplica parameter must have the same UUID.

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. Provide a comma-separated list of column families or columns from a certain column family (column family:qualifier). For example, use the following syntax to replicate the column family purchases and the column stars in the reviews column family: -columns purchases,reviews:stars

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 values are true or false. No throttle (false) is the default.
networkencryption A Boolean value that specifies whether or not to enable on-wire encryption. The values are 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.
synchronous

A Boolean value that specifies whether replication is synchronous or asynchronous. The values are true or false. Asynchronous (false) is the default.

networkcompression

The type of on-wire compression.

The types are:

  • off
  • on (default)
  • lzf
  • lz4. This is the default
  • zlib

lz4 is the default compression which it set by parameter values on or lz4.

Examples

Change the replica path to reflect that replica t2dst was renamed to t2dst_new:

CLI
maprcli table replica edit -path /volume1/t1src -replica /volume1/t2dst -newreplica /volume1/t2dst_new
REST
https://<hostIP:8443/rest/table/replica/edit?path=%2Fvolume1%2Ft1&replica=%2Fvolume1%2Ft2&newreplica=%2Fvolume1%2Ft2_new

Change the column families to replicate:

CLI
maprcli table replica edit -path /volume1/custAsrc -replica /volume2/custAdst -columns purchases, reviews, returns
REST
https://<hostIP:8443/rest/table/replica/edit?path=%2Fvolume1%2FcustAsrc&replica=%2Fvolume2%2FcustAdst&columns=purchases,reviews,returns