Class ReplicationUtils
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationUtils
Helper class for replication.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getAdaptiveTimeout
(int initialValue, int retries) Get the adaptive timeout value when performing a retrystatic org.apache.hadoop.fs.Path
getPeerRemoteWALDir
(String remoteWALDir, String peerId) static org.apache.hadoop.fs.Path
getPeerRemoteWALDir
(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.Path
getPeerReplayWALDir
(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.Path
getPeerSnapshotWALDir
(String remoteWALDir, String peerId) static org.apache.hadoop.fs.Path
getPeerSnapshotWALDir
(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.FileSystem
getRemoteWALFileSystem
(org.apache.hadoop.conf.Configuration conf, String remoteWALDir) 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 boolean
sleepForRetries
(String msg, long sleepForRetries, int sleepMultiplier, int maxRetriesMultiplier) Do the sleeping logic
-
Field Details
-
LOG
-
REPLICATION_ATTR_NAME
- See Also:
-
REMOTE_WAL_DIR_NAME
- See Also:
-
SYNC_WAL_SUFFIX
- See Also:
-
REMOTE_WAL_REPLAY_SUFFIX
- See Also:
-
REMOTE_WAL_SNAPSHOT_SUFFIX
- See Also:
-
RENAME_WAL_SUFFIX
- See Also:
-
LEGACY_REGION_REPLICATION_ENDPOINT_NAME
- See Also:
-
-
Constructor Details
-
ReplicationUtils
private ReplicationUtils()
-
-
Method Details
-
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.
-
getRemoteWALFileSystem
public static org.apache.hadoop.fs.FileSystem getRemoteWALFileSystem(org.apache.hadoop.conf.Configuration conf, String remoteWALDir) throws IOException - Throws:
IOException
-
getPeerRemoteWALDir
-
getPeerRemoteWALDir
public static org.apache.hadoop.fs.Path getPeerRemoteWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) -
getPeerReplayWALDir
public static org.apache.hadoop.fs.Path getPeerReplayWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) -
getPeerSnapshotWALDir
-
getPeerSnapshotWALDir
public static org.apache.hadoop.fs.Path getPeerSnapshotWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) -
sleepForRetries
public static boolean sleepForRetries(String msg, long sleepForRetries, int sleepMultiplier, int maxRetriesMultiplier) Do the sleeping logic- Parameters:
msg
- Why we sleepsleepForRetries
- the base sleep time.sleepMultiplier
- by how many times the default sleeping time is augmentedmaxRetriesMultiplier
- the max retry multiplier- Returns:
- True if
sleepMultiplier
is <maxRetriesMultiplier
-
getAdaptiveTimeout
Get the adaptive timeout value when performing a retry
-