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, ...


Nested Class Summary
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
 
Constructor Summary
SnapshotInfo()
           
 
Method Summary
static SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf, 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 SnapshotInfo.SnapshotStats getSnapshotStats(org.apache.hadoop.conf.Configuration conf,
                                                          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

main

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


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.