zoukankan      html  css  js  c++  java
  • How Region Split works in Hbase

    1. A region is decided to be split when store file size goes above hbase.hregion.max.filesize or according to defined region split policy.
    2. At this point this region is divided into two by region server.
    3. Region server creates two reference files for these two daughter regions.
    4. These reference files are stored in a new directory called splits under parent directory.
    5. Exactly at this point, parent region is marked as closed or offline so no client tries to read or write to it.
    6. Now region server creates two new directories in splits directory for these daughter regions.
    7. If steps till 6 are completed successfully, Region server moves both daughter region directories under table directory.
    8. The META table is now informed of the creation of two new regions, along with an update in the entry of parent region that it has now been split and is offline. (OFFLINE=true , SPLIT=true)
    9. The reference files are very small files containing only the key at which the split happened and also whether it represents top half or bottom half of the parent region.
    10. There is a class called “HalfHFileReader”which then utilizes these two reference files to read the original data file of parent region and also to decide as which half of the file has to be read.
    11. Both regions are now brought online by region server and start serving requests to clients.
    12. As soon as the daughter regions come online, a compaction is scheduled which rewrites the HFile of parent region into two HFiles independent for both daughter regions.
    13. As this process in step 12 completes, both the HFiles cleanly replace their respective reference files. The compaction activity happens under .tmp directory of daughter regions.
    14. With the successful completion till step 13, the parent region is now removed from META and all its files and directories marked for deletion.
    15. Finally Master server is informed by this Region server about two new regions getting born. Master now decides the fate of the two regions as to let them run on same region server or have them travel to another one.
  • 相关阅读:
    [转]list的交集,差集,并集
    [转]$.post() 和 $.get() 如何同步请求
    [转]Jsoup(一)Jsoup详解(官方)
    [转]Kindeditor图片粘贴上传(chrome)
    [转]kindeditor隐藏上传图片框网络图片或本地上传的功能
    微信公众号平台上传文件返回错误代码:40005 invalid file type
    [转]spring MultipartFile 转 File
    [转]客户端js判断文件类型和文件大小即限制上传大小
    java list排序
    spring security oauth2.0 实现
  • 原文地址:https://www.cnblogs.com/gm-201705/p/10058425.html
Copyright © 2011-2022 走看看