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
Modifier and TypeClassDescription(package 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
(Connection connection, Set<String> peerIds, boolean hdfs, org.apache.hadoop.conf.Configuration conf) private int
dumpReplicationViaTable
(Connection connection, org.apache.hadoop.conf.Configuration conf) private String
formatQueue
(ServerName regionServer, Map<String, ReplicationGroupOffset> offsets, List<String> wals, ReplicationQueueId queueId, 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
-
dumpReplicationViaTable
public String dumpReplicationViaTable(Connection connection, org.apache.hadoop.conf.Configuration conf) throws ReplicationException, IOException - Throws:
ReplicationException
IOException
-
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
-