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
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configuration
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription
private final org.apache.hadoop.fs.FileSystem
private final org.apache.hadoop.hbase.client.TableDescriptor
private final org.apache.hadoop.fs.Path
private org.apache.hadoop.fs.Path
private int
private final SnapshotTestingUtils.SnapshotMock.RegionData[]
-
Constructor Summary
ConstructorDescriptionSnapshotBuilder
(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.Path
commit()
void
void
Corrupt data-manifest fileprivate void
corruptFile
(org.apache.hadoop.fs.Path p) void
Corrupt one region-manifest fileorg.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription
org.apache.hadoop.fs.Path
org.apache.hadoop.hbase.client.TableDescriptor
void
-
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
-