Package org.apache.hadoop.hbase.mob
Class MobTestUtil
java.lang.Object
org.apache.hadoop.hbase.mob.MobTestUtil
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final char
protected static final char
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertCellEquals
(org.apache.hadoop.hbase.Cell firstKeyValue, org.apache.hadoop.hbase.Cell secondKeyValue) Compare two Cells only for their row family qualifier valuestatic void
assertCellsValue
(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, byte[] expectedValue, int expectedCount) static int
countMobRows
(HBaseTestingUtility util, org.apache.hadoop.hbase.client.Table table) Gets the number of rows in the given table.static org.apache.hadoop.fs.Path
generateMOBFileForRegion
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor familyDescriptor, String regionName) protected static String
generateRandomString
(int demoLength) private static void
writeStoreFile
(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, byte[] fam, byte[] qualifier) protected static void
writeStoreFile
(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, String caseName)
-
Field Details
-
FIRST_CHAR
- See Also:
-
LAST_CHAR
- See Also:
-
-
Constructor Details
-
MobTestUtil
public MobTestUtil()
-
-
Method Details
-
generateRandomString
-
writeStoreFile
protected static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, String caseName) throws IOException - Throws:
IOException
-
writeStoreFile
private static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer, byte[] fam, byte[] qualifier) throws IOException - Throws:
IOException
-
assertCellEquals
public static void assertCellEquals(org.apache.hadoop.hbase.Cell firstKeyValue, org.apache.hadoop.hbase.Cell secondKeyValue) Compare two Cells only for their row family qualifier value -
assertCellsValue
public static void assertCellsValue(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, byte[] expectedValue, int expectedCount) throws IOException - Throws:
IOException
-
countMobRows
public static int countMobRows(HBaseTestingUtility util, org.apache.hadoop.hbase.client.Table table) throws IOException Gets the number of rows in the given table.- Parameters:
table
- to get the scanner- Returns:
- the number of rows
- Throws:
IOException
-
generateMOBFileForRegion
public static org.apache.hadoop.fs.Path generateMOBFileForRegion(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor familyDescriptor, String regionName) throws IOException - Throws:
IOException
-