public class TestTableInputFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestTableInputFormat.ExampleDeprecatedTIF |
static class |
TestTableInputFormat.ExampleJobConfigurableTIF |
static class |
TestTableInputFormat.ExampleTIF |
static class |
TestTableInputFormat.ExampleVerifier |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static byte[][] |
columns |
(package private) static byte[] |
FAMILY |
private static org.slf4j.Logger |
LOG |
private static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestTableInputFormat() |
Modifier and Type | Method and Description |
---|---|
static void |
afterClass() |
void |
before() |
static void |
beforeClass() |
(package private) static boolean |
checkResult(org.apache.hadoop.hbase.client.Result r,
org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
byte[] expectedKey,
byte[] expectedValue)
Verify that the result and key have expected values.
|
(package private) static org.apache.hadoop.hbase.client.Table |
createDNRIOEScannerTable(byte[] name,
int failCnt)
Create a table that throws a DoNoRetryIOException on first scanner next call n
|
(package private) static org.apache.hadoop.hbase.client.Table |
createIOEScannerTable(byte[] name,
int failCnt)
Create a table that IOE's on first scanner next call n
|
static org.apache.hadoop.hbase.client.Table |
createTable(byte[] tableName)
Setup a table with two rows and values.
|
static org.apache.hadoop.hbase.client.Table |
createTable(byte[] tableName,
byte[][] families)
Setup a table with two rows and values per column family.
|
(package private) static void |
runTestMapred(org.apache.hadoop.hbase.client.Table table)
Create table data and run tests on specified htable using the o.a.h.hbase.mapred API.
|
void |
testDeprecatedExtensionOfTableInputFormatBase() |
void |
testExtensionOfTableInputFormatBase()
Verify the example we present in javadocs on TableInputFormatBase
|
(package private) void |
testInputFormat(Class<? extends org.apache.hadoop.mapred.InputFormat> clazz) |
void |
testJobConfigurableExtensionOfTableInputFormatBase() |
void |
testTableRecordReader()
Run test assuming no errors using mapred api.
|
void |
testTableRecordReaderScannerFail()
Run test assuming Scanner IOException failure using mapred api, n
|
void |
testTableRecordReaderScannerFailTwice()
Run test assuming Scanner IOException failure using mapred api, n
|
void |
testTableRecordReaderScannerTimeout()
Run test assuming NotServingRegionException using mapred api.
|
void |
testTableRecordReaderScannerTimeoutTwice()
Run test assuming NotServingRegionException using mapred api.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
static final byte[] FAMILY
private static final byte[][] columns
public TestTableInputFormat()
public static void beforeClass() throws Exception
Exception
public static void afterClass() throws Exception
Exception
public void before() throws IOException
IOException
public static org.apache.hadoop.hbase.client.Table createTable(byte[] tableName) throws IOException
tableName
- the name of the table to createIOException
public static org.apache.hadoop.hbase.client.Table createTable(byte[] tableName, byte[][] families) throws IOException
IOException
static boolean checkResult(org.apache.hadoop.hbase.client.Result r, org.apache.hadoop.hbase.io.ImmutableBytesWritable key, byte[] expectedKey, byte[] expectedValue)
r
- single row resultkey
- the row keyexpectedKey
- the expected keyexpectedValue
- the expected valuestatic void runTestMapred(org.apache.hadoop.hbase.client.Table table) throws IOException
IOException
static org.apache.hadoop.hbase.client.Table createIOEScannerTable(byte[] name, int failCnt) throws IOException
IOException
static org.apache.hadoop.hbase.client.Table createDNRIOEScannerTable(byte[] name, int failCnt) throws IOException
IOException
public void testTableRecordReader() throws IOException
IOException
public void testTableRecordReaderScannerFail() throws IOException
IOException
public void testTableRecordReaderScannerFailTwice() throws IOException
IOException
public void testTableRecordReaderScannerTimeout() throws IOException
org.apache.hadoop.hbase.DoNotRetryIOException
IOException
public void testTableRecordReaderScannerTimeoutTwice() throws IOException
org.apache.hadoop.hbase.DoNotRetryIOException
IOException
public void testExtensionOfTableInputFormatBase() throws IOException
IOException
public void testDeprecatedExtensionOfTableInputFormatBase() throws IOException
IOException
public void testJobConfigurableExtensionOfTableInputFormatBase() throws IOException
IOException
void testInputFormat(Class<? extends org.apache.hadoop.mapred.InputFormat> clazz) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.