Class ReplicationSyncUp
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.replication.regionserver.ReplicationSyncUp
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
@Private
public class ReplicationSyncUp
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
In a scenario of Replication based Disaster/Recovery, when hbase Master-Cluster crashes, this
tool is used to sync-up the delta from Master to Slave using the info from ZooKeeper. The tool
will run on Master-Cluster, and assume ZK, Filesystem and NetWork still available after hbase
crashes
hbase org.apache.hadoop.hbase.replication.regionserver.ReplicationSyncUp
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddMissingReplicationQueues(ReplicationQueueStorage storage, Set<ServerName> regionServers, Set<String> peerIds) private voidaddMissingReplicationQueues(ReplicationQueueStorage storage, ServerName regionServer, Set<String> peerIds) private voidclaimReplicationQueues(ReplicationSourceManager mgr, Set<ServerName> regionServers) private Set<ServerName>listRegionServers(org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walDir) static voidMain programprivate static booleanprivate static voidprintUsage(String message) private static voidprintUsageAndExit(String message, int exitCode) intprivate voidwriteInfoFile(org.apache.hadoop.fs.FileSystem fs, boolean isForce) Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
INFO_DIR
- See Also:
-
INFO_FILE
- See Also:
-
SLEEP_TIME
- See Also:
-
-
Constructor Details
-
ReplicationSyncUp
public ReplicationSyncUp()
-
-
Method Details
-
main
Main program- Throws:
Exception
-
listRegionServers
private Set<ServerName> listRegionServers(org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walDir) throws IOException - Throws:
IOException
-
addMissingReplicationQueues
private void addMissingReplicationQueues(ReplicationQueueStorage storage, ServerName regionServer, Set<String> peerIds) throws ReplicationException - Throws:
ReplicationException
-
addMissingReplicationQueues
private void addMissingReplicationQueues(ReplicationQueueStorage storage, Set<ServerName> regionServers, Set<String> peerIds) throws ReplicationException - Throws:
ReplicationException
-
claimReplicationQueues
private void claimReplicationQueues(ReplicationSourceManager mgr, Set<ServerName> regionServers) throws ReplicationException, org.apache.zookeeper.KeeperException, IOException - Throws:
ReplicationExceptionorg.apache.zookeeper.KeeperExceptionIOException
-
writeInfoFile
- Throws:
IOException
-
parseOpts
-
printUsageAndExit
-
printUsage
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-