org.apache.hadoop.hbase.snapshot
Class SnapshotInfo

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.snapshot.SnapshotInfo
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

@InterfaceAudience.Public
@InterfaceStability.Evolving
public final class SnapshotInfo
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

Tool for dumping snapshot information.

  1. Table Descriptor
  2. Snapshot creation time, type, format version, ...
  3. List of hfiles and hlogs
  4. Stats about hfiles and logs sizes, percentage of shared with the source table, ...


Constructor Summary
SnapshotInfo()
           
 
Method Summary
static List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getSnapshotList(org.apache.hadoop.conf.Configuration conf)
          Returns the list of available snapshots in the specified location
static org.apache.hadoop.hbase.snapshot.SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
          Returns the snapshot stats
static void main(String[] args)
           
 int run(String[] args)
           
 
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
 

Constructor Detail

SnapshotInfo

public SnapshotInfo()
Method Detail

run

public int run(String[] args)
        throws IOException,
               InterruptedException
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
IOException
InterruptedException

getSnapshotStats

public static org.apache.hadoop.hbase.snapshot.SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf,
                                                                                           org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                                                                                    throws IOException
Returns the snapshot stats

Parameters:
conf - the Configuration to use
snapshot - HBaseProtos.SnapshotDescription to get stats from
Returns:
the snapshot stats
Throws:
IOException

getSnapshotList

public static List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getSnapshotList(org.apache.hadoop.conf.Configuration conf)
                                                                                                        throws IOException
Returns the list of available snapshots in the specified location

Parameters:
conf - the Configuration to use
Returns:
the list of snapshots
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2015 The Apache Software Foundation. All rights reserved.