Class DumpReplicationQueues
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.replication.regionserver.DumpReplicationQueues
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
@Private
public class DumpReplicationQueues
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Provides information about the existing states of replication, replication peers and queues.
Usage: hbase org.apache.hadoop.hbase.replication.regionserver.DumpReplicationQueues [args]
Arguments: --distributed Polls each RS to dump information about the queue --hdfs Reports HDFS
usage by the replication queues (note: can be overestimated).
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
private static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private long
private org.apache.hbase.thirdparty.com.google.common.util.concurrent.AtomicLongMap<String>
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondumpQueues
(ZKWatcher zkw, Set<String> peerIds, boolean hdfs) private int
private String
formatQueue
(ServerName regionserver, ReplicationQueueStorage queueStorage, ReplicationQueueInfo queueInfo, String queueId, List<String> wals, boolean isDeleted, boolean hdfs) private long
getTotalWALSize
(org.apache.hadoop.fs.FileSystem fs, List<String> wals, ServerName server) return total size in bytes from a list of WALsstatic void
Main(package private) static DumpReplicationQueues.DumpOptions
protected void
protected static void
printUsage
(String message) protected static void
printUsage
(String className, String message) protected static void
printUsageAndExit
(String message, int exitCode) int
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
deadRegionServers
-
deletedQueues
-
peersQueueSize
private org.apache.hbase.thirdparty.com.google.common.util.concurrent.AtomicLongMap<String> peersQueueSize -
totalSizeOfWALs
-
numWalsNotFound
-
-
Constructor Details
-
DumpReplicationQueues
public DumpReplicationQueues()
-
-
Method Details
-
parseOpts
-
main
Main- Throws:
Exception
-
run
- Specified by:
run
in interfaceorg.apache.hadoop.util.Tool
- Throws:
Exception
-
printUsage
-
printUsage
-
printUsage
-
printUsageAndExit
-
dumpReplicationQueues
- Throws:
Exception
-
dumpReplicationSummary
-
dumpPeersState
- Throws:
Exception
-
dumpQueues
- Throws:
Exception
-
formatQueue
private String formatQueue(ServerName regionserver, ReplicationQueueStorage queueStorage, ReplicationQueueInfo queueInfo, String queueId, List<String> wals, boolean isDeleted, boolean hdfs) throws Exception - Throws:
Exception
-
getTotalWALSize
private long getTotalWALSize(org.apache.hadoop.fs.FileSystem fs, List<String> wals, ServerName server) throws IOException return total size in bytes from a list of WALs- Throws:
IOException
-