public class OmidHBaseUtils extends AbstractHBaseUtils
logger
Constructor and Description |
---|
OmidHBaseUtils(Properties properties)
Constructor.
|
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
|
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
|
Object |
getTable(String tableName)
Gets a handle of a specific table.
|
void |
processDelete(org.openrdf.model.URI id,
String tabName,
String famName,
String quaName)
Process operations on the Resource table.
|
void |
processPut(Record record,
String tabName,
String famName,
String quaName)
Process operations on the Resource table.
|
void |
rollback()
Rollbacks work done.
|
checkAndCreateTable, createConfiguration, createDelete, createPut, factoryHBaseUtils, getFilter, getHbaseTableNamePrefix, getHbcfg, getLogger, getResultScan, getScan, getSerializer, getServerFilterFlag, initHbaseTableNamePrefix, initSerializer, initServerFilterFlag, setHbcfg, setLogger
public OmidHBaseUtils(Properties properties)
properties
- the configuration propertiespublic void commit() throws DataCorruptedException, IOException, IllegalStateException
commit
in class AbstractHBaseUtils
DataCorruptedException
- in case a rollback has not been successful.IOException
- in case a commit has not been successful.IllegalStateException
public void rollback() throws DataCorruptedException, IOException, IllegalStateException
rollback
in class AbstractHBaseUtils
DataCorruptedException
- in case a rollback has not been successful.IOException
- in case a commit has not been successful.IllegalStateException
public Object getTable(String tableName)
getTable
in class AbstractHBaseUtils
tableName
- of the table to be accessed.public void processPut(Record record, String tabName, String famName, String quaName)
AbstractHBaseUtils
processPut
in class AbstractHBaseUtils
record
- to be put.public void begin()
AbstractHBaseUtils
begin
in class AbstractHBaseUtils
public void processDelete(org.openrdf.model.URI id, String tabName, String famName, String quaName)
AbstractHBaseUtils
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 List<Object> checkForErrors(Object[] objs)
AbstractHBaseUtils
checkForErrors
in class AbstractHBaseUtils
public long count(String tableName, String familyName, @Nullable XPath condition) throws IOException
count
in class AbstractHBaseUtils
tableName
- to scancondition
- to matchscan
- to scanIOException
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 tableCopyright © 2015–2016 FBK-irst. All rights reserved.