@InterfaceAudience.Public public final class SnapshotInfo extends org.apache.hadoop.hbase.util.AbstractHBaseTool
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 org.apache.hadoop.hbase.snapshot.SnapshotInfo.SnapshotStats |
getSnapshotStats(org.apache.hadoop.conf.Configuration conf,
SnapshotDescription snapshot)
Returns the snapshot stats
|
static org.apache.hadoop.hbase.snapshot.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 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, setConf
public SnapshotInfo()
public int doWork() throws IOException, InterruptedException
org.apache.hadoop.hbase.util.AbstractHBaseTool
doWork
in class org.apache.hadoop.hbase.util.AbstractHBaseTool
IOException
InterruptedException
protected void addOptions()
org.apache.hadoop.hbase.util.AbstractHBaseTool
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods.addOptions
in class org.apache.hadoop.hbase.util.AbstractHBaseTool
protected void processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
org.apache.hadoop.hbase.util.AbstractHBaseTool
processOptions
in class org.apache.hadoop.hbase.util.AbstractHBaseTool
protected void printUsage()
printUsage
in class org.apache.hadoop.hbase.util.AbstractHBaseTool
public static org.apache.hadoop.hbase.snapshot.SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf, SnapshotDescription snapshot) throws IOException
conf
- the Configuration
to usesnapshot
- SnapshotDescription
to get stats fromIOException
public static org.apache.hadoop.hbase.snapshot.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 nullIOException
public static List<SnapshotDescription> getSnapshotList(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- the Configuration
to useIOException
public 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 sharedIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.