设为首页 加入收藏

TOP

HBase --- 读写流程(一)
2019-04-14 13:42:45 】 浏览:36
Tags:HBase --- 读写 流程
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yangguosb/article/details/81985127

整体流程

读写流程主要分为两大部分:

  1. Client从MetaTable路由到Region所在的Region Server;
  2. Client直接与对应的Region Server进行交互;

        这里写图片描述

路由表MetaTable

  MetaTable存储Region与Region Server的对应关系,其结构如下所示:
这里写图片描述

路由表的获取时机

  Client 首次读写时会首先从Zookeeper获取MetaTable,然后缓存在本地;

Region Server写流程

  1. 写请求追加写入WAL;
    这里写图片描述
  2. 写入MemStore,给客户端返回ACK;
    这里写图片描述
  3. 如果MemStore超过设定阈值,持久化到磁盘生成HFile;
    这里写图片描述

Region Server读流程

  1. 首先,从读缓存BlockCache(LRU策略)查找;
  2. 其次,从写缓存MemStore查找;
  3. 最后,根据Bloom Filter定位到对应的HFile,并加载到内存,返回对应的单元值;

First, the scanner looks for the Row cells in the Block cache - the read cache. Recently Read Key Values are cached here, and Least Recently Used are evicted when memory is needed. Next, the scanner looks in the MemStore, the write cache in memory containing the most recent writes. If the scanner does not find all of the row cells in the MemStore and Block Cache, then HBase will use the Block Cache indexes and bloom filters to load HFiles into memory, which may contain the target row cells.

这里写图片描述

参考:

  1. https://mapr.com/blog/in-depth-look-hbase-architecture/
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Zeppelin配置hbase解释器 下一篇HBASE获取表格的所有列族(java A..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目