RegionServer Splitting Implementation:regionServer 分裂过程分析

The RegionServer decides locally to split the region, and prepares the split. THE SPLIT TRANSACTION IS STARTED.As a first step, the RegionServer acquires a shared read lock on the table to prevent schema modifications during the splitting process. Then it creates a znode in zookeeper under
/hbase/region-in-transition/region-name, and sets the znode’s state toSPLITTING.The Master learns about this znode, since it has a watcher for the parent
region-in-transitionznode.The RegionServer creates a sub-directory named
.splitsunder the parent’sregiondirectory in HDFS.The RegionServer closes the parent region and marks the region as offline in its local data structures. THE SPLITTING REGION IS NOW OFFLINE. At this point, client requests coming to the parent region will throw
NotServingRegionException. The client will retry with some backoff. The closing region is flushed.The RegionServer creates region directories under the
.splitsdirectory, for daughter regions A and B, and creates necessary data structures. Then it splits the store files, in the sense that it creates two Reference files per store file in the parent region. Those reference files will point to the parent region’s files.The RegionServer creates the actual region directory in HDFS, and moves the reference files for each daughter.
The RegionServer sends a
Putrequest to the.META.table, to set the parent as offline in the.META.table and add information about daughter regions. At this point, there won’t be individual entries in.META.for the daughters. Clients will see that the parent region is split if they scan.META., but won’t know about the daughters until they appear in.META.. Also, if thisPutto.META. succeeds, the parent will be effectively split. If the RegionServer fails before this RPC succeeds, Master and the next Region Server opening the region will clean dirty state about the region split. After the.META.update, though, the region split will be rolled-forward by Master.The RegionServer opens daughters A and B in parallel.
The RegionServer adds the daughters A and B to
.META., together with information that it hosts the regions.THE SPLIT REGIONS (DAUGHTERS WITH REFERENCES TO PARENT) ARE NOW ONLINE. After this point, clients can discover the new regions and issue requests to them. Clients cache the.META.entries locally, but when they make requests to the RegionServer or.META., their caches will be invalidated, and they will learn about the new regions from.META..The RegionServer updates znode
/hbase/region-in-transition/region-namein ZooKeeper to stateSPLIT, so that the master can learn about it. The balancer can freely re-assign the daughter regions to other region servers if necessary. THE SPLIT TRANSACTION IS NOW FINISHED.After the split,
.META.and HDFS will still contain references to the parent region. Those references will be removed when compactions in daughter regions rewrite the data files. Garbage collection tasks in the master periodically check whether the daughter regions still refer to the parent region’s files. If not, the parent region will be removed.- 本文链接地址:http://hbase.apache.org/book.html#regionserver.arch
RegionServer Splitting Implementation:regionServer 分裂过程分析的更多相关文章
- HBase RegionServer Splitting 流程
RegionServer Splitting 实现 HBase 中的写请求由 Region Server 处理,这些数据首先存储在 memstore (RegionServer 里的一个存储系统)里. ...
- HBASE 优化之REGIONSERVER
HBASE 优化之REGIONSERVER 一,概述 本人在使用优化regionserver的过程有些心得,借此随笔的机会,向大家介绍我的心得,有些是网上拿来的有些是自己在使用过程自己的经验,希望对大 ...
- HBase–RegionServer宕机恢复原理
Region Server宕机总述 HBase一个很大的特色是扩展性极其友好,可以通过简单地加机器实现集群规模的线性扩展,而且机器的配置并不需要太好,通过大量廉价机器代替价格昂贵的高性能机器.但也正因 ...
- Hbase学习02
第2章 Apache HBase配置 本章在“入门”一章中进行了扩展,以进一步解释Apache HBase的配置. 请仔细阅读本章,特别是基本先决条件,确保您的HBase测试和部署顺利进行,并防止数据 ...
- hbase官方文档(转)
FROM:http://www.just4e.com/hbase.html Apache HBase™ 参考指南 HBase 官方文档中文版 Copyright © 2012 Apache Soft ...
- HBase官方文档
HBase官方文档 目录 序 1. 入门 1.1. 介绍 1.2. 快速开始 2. Apache HBase (TM)配置 2.1. 基础条件 2.2. HBase 运行模式: 独立和分布式 2.3. ...
- Hbase集群搭建及所有配置调优参数整理及API代码运行
最近为了方便开发,在自己的虚拟机上搭建了三节点的Hadoop集群与Hbase集群,hadoop集群的搭建与zookeeper集群这里就不再详细说明,原来的笔记中记录过.这里将hbase配置参数进行相应 ...
- HBase学习-HBase原理
1.系统架构 1.1 图解 从HBase的架构图上可以看出,HBase中的组件包括Client.Zookeeper.HMaster.HRegionServer.HRegion.Store.MemS ...
- HBase 架构与工作原理5 - Region 的部分特性
本文系转载,如有侵权,请联系我:likui0913@gmail.com Region Region 是表格可用性和分布的基本元素,由列族(Column Family)构成的 Store 组成.对象的层 ...
随机推荐
- Excel中数字和字母混合时提取某些字符进行排序
在excel中,当数字和字母混合在一起的时候,会出现排序错误的情况 比如下图的这种情况.我们希望的是2排在1后面,但是实际上10却排在了1的后面.这时候我们就需要把字符串中的数字提取出来进行排序 第一 ...
- python-javascript之bom
BOM BOM介绍 全称 Browser Object Mode 浏览器对象模式 操作浏览器的API接口.比如浏览器自动滚动 Windows对象的顶层部分是BOM的顶层(核心)对象,所有的对象都是通过 ...
- Loadrunner实现多台测试机负载时可能遇到的难题
压测机安装的loadrunner版本为11.0 压测机器的操作系统是windows server 2016 所有的负载机器操作系统和压侧机器是一样的,都是windows server 2016 Err ...
- 分布式服务防雪崩熔断器,Hystrix理论+实战。
Hystrix是什么? hystrix对应的中文名字是"豪猪",豪猪周身长满了刺,能保护自己不受天敌的伤害,代表了一种防御机制,这与hystrix本身的功能不谋而合,因此Netfl ...
- java异常不匹配问题
java的异常处理是为了提高程序健壮性的. 当发生异常的时候,我们把这个异常捕获到,或者throw出去.然后对这些异常的情况进行处理.并且异常发生之后的代码仍然会执行,这样就能提高程序的健壮性.如下 ...
- SCAU大二上Java综合性实验
一.题目要求 实验内容: 1. 已经提供的原始数据:班级成绩单文件 该文件为文本文件,存储某个班的所有学生某门课程的成绩. 例如:2012级计算机科学与技术8班-面向对象程序设计.txt 文件中每行存 ...
- Java中的HashMap的2种遍历方式比较
首先我们准备数据,准备一个map Map<String, String> map = new HashMap<String, String>(); for (int i = 0 ...
- python函数参数*args **kwargs
毕业多年,把C++都就饭吃了....今天居然在纠结什么是形参什么是实参..... 定义函数里面写的参数就是形参,因为没有内存占用,实际调用时写的参数就是实参,因为有内存占用和传值 然后就是位置参数,可 ...
- spring框架的一些测试思路
一.Spring Boot Actuators Spring Boot Actuator是Spring Boot提供的对应用系统的监控和管理的集成功能,可以查看应用配置的详细信息,例如自动化配置信息. ...
- 【leetcode】985. Sum of Even Numbers After Queries
题目如下: We have an array A of integers, and an array queries of queries. For the i-th query val = quer ...