public class TephraHBaseConnection extends VanillaHBaseConnection
conf, conn, tables
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction()
Begin a transaction.
|
protected org.apache.hadoop.hbase.HTableDescriptor |
buildDescriptor(String tableName,
List<byte[]> columnFamilies) |
void |
commitTransaction()
Commit a transaction
|
void |
connect()
Connects to HBase.
|
void |
flush(org.apache.hadoop.hbase.client.HTableInterface htab)
Flush commits.
|
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
|
close, createHBaseTable, getConf, getHBaseTable, setConf
public void connect() throws IOException
HBaseConnection
Configurable.setConf(org.apache.hadoop.conf.Configuration)
has been called.connect
in interface HBaseConnection
connect
in class VanillaHBaseConnection
IOException
public void beginTransaction() throws IOException
HBaseConnection
beginTransaction
in interface HBaseConnection
beginTransaction
in class VanillaHBaseConnection
IOException
public void commitTransaction() throws IOException
HBaseConnection
commitTransaction
in interface HBaseConnection
commitTransaction
in class VanillaHBaseConnection
IOException
- indicates the commit has failedpublic void rollbackTransaction() throws IOException
HBaseConnection
rollbackTransaction
in interface HBaseConnection
rollbackTransaction
in class VanillaHBaseConnection
IOException
public void flush(org.apache.hadoop.hbase.client.HTableInterface htab) throws IOException
HBaseConnection
flush
in interface HBaseConnection
flush
in class VanillaHBaseConnection
htab
- Table to flushIOException
protected org.apache.hadoop.hbase.HTableDescriptor buildDescriptor(String tableName, List<byte[]> columnFamilies) throws IOException
buildDescriptor
in class VanillaHBaseConnection
IOException
public org.apache.hadoop.hbase.client.HTableInterface getHBaseTable(String tableName, boolean force) throws IOException
HBaseConnection
getHBaseTable
in interface HBaseConnection
getHBaseTable
in class VanillaHBaseConnection
tableName
- name of the tableforce
- if true, force a connection by fetching a non-existant keyIOException
Copyright © 2021 The Apache Software Foundation. All rights reserved.