Package org.apache.hadoop.hbase.snapshot
Class TestRestoreFlushSnapshotFromClient
java.lang.Object
org.apache.hadoop.hbase.snapshot.TestRestoreFlushSnapshotFromClient
- Direct Known Subclasses:
TestMobRestoreFlushSnapshotFromClient
Test clone/restore snapshots from the client TODO This is essentially a clone of
TestRestoreSnapshotFromClient. This is worth refactoring this because there will be a few more
flavors of snapshots that need to run these tests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Adminstatic final HBaseClassTestRuleprotected final byte[]private static final org.slf4j.Loggerprotected intprotected intprotected Stringprotected Stringprotected Stringprotected org.apache.hadoop.hbase.TableNameprotected static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcountRows(org.apache.hadoop.hbase.client.Table table, byte[]... families) protected voidprivate voidvoidsetup()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) voidtearDown()static voidvoidvoidprivate voidtestCloneSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, int snapshotRows) voidvoidvoidprotected voidverifyRowCount(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName, long expectedRows)
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
FAMILY
-
snapshotName0
-
snapshotName1
-
snapshotName2
-
snapshot0Rows
-
snapshot1Rows
-
tableName
-
admin
-
-
Constructor Details
-
TestRestoreFlushSnapshotFromClient
public TestRestoreFlushSnapshotFromClient()
-
-
Method Details
-
setupCluster
- Throws:
Exception
-
setupConf
-
tearDownAfterClass
- Throws:
Exception
-
createTable
- 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
-
tearDown
- Throws:
Exception
-
testTakeFlushSnapshot
- Throws:
IOException
-
testRestoreSnapshot
- Throws:
IOException
-
testCloneNonExistentSnapshot
- Throws:
IOExceptionInterruptedException
-
testCloneSnapshot
- Throws:
IOExceptionInterruptedException
-
testCloneSnapshot
private void testCloneSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, int snapshotRows) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
testRestoreSnapshotOfCloned
- Throws:
IOExceptionInterruptedException
-
logFSTree
- Throws:
IOException
-
verifyRowCount
protected void verifyRowCount(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName, long expectedRows) throws IOException - Throws:
IOException
-
countRows
protected int countRows(org.apache.hadoop.hbase.client.Table table, byte[]... families) throws IOException - Throws:
IOException
-