Package org.apache.hadoop.hbase.snapshot
Class SnapshotTestingUtils.SnapshotMock.SnapshotBuilder
java.lang.Object
org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils.SnapshotMock.SnapshotBuilder
- Enclosing class:
- SnapshotTestingUtils.SnapshotMock
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationprivate final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescriptionprivate final org.apache.hadoop.fs.FileSystemprivate final org.apache.hadoop.hbase.client.TableDescriptorprivate final org.apache.hadoop.fs.Pathprivate org.apache.hadoop.fs.Pathprivate intprivate final SnapshotTestingUtils.SnapshotMock.RegionData[] -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotBuilder(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.client.TableDescriptor htd, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, SnapshotTestingUtils.SnapshotMock.RegionData[] tableRegions) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.Path[]private org.apache.hadoop.fs.Path[]addRegion(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) org.apache.hadoop.fs.Path[]org.apache.hadoop.fs.Path[]org.apache.hadoop.fs.Pathcommit()voidvoidCorrupt data-manifest fileprivate voidcorruptFile(org.apache.hadoop.fs.Path p) voidCorrupt one region-manifest fileorg.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescriptionorg.apache.hadoop.fs.Pathorg.apache.hadoop.hbase.client.TableDescriptorvoid
-
Field Details
-
tableRegions
-
desc
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc -
htd
-
conf
-
fs
-
rootDir
-
snapshotDir
-
snapshotted
-
-
Constructor Details
-
SnapshotBuilder
public SnapshotBuilder(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.client.TableDescriptor htd, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, SnapshotTestingUtils.SnapshotMock.RegionData[] tableRegions) throws IOException - Throws:
IOException
-
-
Method Details
-
getTableDescriptor
-
getSnapshotDescription
public org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription getSnapshotDescription() -
getSnapshotsDir
-
addRegion
- Throws:
IOException
-
addRegionV1
- Throws:
IOException
-
addRegionV2
- Throws:
IOException
-
addRegion
private org.apache.hadoop.fs.Path[] addRegion(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) throws IOException - Throws:
IOException
-
corruptFile
- Throws:
IOException
-
corruptOneRegionManifest
Corrupt one region-manifest file- Throws:
IOException- on unexecpted error from the FS
-
missOneRegionSnapshotFile
- Throws:
IOException
-
corruptDataManifest
Corrupt data-manifest file- Throws:
IOException- on unexecpted error from the FS
-
commit
- Throws:
IOException
-
consolidate
- Throws:
IOException
-