Class ReplicationUtils
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationUtils
Helper class for replication.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(ReplicationPeerConfig peerConfig, TableName tableName) Deprecated.Will be removed in HBase 3.static intgetAdaptiveTimeout(int initialValue, int retries) Get the adaptive timeout value when performing a retrystatic org.apache.hadoop.conf.ConfigurationgetPeerClusterConfiguration(ReplicationPeerConfig peerConfig, org.apache.hadoop.conf.Configuration baseConf) private static booleanisCollectionEqual(Collection<String> c1, Collection<String> c2) static booleanprivate static booleanisNamespacesEqual(Set<String> ns1, Set<String> ns2) static booleanisReplicationForBulkLoadDataEnabled(org.apache.hadoop.conf.Configuration c) private static booleanstatic voidremoveAllQueues(ReplicationQueueStorage queueStorage, String peerId)
-
Constructor Details
-
ReplicationUtils
private ReplicationUtils()
-
-
Method Details
-
getPeerClusterConfiguration
public static org.apache.hadoop.conf.Configuration getPeerClusterConfiguration(ReplicationPeerConfig peerConfig, org.apache.hadoop.conf.Configuration baseConf) throws ReplicationException - Throws:
ReplicationException
-
removeAllQueues
public static void removeAllQueues(ReplicationQueueStorage queueStorage, String peerId) throws ReplicationException - Throws:
ReplicationException
-
isCollectionEqual
-
isNamespacesEqual
-
isTableCFsEqual
-
isNamespacesAndTableCFsEqual
public static boolean isNamespacesAndTableCFsEqual(ReplicationPeerConfig rpc1, ReplicationPeerConfig rpc2) -
isReplicationForBulkLoadDataEnabled
- Parameters:
c- Configuration to look at- Returns:
- True if replication for bulk load data is enabled.
-
contains
Deprecated.Will be removed in HBase 3. UseReplicationPeerConfig.needToReplicate(TableName)instead.- Parameters:
peerConfig- configuration for the replication peer clustertableName- name of the table- Returns:
- true if the table need replicate to the peer cluster
-
getAdaptiveTimeout
Get the adaptive timeout value when performing a retry
-