public class TestRowCounter extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static String |
COL_FAM |
private static String |
COL1 |
private static String |
COL2 |
private static String |
COMPOSITE_COLUMN |
private static org.slf4j.Logger |
LOG |
private static int |
ROWS_WITH_ONE_COL |
private static String |
TABLE_NAME |
private static String |
TABLE_NAME_TS_RANGE |
private static HBaseTestingUtility |
TEST_UTIL |
private static int |
TOTAL_ROWS |
Constructor and Description |
---|
TestRowCounter() |
Modifier and Type | Method and Description |
---|---|
private void |
assertUsageContent(String usage) |
private void |
runCreateSubmittableJobWithArgs(String[] args,
int expectedCount)
Run the RowCounter map reduce job and verify the row count.
|
private void |
runRowCount(String[] args,
int expectedCount)
Run the RowCounter map reduce job and verify the row count.
|
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testCreateSubmittableJobWithArgs10kRowRange() |
void |
testCreateSubmittableJobWithArgsColumnAndRowRange()
Test a case when the column specified in command line arguments is exclusive for few rows and
also a row range filter is specified
|
void |
testCreateSubmittableJobWithArgsColumnWithColonInQualifier()
Test a case when the column specified in command line arguments is one for which the qualifier
contains colons.
|
void |
testCreateSubmittableJobWithArgsExclusiveColumn()
Test a case when the column specified in command line arguments is exclusive for few rows.
|
void |
testCreateSubmittableJobWithArgsHiddenColumn()
Test a case when the column specified in command line arguments is not part of first KV for a
row.
|
void |
testCreateSubmittableJobWithArgsNoColumn() |
void |
testCreateSubmittableJobWithArgsRowMultiEmptyRange()
Test a case when a range is specified with multiple ranges of start-end keys; one range is
filled, another two are not
|
void |
testCreateSubmittableJobWithArgsRowMultiRange()
Test a case when a range is specified with multiple ranges of start-end keys
|
void |
testCreateSubmittableJobWithArgsRowMultiRangeUpperBound()
Test a case when a range is specified with two ranges where one range is with end key only
|
void |
testCreateSubmittableJobWithArgsRowSingleRange()
Test a case when a range is specified with single range of start-end keys
|
void |
testCreateSubmittableJobWithArgsRowSingleRangeUpperBound()
Test a case when a range is specified with single range with end key only
|
void |
testCreateSubmittableJobWithArgsTimeRange()
Test a case when the timerange is specified with --starttime and --endtime options
|
void |
testHelp() |
void |
testImportMain()
test main method.
|
void |
testInvalidTable() |
void |
testRowCounter10kRowRange() |
void |
testRowCounterColumnAndRowRange()
Test a case when the column specified in command line arguments is exclusive for few rows and
also a row range filter is specified n
|
void |
testRowCounterColumnWithColonInQualifier()
Test a case when the column specified in command line arguments is one for which the qualifier
contains colons.
|
void |
testRowCounterExclusiveColumn()
Test a case when the column specified in command line arguments is exclusive for few rows.
|
void |
testRowCounterHiddenColumn()
Test a case when the column specified in command line arguments is not part of first KV for a
row.
|
void |
testRowCounterNoColumn()
Test a case when no column was specified in command line arguments.
|
void |
testRowCounterRowMultiEmptyRange()
Test a case when a range is specified with multiple ranges of start-end keys; one range is
filled, another two are not n
|
void |
testRowCounterRowMultiRange()
Test a case when a range is specified with multiple ranges of start-end keys n
|
void |
testRowCounterRowMultiRangeUpperBound()
Test a case when a range is specified with two ranges where one range is with end key only n
|
void |
testRowCounterRowSingleRange()
Test a case when a range is specified with single range of start-end keys n
|
void |
testRowCounterRowSingleRangeUpperBound()
Test a case when a range is specified with single range with end key only n
|
void |
testRowCounterTimeRange()
Test a case when the timerange is specified with --starttime and --endtime options n
|
private static void |
writeRows(org.apache.hadoop.hbase.client.Table table,
int totalRows,
int rowsWithOneCol)
Writes TOTAL_ROWS number of distinct rows in to the table.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private static final String TABLE_NAME
private static final String TABLE_NAME_TS_RANGE
private static final String COL_FAM
private static final String COL1
private static final String COL2
private static final String COMPOSITE_COLUMN
private static final int TOTAL_ROWS
private static final int ROWS_WITH_ONE_COL
public TestRowCounter()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testRowCounterNoColumn() throws Exception
Exception
public void testRowCounterExclusiveColumn() throws Exception
Exception
public void testRowCounterColumnWithColonInQualifier() throws Exception
Exception
public void testRowCounterHiddenColumn() throws Exception
Exception
public void testRowCounterColumnAndRowRange() throws Exception
Exception
public void testRowCounterRowSingleRange() throws Exception
Exception
public void testRowCounterRowSingleRangeUpperBound() throws Exception
Exception
public void testRowCounterRowMultiRangeUpperBound() throws Exception
Exception
public void testRowCounterRowMultiRange() throws Exception
Exception
public void testRowCounterRowMultiEmptyRange() throws Exception
Exception
public void testRowCounter10kRowRange() throws Exception
Exception
public void testRowCounterTimeRange() throws Exception
Exception
private void runRowCount(String[] args, int expectedCount) throws Exception
args
- the command line arguments to be used for rowcounter job.expectedCount
- the expected row count (result of map reduce job). nException
private void runCreateSubmittableJobWithArgs(String[] args, int expectedCount) throws Exception
args
- the command line arguments to be used for rowcounter job.expectedCount
- the expected row count (result of map reduce job).Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsNoColumn() throws Exception
Exception
public void testCreateSubmittableJobWithArgsExclusiveColumn() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsColumnWithColonInQualifier() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsHiddenColumn() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsColumnAndRowRange() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsRowSingleRange() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsRowSingleRangeUpperBound() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsRowMultiRangeUpperBound() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsRowMultiRange() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgsRowMultiEmptyRange() throws Exception
Exception
- in case of any unexpected error.public void testCreateSubmittableJobWithArgs10kRowRange() throws Exception
Exception
public void testCreateSubmittableJobWithArgsTimeRange() throws Exception
Exception
- in case of any unexpected error.private static void writeRows(org.apache.hadoop.hbase.client.Table table, int totalRows, int rowsWithOneCol) throws IOException
IOException
public void testImportMain() throws Exception
Exception
public void testInvalidTable() throws Exception
Exception
private void assertUsageContent(String usage)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.