public class TestFlushSnapshotFromClient
extends java.lang.Object
This is an end-to-end test for the snapshot utility TODO This is essentially a clone of TestSnapshotFromClient. This is worth refactoring this because there will be a few more flavors of snapshots that need to run these tests.
| Modifier and Type | Field and Description |
|---|---|
protected int |
DEFAULT_NUM_ROWS |
protected static int |
NUM_RS |
protected static TableName |
TABLE_NAME |
protected static byte[] |
TEST_FAM |
protected static HBaseTestingUtility |
UTIL |
| Constructor and Description |
|---|
TestFlushSnapshotFromClient() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanupTest() |
protected int |
countRows(Table table,
byte[]... families) |
protected void |
createTable() |
void |
setup() |
static void |
setupCluster() |
protected static void |
setupConf(Configuration conf) |
void |
tearDown() |
void |
testAsyncFlushSnapshot() |
void |
testConcurrentSnapshottingAttempts()
Demonstrate that we reject snapshot requests if there is a snapshot already running on the
same table currently running and that concurrent snapshots on different tables can both
succeed concurretly.
|
void |
testFlushCreateListDestroy()
Basic end-to-end test of simple-flush-based snapshots
|
void |
testFlushTableSnapshot()
Test simple flush snapshotting a table that is online
|
void |
testFlushTableSnapshotWithProcedure()
Test simple flush snapshotting a table that is online
|
void |
testSkipFlushTableSnapshot()
Test snapshotting a table that is online without flushing
|
void |
testSnapshotFailsOnNonExistantTable() |
void |
testSnapshotStateAfterMerge() |
void |
testTakeSnapshotAfterMerge() |
protected void |
verifyRowCount(HBaseTestingUtility util,
TableName tableName,
long expectedRows) |
protected static final HBaseTestingUtility UTIL
protected static final int NUM_RS
protected static final byte[] TEST_FAM
protected static final TableName TABLE_NAME
protected final int DEFAULT_NUM_ROWS
public static void setupCluster()
throws java.lang.Exception
java.lang.Exceptionprotected static void setupConf(Configuration conf)
public void setup()
throws java.lang.Exception
java.lang.Exceptionprotected void createTable()
throws java.lang.Exception
java.lang.Exceptionpublic void tearDown()
throws java.lang.Exception
java.lang.Exceptionpublic static void cleanupTest()
throws java.lang.Exception
java.lang.Exceptionpublic void testFlushTableSnapshot()
throws java.lang.Exception
java.lang.Exceptionpublic void testSkipFlushTableSnapshot()
throws java.lang.Exception
java.lang.Exceptionpublic void testFlushTableSnapshotWithProcedure()
throws java.lang.Exception
java.lang.Exceptionpublic void testSnapshotFailsOnNonExistantTable()
throws java.lang.Exception
java.lang.Exceptionpublic void testAsyncFlushSnapshot()
throws java.lang.Exception
java.lang.Exceptionpublic void testSnapshotStateAfterMerge()
throws java.lang.Exception
java.lang.Exceptionpublic void testTakeSnapshotAfterMerge()
throws java.lang.Exception
java.lang.Exceptionpublic void testFlushCreateListDestroy()
throws java.lang.Exception
java.lang.Exceptionpublic void testConcurrentSnapshottingAttempts()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionprotected void verifyRowCount(HBaseTestingUtility util,
TableName tableName,
long expectedRows)
throws java.io.IOException
java.io.IOExceptionprotected int countRows(Table table,
byte[]... families)
throws java.io.IOException
java.io.IOException