Class ReplicationUtils
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationUtils
Helper class for replication.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic intgetAdaptiveTimeout(int initialValue, int retries) Get the adaptive timeout value when performing a retrystatic org.apache.hadoop.fs.PathgetPeerRemoteWALDir(String remoteWALDir, String peerId) static org.apache.hadoop.fs.PathgetPeerRemoteWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.PathgetPeerReplayWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.PathgetPeerSnapshotWALDir(String remoteWALDir, String peerId) static org.apache.hadoop.fs.PathgetPeerSnapshotWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) static org.apache.hadoop.fs.FileSystemgetRemoteWALFileSystem(org.apache.hadoop.conf.Configuration conf, String remoteWALDir) 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 booleansleepForRetries(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 
sleepMultiplieris <maxRetriesMultiplier 
 - 
getAdaptiveTimeout
Get the adaptive timeout value when performing a retry 
 -