Class ReplicationUtils
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationUtils
Helper class for replication.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
contains
(ReplicationPeerConfig peerConfig, TableName tableName) Deprecated.Will be removed in HBase 3.static int
getAdaptiveTimeout
(int initialValue, int retries) Get the adaptive timeout value when performing a retrystatic org.apache.hadoop.conf.Configuration
getPeerClusterConfiguration
(ReplicationPeerConfig peerConfig, org.apache.hadoop.conf.Configuration baseConf) private static boolean
isCollectionEqual
(Collection<String> c1, Collection<String> c2) static boolean
private static boolean
isNamespacesEqual
(Set<String> ns1, Set<String> ns2) static boolean
isReplicationForBulkLoadDataEnabled
(org.apache.hadoop.conf.Configuration c) private static boolean
static void
removeAllQueues
(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
-