【发布时间】:2018-02-13 06:52:25
【问题描述】:
我正在尝试创建具有以下结构的 hbase 表。
**rowkey** |**CF1**
(customerid,txtimestamp)|customerid,amount
- 我想使用customerid查询特定时期范围内的记录。
- 我的 rowkey 以相反的顺序使用客户 ID 和交易时间戳。
Long customerid=Long.valueOf(new StringBuilder(customerid).reverse().toString());
byte[] rowKey = Bytes.add(Bytes.toBytes(customerid),Bytes.toBytes(txttimestamp.getTime()));
- 如何设计行键以便将其拆分为 4 个区域服务器?
- 有没有高效的行键设计方法?
【问题讨论】: