public interface HBaseConnection
extends org.apache.hadoop.conf.Configurable
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction()
Begin a transaction.
|
void |
close()
Close the connection.
|
void |
commitTransaction()
Commit a transaction
|
void |
connect()
Connects to HBase.
|
void |
createHBaseTable(String tableName,
List<byte[]> columnFamilies)
Create a new table
|
void |
flush(org.apache.hadoop.hbase.client.HTableInterface htab)
Flush commits.
|
org.apache.hadoop.hbase.client.HTableInterface |
getHBaseTable(String tableName)
Fetch an existing HBase table.
|
org.apache.hadoop.hbase.client.HTableInterface |
getHBaseTable(String tableName,
boolean force)
Fetch an existing HBase table and force a connection to it.
|
void |
rollbackTransaction()
Rollback a transaction
|
void connect() throws IOException
Configurable.setConf(org.apache.hadoop.conf.Configuration)
has been called.IOException
void close() throws IOException
IOException
void beginTransaction() throws IOException
IOException
void commitTransaction() throws IOException
IOException
- indicates the commit has failedvoid rollbackTransaction() throws IOException
IOException
void flush(org.apache.hadoop.hbase.client.HTableInterface htab) throws IOException
htab
- Table to flushIOException
void createHBaseTable(String tableName, List<byte[]> columnFamilies) throws IOException
tableName
- name of the tablecolumnFamilies
- name of the column families in the tableIOException
org.apache.hadoop.hbase.client.HTableInterface getHBaseTable(String tableName) throws IOException
tableName
- name of the tableIOException
org.apache.hadoop.hbase.client.HTableInterface getHBaseTable(String tableName, boolean force) throws IOException
tableName
- name of the tableforce
- if true, force a connection by fetching a non-existant keyIOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.