public abstract class TestTableInputFormatScanBase extends Object
Tests various scan start and stop row scenarios. This is set in a scan and tested in a MapReduce job to see if that is handed over and done properly too.
This test is broken into two parts in order to side-step the test timeout period of 900, as documented in HBASE-8326.
Modifier and Type | Class and Description |
---|---|
static class |
TestTableInputFormatScanBase.ScanMapper
Pass the key and value to reduce.
|
static class |
TestTableInputFormatScanBase.ScanReducer
Checks the last and first key seen against the scanner boundaries.
|
Modifier and Type | Field and Description |
---|---|
(package private) static byte[][] |
INPUT_FAMILYS |
(package private) static String |
KEY_LASTROW |
(package private) static String |
KEY_STARTROW |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.hbase.client.Table |
table |
(package private) static org.apache.hadoop.hbase.TableName |
TABLE_NAME |
(package private) static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestTableInputFormatScanBase() |
Modifier and Type | Method and Description |
---|---|
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testAutobalanceNumOfSplit()
Run MR job to test autobalance for setting number of mappers for TIF
This does not run real MR job
|
void |
testNumOfSplits(int splitsPerRegion,
int expectedNumOfSplits)
Tests Number of inputSplits for MR job when specify number of mappers for TableInputFormatXXX
This test does not run MR job
|
void |
testNumOfSplitsMR(int splitsPerRegion,
int expectedNumOfSplits)
Run MR job to check the number of mapper = expectedNumOfSplits
|
protected void |
testScan(String start,
String stop,
String last)
Tests a MR scan using specific start and stop rows.
|
protected void |
testScanFromConfiguration(String start,
String stop,
String last)
Tests an MR Scan initialized from properties set in the Configuration.
|
private static final org.slf4j.Logger LOG
static final HBaseTestingUtility TEST_UTIL
static final org.apache.hadoop.hbase.TableName TABLE_NAME
static final byte[][] INPUT_FAMILYS
static final String KEY_STARTROW
static final String KEY_LASTROW
private static org.apache.hadoop.hbase.client.Table table
public TestTableInputFormatScanBase()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
protected void testScanFromConfiguration(String start, String stop, String last) throws IOException, InterruptedException, ClassNotFoundException
protected void testScan(String start, String stop, String last) throws IOException, InterruptedException, ClassNotFoundException
public void testNumOfSplits(int splitsPerRegion, int expectedNumOfSplits) throws IOException, InterruptedException, ClassNotFoundException
public void testNumOfSplitsMR(int splitsPerRegion, int expectedNumOfSplits) throws IOException, InterruptedException, ClassNotFoundException
public void testAutobalanceNumOfSplit() throws IOException
IOException
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.