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
Fields -
Constructor Summary
Constructors -
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, waitMethods 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:ReplicationPeerConfigBuilderSet the clusterKey which is the concatenation of the slave cluster's: hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent- Specified by:
setClusterKeyin interfaceReplicationPeerConfigBuilder
-
setReplicationEndpointImpl
Description copied from interface:ReplicationPeerConfigBuilderSets the ReplicationEndpoint plugin class for this peer.- Specified by:
setReplicationEndpointImplin interfaceReplicationPeerConfigBuilder- Parameters:
replicationEndpointImpl- a class implementing ReplicationEndpoint
-
putConfiguration
Description copied from interface:ReplicationPeerConfigBuilderSets a "raw" configuration property for this replication peer. For experts only.- Specified by:
putConfigurationin interfaceReplicationPeerConfigBuilder- Parameters:
key- Configuration property keyvalue- Configuration property value- Returns:
this
-
removeConfiguration
Description copied from interface:ReplicationPeerConfigBuilderRemoves a "raw" configuration property for this replication peer. For experts only.- Specified by:
removeConfigurationin interfaceReplicationPeerConfigBuilder- Parameters:
key- Configuration property key to ve removed- Returns:
this
-
putPeerData
Description copied from interface:ReplicationPeerConfigBuilderSets the serialized peer configuration data- Specified by:
putPeerDatain interfaceReplicationPeerConfigBuilder- Returns:
this
-
setTableCFsMap
Description copied from interface:ReplicationPeerConfigBuilderSets 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:
setTableCFsMapin 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:ReplicationPeerConfigBuilderSets a unique collection of HBase namespaces that should be replicated to this peer.- Specified by:
setNamespacesin interfaceReplicationPeerConfigBuilder- Parameters:
namespaces- A set of namespaces to be replicated to this peer.- Returns:
this
-
setReplicateAllUserTables
Description copied from interface:ReplicationPeerConfigBuilderConfigures HBase to replicate all user tables (not system tables) to the peer. Default istrue.- Specified by:
setReplicateAllUserTablesin 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:ReplicationPeerConfigBuilderSets 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:
setExcludeTableCFsMapin 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:ReplicationPeerConfigBuilderSets 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:
setExcludeNamespacesin interfaceReplicationPeerConfigBuilder- Parameters:
excludeNamespaces- A set of namespaces whose tables should not be replicated.- Returns:
this
-
setBandwidth
Description copied from interface:ReplicationPeerConfigBuilderSets the speed, in bytes per second, for any one RegionServer to replicate data to the peer.- Specified by:
setBandwidthin interfaceReplicationPeerConfigBuilder- Parameters:
bandwidth- Bytes per second- Returns:
this.
-
setSerial
Description copied from interface:ReplicationPeerConfigBuilderSets whether we should preserve order when replicating, i.e, serial replication.
Default
false.- Specified by:
setSerialin interfaceReplicationPeerConfigBuilder- Parameters:
serial-truemeans preserve order, otherwisefalse.- Returns:
this
-
setRemoteWALDir
Description copied from interface:ReplicationPeerConfigBuilderSet the remote peer cluster's wal directory. Used by synchronous replication.- Specified by:
setRemoteWALDirin interfaceReplicationPeerConfigBuilder- Parameters:
dir- the remote peer cluster's wal directory- Returns:
this
-
build
Description copied from interface:ReplicationPeerConfigBuilderBuilds the configuration object from the current state ofthis.- Specified by:
buildin interfaceReplicationPeerConfigBuilder- Returns:
- A
ReplicationPeerConfiginstance.
-