Package org.apache.hadoop.hbase.io.hfile
Class TestHFileBlockHeaderCorruption
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestHFileBlockHeaderCorruption
This test provides coverage for HFileHeader block fields that are read and interpreted before
HBase checksum validation can be applied. As of now, this is just
onDiskSizeWithoutHeader
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Enables writing and rewriting portions of the file backing anHFileBlock
.static class
Reads blocks off of anTestHFileBlockHeaderCorruption.HFileBlockChannelPositionIterator
, counting them as it does.static class
Data class to enabled messing with the bytes behind anHFileBlock
.static class
A simplified wrapper over anHFileBlock.BlockIterator
that looks a lot like anIterator
.static class
private static final class
A Matcher implementation that can make basic assertions over a providedThrowable
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private final TestHFileBlockHeaderCorruption.HFileTestRule
private static final org.slf4j.Logger
final org.junit.rules.RuleChain
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private static void
logHeader
(org.apache.hadoop.hbase.nio.ByteBuff buf) void
void
-
Field Details
-
LOG
-
CLASS_RULE
-
hFileTestRule
-
ruleChain
-
-
Constructor Details
-
TestHFileBlockHeaderCorruption
- Throws:
IOException
-
-
Method Details
-
testOnDiskSizeWithoutHeaderCorruptionFirstBlock
- Throws:
Exception
-
testOnDiskSizeWithoutHeaderCorruptionSecondBlock
- Throws:
Exception
-
logHeader
private static void logHeader(TestHFileBlockHeaderCorruption.HFileBlockChannelPosition hbcp) throws IOException - Throws:
IOException
-
logHeader
-