public class HbaseSessions.Session extends BackendSession.AbstractBackendSession implements HbaseSessions.HbaseSession<HbaseSessions.RowIterator>
BackendSession.AbstractBackendSessionopened| Constructor and Description |
|---|
Session() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
closed() |
Integer |
commit()
Commit all updates(put/delete) to DB
|
HbaseSessions.CountSession |
countSession() |
void |
delete(String table,
byte[] family,
byte[] rowkey)
Delete a record by rowkey from a table
|
HbaseSessions.RowIterator |
get(String table,
byte[] family,
byte[] rowkey)
Get a record by rowkey from a table
|
HbaseSessions.RowIterator |
get(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier)
Get a record by rowkey and qualifier from a table
|
HbaseSessions.RowIterator |
get(String table,
byte[] family,
Set<byte[]> rowkeys)
Get multi records by rowkeys from a table
|
boolean |
hasChanges()
Any change in the session
|
org.apache.hadoop.hbase.client.Connection |
hbase() |
long |
increase(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier,
long value)
Increase a counter by rowkey and qualifier to a table
|
String |
namespace() |
void |
open() |
void |
put(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier,
byte[] value)
Add a row record to a table(can be used when adding an index)
|
void |
put(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier,
byte[] value,
long ttl)
Add a row record to a table with ttl for index
|
void |
put(String table,
byte[] family,
byte[] rowkey,
Collection<BackendEntry.BackendColumn> columns)
Add a row record to a table
|
void |
put(String table,
byte[] family,
byte[] rowkey,
Collection<BackendEntry.BackendColumn> columns,
long ttl)
Add a row record to a table with ttl
|
void |
remove(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier)
Delete a record by rowkey and qualifier from a table
|
void |
remove(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier,
boolean latestVersion)
Delete a record by rowkey and qualifier from a table,
just delete the latest version of the specified column if need
|
void |
rollback()
Rollback all updates(put/delete) not committed
|
HbaseSessions.RowIterator |
scan(String table,
byte[] startRow,
boolean inclusiveStart,
byte[] stopRow,
boolean inclusiveStop)
Scan records by rowkey range from a table
|
HbaseSessions.RowIterator |
scan(String table,
org.apache.hadoop.hbase.client.Scan scan)
Inner scan: send scan request to HBase and get iterator
|
long |
storeSize(String table)
Get store size of specified table
|
attach, closeable, created, detach, opened, txState, txState, update, updatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscan, scan, scan, scan, scanreconnectIfNeeded, resetpublic org.apache.hadoop.hbase.client.Connection hbase()
public String namespace()
public void open()
open in interface BackendSessionpublic void close()
close in interface BackendSessionpublic boolean closed()
closed in interface BackendSessionclosed in class BackendSession.AbstractBackendSessionpublic boolean hasChanges()
hasChanges in interface BackendSessionpublic Integer commit()
commit in interface BackendSessionpublic void rollback()
rollback in interface BackendSessionpublic void put(String table, byte[] family, byte[] rowkey, Collection<BackendEntry.BackendColumn> columns)
put in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public void put(String table, byte[] family, byte[] rowkey, Collection<BackendEntry.BackendColumn> columns, long ttl)
public void put(String table, byte[] family, byte[] rowkey, byte[] qualifier, byte[] value)
put in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public void put(String table, byte[] family, byte[] rowkey, byte[] qualifier, byte[] value, long ttl)
public void remove(String table, byte[] family, byte[] rowkey, byte[] qualifier)
remove in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public void remove(String table, byte[] family, byte[] rowkey, byte[] qualifier, boolean latestVersion)
remove in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public void delete(String table, byte[] family, byte[] rowkey)
delete in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public HbaseSessions.RowIterator get(String table, byte[] family, byte[] rowkey, byte[] qualifier)
get in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public HbaseSessions.RowIterator get(String table, byte[] family, byte[] rowkey)
get in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public HbaseSessions.RowIterator get(String table, byte[] family, Set<byte[]> rowkeys)
get in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public HbaseSessions.RowIterator scan(String table, byte[] startRow, boolean inclusiveStart, byte[] stopRow, boolean inclusiveStop)
scan in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public HbaseSessions.RowIterator scan(String table, org.apache.hadoop.hbase.client.Scan scan)
scan in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public long increase(String table, byte[] family, byte[] rowkey, byte[] qualifier, long value)
increase in interface HbaseSessions.HbaseSession<HbaseSessions.RowIterator>public long storeSize(String table) throws IOException
IOExceptionpublic HbaseSessions.CountSession countSession()
Copyright © 2017–2024 The Apache Software Foundation. All rights reserved.