public class LocalStandaloneHBaseResource extends Object implements HBaseResource
HBaseResource
that downloads hbase and set up a local hbase cluster.Modifier and Type | Method and Description |
---|---|
void |
afterTestSuccess() |
void |
before() |
void |
createTable(String tableName,
String... columnFamilies)
Creates a table with the given name and column families.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
afterTestFailure, apply
public void before() throws Exception
before
in interface ExternalResource
Exception
public void afterTestSuccess()
afterTestSuccess
in interface ExternalResource
public void createTable(String tableName, String... columnFamilies) throws IOException
HBaseResource
createTable
in interface HBaseResource
tableName
- desired table namecolumnFamilies
- column family to createIOException
public List<String> scanTable(String tableName) throws IOException
HBaseResource
scanTable
in interface HBaseResource
tableName
- table desired to scanIOException
public void putData(String tableName, String rowKey, String columnFamily, String columnQualifier, String value) throws IOException
HBaseResource
putData
in interface HBaseResource
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
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.