设为首页 收藏本站
查看: 598|回复: 0

[经验分享] Hbase/MultipleMasters

[复制链接]

尚未签到

发表于 2016-12-8 08:19:05 | 显示全部楼层 |阅读模式
  http://wiki.apache.org/hadoop/Hbase/MultipleMasters
This document is still a draft
Since version 0.20.0 HBase supports multiple Masters to provide higher availability. It works in the same way that Bigtable does as explained in the 2006 paper. This page contains the information you need to set it up, maintain it, and to understand how it works under the hood.
 
Single Master Setup
  
The Getting Started documentation describes set up with a single Master. A cluster can run without a Master for a few minutes but your regions will be unable to split. If it does happen, you can go to any other machine with the correct installation/configuration and do $ ${HBASE_HOME}/bin/hbase-daemon.sh start master. This newly started Master will take over Master functions.
Currently the Hadoop Distributed Filesystem is not highly available so if the Namenode resides on the same machine as your Master, the cluster is still wedged and you will have to shut down HBase with a high probability of losing data.
 
Multiple Masters Setup
  
Before setting up multiple Masters, you should already have built an HBase cluster with a single Master. If not, please refer to the Getting Started documentation.
 
Basic knowledge
  
The multi-master feature introduced in 0.20.0 does not add cooperating Masters; there is still just one working Master while the other backups wait. For example, if you start 200 Masters only 1 will be active while the others wait for it to die. The switch usually takes zookeeper.session.timeout plus a couple of seconds to occur. See "How it works inside" below for more information.
 
Designing your highly available setup
  
The rule of thumb here is to not put all your eggs in the same basket. You don't want a Namenode and a Master on the same machine because currently you can recover automatically from a Master failure but not from a Namenode failure. Be sure that the Namenode has its own very reliable machine until Hadoop 0.21 comes in with Backup Namenodes. Also you don't want to have a Region Server and a Master on the same node, as that machine failure will imply first a Master failover and then the new Master will have to split the logs of the failed RS.
Your ideal highly available cluster would have 5 or more dedicated Zookeeper servers, 2-3 dedicated Master servers (one per rack for example), 1 very reliable Namenode/Job Tracker server with redundant hardware and the rest is the usual Datanode/Task Tracker/Region Server stack. If you don't even have twice that amount of machines, you will have to evaluate some trade-offs. For example, you could try to keep a dedicated Master server and put the others along the Region Servers as the failure of a backup Master doesn't have any impact and you could do the same for the ZK servers.
 
Managing the Masters
  
Currently handling the other Masters isn't really user friendly but it's getting worked on. When you start HBase, your first main Master will also be started. To start other Masters do $ ${HBASE_HOME}/bin/hbase-daemon.sh start master on all the nodes you want to, as long as the have the correct installation/configuration. You could also do $ ${HBASE_HOME}/bin/hbase-daemons.sh start master and that would start a Master on every machine listed in ��conf/regionserver.
To stop any Master without shutting down HBase, you currently have to kill -9 it (This is OK. All state is maintained elsewhere off in ZooKeeper and out on RegionServers). If you kill the active Master, first make sure it's not splitting logs as you could lose data. To check that, tail the Master's log and watch for anything that says "Splitting logs # of #".
 
How it works inside
  
TBD
Hbase/MultipleMasters (last edited 2009-11-03 01:00:15 by LarsFrancke)

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-311163-1-1.html 上篇帖子: hadoop几种排序简介 下篇帖子: Using Hadoop Distributed Cache
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表