Package org.apache.hadoop.hbase.client
Class TestSnapshotTemporaryDirectory
java.lang.Object
org.apache.hadoop.hbase.client.TestSnapshotTemporaryDirectory
- Direct Known Subclasses:
TestSnapshotDFSTemporaryDirectory
,TestSnapshotTemporaryDirectoryWithRegionReplicas
This class tests that the use of a temporary snapshot directory supports snapshot functionality
while the temporary directory is on a different file system than the root directory
This is an end-to-end test for the snapshot utility
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.apache.hadoop.hbase.client.Admin
static final HBaseClassTestRule
private static final org.slf4j.Logger
int
protected static final int
protected static final String
protected static final org.apache.hadoop.hbase.TableName
protected static String
protected static final byte[]
protected static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
data()
protected int
void
setup()
static void
Setup the config for the clusterprivate static void
setupConf
(org.apache.hadoop.conf.Configuration conf) private void
takeSnapshot
(org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean disabled) void
tearDown()
void
void
Test snapshotting a table that is offlinevoid
void
void
void
Tests that snapshot has correct contents by taking snapshot, cloning it, then affirming the contents of the original and cloned table match
-
Field Details
-
CLASS_RULE
-
manifestVersion
-
LOG
-
NUM_RS
- See Also:
-
TEMP_DIR
-
admin
-
UTIL
-
STRING_TABLE_NAME
- See Also:
-
TEST_FAM
-
TABLE_NAME
-
-
Constructor Details
-
TestSnapshotTemporaryDirectory
public TestSnapshotTemporaryDirectory()
-
-
Method Details
-
data
-
setupCluster
Setup the config for the cluster- Throws:
Exception
- on failure
-
setupConf
-
setup
- Throws:
Exception
-
getNumReplicas
-
tearDown
- Throws:
Exception
-
cleanupTest
-
testRestoreDisabledSnapshot
- Throws:
IOException
InterruptedException
-
testRestoreEnabledSnapshot
- Throws:
IOException
InterruptedException
-
testOfflineTableSnapshot
Test snapshotting a table that is offline- Throws:
Exception
- if snapshot does not complete successfully
-
testSnapshotCloneContents
Tests that snapshot has correct contents by taking snapshot, cloning it, then affirming the contents of the original and cloned table match- Throws:
Exception
- if snapshot does not complete successfully
-
testOfflineTableSnapshotWithEmptyRegion
- Throws:
Exception
-
testEnsureTemporaryDirectoryTransfer
- Throws:
Exception
-
takeSnapshot
private void takeSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean disabled) throws IOException - Throws:
IOException
-