https://github.com/zhang-xzhi/simplehbase/ https://github.com/zhang-xzhi/simplehbase/wiki## simplehbase簡介
simplehbase是java和hbase之間的輕量級中間件。
主要包含以下功能。
* 數據類型映射:java類型和hbase的bytes之間的數據轉換。
* 簡單操作封裝:封裝了hbase的put,get,scan等操作為簡單的java操作方式。
* hbase query封裝:封裝了hbase的filter,可以使用sql-like的方式操作hbase。
* 動態query封裝:類似于myibatis,可以使用xml配置動態語句查詢hbase。
* insert,update支持: 建立在hbase的checkAndPut之上。
* hbase多版本支持:提供接口可以對hbase多版本數據進行查詢,映射。
* hbase原生接口支持。
### v0.9
新增
支持HTable如下使用方式,對HTable可以定時flush。
主要場景:
批量寫入,但是flush可以配置為指定時間間隔進行。
不降低批操作的吞吐,同時,有一定的實時性保證。
支持用戶自定義htablePoolService。
多個HTable可以使用同一個線程池。
intelligentScanSize功能,可以根據limit的值設定scan的cachingsize大小。
### v0.8
批量操作接口新增
public <T> void putObjectList(List<PutRequest<T>> putRequestList);
public void deleteObjectList(List<RowKey> rowKeyList, Class<?> type);
public <T> void putObjectListMV(List<PutRequest<T>> putRequests,long timestamp)
public <T> void putObjectListMV(List<PutRequest<T>> putRequests,Date timestamp)
public <T> void putObjectListMV(List<PutRequest<T>> putRequestList)
public void deleteObjectMV(RowKey rowKey, Class<?> type, long timeStamp)
public void deleteObjectMV(RowKey rowKey, Class<?> type, Date timeStamp)
public void deleteObjectListMV(List<RowKey> rowKeyList, Class<?> type,long timeStamp)
public void deleteObjectListMV(List<RowKey> rowKeyList, Class<?> type,Date timeStamp)
public void deleteObjectListMV(List<DeleteRequest> deleteRequestList,Class<?> type);
Util新增(前綴查詢使用)
public static RowKey getEndRowKeyOfPrefix(RowKey prefixRowKey)
性能改進
把get的實現從scan調回get。
### v0.7新增功能:
支持查詢時主記錄和關聯的RowKey同時返回。