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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprotected static org.apache.hadoop.conf.Configurationprotected static org.apache.hadoop.fs.FileSystemprotected static final org.slf4j.Loggerprotected static final longprotected static org.apache.hadoop.fs.Pathprotected static org.apache.hadoop.fs.Pathprotected static final HBaseTestingUtilityprotected static org.apache.hadoop.fs.Pathprotected static org.apache.hadoop.fs.FileSystem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate static booleanprivate voidcreateAndTestSnapshot(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 voidcreateAndTestSnapshotV2(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 voidprivate org.apache.hadoop.fs.FileStatusmockStoreFile(String storeFileName) static voidstatic voidvoidvoidvoidvoidvoid
-
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
-