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
Modifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Admin
protected byte[]
protected final byte[]
org.junit.rules.TestName
protected int
protected int
protected byte[]
protected byte[]
protected byte[]
protected org.apache.hadoop.hbase.TableName
protected final byte[]
protected static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
countRows
(org.apache.hadoop.hbase.client.Table table, byte[]... families) protected void
protected int
protected final String
void
setup()
Initialize the tests with a table filled with some data and two snapshots (snapshotName0, snapshotName1) of different states.static void
protected static void
setupConf
(org.apache.hadoop.conf.Configuration conf) protected final void
splitRegion
(org.apache.hadoop.hbase.client.RegionInfo regionInfo) void
tearDown()
static void
protected void
verifyRowCount
(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
-