Interface ReplicationPeerConfigBuilder
- All Known Implementing Classes:
ReplicationPeerConfig.ReplicationPeerConfigBuilderImpl
For creating
ReplicationPeerConfig
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configuration object from the current state ofthis
.default ReplicationPeerConfigBuilder
putAllConfiguration
(Map<String, String> configuration) Adds all of the provided "raw" configuration entries tothis
.default ReplicationPeerConfigBuilder
putAllPeerData
(Map<byte[], byte[]> peerData) Sets all of the provided serialized peer configuration data.putConfiguration
(String key, String value) Sets a "raw" configuration property for this replication peer.putPeerData
(byte[] key, byte[] value) Sets the serialized peer configuration dataRemoves a "raw" configuration property for this replication peer.setBandwidth
(long bandwidth) Sets the speed, in bytes per second, for any one RegionServer to replicate data to the peer.setClusterKey
(String clusterKey) Set the clusterKey which is the concatenation of the slave cluster's: hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parentsetExcludeNamespaces
(Set<String> namespaces) Sets the collection of namespaces which should not be replicated when all user tables are configured to be replicated.setExcludeTableCFsMap
(Map<TableName, List<String>> tableCFsMap) Sets the mapping of table name to column families which should not be replicated.setNamespaces
(Set<String> namespaces) Sets a unique collection of HBase namespaces that should be replicated to this peer.setRemoteWALDir
(String dir) Set the remote peer cluster's wal directory.setReplicateAllUserTables
(boolean replicateAllUserTables) Configures HBase to replicate all user tables (not system tables) to the peer.setReplicationEndpointImpl
(String replicationEndpointImpl) Sets the ReplicationEndpoint plugin class for this peer.setSerial
(boolean serial) Sets whether we should preserve order when replicating, i.e, serial replication.setTableCFsMap
(Map<TableName, List<String>> tableCFsMap) Sets an explicit map of tables and column families in those tables that should be replicated to the given peer.
-
Method Details
-
setClusterKey
Set the clusterKey which is the concatenation of the slave cluster's: hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent -
setReplicationEndpointImpl
Sets the ReplicationEndpoint plugin class for this peer.- Parameters:
replicationEndpointImpl
- a class implementing ReplicationEndpoint
-
putConfiguration
Sets a "raw" configuration property for this replication peer. For experts only.- Parameters:
key
- Configuration property keyvalue
- Configuration property value- Returns:
this
-
removeConfiguration
Removes a "raw" configuration property for this replication peer. For experts only.- Parameters:
key
- Configuration property key to ve removed- Returns:
this
-
putAllConfiguration
Adds all of the provided "raw" configuration entries tothis
.- Parameters:
configuration
- A collection of raw configuration entries- Returns:
this
-
putPeerData
Sets the serialized peer configuration data- Returns:
this
-
putAllPeerData
Sets all of the provided serialized peer configuration data.- Returns:
this
-
setTableCFsMap
Sets an explicit map of tables and column families in those tables that should be replicated to the given peer. UsesetReplicateAllUserTables(boolean)
to replicate all tables to a peer.- Parameters:
tableCFsMap
- A map from tableName to column family names. An empty collection can be passed to indicate replicating all column families.- Returns:
this
- See Also:
-
setNamespaces
Sets a unique collection of HBase namespaces that should be replicated to this peer.- Parameters:
namespaces
- A set of namespaces to be replicated to this peer.- Returns:
this
-
setBandwidth
Sets the speed, in bytes per second, for any one RegionServer to replicate data to the peer.- Parameters:
bandwidth
- Bytes per second- Returns:
this
.
-
setReplicateAllUserTables
Configures HBase to replicate all user tables (not system tables) to the peer. Default istrue
.- Parameters:
replicateAllUserTables
- True if all user tables should be replicated, else false.- Returns:
this
-
setExcludeTableCFsMap
Sets the mapping of table name to column families which should not be replicated. This method sets state which is mutually exclusive tosetTableCFsMap(Map)
. Invoking this method is only relevant when all user tables are being replicated.- Parameters:
tableCFsMap
- A mapping of table names to column families which should not be replicated. An empty list of column families implies all families for the table.- Returns:
this
.
-
setExcludeNamespaces
Sets the collection of namespaces which should not be replicated when all user tables are configured to be replicated. This method sets state which is mutually exclusive tosetNamespaces(Set)
. Invoking this method is only relevant when all user tables are being replicated.- Parameters:
namespaces
- A set of namespaces whose tables should not be replicated.- Returns:
this
-
setSerial
Sets whether we should preserve order when replicating, i.e, serial replication.
Default
false
.- Parameters:
serial
-true
means preserve order, otherwisefalse
.- Returns:
this
-
setRemoteWALDir
Set the remote peer cluster's wal directory. Used by synchronous replication.- Parameters:
dir
- the remote peer cluster's wal directory- Returns:
this
-
build
Builds the configuration object from the current state ofthis
.- Returns:
- A
ReplicationPeerConfig
instance.
-