Class TestOpenTableInCoprocessor
java.lang.Object
org.apache.hadoop.hbase.coprocessor.TestOpenTableInCoprocessor
Test that a coprocessor can open a connection and write to another table, inside a hook.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Coprocessor that creates an HTable with a pool to write to another tablestatic class
Custom coprocessor that just copies the write to another table. -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static boolean[]
private static boolean[]
private static final byte[]
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private int
getKeyValueCount
(org.apache.hadoop.hbase.client.Table table) Count the number of keyvalue in the table.private void
runCoprocessorConnectionToRemoteTable
(Class clazz, boolean[] completeCheck) static void
static void
void
void
-
Field Details
-
CLASS_RULE
-
otherTable
-
-
family
-
completed
-
completedWithPool
-
UTIL
-
-
Constructor Details
-
TestOpenTableInCoprocessor
public TestOpenTableInCoprocessor()
-
-
Method Details
-
setupCluster
- Throws:
Exception
-
cleanupTestTable
- Throws:
Exception
-
teardownCluster
- Throws:
Exception
-
testCoprocessorCanCreateConnectionToRemoteTable
- Throws:
Throwable
-
testCoprocessorCanCreateConnectionToRemoteTableWithCustomPool
- Throws:
Throwable
-
runCoprocessorConnectionToRemoteTable
private void runCoprocessorConnectionToRemoteTable(Class clazz, boolean[] completeCheck) throws Throwable - Throws:
Throwable
-
getKeyValueCount
Count the number of keyvalue in the table. Scans all possible versions- Parameters:
table
- table to scan- Returns:
- number of keyvalues over all rows in the table
- Throws:
IOException
-