You can run maprcli commands to set up primary-secondary replication
manually.
maprcli table info command on the source table
to verify that you have the following permissions: readperm, which is required for reading from
the table.replperm, which is required for replicating
from the table.maprcli table info command on the destination
table (if it already exists) to verify that you have the following
permissions: bulkload, which is required for the initial
copy of source data into the destination table.replperm, which is required for receiving
replicated updates from the source table. maprcli command
table create. Use the -copymetafrom option
to ensure that the metadata for the replica is identical to the metadata for the
source table. Metadata includes column families, access control expressions
(ACEs), and other attributes.
maprcli table create -path <path to the replica> -copymetafrom <path to the source table>
customers in the
newyork cluster and use the metadata from the source
table in the sanfrancisco cluster, you could use this
command:
maprcli table create -path /mapr/newyork/customers -copymetafrom /mapr/sanfrancisco/customersmaprcli table replica add command.
maprcli table replica add -path <path to the source table> -replica <path to the replica> -paused true
customers table in the
newyork cluster as a replica of the
customers table in the sanfrancisco
cluster, you could use this command:
maprcli table replica add -path /mapr/sanfrancisco/customers -replica /mapr/newyork/customers -paused true-paused parameter ensures that replication does not
start immediately after you register the source table as a source for this
replica. You do this registration in step 4.maprcli
table replica list command.
maprcli table replica list -path <path to the source table>
newyork cluster is
a replica of the customers table in the
sanfrancisco cluster, you could look at the output of
this command:
maprcli table replica list -path /mapr/sanfrancisco/customers maprcli table upstream
add command. Definition of the upstream table ensures that a table
cannot replicate updates to any replica. Replication depends on a two-way
agreement between the owners of the two tables.
maprcli table upstream add -path <path to the replica> -upstream <path to the source table>
customers table in the
sanfrancisco cluster as an upstream source for the
customers table in the newyork
cluster:
maprcli table upstream add -path /mapr/newyork/customers -upstream /mapr/sanfrancisco/customersmaprcli table upstream list command.
maprcli table upstream list -path <path to the replica>
maprcli table upstream list -path /mapr/newyork/customers-paused to true when adding the
replica, follow these steps:
maprcli table replica
resume. Here is the maprcli command:
maprcli table replica resume -path <path to the source table> -replica <path to the replica>
maprcli table replica resume -path mapr/sanfrancisco/customers -replica /mapr/newyork/customersYou can check for alarms related to replication and whether synchronous replication is switched temporarily to asynchronous replication by looking in the Control System. See Table-Replication Alarms.