public class HbaseSessions.Session extends BackendSession.AbstractBackendSession implements HbaseSessions.HbaseSession<HbaseSessions.RowIterator>
BackendSession.AbstractBackendSessionopened| 构造器和说明 |
|---|
Session() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 BackendSessionpublic void close()
close 在接口中 BackendSessionpublic boolean closed()
closed 在接口中 BackendSessionclosed 在类中 BackendSession.AbstractBackendSessionpublic boolean hasChanges()
hasChanges 在接口中 BackendSessionpublic Integer commit()
commit 在接口中 BackendSessionpublic void rollback()
rollback 在接口中 BackendSessionpublic void put(String table, byte[] family, byte[] rowkey, Collection<BackendEntry.BackendColumn> columns)
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)
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)
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 get(String table, byte[] family, Set<byte[]> rowkeys)
public HbaseSessions.RowIterator scan(String table, byte[] startRow, boolean inclusiveStart, byte[] stopRow, boolean inclusiveStop)
public HbaseSessions.RowIterator scan(String table, org.apache.hadoop.hbase.client.Scan scan)
public long increase(String table, byte[] family, byte[] rowkey, byte[] qualifier, long value)
public long storeSize(String table) throws IOException
IOExceptionpublic HbaseSessions.CountSession countSession()
Copyright © 2017–2021. All rights reserved.