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 |
removeConfiguration(String key)
Removes a "raw" configuration property for this replication peer.
|
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, wait
putAllConfiguration, putAllPeerData
private 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)
ReplicationPeerConfigBuilder
setClusterKey
in interface ReplicationPeerConfigBuilder
public ReplicationPeerConfigBuilder setReplicationEndpointImpl(String replicationEndpointImpl)
ReplicationPeerConfigBuilder
setReplicationEndpointImpl
in interface ReplicationPeerConfigBuilder
replicationEndpointImpl
- a class implementing ReplicationEndpointpublic ReplicationPeerConfigBuilder putConfiguration(String key, String value)
ReplicationPeerConfigBuilder
putConfiguration
in interface ReplicationPeerConfigBuilder
key
- Configuration property keyvalue
- Configuration property valuethis
public ReplicationPeerConfigBuilder removeConfiguration(String key)
ReplicationPeerConfigBuilder
removeConfiguration
in interface ReplicationPeerConfigBuilder
key
- Configuration property key to ve removedthis
public ReplicationPeerConfigBuilder putPeerData(byte[] key, byte[] value)
ReplicationPeerConfigBuilder
putPeerData
in interface ReplicationPeerConfigBuilder
this
public ReplicationPeerConfigBuilder setTableCFsMap(Map<TableName,List<String>> tableCFsMap)
ReplicationPeerConfigBuilder
ReplicationPeerConfigBuilder.setReplicateAllUserTables(boolean)
to replicate all tables to a
peer.setTableCFsMap
in interface ReplicationPeerConfigBuilder
tableCFsMap
- A map from tableName to column family names. An empty collection can be
passed to indicate replicating all column families.this
ReplicationPeerConfigBuilder.setReplicateAllUserTables(boolean)
public ReplicationPeerConfigBuilder setNamespaces(Set<String> namespaces)
ReplicationPeerConfigBuilder
setNamespaces
in interface ReplicationPeerConfigBuilder
namespaces
- A set of namespaces to be replicated to this peer.this
public ReplicationPeerConfigBuilder setReplicateAllUserTables(boolean replicateAllUserTables)
ReplicationPeerConfigBuilder
true
.setReplicateAllUserTables
in interface ReplicationPeerConfigBuilder
replicateAllUserTables
- True if all user tables should be replicated, else false.this
public ReplicationPeerConfigBuilder setExcludeTableCFsMap(Map<TableName,List<String>> excludeTableCFsMap)
ReplicationPeerConfigBuilder
ReplicationPeerConfigBuilder.setTableCFsMap(Map)
. Invoking this method is
only relevant when all user tables are being replicated.setExcludeTableCFsMap
in interface ReplicationPeerConfigBuilder
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.this
.public ReplicationPeerConfigBuilder setExcludeNamespaces(Set<String> excludeNamespaces)
ReplicationPeerConfigBuilder
ReplicationPeerConfigBuilder.setNamespaces(Set)
. Invoking this method is only relevant when all user tables are
being replicated.setExcludeNamespaces
in interface ReplicationPeerConfigBuilder
excludeNamespaces
- A set of namespaces whose tables should not be replicated.this
public ReplicationPeerConfigBuilder setBandwidth(long bandwidth)
ReplicationPeerConfigBuilder
setBandwidth
in interface ReplicationPeerConfigBuilder
bandwidth
- Bytes per secondthis
.public ReplicationPeerConfigBuilder setSerial(boolean serial)
ReplicationPeerConfigBuilder
Sets whether we should preserve order when replicating, i.e, serial replication.
Default false
.
setSerial
in interface ReplicationPeerConfigBuilder
serial
- true
means preserve order, otherwise false
.this
public ReplicationPeerConfig build()
ReplicationPeerConfigBuilder
this
.build
in interface ReplicationPeerConfigBuilder
ReplicationPeerConfig
instance.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.