https://github.com/zhang-xzhi/simplehbase/ https://github.com/zhang-xzhi/simplehbase/wiki## simplehbase簡介
simplehbase是java和hbase之間的輕量級(jí)中間件。
主要包含以下功能。
* 數(shù)據(jù)類型映射:java類型和hbase的bytes之間的數(shù)據(jù)轉(zhuǎn)換。
* 簡單操作封裝:封裝了hbase的put,get,scan等操作為簡單的java操作方式。
* hbase query封裝:封裝了hbase的filter,可以使用sql-like的方式操作hbase。
* 動(dòng)態(tài)query封裝:類似于myibatis,可以使用xml配置動(dòng)態(tài)語句查詢hbase。
* insert,update支持: 建立在hbase的checkAndPut之上。
* hbase多版本支持:提供接口可以對(duì)hbase多版本數(shù)據(jù)進(jìn)行查詢,映射。
* hbase原生接口支持。
### v0.9
新增
支持HTable如下使用方式,對(duì)HTable可以定時(shí)flush。
主要場景:
批量寫入,但是flush可以配置為指定時(shí)間間隔進(jìn)行。
不降低批操作的吞吐,同時(shí),有一定的實(shí)時(shí)性保證。
支持用戶自定義htablePoolService。
多個(gè)HTable可以使用同一個(gè)線程池。
intelligentScanSize功能,可以根據(jù)limit的值設(shè)定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)
性能改進(jìn)
把get的實(shí)現(xiàn)從scan調(diào)回get。
### v0.7新增功能:
支持查詢時(shí)主記錄和關(guān)聯(lián)的RowKey同時(shí)返回。