Class TestMultithreadedTableMapper
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestMultithreadedTableMapper
Test Map/Reduce job over HBase tables. The map/reduce process we're testing on our tables is
simple - take every row in the table, reverse the value of a particular cell, and write it back
to the table.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Pass the given key and processed record reduce -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
(package private) static final byte[]
private static final org.slf4j.Logger
(package private) static final org.apache.hadoop.hbase.TableName
(package private) static final int
(package private) static final byte[]
private static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
private void
runTestOnTable
(org.apache.hadoop.hbase.client.Table table) void
Test multithreadedTableMappper map/reduce against a multi-region tableprivate void
verify
(org.apache.hadoop.hbase.TableName tableName) private void
verifyAttempt
(org.apache.hadoop.hbase.client.Table table) Looks at every value of the mapreduce output and verifies that indeed the values have been reversed.
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
MULTI_REGION_TABLE_NAME
-
INPUT_FAMILY
-
OUTPUT_FAMILY
-
NUMBER_OF_THREADS
- See Also:
-
-
Constructor Details
-
TestMultithreadedTableMapper
public TestMultithreadedTableMapper()
-
-
Method Details
-
beforeClass
- Throws:
Exception
-
afterClass
- Throws:
Exception
-
testMultithreadedTableMapper
public void testMultithreadedTableMapper() throws IOException, InterruptedException, ClassNotFoundExceptionTest multithreadedTableMappper map/reduce against a multi-region table -
runTestOnTable
private void runTestOnTable(org.apache.hadoop.hbase.client.Table table) throws IOException, InterruptedException, ClassNotFoundException -
verify
- Throws:
IOException
-
verifyAttempt
private void verifyAttempt(org.apache.hadoop.hbase.client.Table table) throws IOException, NullPointerException Looks at every value of the mapreduce output and verifies that indeed the values have been reversed.- Parameters:
table
- Table to scan.- Throws:
NullPointerException
- if we failed to find a cell valueIOException
-