| 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.KeyValue.Type |
generateKeyType(Random rand) |
private byte[] |
getSomeKey(int rowId) |
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) |
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 |
testCorruptTruncatedHFile()
Create a truncated hfile and verify that exception thrown.
|
void |
testEmptyHFile()
Test empty HFile.
|
void |
testGetShortMidpoint() |
protected void |
testHFilefeaturesInternals(boolean useTags) |
void |
testMetaBlocks() |
void |
testNullMetaBlocks() |
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 void testReaderWithoutBlockCache() throws Exception
Exceptionprivate void readStoreFile(org.apache.hadoop.fs.Path storeFilePath) 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 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()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.