@InterfaceAudience.Private public final class SnapshotReferenceUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SnapshotReferenceUtil.SnapshotVisitor |
static interface |
SnapshotReferenceUtil.StoreFileVisitor |
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
LOG |
| Modifier | Constructor and Description |
|---|---|
private |
SnapshotReferenceUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
private static Set<String> |
getHFileNames(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshotDesc)
Returns the store file names 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 Set<String> |
getWALNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir)
Returns the log file names available in the snapshot.
|
static void |
verifySnapshot(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.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
|
private static void |
verifyStoreFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
HRegionInfo regionInfo,
String family,
org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile)
Verify the validity of the snapshot store file
|
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,
org.apache.hadoop.hbase.protobuf.generated.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
|
(package private) static void |
visitRegionStoreFiles(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest,
SnapshotReferenceUtil.StoreFileVisitor visitor)
Iterate over the snapshot store files in the specified region
|
(package private) static void |
visitTableStoreFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc,
SnapshotReferenceUtil.StoreFileVisitor visitor)
©
Iterate over the snapshot store files
|
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 filespublic 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 - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the referenced filesIOException - 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,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc,
SnapshotReferenceUtil.SnapshotVisitor visitor)
throws IOException
conf - The current Configuration instance.fs - FileSystemsnapshotDir - Path to the Snapshot directorydesc - the HBaseProtos.SnapshotDescription of the snapshot to verifyvisitor - callback object to get the referenced filesIOException - if an error occurred while scanning the directorystatic void visitTableStoreFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc,
SnapshotReferenceUtil.StoreFileVisitor visitor)
throws IOException
conf - The current Configuration instance.fs - FileSystemsnapshotDir - Path to the Snapshot directorydesc - the HBaseProtos.SnapshotDescription of the snapshot to verifyvisitor - callback object to get the store filesIOException - if an error occurred while scanning the directorystatic void visitRegionStoreFiles(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest,
SnapshotReferenceUtil.StoreFileVisitor visitor)
throws IOException
manifest - snapshot manifest to inspectvisitor - callback object to get the store filesIOException - 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 - FileSystemsnapshotDir - Path to the Snapshot directoryvisitor - callback object to get the log filesIOException - 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,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshotDesc)
throws IOException
conf - The current Configuration instance.fs - FileSystemsnapshotDir - Path to the Snapshot directory of the snapshot to verifysnapshotDesc - the HBaseProtos.SnapshotDescription of the snapshot to verifyCorruptedSnapshotException - if the snapshot is corruptedIOException - 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 - FileSystemmanifest - snapshot manifest to inspectCorruptedSnapshotException - if the snapshot is corruptedIOException - 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
IOExceptionprivate static void verifyStoreFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path snapshotDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
HRegionInfo regionInfo,
String family,
org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile)
throws IOException
conf - The current Configuration instance.fs - FileSystemsnapshotDir - Path to the Snapshot directory of the snapshot to verifysnapshot - the HBaseProtos.SnapshotDescription of the snapshot to verifyregionInfo - HRegionInfo of the region that contains the store filefamily - family that contains the store filestoreFile - the store file to verifyCorruptedSnapshotException - if the snapshot is corruptedIOException - if an error occurred while scanning the directorypublic 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 - FileSystemsnapshotDir - Path to the Snapshot directoryIOException - if an error occurred while scanning the directoryprivate static Set<String> getHFileNames(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshotDesc) throws IOException
conf - The current Configuration instance.fs - FileSystemsnapshotDir - Path to the Snapshot directorysnapshotDesc - the HBaseProtos.SnapshotDescription of the snapshot to inspectIOException - if an error occurred while scanning the directorypublic static Set<String> getWALNames(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path snapshotDir) throws IOException
fs - FileSystemsnapshotDir - Path to the Snapshot directoryIOException - if an error occurred while scanning the directoryCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.