Class TestCleanerChore
java.lang.Object
org.apache.hadoop.hbase.master.cleaner.TestCleanerChore
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
static class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
private static org.apache.hadoop.hbase.master.cleaner.DirScanPool
private static org.apache.hadoop.hbase.ChoreService
private static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanup()
private void
createFiles
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) void
static void
setup()
void
While cleaning a directory, all the files in the directory may be deleted, but there may be another file added, in which case the directory shouldn't be deleted.void
void
void
void
Test to make sure that we don't attempt to ask the delegate whether or not we should preserve a directory.void
void
The cleaner runs in a loop, where it first checks to see all the files under a directory can be deleted.void
void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
POOL
-
SERVICE
-
-
Constructor Details
-
TestCleanerChore
public TestCleanerChore()
-
-
Method Details
-
setup
-
cleanup
- Throws:
Exception
-
testSavesFilesOnRequest
- Throws:
Exception
-
retriesIOExceptionInStatus
- Throws:
Exception
-
testDeletesEmptyDirectories
- Throws:
Exception
-
testDoesNotCheckDirectories
Test to make sure that we don't attempt to ask the delegate whether or not we should preserve a directory.- Throws:
Exception
- on failure
-
testStoppedCleanerDoesNotDeleteFiles
- Throws:
Exception
-
testCleanerDoesNotDeleteDirectoryWithLateAddedFiles
While cleaning a directory, all the files in the directory may be deleted, but there may be another file added, in which case the directory shouldn't be deleted.- Throws:
IOException
- on failure
-
testNoExceptionFromDirectoryWithRacyChildren
The cleaner runs in a loop, where it first checks to see all the files under a directory can be deleted. If they all can, then we try to delete the directory. However, a file may be added that directory to after the original check. This ensures that we don't accidentally delete that directory on and don't get spurious IOExceptions.This was from HBASE-7465.
- Throws:
Exception
- on failure
-
testDeleteFileWithCleanerEnabled
- Throws:
Exception
-
testDeleteFileWithCleanerDisabled
- Throws:
Exception
-
testOnConfigurationChange
- Throws:
Exception
-
testOnConfigurationChangeLogCleaner
- Throws:
Exception
-
testMinimumNumberOfThreads
- Throws:
Exception
-
testTriggerCleaner
- Throws:
Exception
-
testRescheduleNoConcurrencyRun
- Throws:
Exception
-
createFiles
private void createFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) throws IOException - Throws:
IOException
-