Class ReplicationPeerConfig.ReplicationPeerConfigBuilderImpl
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationPeerConfig.ReplicationPeerConfigBuilderImpl
- All Implemented Interfaces:
ReplicationPeerConfigBuilder
- Enclosing class:
- ReplicationPeerConfig
static class ReplicationPeerConfig.ReplicationPeerConfigBuilderImpl
extends Object
implements ReplicationPeerConfigBuilder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configuration object from the current state ofthis
.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> excludeNamespaces) Sets the collection of namespaces which should not be replicated when all user tables are configured to be replicated.setExcludeTableCFsMap
(Map<TableName, List<String>> excludeTableCFsMap) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.replication.ReplicationPeerConfigBuilder
putAllConfiguration, putAllPeerData
-
Field Details
-
clusterKey
-
replicationEndpointImpl
-
peerData
-
configuration
-
tableCFsMap
-
namespaces
-
replicateAllUserTables
-
excludeTableCFsMap
-
excludeNamespaces
-
bandwidth
-
serial
-
remoteWALDir
-
-
Constructor Details
-
ReplicationPeerConfigBuilderImpl
-
-
Method Details
-
setClusterKey
Description copied from interface:ReplicationPeerConfigBuilder
Set the clusterKey which is the concatenation of the slave cluster's: hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent- Specified by:
setClusterKey
in interfaceReplicationPeerConfigBuilder
-
setReplicationEndpointImpl
Description copied from interface:ReplicationPeerConfigBuilder
Sets the ReplicationEndpoint plugin class for this peer.- Specified by:
setReplicationEndpointImpl
in interfaceReplicationPeerConfigBuilder
- Parameters:
replicationEndpointImpl
- a class implementing ReplicationEndpoint
-
putConfiguration
Description copied from interface:ReplicationPeerConfigBuilder
Sets a "raw" configuration property for this replication peer. For experts only.- Specified by:
putConfiguration
in interfaceReplicationPeerConfigBuilder
- Parameters:
key
- Configuration property keyvalue
- Configuration property value- Returns:
this
-
removeConfiguration
Description copied from interface:ReplicationPeerConfigBuilder
Removes a "raw" configuration property for this replication peer. For experts only.- Specified by:
removeConfiguration
in interfaceReplicationPeerConfigBuilder
- Parameters:
key
- Configuration property key to ve removed- Returns:
this
-
putPeerData
Description copied from interface:ReplicationPeerConfigBuilder
Sets the serialized peer configuration data- Specified by:
putPeerData
in interfaceReplicationPeerConfigBuilder
- Returns:
this
-
setTableCFsMap
Description copied from interface:ReplicationPeerConfigBuilder
Sets an explicit map of tables and column families in those tables that should be replicated to the given peer. UseReplicationPeerConfigBuilder.setReplicateAllUserTables(boolean)
to replicate all tables to a peer.- Specified by:
setTableCFsMap
in interfaceReplicationPeerConfigBuilder
- 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
Description copied from interface:ReplicationPeerConfigBuilder
Sets a unique collection of HBase namespaces that should be replicated to this peer.- Specified by:
setNamespaces
in interfaceReplicationPeerConfigBuilder
- Parameters:
namespaces
- A set of namespaces to be replicated to this peer.- Returns:
this
-
setReplicateAllUserTables
Description copied from interface:ReplicationPeerConfigBuilder
Configures HBase to replicate all user tables (not system tables) to the peer. Default istrue
.- Specified by:
setReplicateAllUserTables
in interfaceReplicationPeerConfigBuilder
- Parameters:
replicateAllUserTables
- True if all user tables should be replicated, else false.- Returns:
this
-
setExcludeTableCFsMap
public ReplicationPeerConfigBuilder setExcludeTableCFsMap(Map<TableName, List<String>> excludeTableCFsMap) Description copied from interface:ReplicationPeerConfigBuilder
Sets the mapping of table name to column families which should not be replicated. This method sets state which is mutually exclusive toReplicationPeerConfigBuilder.setTableCFsMap(Map)
. Invoking this method is only relevant when all user tables are being replicated.- Specified by:
setExcludeTableCFsMap
in interfaceReplicationPeerConfigBuilder
- Parameters:
excludeTableCFsMap
- 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
Description copied from interface:ReplicationPeerConfigBuilder
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 toReplicationPeerConfigBuilder.setNamespaces(Set)
. Invoking this method is only relevant when all user tables are being replicated.- Specified by:
setExcludeNamespaces
in interfaceReplicationPeerConfigBuilder
- Parameters:
excludeNamespaces
- A set of namespaces whose tables should not be replicated.- Returns:
this
-
setBandwidth
Description copied from interface:ReplicationPeerConfigBuilder
Sets the speed, in bytes per second, for any one RegionServer to replicate data to the peer.- Specified by:
setBandwidth
in interfaceReplicationPeerConfigBuilder
- Parameters:
bandwidth
- Bytes per second- Returns:
this
.
-
setSerial
Description copied from interface:ReplicationPeerConfigBuilder
Sets whether we should preserve order when replicating, i.e, serial replication.
Default
false
.- Specified by:
setSerial
in interfaceReplicationPeerConfigBuilder
- Parameters:
serial
-true
means preserve order, otherwisefalse
.- Returns:
this
-
setRemoteWALDir
Description copied from interface:ReplicationPeerConfigBuilder
Set the remote peer cluster's wal directory. Used by synchronous replication.- Specified by:
setRemoteWALDir
in interfaceReplicationPeerConfigBuilder
- Parameters:
dir
- the remote peer cluster's wal directory- Returns:
this
-
build
Description copied from interface:ReplicationPeerConfigBuilder
Builds the configuration object from the current state ofthis
.- Specified by:
build
in interfaceReplicationPeerConfigBuilder
- Returns:
- A
ReplicationPeerConfig
instance.
-