public class TestSnapshotFileCache extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TestSnapshotFileCache.SnapshotFiles |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.fs.FileSystem |
fs |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.fs.Path |
rootDir |
private static HBaseTestingUtility |
UTIL |
| Constructor and Description |
|---|
TestSnapshotFileCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupFiles() |
private static boolean |
contains(Iterable<org.apache.hadoop.fs.FileStatus> files,
org.apache.hadoop.fs.Path filePath) |
private void |
createAndTestSnapshot(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache,
SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder,
boolean tmp,
boolean removeOnExit) |
private SnapshotTestingUtils.SnapshotMock.SnapshotBuilder |
createAndTestSnapshotV1(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache,
String name,
boolean tmp,
boolean removeOnExit) |
private void |
createAndTestSnapshotV2(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache,
String name,
boolean tmp,
boolean removeOnExit) |
private static Iterable<org.apache.hadoop.fs.FileStatus> |
getNonSnapshotFiles(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache,
org.apache.hadoop.fs.Path storeFile) |
private List<org.apache.hadoop.fs.FileStatus> |
getStoreFilesForSnapshot(SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder) |
private org.apache.hadoop.fs.FileStatus |
mockStoreFile(String storeFileName) |
static void |
startCluster() |
static void |
stopCluster() |
void |
testLoadAndDelete() |
void |
testReloadModifiedDirectory() |
void |
testSnapshotTempDirReload() |
void |
testWeNeverCacheTmpDirAndLoadIt() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private static org.apache.hadoop.fs.FileSystem fs
private static org.apache.hadoop.fs.Path rootDir
public TestSnapshotFileCache()
public static void startCluster() throws Exception
Exceptionpublic static void stopCluster() throws Exception
Exceptionpublic void cleanupFiles() throws Exception
Exceptionpublic void testLoadAndDelete() throws IOException
IOExceptionpublic void testReloadModifiedDirectory() throws IOException
IOExceptionpublic void testSnapshotTempDirReload() throws IOException
IOExceptionpublic void testWeNeverCacheTmpDirAndLoadIt() throws Exception
Exceptionprivate List<org.apache.hadoop.fs.FileStatus> getStoreFilesForSnapshot(SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder) throws IOException
IOExceptionprivate org.apache.hadoop.fs.FileStatus mockStoreFile(String storeFileName)
private SnapshotTestingUtils.SnapshotMock.SnapshotBuilder createAndTestSnapshotV1(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit) throws IOException
IOExceptionprivate void createAndTestSnapshotV2(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit) throws IOException
IOExceptionprivate void createAndTestSnapshot(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder, boolean tmp, boolean removeOnExit) throws IOException
IOExceptionprivate static boolean contains(Iterable<org.apache.hadoop.fs.FileStatus> files, org.apache.hadoop.fs.Path filePath)
private static Iterable<org.apache.hadoop.fs.FileStatus> getNonSnapshotFiles(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, org.apache.hadoop.fs.Path storeFile) throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.