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
Modifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Admin
static final HBaseClassTestRule
protected final byte[]
private static final org.slf4j.Logger
protected int
protected int
protected String
protected String
protected String
protected org.apache.hadoop.hbase.TableName
protected static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
countRows
(org.apache.hadoop.hbase.client.Table table, byte[]... families) protected void
private void
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) void
tearDown()
static void
void
void
private void
testCloneSnapshot
(org.apache.hadoop.hbase.TableName tableName, String snapshotName, int snapshotRows) void
void
void
protected void
verifyRowCount
(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:
IOException
InterruptedException
-
testCloneSnapshot
- Throws:
IOException
InterruptedException
-
testCloneSnapshot
private void testCloneSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, int snapshotRows) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
testRestoreSnapshotOfCloned
- Throws:
IOException
InterruptedException
-
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
-