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 n
|
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 org.apache.hadoop.hbase.Cell |
getCell(byte[] row,
byte[] family,
byte[] qualifier) |
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(String l1CachePolicy) |
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() |
private void |
testReaderCombinedCache(String l1CachePolicy) |
void |
testReaderWithAdaptiveLruCombinedBlockCache()
Test case for CombinedBlockCache with AdaptiveLRU as L1 cache
|
void |
testReaderWithCombinedBlockCache()
Test case for HBASE-22127 in CombinedBlockCache
|
void |
testReaderWithLRUBlockCache()
Test case for HBASE-22127 in LruBlockCache.
|
void |
testReaderWithLruCombinedBlockCache()
Test case for CombinedBlockCache with AdaptiveLRU as L1 cache
|
void |
testReaderWithoutBlockCache() |
void |
testReaderWithTinyLfuCombinedBlockCache()
Test case for CombinedBlockCache with TinyLfu as L1 cache
|
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
IOException
private 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
Exception
public void testReaderWithLRUBlockCache() throws Exception
Exception
private org.apache.hadoop.hbase.io.hfile.BlockCache initCombinedBlockCache(String l1CachePolicy)
public void testReaderWithCombinedBlockCache() throws Exception
Exception
private void readStoreFile(org.apache.hadoop.fs.Path storeFilePath, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.ByteBuffAllocator alloc) throws Exception
Exception
private org.apache.hadoop.fs.Path writeStoreFile() throws IOException
IOException
public static org.apache.hadoop.hbase.KeyValue.Type generateKeyType(Random rand)
public void testEmptyHFile() throws IOException
IOException
public void testCorrupt0LengthHFile() throws IOException
IOException
public void testCorruptOutOfOrderHFileWrite() throws IOException
IOException
public static void truncateFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
IOException
public void testCorruptTruncatedHFile() throws IOException
IOException
private int writeSomeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, int start, int n, boolean useTags) throws IOException
IOException
private void readAllRecords(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner) throws IOException
IOException
private int readAndCheckbytes(org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int start, int n) throws IOException
IOException
private byte[] getSomeKey(int rowId)
private void writeRecords(org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, boolean useTags) throws IOException
IOException
private org.apache.hadoop.fs.FSDataOutputStream createFSOutput(org.apache.hadoop.fs.Path name) throws IOException
IOException
void basicWithSomeCodec(String codec, boolean useTags) throws IOException
IOException
public void testTFileFeatures() throws IOException
IOException
protected void testHFilefeaturesInternals(boolean useTags) throws IOException
IOException
private 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
IOException
private void someReadingWithMetaBlock(org.apache.hadoop.hbase.io.hfile.HFile.Reader reader) throws IOException
IOException
private void metablocks(String compress) throws Exception
Exception
public void testMetaBlocks() throws Exception
Exception
public void testNullMetaBlocks() throws Exception
Exception
public void testCompressionOrdinance()
public void testShortMidpointSameQual()
private org.apache.hadoop.hbase.Cell getCell(byte[] row, byte[] family, byte[] qualifier)
public void testGetShortMidpoint()
public void testDBEShipped() throws IOException
IOException
public void testReaderWithTinyLfuCombinedBlockCache() throws Exception
Exception
public void testReaderWithAdaptiveLruCombinedBlockCache() throws Exception
Exception
public void testReaderWithLruCombinedBlockCache() throws Exception
Exception
private void testReaderCombinedCache(String l1CachePolicy) throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.