HBase Read Path
caching maxResultSize AllowPartialScanResultCache Cell-1 Cell-2 RowKey-1 Cell-3 Cell-4 RowKey-2 Cell-5 RowKey-3 Cell-7 RowKey-4 Cell-6 Cell-8 Cell-9 Cell-1 Result-1 Cell-4 Result-3 Cell-5 Result-4 limit Caching maxResultSize CompleteScanResultCache Cell-1 Cell-2 RowKey-1 Cell-3 Cell-4 RowKey-2 Cell-5 RowKey-3 Cell-7 RowKey-4 Cell-6 Cell-8 Cell-9 Cell-1 Result-1 Cell-4 Result-3 Cell-5 Result-4 limit Caching Caching Caching BatchScanResultCache Cell-1 Cell-2 RowKey-1 Cell-3 Cell-4 RowKey-2 Cell-5 RowKey-3 Cell-7 RowKey-4 Cell-6 Cell-8 Cell-9 Cell-1 Result-1 Cell-4 Result-3 Cell-5 Result-40 码力 | 38 页 | 970.76 KB | 1 年前3HBase基本介绍
都可以有多个版本的值, 我没有画出来. 版本⽤用时间戳表示. • 整个table都是按rowkey排序存储的 • 按rowkey⽤用LSM树做了了索引, 没有其他⼆二级 索引 • 所以只有按rowkey查询⽐比较快, 其他全表扫 • 除了了列列族要求是可打印字符, 别的都可以是任 意⼆二进制数据 数据模型 RowKey • ColumnFamily的设计是要求把相关的列列放在 同族 • ⽤用⼀一句句话总结物理理视图, 就是伪装起来的KV存储 这⾥里里我想了了好久如何给⼤大家讲HBase数据模型的物理理视图 数据模型 物理理视图 数据模型 物理理视图 或者换⼀一个⽅方式来看 • 设备id作为rowkey • ⽇日志时间作为version时间 • 其余作为10列列 1个ID, 100条⾏行行为(100个版本), 10列列 = 1000个KV对: id存了了1000次, 时间存了了1000次 就要有node. 如图可以看出RegionServer和Datanode尽量量在同⼀一台机器器上. • ⽔水平 按rowkey分开 region • Pre-split: 0-5 6-10 • Auto-split: size • 垂直 按CF分开 系统组成 Region ⽔水平按rowkey分. 这个分两步, 第⼀一个是在建表的时候指定分的⽅方式. ⽐比如两个split, 0-5 6-100 码力 | 33 页 | 4.86 MB | 1 年前3HBase Practice At XiaoMi
ID in hbase:meta ○ WAL Entry only has an encoded region name, but rowkey in hbase:meta is a full region name, the two different rowkey format messed up the hbase:meta. ○ Inconsistent between WAL position(ZK) Last Pushed Seq ID (Region) WAL-Position Original Design New Design RowKey: Encoded Region Name RowKey: Encoded Region Name RowKey: Full Region Name Why to reimplement the serial replication #1 ➢ ID in hbase:meta ○ WAL Entry only has an encoded region name, but rowkey in hbase:meta is a full region name, the two different rowkey format messed up the hbase:meta. ○ Inconsistent between WAL position(ZK)0 码力 | 56 页 | 350.38 KB | 1 年前3HBase最佳实践及优化
Postgres Conference China 2016 中国用户大会 HBase现存缺点 • SQL(传统BI)不友好,不支持很多传统DBMS 功能,如外键,约束… • 数据无类型 • 非RowKey查询性能差 • Column Family限制(数目,Partition对齐) • Region资源消耗大,实例数目不能太多 • 无法保证服务质量* – Split/Compaction等操作对集群性能影响极大 Conference China 2016 中国用户大会 HBase表结构逻辑图 22 Postgres Conference China 2016 中国用户大会 HBase基础 • 表记录按RowKey字典序存储 • 表Schema只定义到Column Family级别属性 – 每个Column Family可以有任意多个Column – 每个Column有可以有任意多个版本(version)的数据 Conference China 2016 中国用户大会 Key粒度及性能 25 Postgres Conference China 2016 中国用户大会 Key对数据查询的影响 • 使用RowKey进行查询的性能最好 • 指定Timestamp能减少store file级别的读操 作 – Bloom Filter也能达到同样目的 • 选择指定的Column Family可以减少查询需0 码力 | 45 页 | 4.33 MB | 1 年前3电商消息系统架构演进&mdash
4�������� �� ��� ����������� ���������� IM�� ���� ��/��� ����� IM���� ����������DataType���� RowKey=��+��+dataType syncId�� syncBody ���� ������� ���� syncId ��������������� ����syncId��������0 码力 | 22 页 | 12.22 MB | 1 年前32022年美团技术年货 合辑
2. 延时消费 Join 方式:解决占用内存大问题。 ● 曝光流作为主流,写入到 HBase 中,同时为了后续能让其他流在 HBase 中 Join 上曝光,将 RowKey 写入 Redis;后续流通过 RowKey 写入 HBase, 曝光与点击、特征的拼接借助外存完成,保证数据量增大后系统能稳定运行。 ● 样本流延时消费,后台服务的样本流往往会比曝光流先到,为了能 Join0 码力 | 1356 页 | 45.90 MB | 1 年前3
共 6 条
- 1