|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil
@InterfaceAudience.Private public final class SnapshotReferenceUtil
Utility methods for interacting with the snapshot referenced files.
| Nested Class Summary | |
|---|---|
static interface |
SnapshotReferenceUtil.FileVisitor
|
| Method Summary | |
|---|---|
static Set<String> |
getHFileNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
Returns the store file names in the snapshot. |
static Set<String> |
getHLogNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
Returns the log file names available in the snapshot. |
static org.apache.hadoop.fs.Path |
getLogsDir(org.apache.hadoop.fs.Path snapshotDir,
String serverName)
Get log directory for a server in a snapshot. |
static org.apache.hadoop.fs.Path |
getRecoveredEdits(org.apache.hadoop.fs.Path snapshotDir,
String regionName,
String logfile)
Get the snapshot recovered.edits file |
static org.apache.hadoop.fs.Path |
getRecoveredEditsDir(org.apache.hadoop.fs.Path snapshotDir,
String regionName)
Get the snapshotted recovered.edits dir for the specified region. |
static Map<String,List<String>> |
getRegionHFileReferences(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotRegionDir)
Get the list of hfiles for the specified snapshot region. |
static Set<String> |
getSnapshotRegionNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
Returns the set of region names available in the snapshot. |
static void |
visitLogFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.LogFileVisitor visitor)
Iterate over the snapshot log files |
static void |
visitRecoveredEdits(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.RecoveredEditsVisitor visitor)
Iterate over the snapshot recovered.edits |
static void |
visitReferencedFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
SnapshotReferenceUtil.FileVisitor visitor)
Iterate over the snapshot store files, restored.edits and logs |
static void |
visitRegionStoreFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path regionDir,
FSVisitor.StoreFileVisitor visitor)
Iterate over the snapshot store files in the specified region |
static void |
visitTableStoreFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.StoreFileVisitor visitor)
Iterate over the snapshot store files |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static org.apache.hadoop.fs.Path getLogsDir(org.apache.hadoop.fs.Path snapshotDir,
String serverName)
snapshotDir - directory where the specific snapshot is storedserverName - name of the parent regionserver for the log files
public static org.apache.hadoop.fs.Path getRecoveredEditsDir(org.apache.hadoop.fs.Path snapshotDir,
String regionName)
snapshotDir - directory where the specific snapshot is storedregionName - name of the region
public static org.apache.hadoop.fs.Path getRecoveredEdits(org.apache.hadoop.fs.Path snapshotDir,
String regionName,
String logfile)
snapshotDir - directory where the specific snapshot is storedregionName - name of the regionlogfile - name of the edit file
public static void visitReferencedFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
SnapshotReferenceUtil.FileVisitor visitor)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the referenced files
IOException - if an error occurred while scanning the directory
public static void visitTableStoreFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.StoreFileVisitor visitor)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the store files
IOException - if an error occurred while scanning the directory
public static void visitRegionStoreFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path regionDir,
FSVisitor.StoreFileVisitor visitor)
throws IOException
fs - FileSystemregionDir - Path to the Snapshot region directoryvisitor - callback object to get the store files
IOException - if an error occurred while scanning the directory
public static void visitRecoveredEdits(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.RecoveredEditsVisitor visitor)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the recovered.edits files
IOException - if an error occurred while scanning the directory
public static void visitLogFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
FSVisitor.LogFileVisitor visitor)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the log files
IOException - if an error occurred while scanning the directory
public static Set<String> getSnapshotRegionNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directory
IOException - if an error occurred while scanning the directory
public static Map<String,List<String>> getRegionHFileReferences(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotRegionDir)
throws IOException
fs - FileSystemsnapshotRegionDir - Path to the Snapshot region directory
IOException - if an error occurred while scanning the directory
public static Set<String> getHFileNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directory
IOException - if an error occurred while scanning the directory
public static Set<String> getHLogNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directory
IOException - if an error occurred while scanning the directory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||