public interface HBaseResource extends ExternalResource
Modifier and Type | Method and Description |
---|---|
void |
createTable(String tableName,
String... columnFamilies)
Creates a table with the given name and column families.
|
static HBaseResource |
get(String version)
Returns the configured HBaseResource implementation, or a
LocalStandaloneHBaseResource if none is configured. |
void |
putData(String tableName,
String rowKey,
String columnFamily,
String columnQualifier,
String value)
Put the given data to the given table.
|
List<String> |
scanTable(String tableName)
Scan the given HBase table.
|
afterTestFailure, afterTestSuccess, apply, before
void createTable(String tableName, String... columnFamilies) throws IOException
tableName
- desired table namecolumnFamilies
- column family to createIOException
List<String> scanTable(String tableName) throws IOException
tableName
- table desired to scanIOException
void putData(String tableName, String rowKey, String columnFamily, String columnQualifier, String value) throws IOException
tableName
- table to put datarowKey
- row key of the given datacolumnFamily
- column family of the given datacolumnQualifier
- column qualifier of the given datavalue
- value of the given dataIOException
static HBaseResource get(String version)
LocalStandaloneHBaseResource
if none is configured.version
- The hbase versionLocalStandaloneHBaseResource
if none is
configuredCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.