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
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.conf.Configuration
private static org.apache.hadoop.fs.FileSystem
private final org.slf4j.Logger
private static org.apache.hadoop.fs.Path
private static HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate 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) 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) static void
private org.apache.hadoop.hbase.client.Table
setupTable
(org.apache.hadoop.hbase.TableName tableName) static void
tearDown()
void
Tests 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
-