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
FieldsModifier and TypeFieldDescriptionprotected static org.apache.hadoop.hbase.client.Adminstatic final HBaseClassTestRuleprivate static final org.slf4j.Loggerintprotected static final intprotected static final Stringprotected static final org.apache.hadoop.hbase.TableNameprotected static Stringprotected static final byte[]protected static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddata()protected intvoidsetup()static voidSetup the config for the clusterprivate static voidsetupConf(org.apache.hadoop.conf.Configuration conf) private voidtakeSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean disabled) voidtearDown()voidvoidTest snapshotting a table that is offlinevoidvoidvoidvoidTests 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:
IOExceptionInterruptedException
-
testRestoreEnabledSnapshot
- Throws:
IOExceptionInterruptedException
-
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
-