Class TestCleanerChore
java.lang.Object
org.apache.hadoop.hbase.master.cleaner.TestCleanerChore
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final org.slf4j.Loggerprivate static org.apache.hadoop.hbase.master.cleaner.DirScanPoolprivate static org.apache.hadoop.hbase.ChoreServiceprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanup()private voidcreateFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) voidstatic voidsetup()voidWhile 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.voidvoidvoidvoidTest to make sure that we don't attempt to ask the delegate whether or not we should preserve a directory.voidvoidThe cleaner runs in a loop, where it first checks to see all the files under a directory can be deleted.voidvoidvoidvoidvoidvoid
-
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
-