public class TestSnapshotTemporaryDirectory extends Object
This is an end-to-end test for the snapshot utility
Modifier and Type | Field and Description |
---|---|
protected static org.apache.hadoop.hbase.client.Admin |
admin |
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
int |
manifestVersion |
protected static int |
NUM_RS |
protected static String |
STRING_TABLE_NAME |
protected static org.apache.hadoop.hbase.TableName |
TABLE_NAME |
protected static String |
TEMP_DIR |
protected static byte[] |
TEST_FAM |
protected static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestSnapshotTemporaryDirectory() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanupTest() |
static Iterable<Integer> |
data() |
protected int |
getNumReplicas() |
void |
setup() |
static void |
setupCluster()
Setup the config for the cluster
|
private 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 |
testEnsureTemporaryDirectoryTransfer() |
void |
testOfflineTableSnapshot()
Test snapshotting a table that is offline
|
void |
testOfflineTableSnapshotWithEmptyRegion() |
void |
testRestoreDisabledSnapshot() |
void |
testRestoreEnabledSnapshot() |
void |
testSnapshotCloneContents()
Tests that snapshot has correct contents by taking snapshot, cloning it, then affirming the
contents of the original and cloned table match
|
public static final HBaseClassTestRule CLASS_RULE
public int manifestVersion
private static final org.slf4j.Logger LOG
protected static final int NUM_RS
protected static org.apache.hadoop.hbase.client.Admin admin
protected static final HBaseTestingUtility UTIL
protected static final String STRING_TABLE_NAME
protected static final byte[] TEST_FAM
protected static final org.apache.hadoop.hbase.TableName TABLE_NAME
public TestSnapshotTemporaryDirectory()
public static void setupCluster() throws Exception
Exception
- on failureprivate static void setupConf(org.apache.hadoop.conf.Configuration conf)
protected int getNumReplicas()
public static void cleanupTest()
public void testRestoreDisabledSnapshot() throws IOException, InterruptedException
IOException
InterruptedException
public void testRestoreEnabledSnapshot() throws IOException, InterruptedException
IOException
InterruptedException
public void testOfflineTableSnapshot() throws Exception
Exception
- if snapshot does not complete successfullypublic void testSnapshotCloneContents() throws Exception
Exception
- if snapshot does not complete successfullypublic void testOfflineTableSnapshotWithEmptyRegion() throws Exception
Exception
public void testEnsureTemporaryDirectoryTransfer() throws Exception
Exception
private void takeSnapshot(org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean disabled) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.