|
||||||||||
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.SnapshotVisitor
|
static interface |
SnapshotReferenceUtil.StoreFileVisitor
|
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Method Summary | |
---|---|
static void |
concurrentVisitReferencedFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
SnapshotManifest manifest,
SnapshotReferenceUtil.StoreFileVisitor visitor)
|
static Set<String> |
getHFileNames(org.apache.hadoop.conf.Configuration conf,
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 void |
verifySnapshot(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
HBaseProtos.SnapshotDescription snapshotDesc)
Verify the validity of the snapshot |
static void |
verifySnapshot(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
SnapshotManifest manifest)
Verify the validity of 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 |
visitReferencedFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
HBaseProtos.SnapshotDescription desc,
SnapshotReferenceUtil.SnapshotVisitor visitor)
Iterate over the snapshot store files, restored.edits and logs |
static void |
visitReferencedFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
SnapshotReferenceUtil.SnapshotVisitor visitor)
Iterate over the snapshot store files, restored.edits and logs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
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 void visitReferencedFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir, SnapshotReferenceUtil.SnapshotVisitor visitor) throws IOException
conf
- The current Configuration
instance.fs
- FileSystem
snapshotDir
- Path
to the Snapshot directoryvisitor
- callback object to get the referenced files
IOException
- if an error occurred while scanning the directorypublic static void visitReferencedFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir, HBaseProtos.SnapshotDescription desc, SnapshotReferenceUtil.SnapshotVisitor visitor) throws IOException
conf
- The current Configuration
instance.fs
- FileSystem
snapshotDir
- Path
to the Snapshot directorydesc
- the HBaseProtos.SnapshotDescription
of the snapshot to verifyvisitor
- callback object to get the referenced files
IOException
- if an error occurred while scanning the directorypublic static void visitLogFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir, FSVisitor.LogFileVisitor visitor) throws IOException
fs
- FileSystem
snapshotDir
- Path
to the Snapshot directoryvisitor
- callback object to get the log files
IOException
- if an error occurred while scanning the directorypublic static void verifySnapshot(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir, HBaseProtos.SnapshotDescription snapshotDesc) throws IOException
conf
- The current Configuration
instance.fs
- FileSystem
snapshotDir
- Path
to the Snapshot directory of the snapshot to verifysnapshotDesc
- the HBaseProtos.SnapshotDescription
of the snapshot to verify
CorruptedSnapshotException
- if the snapshot is corrupted
IOException
- if an error occurred while scanning the directorypublic static void verifySnapshot(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, SnapshotManifest manifest) throws IOException
conf
- The current Configuration
instance.fs
- FileSystem
manifest
- snapshot manifest to inspect
CorruptedSnapshotException
- if the snapshot is corrupted
IOException
- if an error occurred while scanning the directorypublic static void concurrentVisitReferencedFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, SnapshotManifest manifest, SnapshotReferenceUtil.StoreFileVisitor visitor) throws IOException
IOException
public static Set<String> getHFileNames(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir) throws IOException
conf
- The current Configuration
instance.fs
- FileSystem
snapshotDir
- Path
to the Snapshot directory
IOException
- if an error occurred while scanning the directorypublic static Set<String> getHLogNames(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir) throws IOException
fs
- FileSystem
snapshotDir
- 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 |