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
Nested ClassesModifier and TypeClassDescriptionstatic classEnables writing and rewriting portions of the file backing anHFileBlock.static classReads blocks off of anTestHFileBlockHeaderCorruption.HFileBlockChannelPositionIterator, counting them as it does.static classData class to enabled messing with the bytes behind anHFileBlock.static classA simplified wrapper over anHFileBlock.BlockIteratorthat looks a lot like anIterator.static classprivate static final classA Matcher implementation that can make basic assertions over a providedThrowable. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate final TestHFileBlockHeaderCorruption.HFileTestRuleprivate static final org.slf4j.Loggerfinal org.junit.rules.RuleChain -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidlogHeader(org.apache.hadoop.hbase.nio.ByteBuff buf) voidvoid
-
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
-