| Modifier and Type | Field and Description |
|---|---|
private static org.apache.hadoop.hbase.io.hfile.CacheConfig |
cacheConf |
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.conf.Configuration |
conf |
private static org.apache.hadoop.fs.FileSystem |
fs |
private static String |
localFormatter |
private static org.slf4j.Logger |
LOG |
private int |
minBlockSize |
private static int |
NUM_VALID_KEY_TYPES |
private static String |
ROOT_DIR |
private static HBaseTestingUtility |
TEST_UTIL |
org.junit.rules.TestName |
testName |
| Constructor and Description |
|---|
TestHFile() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
basicWithSomeCodec(String codec,
boolean useTags)
test none codecs
|
private org.apache.hadoop.fs.FSDataOutputStream |
createFSOutput(org.apache.hadoop.fs.Path name) |
static org.apache.hadoop.hbase.io.hfile.HFile.Reader |
createReaderFromStream(org.apache.hadoop.hbase.io.hfile.ReaderContext context,
org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf,
org.apache.hadoop.conf.Configuration conf) |
private void |
fillByteBuffAllocator(org.apache.hadoop.hbase.io.ByteBuffAllocator alloc,
int bufCount) |
static org.apache.hadoop.hbase.KeyValue.Type |
generateKeyType(Random rand) |
private byte[] |
getSomeKey(int rowId) |
private org.apache.hadoop.hbase.io.ByteBuffAllocator |
initAllocator(boolean reservoirEnabled,
int bufSize,
int bufCount,
int minAllocSize) |
private org.apache.hadoop.hbase.io.hfile.BlockCache |
initCombinedBlockCache() |
private void |
metablocks(String compress) |
private void |
readAllRecords(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner) |
private int |
readAndCheckbytes(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner,
int start,
int n) |
private void |
readNumMetablocks(org.apache.hadoop.hbase.io.hfile.HFile.Reader reader,
int n) |
private void |
readStoreFile(org.apache.hadoop.fs.Path storeFilePath,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.io.ByteBuffAllocator alloc) |
static void |
setUp() |
private void |
someReadingWithMetaBlock(org.apache.hadoop.hbase.io.hfile.HFile.Reader reader) |
private void |
someTestingWithMetaBlock(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer) |
void |
testCompressionOrdinance()
Make sure the ordinals for our compression algorithms do not change on us.
|
void |
testCorrupt0LengthHFile()
Create 0-length hfile and show that it fails
|
void |
testCorruptOutOfOrderHFileWrite() |
void |
testCorruptTruncatedHFile()
Create a truncated hfile and verify that exception thrown.
|
void |
testDBEShipped() |
void |
testEmptyHFile()
Test empty HFile.
|
void |
testGetShortMidpoint() |
protected void |
testHFilefeaturesInternals(boolean useTags) |
void |
testMetaBlocks() |
void |
testNullMetaBlocks() |
void |
testReaderWithCombinedBlockCache()
Test case for HBASE-22127 in CombinedBlockCache
|
void |
testReaderWithLRUBlockCache()
Test case for HBASE-22127 in LruBlockCache.
|
void |
testReaderWithoutBlockCache() |
void |
testShortMidpointSameQual() |
void |
testTFileFeatures() |
static void |
truncateFile(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
private void |
writeNumMetablocks(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer,
int n) |
private void |
writeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer,
boolean useTags) |
private int |
writeSomeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer,
int start,
int n,
boolean useTags) |
private org.apache.hadoop.fs.Path |
writeStoreFile() |
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName testName
private static final org.slf4j.Logger LOG
private static final int NUM_VALID_KEY_TYPES
private static final HBaseTestingUtility TEST_UTIL
private final int minBlockSize
private static String localFormatter
private static org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf
private static org.apache.hadoop.conf.Configuration conf
private static org.apache.hadoop.fs.FileSystem fs
public TestHFile()
public static org.apache.hadoop.hbase.io.hfile.HFile.Reader createReaderFromStream(org.apache.hadoop.hbase.io.hfile.ReaderContext context, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf, org.apache.hadoop.conf.Configuration conf) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.io.ByteBuffAllocator initAllocator(boolean reservoirEnabled, int bufSize, int bufCount, int minAllocSize)
private void fillByteBuffAllocator(org.apache.hadoop.hbase.io.ByteBuffAllocator alloc, int bufCount)
public void testReaderWithoutBlockCache() throws Exception
Exceptionpublic void testReaderWithLRUBlockCache() throws Exception
Exceptionprivate org.apache.hadoop.hbase.io.hfile.BlockCache initCombinedBlockCache()
public void testReaderWithCombinedBlockCache() throws Exception
Exceptionprivate void readStoreFile(org.apache.hadoop.fs.Path storeFilePath, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.ByteBuffAllocator alloc) throws Exception
Exceptionprivate org.apache.hadoop.fs.Path writeStoreFile() throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.KeyValue.Type generateKeyType(Random rand)
public void testEmptyHFile() throws IOException
IOExceptionpublic void testCorrupt0LengthHFile() throws IOException
IOExceptionpublic void testCorruptOutOfOrderHFileWrite() throws IOException
IOExceptionpublic static void truncateFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
IOExceptionpublic void testCorruptTruncatedHFile() throws IOException
IOExceptionprivate int writeSomeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, int start, int n, boolean useTags) throws IOException
IOExceptionprivate void readAllRecords(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner) throws IOException
IOExceptionprivate int readAndCheckbytes(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int start, int n) throws IOException
IOExceptionprivate byte[] getSomeKey(int rowId)
private void writeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, boolean useTags) throws IOException
IOExceptionprivate org.apache.hadoop.fs.FSDataOutputStream createFSOutput(org.apache.hadoop.fs.Path name) throws IOException
IOExceptionvoid basicWithSomeCodec(String codec, boolean useTags) throws IOException
useTags - IOExceptionpublic void testTFileFeatures() throws IOException
IOExceptionprotected void testHFilefeaturesInternals(boolean useTags) throws IOException
IOExceptionprivate void writeNumMetablocks(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, int n)
private void someTestingWithMetaBlock(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer)
private void readNumMetablocks(org.apache.hadoop.hbase.io.hfile.HFile.Reader reader, int n) throws IOException
IOExceptionprivate void someReadingWithMetaBlock(org.apache.hadoop.hbase.io.hfile.HFile.Reader reader) throws IOException
IOExceptionprivate void metablocks(String compress) throws Exception
Exceptionpublic void testMetaBlocks() throws Exception
Exceptionpublic void testNullMetaBlocks() throws Exception
Exceptionpublic void testCompressionOrdinance()
public void testShortMidpointSameQual()
public void testGetShortMidpoint()
public void testDBEShipped() throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.