public class TestMobStoreScanner extends Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.hadoop.hbase.client.Admin |
admin |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private static long |
defaultThreshold |
private static org.apache.hadoop.hbase.HTableDescriptor |
desc |
private static byte[] |
family |
private org.apache.hadoop.fs.FileSystem |
fs |
private static org.apache.hadoop.hbase.HColumnDescriptor |
hcd |
org.junit.rules.TestName |
name |
private static byte[] |
qf1 |
private static byte[] |
qf2 |
protected byte[] |
qf3 |
private static Random |
random |
private static byte[] |
row1 |
private static byte[] |
row2 |
private static org.apache.hadoop.hbase.client.Table |
table |
private static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestMobStoreScanner() |
Modifier and Type | Method and Description |
---|---|
private static void |
assertIsMobReference(org.apache.hadoop.hbase.Cell cell,
byte[] row,
byte[] family,
byte[] value,
org.apache.hadoop.hbase.TableName tn)
Assert the value is store in mob.
|
private static void |
assertNotMobReference(org.apache.hadoop.hbase.Cell cell,
byte[] row,
byte[] family,
byte[] value)
Assert the value is not store in mob.
|
private void |
createRecordAndCorruptMobFile(org.apache.hadoop.hbase.TableName tn,
byte[] row,
byte[] family,
byte[] qf,
byte[] value) |
private static byte[] |
generateMobValue(int size)
Generate the mob value.
|
private org.apache.hadoop.fs.Path |
getFlushedMobFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.hbase.TableName table,
String family) |
void |
setScan(org.apache.hadoop.hbase.client.Scan scan,
boolean reversed,
boolean mobScanRaw)
Set the scan attribute
|
void |
setUp(long threshold,
org.apache.hadoop.hbase.TableName tn) |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
private void |
testGet(org.apache.hadoop.hbase.TableName tableName,
boolean reversed,
boolean doFlush) |
private void |
testGetFromArchive(boolean reversed) |
private void |
testGetFromFiles(boolean reversed) |
private void |
testGetFromMemStore(boolean reversed) |
void |
testGetMassive() |
private void |
testGetReferences(boolean reversed) |
void |
testMobStoreScanner() |
private void |
testMobThreshold(boolean reversed) |
void |
testReadFromCorruptMobFiles() |
void |
testReadFromCorruptMobFilesWithReadEmptyValueOnMobCellMiss() |
void |
testReadPt() |
void |
testReversedMobStoreScanner() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
private static final byte[] row1
private static final byte[] row2
private static final byte[] family
private static final byte[] qf1
private static final byte[] qf2
protected final byte[] qf3
private static org.apache.hadoop.hbase.client.Table table
private static org.apache.hadoop.hbase.client.Admin admin
private static org.apache.hadoop.hbase.HColumnDescriptor hcd
private static org.apache.hadoop.hbase.HTableDescriptor desc
private static long defaultThreshold
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.conf.Configuration conf
public org.junit.rules.TestName name
public TestMobStoreScanner()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void setUp(long threshold, org.apache.hadoop.hbase.TableName tn) throws Exception
Exception
private static byte[] generateMobValue(int size)
size
- the size of the valuepublic void setScan(org.apache.hadoop.hbase.client.Scan scan, boolean reversed, boolean mobScanRaw)
reversed
- if true, scan will be backward ordermobScanRaw
- if true, scan will get the mob referencepublic void testMobStoreScanner() throws Exception
Exception
public void testReversedMobStoreScanner() throws Exception
Exception
public void testGetMassive() throws Exception
Exception
public void testReadPt() throws Exception
Exception
public void testReadFromCorruptMobFilesWithReadEmptyValueOnMobCellMiss() throws Exception
Exception
public void testReadFromCorruptMobFiles() throws Exception
Exception
private void createRecordAndCorruptMobFile(org.apache.hadoop.hbase.TableName tn, byte[] row, byte[] family, byte[] qf, byte[] value) throws IOException
IOException
private org.apache.hadoop.fs.Path getFlushedMobFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.TableName table, String family) throws IOException
IOException
private void testGetFromFiles(boolean reversed) throws Exception
Exception
private void testGetFromMemStore(boolean reversed) throws Exception
Exception
private void testGet(org.apache.hadoop.hbase.TableName tableName, boolean reversed, boolean doFlush) throws Exception
Exception
private void testGetReferences(boolean reversed) throws Exception
Exception
private void testMobThreshold(boolean reversed) throws Exception
Exception
private void testGetFromArchive(boolean reversed) throws Exception
Exception
private static void assertNotMobReference(org.apache.hadoop.hbase.Cell cell, byte[] row, byte[] family, byte[] value) throws IOException
IOException
private static void assertIsMobReference(org.apache.hadoop.hbase.Cell cell, byte[] row, byte[] family, byte[] value, org.apache.hadoop.hbase.TableName tn) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.