Class TestWALInputFormat
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestWALInputFormat
@Tag("org.apache.hadoop.hbase.testclassification.MapReduceTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestWALInputFormat
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<org.apache.hadoop.mapreduce.InputSplit>getSplitsForEmptyFile(boolean ignoreEmptyFiles) private static booleanisKept(org.apache.hadoop.fs.FileSystem fs, long created, long mtime, long start, long end) private static booleanisKept(org.apache.hadoop.fs.FileSystem fs, long created, long staleMtime, long refreshedMtime, long start, long end) static voidvoidTest the primitive start/end time filtering.voidThe name of a WAL carries its creation time, which only bounds its entries from below.voidvoidvoidvoidTest that an empty WAL file (which causes WALHeaderEOFException) is gracefully handled and skipped rather than causing the job to fail.
-
Field Details
-
TEST_UTIL
-
-
Constructor Details
-
TestWALInputFormat
public TestWALInputFormat()
-
-
Method Details
-
setupClass
- Throws:
Exception
-
testAddFile
Test the primitive start/end time filtering. -
isKept
private static boolean isKept(org.apache.hadoop.fs.FileSystem fs, long created, long mtime, long start, long end) -
isKept
private static boolean isKept(org.apache.hadoop.fs.FileSystem fs, long created, long staleMtime, long refreshedMtime, long start, long end) -
testAddFileUsesModificationTimeOfClosedFilesOnly
The name of a WAL carries its creation time, which only bounds its entries from below. A WAL stays open until it rolls, so one created before startTime can still hold entries in range. Only a closed file has a final modification time that can rule it out.- Throws:
Exception
-
testHandlesArchivedWALFiles
- Throws:
Exception
-
testEmptyFileIsIgnoredWhenConfigured
- Throws:
IOExceptionInterruptedException
-
testEmptyFileIsIncludedWhenNotIgnored
- Throws:
IOExceptionInterruptedException
-
getSplitsForEmptyFile
private List<org.apache.hadoop.mapreduce.InputSplit> getSplitsForEmptyFile(boolean ignoreEmptyFiles) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
testHandlesEmptyWALFile
Test that an empty WAL file (which causes WALHeaderEOFException) is gracefully handled and skipped rather than causing the job to fail.- Throws:
Exception
-