static class ReplicationPeerConfig.ReplicationPeerConfigBuilderImpl extends Object implements ReplicationPeerConfigBuilder
| Modifier and Type | Field and Description |
|---|---|
private long |
bandwidth |
private String |
clusterKey |
private Map<String,String> |
configuration |
private Set<String> |
excludeNamespaces |
private Map<TableName,List<String>> |
excludeTableCFsMap |
private Set<String> |
namespaces |
private Map<byte[],byte[]> |
peerData |
private boolean |
replicateAllUserTables |
private String |
replicationEndpointImpl |
private boolean |
serial |
private Map<TableName,List<String>> |
tableCFsMap |
| Constructor and Description |
|---|
ReplicationPeerConfigBuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
ReplicationPeerConfig |
build()
Builds the configuration object from the current state of
this. |
ReplicationPeerConfigBuilder |
putConfiguration(String key,
String value)
Sets a "raw" configuration property for this replication peer.
|
ReplicationPeerConfigBuilder |
putPeerData(byte[] key,
byte[] value)
Sets the serialized peer configuration data
|
ReplicationPeerConfigBuilder |
setBandwidth(long bandwidth)
Sets the speed, in bytes per second, for any one RegionServer to replicate data to the peer.
|
ReplicationPeerConfigBuilder |
setClusterKey(String clusterKey)
Set the clusterKey which is the concatenation of the slave cluster's:
hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent
|
ReplicationPeerConfigBuilder |
setExcludeNamespaces(Set<String> excludeNamespaces)
Sets the collection of namespaces which should not be replicated when all user tables are
configured to be replicated.
|
ReplicationPeerConfigBuilder |
setExcludeTableCFsMap(Map<TableName,List<String>> excludeTableCFsMap)
Sets the mapping of table name to column families which should not be replicated.
|
ReplicationPeerConfigBuilder |
setNamespaces(Set<String> namespaces)
Sets a unique collection of HBase namespaces that should be replicated to this peer.
|
ReplicationPeerConfigBuilder |
setReplicateAllUserTables(boolean replicateAllUserTables)
Configures HBase to replicate all user tables (not system tables) to the peer.
|
ReplicationPeerConfigBuilder |
setReplicationEndpointImpl(String replicationEndpointImpl)
Sets the ReplicationEndpoint plugin class for this peer.
|
ReplicationPeerConfigBuilder |
setSerial(boolean serial)
Sets whether we should preserve order when replicating, i.e, serial replication.
|
ReplicationPeerConfigBuilder |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputAllConfiguration, putAllPeerDataprivate String clusterKey
private String replicationEndpointImpl
private Map<String,String> configuration
private Map<TableName,List<String>> tableCFsMap
private Set<String> namespaces
private boolean replicateAllUserTables
private Map<TableName,List<String>> excludeTableCFsMap
private Set<String> excludeNamespaces
private long bandwidth
private boolean serial
ReplicationPeerConfigBuilderImpl()
public ReplicationPeerConfigBuilder setClusterKey(String clusterKey)
ReplicationPeerConfigBuildersetClusterKey in interface ReplicationPeerConfigBuilderpublic ReplicationPeerConfigBuilder setReplicationEndpointImpl(String replicationEndpointImpl)
ReplicationPeerConfigBuildersetReplicationEndpointImpl in interface ReplicationPeerConfigBuilderreplicationEndpointImpl - a class implementing ReplicationEndpointpublic ReplicationPeerConfigBuilder putConfiguration(String key, String value)
ReplicationPeerConfigBuilderputConfiguration in interface ReplicationPeerConfigBuilderkey - Configuration property keyvalue - Configuration property valuethispublic ReplicationPeerConfigBuilder putPeerData(byte[] key, byte[] value)
ReplicationPeerConfigBuilderputPeerData in interface ReplicationPeerConfigBuilderthispublic ReplicationPeerConfigBuilder setTableCFsMap(Map<TableName,List<String>> tableCFsMap)
ReplicationPeerConfigBuilderReplicationPeerConfigBuilder.setReplicateAllUserTables(boolean) to replicate all tables
to a peer.setTableCFsMap in interface ReplicationPeerConfigBuildertableCFsMap - A map from tableName to column family names. An empty collection can be
passed to indicate replicating all column families.thisReplicationPeerConfigBuilder.setReplicateAllUserTables(boolean)public ReplicationPeerConfigBuilder setNamespaces(Set<String> namespaces)
ReplicationPeerConfigBuildersetNamespaces in interface ReplicationPeerConfigBuildernamespaces - A set of namespaces to be replicated to this peer.thispublic ReplicationPeerConfigBuilder setReplicateAllUserTables(boolean replicateAllUserTables)
ReplicationPeerConfigBuildertrue.setReplicateAllUserTables in interface ReplicationPeerConfigBuilderreplicateAllUserTables - True if all user tables should be replicated, else false.thispublic ReplicationPeerConfigBuilder setExcludeTableCFsMap(Map<TableName,List<String>> excludeTableCFsMap)
ReplicationPeerConfigBuilderReplicationPeerConfigBuilder.setTableCFsMap(Map). Invoking this
method is only relevant when all user tables are being replicated.setExcludeTableCFsMap in interface ReplicationPeerConfigBuilderexcludeTableCFsMap - 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.this.public ReplicationPeerConfigBuilder setExcludeNamespaces(Set<String> excludeNamespaces)
ReplicationPeerConfigBuilderReplicationPeerConfigBuilder.setNamespaces(Set). Invoking this method is only relevant when all user tables are
being replicated.setExcludeNamespaces in interface ReplicationPeerConfigBuilderexcludeNamespaces - A set of namespaces whose tables should not be replicated.thispublic ReplicationPeerConfigBuilder setBandwidth(long bandwidth)
ReplicationPeerConfigBuildersetBandwidth in interface ReplicationPeerConfigBuilderbandwidth - Bytes per secondthis.public ReplicationPeerConfigBuilder setSerial(boolean serial)
ReplicationPeerConfigBuilderSets whether we should preserve order when replicating, i.e, serial replication.
Default false.
setSerial in interface ReplicationPeerConfigBuilderserial - true means preserve order, otherwise false.thispublic ReplicationPeerConfig build()
ReplicationPeerConfigBuilderthis.build in interface ReplicationPeerConfigBuilderReplicationPeerConfig instance.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.