public class TestSnapshotFromMaster extends Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.hadoop.fs.Path |
archiveDir |
private static int |
blockingStoreFiles |
private static long |
cacheRefreshPeriod |
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.fs.FileSystem |
fs |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.hbase.master.HMaster |
master |
private static int |
NUM_RS |
private static org.apache.hadoop.fs.Path |
rootDir |
private static org.apache.hadoop.hbase.TableName |
TABLE_NAME |
private static byte[] |
TEST_FAM |
private static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestSnapshotFromMaster() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanupTest() |
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
createSnapshot(String snapshotName) |
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
createSnapshotWithTtl(String snapshotName,
long ttl) |
private static void |
ensureHFileCleanersRun()
Make sure the
HFileCleaners run at least once |
private Collection<String> |
getHFiles(org.apache.hadoop.fs.Path dir,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.hbase.TableName tableName) |
void |
setup() |
static void |
setupCluster()
Setup the config for the cluster
|
private static void |
setupConf(org.apache.hadoop.conf.Configuration conf) |
void |
tearDown() |
void |
testAsyncSnapshotWillNotBlockSnapshotHFileCleaner() |
void |
testDeleteSnapshot() |
void |
testGetCompletedSnapshots() |
void |
testGetCompletedSnapshotsWithCleanup() |
void |
testGetCompletedSnapshotsWithoutCleanup() |
void |
testIsDoneContract()
Test that the contract from the master for checking on a snapshot are valid.
|
void |
testSnapshotCleanupStatus() |
void |
testSnapshotHFileArchiving()
Test that the snapshot hfile archive cleaner works correctly.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private static final int NUM_RS
private static org.apache.hadoop.fs.Path rootDir
private static org.apache.hadoop.fs.FileSystem fs
private static org.apache.hadoop.hbase.master.HMaster master
private static org.apache.hadoop.fs.Path archiveDir
private static final byte[] TEST_FAM
private static final org.apache.hadoop.hbase.TableName TABLE_NAME
private static final long cacheRefreshPeriod
private static final int blockingStoreFiles
public TestSnapshotFromMaster()
public static void setupCluster() throws Exception
Exception
private static void setupConf(org.apache.hadoop.conf.Configuration conf)
public static void cleanupTest() throws Exception
Exception
public void testIsDoneContract() throws Exception
Exception
public void testGetCompletedSnapshots() throws Exception
Exception
public void testDeleteSnapshot() throws Exception
Exception
public void testGetCompletedSnapshotsWithCleanup() throws Exception
Exception
public void testGetCompletedSnapshotsWithoutCleanup() throws Exception
Exception
public void testSnapshotCleanupStatus() throws Exception
Exception
public void testSnapshotHFileArchiving() throws Exception
Exception
- on failureprivate final Collection<String> getHFiles(org.apache.hadoop.fs.Path dir, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
- on expected failureprivate static void ensureHFileCleanersRun()
HFileCleaners
run at least onceprivate org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription createSnapshot(String snapshotName) throws IOException
IOException
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription createSnapshotWithTtl(String snapshotName, long ttl) throws IOException
IOException
public void testAsyncSnapshotWillNotBlockSnapshotHFileCleaner() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.