Package org.apache.hadoop.hbase.client
Class RestoreSnapshotFromClientTestBase
java.lang.Object
org.apache.hadoop.hbase.client.RestoreSnapshotFromClientTestBase
- Direct Known Subclasses:
RestoreSnapshotFromClientAfterSplittingRegionsTestBase,RestoreSnapshotFromClientAfterTruncateTestBase,RestoreSnapshotFromClientCloneTestBase,RestoreSnapshotFromClientGetCompactionStateTestBase,RestoreSnapshotFromClientSchemaChangeTestBase,RestoreSnapshotFromClientSimpleTestBase
Base class for testing restore snapshot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Adminprotected byte[]protected final byte[]org.junit.rules.TestNameprotected intprotected intprotected byte[]protected byte[]protected byte[]protected org.apache.hadoop.hbase.TableNameprotected final byte[]protected static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcountRows(org.apache.hadoop.hbase.client.Table table, byte[]... families) protected voidprotected intprotected final Stringvoidsetup()Initialize the tests with a table filled with some data and two snapshots (snapshotName0, snapshotName1) of different states.static voidprotected static voidsetupConf(org.apache.hadoop.conf.Configuration conf) protected final voidsplitRegion(org.apache.hadoop.hbase.client.RegionInfo regionInfo) voidtearDown()static voidprotected voidverifyRowCount(HBaseTestingUtility util, org.apache.hadoop.hbase.TableName tableName, long expectedRows)
-
Field Details
-
TEST_UTIL
-
FAMILY
-
TEST_FAMILY2
-
tableName
-
emptySnapshot
-
snapshotName0
-
snapshotName1
-
snapshotName2
-
snapshot0Rows
-
snapshot1Rows
-
admin
-
name
-
-
Constructor Details
-
RestoreSnapshotFromClientTestBase
public RestoreSnapshotFromClientTestBase()
-
-
Method Details
-
setupCluster
- Throws:
Exception
-
setupConf
-
tearDownAfterClass
- Throws:
Exception
-
setup
Initialize the tests with a table filled with some data and two snapshots (snapshotName0, snapshotName1) of different states. The tableName, snapshotNames and the number of rows in the snapshot are initialized.- Throws:
Exception
-
createTable
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
getNumReplicas
-
countRows
protected int countRows(org.apache.hadoop.hbase.client.Table table, byte[]... families) throws IOException - Throws:
IOException
-
verifyRowCount
protected void verifyRowCount(HBaseTestingUtility util, org.apache.hadoop.hbase.TableName tableName, long expectedRows) throws IOException - Throws:
IOException
-
splitRegion
protected final void splitRegion(org.apache.hadoop.hbase.client.RegionInfo regionInfo) throws IOException - Throws:
IOException
-
getValidMethodName
-