org.apache.hadoop.hbase.util
Class FSVisitor

java.lang.Object
  extended by org.apache.hadoop.hbase.util.FSVisitor

@InterfaceAudience.Private
public final class FSVisitor
extends Object

Utility methods for interacting with the hbase.root file system.


Nested Class Summary
static interface FSVisitor.LogFileVisitor
           
static interface FSVisitor.RecoveredEditsVisitor
           
static interface FSVisitor.StoreFileVisitor
           
 
Method Summary
static void visitLogFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, FSVisitor.LogFileVisitor visitor)
          Iterate over hbase log files
static void visitRegionRecoveredEdits(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path regionDir, FSVisitor.RecoveredEditsVisitor visitor)
          Iterate over recovered.edits of the specified region
static void visitRegionStoreFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path regionDir, FSVisitor.StoreFileVisitor visitor)
          Iterate over the region store files
static void visitTableRecoveredEdits(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tableDir, FSVisitor.RecoveredEditsVisitor visitor)
          Iterate over each region in the table and inform about recovered.edits
static void visitTableStoreFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tableDir, FSVisitor.StoreFileVisitor visitor)
          Iterate over the table store files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

visitTableStoreFiles

public static void visitTableStoreFiles(org.apache.hadoop.fs.FileSystem fs,
                                        org.apache.hadoop.fs.Path tableDir,
                                        FSVisitor.StoreFileVisitor visitor)
                                 throws IOException
Iterate over the table store files

Parameters:
fs - FileSystem
tableDir - Path to the table directory
visitor - callback object to get the store files
Throws:
IOException - if an error occurred while scanning the directory

visitRegionStoreFiles

public static void visitRegionStoreFiles(org.apache.hadoop.fs.FileSystem fs,
                                         org.apache.hadoop.fs.Path regionDir,
                                         FSVisitor.StoreFileVisitor visitor)
                                  throws IOException
Iterate over the region store files

Parameters:
fs - FileSystem
regionDir - Path to the region directory
visitor - callback object to get the store files
Throws:
IOException - if an error occurred while scanning the directory

visitTableRecoveredEdits

public static void visitTableRecoveredEdits(org.apache.hadoop.fs.FileSystem fs,
                                            org.apache.hadoop.fs.Path tableDir,
                                            FSVisitor.RecoveredEditsVisitor visitor)
                                     throws IOException
Iterate over each region in the table and inform about recovered.edits

Parameters:
fs - FileSystem
tableDir - Path to the table directory
visitor - callback object to get the recovered.edits files
Throws:
IOException - if an error occurred while scanning the directory

visitRegionRecoveredEdits

public static void visitRegionRecoveredEdits(org.apache.hadoop.fs.FileSystem fs,
                                             org.apache.hadoop.fs.Path regionDir,
                                             FSVisitor.RecoveredEditsVisitor visitor)
                                      throws IOException
Iterate over recovered.edits of the specified region

Parameters:
fs - FileSystem
regionDir - Path to the Region directory
visitor - callback object to get the recovered.edits files
Throws:
IOException - if an error occurred while scanning the directory

visitLogFiles

public static void visitLogFiles(org.apache.hadoop.fs.FileSystem fs,
                                 org.apache.hadoop.fs.Path rootDir,
                                 FSVisitor.LogFileVisitor visitor)
                          throws IOException
Iterate over hbase log files

Parameters:
fs - FileSystem
rootDir - Path to the HBase root folder
visitor - callback object to get the log files
Throws:
IOException - if an error occurred while scanning the directory


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