Class TestSnapshotFileCache
java.lang.Object
org.apache.hadoop.hbase.master.snapshot.TestSnapshotFileCache
- Direct Known Subclasses:
TestSnapshotFileCacheWithDifferentWorkingDir
Test that we correctly reload the cache, filter directories, etc.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
protected static org.apache.hadoop.conf.Configuration
protected static org.apache.hadoop.fs.FileSystem
protected static final org.slf4j.Logger
protected static final long
protected static org.apache.hadoop.fs.Path
protected static org.apache.hadoop.fs.Path
protected static final HBaseTestingUtility
protected static org.apache.hadoop.fs.Path
protected static org.apache.hadoop.fs.FileSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private static boolean
private void
createAndTestSnapshot
(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder, boolean tmp, boolean removeOnExit, boolean setFolderTime) createAndTestSnapshotV1
(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit, boolean setFolderTime) private void
createAndTestSnapshotV2
(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit, boolean setFolderTime) 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>
protected static void
private org.apache.hadoop.fs.FileStatus
mockStoreFile
(String storeFileName) static void
static void
void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
PERIOD
- See Also:
-
fs
-
rootDir
-
snapshotDir
-
conf
-
workingFs
-
workingDir
-
-
Constructor Details
-
TestSnapshotFileCache
public TestSnapshotFileCache()
-
-
Method Details
-
initCommon
- Throws:
Exception
-
startCluster
- Throws:
Exception
-
stopCluster
- Throws:
Exception
-
cleanupFiles
- Throws:
Exception
-
testLoadAndDelete
- Throws:
IOException
-
testReloadModifiedDirectory
- Throws:
IOException
-
testSnapshotTempDirReload
- Throws:
IOException
-
testCacheUpdatedWhenLastModifiedOfSnapDirNotUpdated
- Throws:
IOException
-
testWeNeverCacheTmpDirAndLoadIt
- Throws:
Exception
-
getStoreFilesForSnapshot
private List<org.apache.hadoop.fs.FileStatus> getStoreFilesForSnapshot(SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder) throws IOException - Throws:
IOException
-
mockStoreFile
-
createAndTestSnapshotV1
private SnapshotTestingUtils.SnapshotMock.SnapshotBuilder createAndTestSnapshotV1(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit, boolean setFolderTime) throws IOException - Throws:
IOException
-
createAndTestSnapshotV2
private void createAndTestSnapshotV2(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, String name, boolean tmp, boolean removeOnExit, boolean setFolderTime) throws IOException - Throws:
IOException
-
createAndTestSnapshot
private void createAndTestSnapshot(org.apache.hadoop.hbase.master.snapshot.SnapshotFileCache cache, SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder, boolean tmp, boolean removeOnExit, boolean setFolderTime) throws IOException - Throws:
IOException
-
contains
-
getNonSnapshotFiles
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 - Throws:
IOException
-