public final class HbaseSessions.Session extends BackendSession
| Constructor and Description |
|---|
Session() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear updates not committed in the session
|
void |
close() |
boolean |
closed() |
Integer |
commit()
Commit all updates(put/delete) to DB
|
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
|
boolean |
hasChanges()
Any change in the session
|
long |
increase(String table,
byte[] family,
byte[] rowkey,
byte[] qualifier,
long value)
Increase a counter by rowkey and qualifier to a table
|
void |
put(String table,
byte[] family,
byte[] rowkey,
Collection<BackendEntry.BackendColumn> columns)
Add a row record to a table
|
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
|
HbaseSessions.RowIterator |
scan(String table,
byte[] prefix)
Scan records by rowkey prefix from a table
|
HbaseSessions.RowIterator |
scan(String table,
byte[] startRow,
boolean inclusiveStart,
byte[] prefix)
Scan records by rowkey start and prefix from a table
|
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,
byte[] startRow,
byte[] stopRow)
Scan records by rowkey range from a table
|
HbaseSessions.RowIterator |
scan(String table,
long limit)
Scan all records from a table
|
long |
storeSize(String table)
Get store size of specified table
|
public void close()
close in class BackendSessionpublic boolean closed()
closed in class BackendSessionpublic void clear()
clear in class BackendSessionpublic boolean hasChanges()
hasChanges in class BackendSessionpublic Integer commit()
commit in class BackendSessionpublic void put(String table, byte[] family, byte[] rowkey, Collection<BackendEntry.BackendColumn> columns)
public void remove(String table, byte[] family, byte[] rowkey, byte[] qualifier)
public void remove(String table, byte[] family, byte[] rowkey, byte[] qualifier, boolean latestVersion)
public void delete(String table, byte[] family, byte[] rowkey)
public HbaseSessions.RowIterator get(String table, byte[] family, byte[] rowkey, byte[] qualifier)
public HbaseSessions.RowIterator get(String table, byte[] family, byte[] rowkey)
public HbaseSessions.RowIterator scan(String table, long limit)
public HbaseSessions.RowIterator scan(String table, byte[] prefix)
public HbaseSessions.RowIterator scan(String table, byte[] startRow, boolean inclusiveStart, byte[] prefix)
public HbaseSessions.RowIterator scan(String table, byte[] startRow, byte[] stopRow)
public HbaseSessions.RowIterator scan(String table, byte[] startRow, boolean inclusiveStart, byte[] stopRow, boolean inclusiveStop)
public long increase(String table, byte[] family, byte[] rowkey, byte[] qualifier, long value)
public long storeSize(String table) throws IOException
IOExceptionCopyright © 2017–2018. All rights reserved.