public class TestHStoreFile extends HBaseTestCase
Modifier and Type | Field and Description |
---|---|
private static int |
BLOCKSIZE_SMALL |
private org.apache.hadoop.hbase.io.hfile.CacheConfig |
cacheConf |
private static int |
CKBYTES |
private static org.apache.hadoop.hbase.util.ChecksumType |
CKTYPE |
static HBaseClassTestRule |
CLASS_RULE |
private static String |
localFormatter |
private static org.slf4j.Logger |
LOG |
private static String |
ROOT_DIR |
(package private) byte[] |
SPLITKEY |
private static String |
TEST_FAMILY |
private static HBaseTestingUtility |
TEST_UTIL |
COLUMNS, conf, fam1, fam2, fam3, FIRST_CHAR, fs, fsTableDescriptors, LAST_CHAR, MAXVERSIONS, meta, PUNCTUATION, START_KEY, START_KEY_BYTES, testDir, testUtil
Constructor and Description |
---|
TestHStoreFile() |
Modifier and Type | Method and Description |
---|---|
private void |
assertOrdering(Comparator<? super org.apache.hadoop.hbase.regionserver.HStoreFile> comparator,
org.apache.hadoop.hbase.regionserver.HStoreFile... sfs)
Assert that the given comparator orders the given storefiles in the
same way that they're passed.
|
private void |
bloomWriteRead(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer,
org.apache.hadoop.fs.FileSystem fs) |
private void |
checkHalfHFile(org.apache.hadoop.hbase.regionserver.HRegionFileSystem regionFs,
org.apache.hadoop.hbase.regionserver.HStoreFile f) |
(package private) List<org.apache.hadoop.hbase.KeyValue> |
getKeyValueSet(long[] timestamps,
int numRows,
byte[] qualifier,
byte[] family)
Generate a list of KeyValues for testing based on given parameters
|
private static org.apache.hadoop.hbase.regionserver.StoreFileScanner |
getStoreFileScanner(org.apache.hadoop.hbase.regionserver.StoreFileReader reader,
boolean cacheBlocks,
boolean pread) |
private org.apache.hadoop.hbase.regionserver.HStoreFile |
mockStoreFile(boolean bulkLoad,
long size,
long bulkTimestamp,
long seqId,
String path)
Create a mock StoreFile with the given attributes.
|
void |
setUp()
Note that this method must be called after the mini hdfs cluster has
started or we end up with a local file system.
|
private org.apache.hadoop.fs.Path |
splitStoreFile(org.apache.hadoop.hbase.regionserver.HRegionFileSystem regionFs,
org.apache.hadoop.hbase.HRegionInfo hri,
String family,
org.apache.hadoop.hbase.regionserver.HStoreFile sf,
byte[] splitKey,
boolean isTopRef) |
void |
tearDown() |
void |
testBasicHalfMapFile()
Write a file and then assert that we can read from top and bottom halves
using two HalfMapFiles.
|
void |
testBloomFilter() |
void |
testBloomTypes() |
void |
testCacheOnWriteEvictOnClose() |
void |
testDataBlockEncodingMetaData()
Check if data block encoding information is saved correctly in HFile's
file info.
|
void |
testDeleteFamilyBloomFilter() |
void |
testEmptyStoreFileRestrictKeyRanges() |
void |
testHFileLink() |
void |
testMultipleTimestamps()
Test to ensure correctness when using StoreFile with multiple timestamps
|
void |
testReference()
Test that our mechanism of writing store files in one region to reference
store files in other regions works.
|
void |
testReferenceToHFileLink()
This test creates an hfile and then the dir structures and files to verify that references
to hfilelinks (created by snapshot clones) can be properly interpreted.
|
void |
testReseek()
Test for HBASE-8012
|
void |
testSeqIdComparator() |
void |
testStoreFileReference() |
private org.apache.hadoop.hbase.regionserver.StoreFileWriter |
writeStoreFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf,
org.apache.hadoop.fs.Path path,
int numBlocks) |
private void |
writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer) |
static void |
writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer,
byte[] fam,
byte[] qualifier) |
addContent, addContent, addContent, addContent, addContent, addContent, addContent, assertByteEquals, assertEquals, assertResultEquals, closeRootAndMeta, createMetaRegion, createNewHRegion, createNewHRegion, createTableDescriptor, createTableDescriptor, createTableDescriptor, getUnitTestdir, openClosedRegion, shutdownDfs
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf
private static final org.apache.hadoop.hbase.util.ChecksumType CKTYPE
private static final int CKBYTES
private static String TEST_FAMILY
byte[] SPLITKEY
private static final String localFormatter
private static final int BLOCKSIZE_SMALL
public TestHStoreFile()
public void setUp() throws Exception
HBaseTestCase
setUp
in class HBaseTestCase
Exception
public void tearDown() throws Exception
tearDown
in class HBaseTestCase
Exception
public void testBasicHalfMapFile() throws Exception
Exception
private void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer) throws IOException
IOException
public static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, byte[] fam, byte[] qualifier) throws IOException
IOException
public void testReference() throws IOException
IOException
public void testStoreFileReference() throws Exception
Exception
public void testEmptyStoreFileRestrictKeyRanges() throws Exception
Exception
public void testHFileLink() throws IOException
IOException
public void testReferenceToHFileLink() throws IOException
IOException
private void checkHalfHFile(org.apache.hadoop.hbase.regionserver.HRegionFileSystem regionFs, org.apache.hadoop.hbase.regionserver.HStoreFile f) throws IOException
IOException
private static org.apache.hadoop.hbase.regionserver.StoreFileScanner getStoreFileScanner(org.apache.hadoop.hbase.regionserver.StoreFileReader reader, boolean cacheBlocks, boolean pread)
private void bloomWriteRead(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, org.apache.hadoop.fs.FileSystem fs) throws Exception
Exception
public void testBloomFilter() throws Exception
Exception
public void testDeleteFamilyBloomFilter() throws Exception
Exception
public void testReseek() throws Exception
Exception
public void testBloomTypes() throws Exception
Exception
public void testSeqIdComparator()
private void assertOrdering(Comparator<? super org.apache.hadoop.hbase.regionserver.HStoreFile> comparator, org.apache.hadoop.hbase.regionserver.HStoreFile... sfs)
private org.apache.hadoop.hbase.regionserver.HStoreFile mockStoreFile(boolean bulkLoad, long size, long bulkTimestamp, long seqId, String path)
List<org.apache.hadoop.hbase.KeyValue> getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family)
public void testMultipleTimestamps() throws IOException
IOException
public void testCacheOnWriteEvictOnClose() throws Exception
Exception
private org.apache.hadoop.fs.Path splitStoreFile(org.apache.hadoop.hbase.regionserver.HRegionFileSystem regionFs, org.apache.hadoop.hbase.HRegionInfo hri, String family, org.apache.hadoop.hbase.regionserver.HStoreFile sf, byte[] splitKey, boolean isTopRef) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.StoreFileWriter writeStoreFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf, org.apache.hadoop.fs.Path path, int numBlocks) throws IOException
IOException
public void testDataBlockEncodingMetaData() throws IOException
IOException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.