public class TestHFileArchiving extends Object
HFileArchiver
correctly removes all the parts of a region when cleaning up
a regionModifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static byte[] |
TEST_FAM |
private static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestHFileArchiving() |
Modifier and Type | Method and Description |
---|---|
private void |
assertArchiveFiles(org.apache.hadoop.fs.FileSystem fs,
List<String> storeFiles,
long timeout) |
static void |
cleanupTest() |
private void |
clearArchiveDirectory() |
private List<String> |
getAllFileNames(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path archiveDir)
Get the names of all the files below the given directory
|
private List<String> |
recurseOnFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus[] files,
List<String> fileNames)
Recursively lookup all the file names under the file[] array
|
static void |
setupCluster()
Setup the config for the cluster
|
private static void |
setupConf(org.apache.hadoop.conf.Configuration conf) |
void |
tearDown() |
void |
testArchiveOnTableDelete() |
void |
testArchiveOnTableFamilyDelete()
Test that the store files are archived when a column family is removed.
|
void |
testCleaningRace()
Test HFileArchiver.resolveAndArchive() race condition HBASE-7643
|
void |
testDeleteRegionWithNoStoreFiles()
Test that the region directory is removed when we archive a region without store files, but
still has hidden files.
|
void |
testRemovesRegionDirOnArchive() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private static final byte[] TEST_FAM
public org.junit.rules.TestName name
public TestHFileArchiving()
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 testRemovesRegionDirOnArchive() throws Exception
Exception
public void testDeleteRegionWithNoStoreFiles() throws Exception
Exception
public void testArchiveOnTableDelete() throws Exception
Exception
private void assertArchiveFiles(org.apache.hadoop.fs.FileSystem fs, List<String> storeFiles, long timeout) throws IOException
IOException
public void testArchiveOnTableFamilyDelete() throws Exception
Exception
public void testCleaningRace() throws Exception
Exception
private void clearArchiveDirectory() throws IOException
IOException
private List<String> getAllFileNames(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path archiveDir) throws IOException
fs
- archiveDir
- IOException
private List<String> recurseOnFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus[] files, List<String> fileNames) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.