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). In the new version, we
reimplemented the DumpReplicationQueues tool to support obtaining information from replication
table.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate longprivate org.apache.hbase.thirdparty.com.google.common.util.concurrent.AtomicLongMap<String>private long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondumpQueues(Connection connection, Set<String> peerIds, boolean hdfs, org.apache.hadoop.conf.Configuration conf) private intdumpReplicationViaTable(Connection connection, org.apache.hadoop.conf.Configuration conf) private StringformatQueue(ServerName regionServer, Map<String, ReplicationGroupOffset> offsets, List<String> wals, ReplicationQueueId queueId, boolean isDeleted, boolean hdfs) private longgetTotalWALSize(org.apache.hadoop.fs.FileSystem fs, List<String> wals, ServerName server) return total size in bytes from a list of WALsstatic voidMain(package private) static DumpReplicationQueues.DumpOptionsprotected voidprotected static voidprintUsage(String message) protected static voidprintUsage(String className, String message) protected static voidprintUsageAndExit(String message, int exitCode) intMethods 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
-
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:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
printUsage
-
printUsage
-
printUsage
-
printUsageAndExit
-
dumpReplicationQueues
- Throws:
Exception
-
dumpReplicationViaTable
public String dumpReplicationViaTable(Connection connection, org.apache.hadoop.conf.Configuration conf) throws ReplicationException, IOException - Throws:
ReplicationExceptionIOException
-
dumpReplicationSummary
-
dumpPeersState
- Throws:
Exception
-
dumpQueues
public String dumpQueues(Connection connection, Set<String> peerIds, boolean hdfs, org.apache.hadoop.conf.Configuration conf) throws Exception - Throws:
Exception
-
formatQueue
private String formatQueue(ServerName regionServer, Map<String, ReplicationGroupOffset> offsets, List<String> wals, ReplicationQueueId queueId, boolean isDeleted, boolean hdfs) throws Exception- Throws:
Exception
-
getTotalWALSize
private long getTotalWALSize(org.apache.hadoop.fs.FileSystem fs, List<String> wals, ServerName server) return total size in bytes from a list of WALs
-