public static class SnapshotTestingUtils.SnapshotMock.SnapshotBuilder extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
desc |
private org.apache.hadoop.fs.FileSystem |
fs |
private org.apache.hadoop.hbase.client.TableDescriptor |
htd |
private org.apache.hadoop.fs.Path |
rootDir |
private org.apache.hadoop.fs.Path |
snapshotDir |
private int |
snapshotted |
private SnapshotTestingUtils.SnapshotMock.RegionData[] |
tableRegions |
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.fs.Path[] |
addRegion() |
private org.apache.hadoop.fs.Path[] |
addRegion(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) |
org.apache.hadoop.fs.Path[] |
addRegionV1() |
org.apache.hadoop.fs.Path[] |
addRegionV2() |
org.apache.hadoop.fs.Path |
commit() |
void |
consolidate() |
void |
corruptDataManifest()
Corrupt data-manifest file
|
private void |
corruptFile(org.apache.hadoop.fs.Path p) |
void |
corruptOneRegionManifest()
Corrupt one region-manifest file
|
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
getSnapshotDescription() |
org.apache.hadoop.fs.Path |
getSnapshotsDir() |
org.apache.hadoop.hbase.client.TableDescriptor |
getTableDescriptor() |
void |
missOneRegionSnapshotFile() |
private final SnapshotTestingUtils.SnapshotMock.RegionData[] tableRegions
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc
private final org.apache.hadoop.hbase.client.TableDescriptor htd
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.fs.FileSystem fs
private final org.apache.hadoop.fs.Path rootDir
private org.apache.hadoop.fs.Path snapshotDir
private int snapshotted
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
IOException
public org.apache.hadoop.hbase.client.TableDescriptor getTableDescriptor()
public org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription getSnapshotDescription()
public org.apache.hadoop.fs.Path getSnapshotsDir()
public org.apache.hadoop.fs.Path[] addRegion() throws IOException
IOException
public org.apache.hadoop.fs.Path[] addRegionV1() throws IOException
IOException
public org.apache.hadoop.fs.Path[] addRegionV2() throws IOException
IOException
private org.apache.hadoop.fs.Path[] addRegion(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) throws IOException
IOException
private void corruptFile(org.apache.hadoop.fs.Path p) throws IOException
IOException
public void corruptOneRegionManifest() throws IOException
IOException
- on unexecpted error from the FSpublic void missOneRegionSnapshotFile() throws IOException
IOException
public void corruptDataManifest() throws IOException
IOException
- on unexecpted error from the FSpublic org.apache.hadoop.fs.Path commit() throws IOException
IOException
public void consolidate() throws IOException
IOException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.