


- Hbase 存






- 唯一性 关联性 ; 长度;
- 长度
- 散列:均匀;
加盐 有规则 任意 增加随机数;
Hash
时间戳反转

- Trigger触发器 如mysql中 外部触发内部操作;协处理器 在HBASE中
HBASE 一级索引RowKey 不能根据字段查询 只能根据RowKey查;Rowkey中拼接添加但很不方便;rawrk索引表 用索引绑定;


插入数据时候 需要同时更新二级索引 使用协处理器 插入数据时候 内部协处理器 分解为不同索引插入不同表中 写规则内部直接处理;查询字段与rowkey建立关系;phenix二级索引 查询字段与rowkey建立关系;

-
客户端找ZK 找插入那个DataNode位置
image.png
*定位好Regin之后 进行数据插入:
插入数据到API;Regin.Put
image.png
image.png
image.png
image.png
*源码中分9步:
Lock rowLock;
Update时间戳 版本;
Build WAL edit;
Append final edit to WAL;不与Hadoop同步;
回写memstore;
Sync wal; 写入Hadoop;
WAL-MemStore - Hadoop




网友评论