Package org.apache.hadoop.hbase.mob
Class TestMobStoreScanner
java.lang.Object
org.apache.hadoop.hbase.mob.TestMobStoreScanner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.Adminstatic final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationprivate static longprivate static org.apache.hadoop.hbase.HTableDescriptorprivate static final byte[]private org.apache.hadoop.fs.FileSystemprivate static org.apache.hadoop.hbase.HColumnDescriptororg.junit.rules.TestNameprivate static final byte[]private static final byte[]protected final byte[]private static final byte[]private static final byte[]private static org.apache.hadoop.hbase.client.Tableprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertIsMobReference(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 voidassertNotMobReference(org.apache.hadoop.hbase.Cell cell, byte[] row, byte[] family, byte[] value) Assert the value is not store in mob.private voidcreateRecordAndCorruptMobFile(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.PathgetFlushedMobFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.TableName table, String family) voidsetScan(org.apache.hadoop.hbase.client.Scan scan, boolean reversed, boolean mobScanRaw) Set the scan attributevoidsetUp(long threshold, org.apache.hadoop.hbase.TableName tn) static voidstatic voidprivate voidtestGet(org.apache.hadoop.hbase.TableName tableName, boolean reversed, boolean doFlush) private voidtestGetFromArchive(boolean reversed) private voidtestGetFromFiles(boolean reversed) private voidtestGetFromMemStore(boolean reversed) voidprivate voidtestGetReferences(boolean reversed) voidprivate voidtestMobThreshold(boolean reversed) voidvoidvoidvoid
-
Field Details
-
CLASS_RULE
-
TEST_UTIL
-
row1
-
row2
-
family
-
qf1
-
qf2
-
qf3
-
table
-
admin
-
hcd
-
desc
-
defaultThreshold
-
fs
-
conf
-
name
-
-
Constructor Details
-
TestMobStoreScanner
public TestMobStoreScanner()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
setUp
- Throws:
Exception
-
generateMobValue
Generate the mob value.- Parameters:
size- the size of the value- Returns:
- the mob value generated
-
setScan
Set the scan attribute- Parameters:
reversed- if true, scan will be backward ordermobScanRaw- if true, scan will get the mob reference
-
testMobStoreScanner
- Throws:
Exception
-
testReversedMobStoreScanner
- Throws:
Exception
-
testGetMassive
- Throws:
Exception
-
testReadPt
- Throws:
Exception
-
testReadFromCorruptMobFilesWithReadEmptyValueOnMobCellMiss
- Throws:
Exception
-
testReadFromCorruptMobFiles
- Throws:
Exception
-
createRecordAndCorruptMobFile
private void createRecordAndCorruptMobFile(org.apache.hadoop.hbase.TableName tn, byte[] row, byte[] family, byte[] qf, byte[] value) throws IOException - Throws:
IOException
-
getFlushedMobFile
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 - Throws:
IOException
-
testGetFromFiles
- Throws:
Exception
-
testGetFromMemStore
- Throws:
Exception
-
testGet
private void testGet(org.apache.hadoop.hbase.TableName tableName, boolean reversed, boolean doFlush) throws Exception - Throws:
Exception
-
testGetReferences
- Throws:
Exception
-
testMobThreshold
- Throws:
Exception
-
testGetFromArchive
- Throws:
Exception
-
assertNotMobReference
private static void assertNotMobReference(org.apache.hadoop.hbase.Cell cell, byte[] row, byte[] family, byte[] value) throws IOException Assert the value is not store in mob.- Throws:
IOException
-
assertIsMobReference
private static void assertIsMobReference(org.apache.hadoop.hbase.Cell cell, byte[] row, byte[] family, byte[] value, org.apache.hadoop.hbase.TableName tn) throws IOException Assert the value is store in mob.- Throws:
IOException
-