HBASE-21879 Read HFile ’s Block into ByteBuffer directly.before because HDFS does not support the ByteBuffer pread interface, also because of its complexity. For the ByteBuffer pread, we have issue HDFS-3246 to track this, so further HDFS version will support positional read interface (HBASE-21946); The ByteBuffer pread issue HDFS-3246 is still in progress, so we can not just use the HDFS ByteBuffer pread interface in our HBase project. Here we abstract byte[] copying. Once the HDFS ByteBuffer pread is available(Need upgrade the HDFS version in our HBase pom.xml), we can re-implement the ByteBuff pread method by using HDFS pread. #2 Checksum validation0 码力 | 18 页 | 1.14 MB | 1 年前3
HBase最佳实践及优化HBase版本 2008年成为 Apache Hadoop 的一个子项目 3 HBase是Google BigTable的开源实现 • BigTable利用GFS作为其文件存储系统 • HBase使用HDFS作为其文件存储系统 Postgres Conference China 2016 中国用户大会 4 HBase的模型特性 Hadoop database and NoSQL database HBase的实现特性 • 非常高的数据读写速度,为写特别优化 – 高效的随机读取 – 对于数据的某一个子集能够进行有效地扫描 • 具有容错特性,能够将数据持久化的非易失性 存储中 – 使用HDFS做底层存储,可利用Hadoop的压缩 Codec等减少空间占用 • 自动水平扩展 – 只需要加入新的结点即可提高存储容量和吞吐量 – 服务器能够被动态加入或者删除(用以维护和升级) – 服务器自动调整负载平衡 支持基于固定有限条件的高并发高性能查询 • 高速计数器aggregation类型的任务 – HBase强一致性(Strongly consistent)读写保证 • 其他适用Hadoop的NoSQL场景 – HBase基于HDFS存储,和 MapReduce/Hive/Spark等紧密结合 11 Postgres Conference China 2016 中国用户大会 HBase现存缺点 • SQL(传统BI)不友好,不支持很多传统DBMS0 码力 | 45 页 | 4.33 MB | 1 年前3
HBase基本介绍map. 回顾: 稀疏的, ⾏行行和列列⽐比较随意, 不不需要固定的schema, 没有值的位置不不占空间 分布式的, 本身hdfs的是分布式的容错的, 在借助region和cf的⽔水平垂直分表, 整个数据可以很好的分散 持久化的, ⼤大部分数据都是基于hdfs的持久化,(btw 顺序写磁盘, 速度不不慢) Sorted map. 整个数据模型就是⼀一个按key排序的⼤大Map, Agenda 前两个是HBase的 Master是负责管理理的, RegionServer是实际⼲干活的 zookeeper作为协调信息存储的地⽅方, ⽐比如节点健康状态 然后HBase的数据都要存放在hdfs上, 就要有node. 如图可以看出RegionServer和Datanode尽量量在同⼀一台机器器上. • ⽔水平 按rowkey分开 region • Pre-split: 0-5 6-10 column family). 归并排序. • 先找BlockCache • 再找Memstore, 写⼊入还没flush • 根据index去HFile⾥里里找 • HBase如何在hdfs这种append- only⽂文件系统上实现, 修改/删除 操作的 系统组成 RegionServer读操作 这⾥里里需要提的⼀一点是, BlockCache⾥里里不不光对数据做了了缓存,0 码力 | 33 页 | 4.86 MB | 1 年前3
HBase Practice At XiaoMiwithout any HBase RPC requests ❏ Required READ access to reference files and HFiles Snapshot ACL ❏ HDFS ACL could grant accesses to certain users besides owner and group ❏ Can support upto 16 users: 32 of log splitting Log splitting problem - 1 ❏ Too much space need to be reserved at the same time. HDFS may not able to assign enough space to create a new block. Reserved space = number of Log * number HLog block * number of replica ❏ Especially for a small hdfs cluster, whose remaining space is small. Log splitting problem - 2 ❏ Too many HDFS streams created at the same time. Then it is prone to failure0 码力 | 56 页 | 350.38 KB | 1 年前3
HBase Practice At XiaomiServer / Master STW GC ● Slow RPC to HDFS ● Region Server Crash ● High Load ● Network Failure BTW: HBase may also suffer from fault amplification when accessing HDFS, so AsyncDFSClient ? Async HBase0 码力 | 45 页 | 1.32 MB | 1 年前3
共 5 条
- 1













