@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
|
AbstractHBaseTool.OptionsOrderComparatorcmdLineArgs, 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() |
int |
doWork() |
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,
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDesc,
Map<org.apache.hadoop.fs.Path,Integer> filesMap)
Returns the snapshot stats
|
static void |
main(String[] args) |
protected org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLineParser |
newParser() |
protected void |
printUsage() |
protected void |
processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) |
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, parseArgs, parseInt, parseLong, printUsage, processOldArgs, run, setConfpublic int doWork()
throws IOException,
InterruptedException
doWork in class AbstractHBaseToolIOExceptionInterruptedExceptionprotected void addOptions()
addOptions in class AbstractHBaseToolprotected org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLineParser newParser()
newParser in class AbstractHBaseToolprotected void processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
processOptions 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, org.apache.hadoop.hbase.shaded.protobuf.generated.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–2020 The Apache Software Foundation. All rights reserved.