Class TestRegionSnapshotTask

java.lang.Object
org.apache.hadoop.hbase.snapshot.TestRegionSnapshotTask

public class TestRegionSnapshotTask extends Object
Testing the region snapshot task on a cluster.
See Also:
  • FlushSnapshotSubprocedure.RegionSnapshotTask
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    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
     
    void
    Tests adding a region to the snapshot manifest while compactions are running on the region.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • setupBeforeClass

      public static void setupBeforeClass() throws Exception
      Throws:
      Exception
    • tearDown

      public static void tearDown() throws Exception
      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