public class TestChecksum extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TestChecksum.CorruptedFSReaderImpl
This class is to test checksum behavior when data is corrupted.
|
Modifier and Type | Field and Description |
---|---|
(package private) static int[] |
BYTES_PER_CHECKSUM |
static HBaseClassTestRule |
CLASS_RULE |
(package private) static org.apache.hadoop.hbase.io.compress.Compression.Algorithm[] |
COMPRESSION_ALGORITHMS |
private org.apache.hadoop.fs.FileSystem |
fs |
private org.apache.hadoop.hbase.fs.HFileSystem |
hfs |
private static org.slf4j.Logger |
LOG |
private static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestChecksum() |
Modifier and Type | Method and Description |
---|---|
void |
setUp() |
void |
testAllChecksumTypes()
Test all checksum types by writing and reading back blocks.
|
void |
testChecksumChunks()
Test different values of bytesPerChecksum
|
void |
testChecksumCorruption()
Introduce checksum failures and check that we can still read
the data
|
protected void |
testChecksumCorruptionInternals(boolean useTags) |
protected void |
testChecksumInternals(boolean useTags) |
void |
testNewBlocksHaveDefaultChecksum() |
private void |
validateData(DataInputStream in) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
static final org.apache.hadoop.hbase.io.compress.Compression.Algorithm[] COMPRESSION_ALGORITHMS
static final int[] BYTES_PER_CHECKSUM
private static final HBaseTestingUtility TEST_UTIL
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.hbase.fs.HFileSystem hfs
public TestChecksum()
public void testNewBlocksHaveDefaultChecksum() throws IOException
IOException
public void testAllChecksumTypes() throws IOException
IOException
public void testChecksumCorruption() throws IOException
IOException
protected void testChecksumCorruptionInternals(boolean useTags) throws IOException
IOException
public void testChecksumChunks() throws IOException
IOException
protected void testChecksumInternals(boolean useTags) throws IOException
IOException
private void validateData(DataInputStream in) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.