public class HBaseUtils extends AbstractHBaseUtils
logger
Constructor and Description |
---|
HBaseUtils(Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begins a transaction.
|
List<Object> |
checkForErrors(Object[] objs)
Checking for errors after operations have been processed.
|
void |
commit()
Commits work done.
|
long |
count(String tableName,
String familyName,
XPath condition)
Gets a number of record of tableName matching condition
|
Delete |
createDelete(org.openrdf.model.URI id,
String tableName)
Creates deletes for HBase tables
|
Put |
createPut(Record record,
String tableName,
String famName,
String quaName)
Creates puts for HBase
|
List<Record> |
get(String tableName,
List<org.openrdf.model.URI> ids)
Gets a resource based on information passed.
|
Record |
get(String tableName,
org.openrdf.model.URI id)
Gets a Record based on information passed.
|
ResultScanner |
getScanner(String tableName,
Scan scan)
Gets a scanner for a specific table
|
HTable |
getTable(String tableName)
Gets a handle of a specific table.
|
void |
processDelete(org.openrdf.model.URI id,
String tabName,
String famName,
String quaName)
Process delete operations on an HBase table.
|
void |
processPut(Record record,
String tabName,
String famName,
String quaName)
Process put operations on an HBase table.
|
void |
rollback()
Rollbacks work done.
|
checkAndCreateTable, createConfiguration, factoryHBaseUtils, getFilter, getHbaseTableNamePrefix, getHbcfg, getLogger, getResultScan, getScan, getSerializer, getServerFilterFlag, initHbaseTableNamePrefix, initSerializer, initServerFilterFlag, setHbcfg, setLogger
public HBaseUtils(Properties properties)
public HTable getTable(String tableName)
getTable
in class AbstractHBaseUtils
tableName
- of the table to be accessed.public void commit()
commit
in class AbstractHBaseUtils
public void rollback()
rollback
in class AbstractHBaseUtils
public ResultScanner getScanner(String tableName, Scan scan)
getScanner
in class AbstractHBaseUtils
tableName
- to get the scanner fromscan
- for the specific tableconf
- object to get a hold of an HBase tablepublic void processPut(Record record, String tabName, String famName, String quaName)
processPut
in class AbstractHBaseUtils
record
- to be put.public void processDelete(org.openrdf.model.URI id, String tabName, String famName, String quaName)
processDelete
in class AbstractHBaseUtils
tabName
- where operations will be performed.famName
- where operation will be performed.quaName
- where operation will be performed.public Record get(String tableName, org.openrdf.model.URI id) throws IOException
get
in class AbstractHBaseUtils
tableName
- to do the get.id
- of the Record neededIOException
public List<Record> get(String tableName, List<org.openrdf.model.URI> ids) throws IOException
AbstractHBaseUtils
get
in class AbstractHBaseUtils
tableName
- table name to get data fromids
- to be retrievedIOException
public Put createPut(Record record, String tableName, String famName, String quaName) throws IOException
createPut
in class AbstractHBaseUtils
record
- IOException
public Delete createDelete(org.openrdf.model.URI id, String tableName) throws IOException
createDelete
in class AbstractHBaseUtils
record
- tableName
- conf
- IOException
public List<Object> checkForErrors(Object[] objs)
checkForErrors
in class AbstractHBaseUtils
objs
- public long count(String tableName, String familyName, XPath condition) throws IOException
count
in class AbstractHBaseUtils
tableName
- the table namefamilyName
- the familycondition
- to matchIOException
public void begin()
AbstractHBaseUtils
begin
in class AbstractHBaseUtils
Copyright © 2015–2016 FBK-irst. All rights reserved.