@InterfaceAudience.Public public final class SnapshotInfo extends AbstractHBaseTool
| Modifier and Type | Class and Description |
|---|---|
static class |
SnapshotInfo.SnapshotStats
Statistics about the snapshot
How many store files and logs are in the archive
How many store files and logs are shared with the table
Total store files and logs size and shared amount
|
cmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION| Constructor and Description |
|---|
SnapshotInfo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOptions()
Override this to add command-line options using
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods. |
int |
doWork()
The "main function" of the tool
|
static List<SnapshotDescription> |
getSnapshotList(org.apache.hadoop.conf.Configuration conf)
Returns the list of available snapshots in the specified location
|
static Map<org.apache.hadoop.fs.Path,Integer> |
getSnapshotsFilesMap(org.apache.hadoop.conf.Configuration conf,
AtomicLong uniqueHFilesArchiveSize,
AtomicLong uniqueHFilesSize,
AtomicLong uniqueHFilesMobSize)
Returns the map of store files based on path for all snapshots
|
static SnapshotInfo.SnapshotStats |
getSnapshotStats(org.apache.hadoop.conf.Configuration conf,
SnapshotDescription snapshot)
Returns the snapshot stats
|
static SnapshotInfo.SnapshotStats |
getSnapshotStats(org.apache.hadoop.conf.Configuration conf,
SnapshotProtos.SnapshotDescription snapshotDesc,
Map<org.apache.hadoop.fs.Path,Integer> filesMap)
Returns the snapshot stats
|
static void |
main(String[] args) |
protected void |
printUsage() |
protected void |
processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
This method is called to process the options after they have been parsed.
|
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, getOptionAsDouble, getOptionAsInt, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, processOldArgs, run, setConfpublic int doWork()
throws IOException,
InterruptedException
AbstractHBaseTooldoWork in class AbstractHBaseToolIOExceptionInterruptedExceptionprotected void addOptions()
AbstractHBaseToolAbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods.addOptions in class AbstractHBaseToolprotected void processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
AbstractHBaseToolprocessOptions in class AbstractHBaseToolprotected void printUsage()
printUsage in class AbstractHBaseToolpublic static SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf, SnapshotDescription snapshot) throws IOException
conf - the Configuration to usesnapshot - SnapshotDescription to get stats fromIOExceptionpublic static SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf, SnapshotProtos.SnapshotDescription snapshotDesc, Map<org.apache.hadoop.fs.Path,Integer> filesMap) throws IOException
conf - the Configuration to usesnapshotDesc - HBaseProtos.SnapshotDescription to get stats fromfilesMap - Map store files map for all snapshots, it may be nullIOExceptionpublic static List<SnapshotDescription> getSnapshotList(org.apache.hadoop.conf.Configuration conf) throws IOException
conf - the Configuration to useIOExceptionpublic static Map<org.apache.hadoop.fs.Path,Integer> getSnapshotsFilesMap(org.apache.hadoop.conf.Configuration conf, AtomicLong uniqueHFilesArchiveSize, AtomicLong uniqueHFilesSize, AtomicLong uniqueHFilesMobSize) throws IOException
conf - the Configuration to useuniqueHFilesArchiveSize - pass out the size for store files in archiveuniqueHFilesSize - pass out the size for store files shareduniqueHFilesMobSize - pass out the size for mob store files sharedIOExceptionpublic static void main(String[] args)
Copyright © 2007–2019 Cloudera. All rights reserved.