stream replica autosetup

Sets up and starts replication between a source stream and replica stream.

The maprcli stream replica autosetup command performs the following steps to set up replication:
  1. Creates a stream in the destination cluster.
  2. Declares the new stream to be a replica of the source stream and ensures that replication does not begin immediately after the next step.
  3. Declares the source stream as the original of the replica stream.
  4. Runs the mapr copystream utility to load a copy of the source data into the replica.
  5. Clears the paused replication state to start replication.

Permissions Required at the Source Cluster

To run this command, your user ID must have the following permissions:
  • readAce and writeAce on the volume
  • lookupdir on directories in the path
  • adminperm and copyperm permissions on the source stream
Note: The mapr user is not treated as a superuser. MapR Streams does not allow the mapr user to run this command unless that user is given the relevant permission or permissions with access-control expressions.

Permissions Required at the Target Cluster

To run this command, your user ID must have the following permissions:

Syntax

CLI
stream replica autosetup
	 -path <stream path> 
	 -replica <remote stream path> 
	[ -synchronous <replicate to remote stream before acknowledging producers> default: false ]
	[ -multimaster <set up bi-directional replication> default: false ]
	[ -throttle <throttle replication operations under load> default: false ]
	[ -networkencryption <enable on-wire encryption> default: false ]
	[ -networkcompression <on-wire compression type: off|lz4|lzf|zlib> default: compression setting on stream ]
REST http[s]://<host>:<port>/rest/stream/replica/autosetup?path=<path>&replica=<name>

Parameters

Parameter Description
path The path and name of the stream that you want to create a replica for.
replica The path and name of the stream that you want to create as a replica of the stream that you specified with the -path parameter.
synchronous A boolean value that specifies whether replication is synchronous or asynchronous. The values are true or false. The default is false and specifies asynchronous replication.
multimaster A boolean value that specifies whether or not to set up a multi-master topology. The values are true or false. The default is false and specifies to use the basic master-slave topology, rather than the multi-master topology.
throttle A boolean value that specifies whether 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. The default is false.
Throttling has two effects, both of which allow MapR Streams to use more system resources to process new messages:
  • Throttling slows down the rate at which changes to a stream are replicated.
  • Throttling slows down the rate at which messages to be replicated are read from disk.
networkencryption A boolean value that specifies whether or not to enable on-wire encryption. The values are true or false. The default is false. If you set the value to true, the local cluster and any other cluster that is part of the replication process must be enabled for security.
networkcompression Specifies the type of compression to use when replicating messages. For more information, see Compression.