Adding JSON Table Replicas
Explains how to add replicas of JSON tables using either the Control System, the CLI or the REST API.
About this task
You can register a HPE Ezmeral Data Fabric Database JSON table as a replica of another HPE Ezmeral Data Fabric Database JSON table using either the Control System or the CLI. When you add a replica using the Control System, you can also setup and start replication between a source HPE Ezmeral Data Fabric Database JSON table to a replica HPE Ezmeral Data Fabric Database JSON table. Before you begin, complete the steps to prepare HPE Ezmeral Data Fabric clusters for table replication.
Adding JSON Table Replica Using the Control System
About this task
Procedure
- Go to the table information page.
-
Click Replicas tab.
The list of replicas associated with the table displays.
-
Click Add Replica.
The Add Replica page displays.
-
Specify the following settings:
Destination Cluster The destination cluster for the replica, where gateways are configured to allow source cluster to send updates. Path to 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 another cluster, you must also specify the
cluster name in the path. For example, for a table named
customerdst
undervolume1
in thesanfrancisco
cluster, specify the following path:/mapr/sanfrancisco/volume1/customerdst
NOTEFor replication to a table, the command will fail if the replica path you specify points to table that already exists.Replication State Specify whether or not to start replication by choosing one of the following: - Automatic Setup — Creates the table on the destination cluster, registers the table on the destination cluster as a replica, adds the current table as an upstream source, copies the content of the current table into the replica, and starts replication.
- Pause Replication — Registers the table on the
destination cluster as a replica and adds the current
table as an upstream source, but prevents replication
from immediately starting after. Pausing replica like
this allows you to load the data into the replica from
the current table, after which you can restart
replication. NOTEAlthough visible, this option is not supported if the source or replica is on a remote secure cluster.
Multi-Master Setup (Available only with Automatic Setup) Multi-master topology, in which there are two primary-secondary relationships, with each table playing both the primary and secondary roles. Client applications update both tables and each table replicates updates to the other.If this is not selected, table replication will be basic primary-secondary topology. In this topology, you replicate one way from source tables to replicas. The replicas can be in a remote cluster or in the cluster where the source tables are located. See Primary-Secondary Replication.
NOTEAccess control expressions on the replica that control permissions for updates to column families and columns are irrelevant because all updates from a source table arrive at a replica after having been authenticated at a gateway, which has the implicit authority to update replicas. - For a table on the local cluster, start the path at the volume
mount point. For example, for a table named
-
Set the following optional properties:
Throttle Specify whether (Yes) or not (No) to throttle replication operations. Throttle the replication stream to minimize the impact of the replication process on incoming operations during periods of heavy load. Replicate Synchronously Specify whether replication is synchronous (Yes) or asynchronous (No). See Modes of replication for more information. Encrypt On Wire Specify whether (Yes) or not (No) to enable on-wire encryption. If you enable this, the local cluster and any other cluster that is part of the replication process must be enabled for security. Compress On Wire The type of on-wire compression. Choose one of the following: - Inherited
- OFF
- LZF
- LZ4
- ZLib
-
Choose whether to:
- Replicate Entire Document
- Replicate Selected Field Paths — Specify the
full path to the field in dotted notation. For example, suppose the
table contained JSON documents that were of this general structure:
To replicate field{ "_id" : "ID", "a" : { "b" : { "c" : "value", }, "e" : "value" } }
c
, you must specifya.b.c
as the field path. Do not use quotation marks and do not include spaces after each dot. Click:- Add Field to add another field to replicate.
- to remove a field.
By default, the entire document in the source table is replicated.NOTEIf a field is added at a later date, replication for that field will start at that time. -
Click Add Replica.
A table with the specified fields is created in the destination cluster, the new table is declared to be a replica of the source table, and the source table is registered as an upstream source for the replica.
Adding JSON Table Replica Using the CLI or the REST API
About this task
To add a replica, run the following command:
maprcli table replica add -path <table path> -replica <replica table path>
readAce
andwriteAce
on both the source volume and the target volumelookupdir
on directories in the paths of both tablesreadperm
andreplperm
permissions on the source table
table replica add
.maprcli table replica
autosetup
which will setup and start replication. For more
information, see table replica autosetup
.