public class TestHFileArchiving extends Object
HFileArchiver correctly removes all the parts of a region when cleaning up
 a region| Modifier 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
Exceptionprivate static void setupConf(org.apache.hadoop.conf.Configuration conf)
public static void cleanupTest() throws Exception
Exceptionpublic void testRemovesRegionDirOnArchive() throws Exception
Exceptionpublic void testDeleteRegionWithNoStoreFiles() throws Exception
Exceptionpublic void testArchiveOnTableDelete() throws Exception
Exceptionprivate void assertArchiveFiles(org.apache.hadoop.fs.FileSystem fs, List<String> storeFiles, long timeout) throws IOException
IOExceptionpublic void testArchiveOnTableFamilyDelete() throws Exception
Exceptionpublic void testCleaningRace() throws Exception
Exceptionprivate void clearArchiveDirectory() throws IOException
IOExceptionprivate List<String> getAllFileNames(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path archiveDir) throws IOException
fs - archiveDir - IOExceptionprivate List<String> recurseOnFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus[] files, List<String> fileNames) throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.