hbase轻量级中间件simplehbase v1.0简介

https://github.com/zhang-xzhi/simplehbase/
https://github.com/zhang-xzhi/simplehbase/wiki


simplehbase的主要功能

数据类型映射: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批量操作支持。
hbase原生接口支持。
HTablePool管理。
HTable count和sum功能。




V1.0发布note.

Data Object需要被simpleHbase识别,除了原有annotation方式,新增POJO和xml配置方式。

新增count的实现,count时可以limit。

public long count(RowKey startRowKey, RowKey endRowKey,
@Nullable AggregateExtInfo aggregateExtInfo);
public long count(RowKey startRowKey, RowKey endRowKey,
@Nullable String id, @Nullable Map para,
@Nullable AggregateExtInfo aggregateExtInfo);

新增countAndSum。

public long[] countAndSum(RowKey startRowKey, RowKey endRowKey);
public long[] countAndSum(RowKey startRowKey, RowKey endRowKey,
@Nullable AggregateExtInfo aggregateExtInfo);
public long[] countAndSum(RowKey startRowKey, RowKey endRowKey,
@Nullable String id, @Nullable Map para);
public long[] countAndSum(RowKey startRowKey, RowKey endRowKey,
@Nullable String id, @Nullable Map para,
@Nullable AggregateExtInfo aggregateExtInfo);

新增batch get功能。

public List findObjectBatch(List rowKeyList,Class<? extends T> type);
public List> findObjectAndKeyBatch(List rowKeyList, Class<? extends T> type);

增加异常描述family和qualifier,rowKeyHandler,方便问题排查。

调整测试代码。

猜你喜欢

转载自zhang-xzhi-xjtu.iteye.com/blog/2166069