Package org.apache.hadoop.hbase.snapshot
Class TestRegionSnapshotTask
java.lang.Object
org.apache.hadoop.hbase.snapshot.TestRegionSnapshotTask
Testing the region snapshot task on a cluster.
- See Also:
-
FlushSnapshotSubprocedure.RegionSnapshotTask
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationprivate static org.apache.hadoop.fs.FileSystemprivate final org.slf4j.Loggerprivate static org.apache.hadoop.fs.Pathprivate static HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddRegionToSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, org.apache.hadoop.hbase.regionserver.HRegion region, org.apache.hadoop.hbase.snapshot.SnapshotManifest manifest) private org.apache.hadoop.hbase.snapshot.SnapshotManifest.RegionVisitorcreateRegionVisitorWithDelay(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, org.apache.hadoop.fs.Path workingDir) static voidprivate org.apache.hadoop.hbase.client.TablesetupTable(org.apache.hadoop.hbase.TableName tableName) static voidtearDown()voidTests adding a region to the snapshot manifest while compactions are running on the region.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
conf
-
fs
-
rootDir
-
-
Constructor Details
-
TestRegionSnapshotTask
public TestRegionSnapshotTask()
-
-
Method Details
-
setupBeforeClass
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testAddRegionWithCompactions
Tests adding a region to the snapshot manifest while compactions are running on the region. The idea is to slow down the process of adding a store file to the manifest while triggering compactions on the region, allowing the store files to be marked for archival while snapshot operation is running. This test checks for the correct behavior in such a case that the compacted files should not be moved around if a snapshot operation is in progress. See HBASE-18398- Throws:
Exception
-
addRegionToSnapshot
private void addRegionToSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, org.apache.hadoop.hbase.regionserver.HRegion region, org.apache.hadoop.hbase.snapshot.SnapshotManifest manifest) throws Exception - Throws:
Exception
-
createRegionVisitorWithDelay
private org.apache.hadoop.hbase.snapshot.SnapshotManifest.RegionVisitor createRegionVisitorWithDelay(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, org.apache.hadoop.fs.Path workingDir) -
setupTable
private org.apache.hadoop.hbase.client.Table setupTable(org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-