博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hadoop-005-YARN HA 配置
阅读量:6158 次
发布时间:2019-06-21

本文共 2623 字,大约阅读时间需要 8 分钟。

hot3.png

yarn-site.xml 并使用zookeeper 来 管理resourcemanager的状态

 

<?xml version="1.0"?>

<configuration>
<property>
  <name>yarn.resourcemanager.ha.enabled</name>
  <value>true</value>
</property>
<property>
  <name>yarn.resourcemanager.cluster-id</name>
  <value>cluster1</value>
</property>
<property>
  <name>yarn.resourcemanager.ha.rm-ids</name>
  <value>rm1,rm2</value>
</property>
<property>
  <name>yarn.resourcemanager.hostname.rm1</name>
  <value>master</value>
</property>
<property>
  <name>yarn.resourcemanager.hostname.rm2</name>
  <value>slave01</value>
</property>
<property>
  <name>yarn.resourcemanager.webapp.address.rm1</name>
  <value>master:8088</value>
</property>
<property>
  <name>yarn.resourcemanager.webapp.address.rm2</name>
  <value>slave01:8088</value>
</property>
<property>
  <name>yarn.resourcemanager.zk-address</name>
  <value>master:2181,slave01:2181,slave02:2181</value>
</property>
<!-- Site specific YARN configuration properties -->

</configuration>

将配置同步到 master 和slave01 节点,然后启动rm

hadoop-2.7.2/sbin/yarn-daemon.sh start resourcemanager

查看节点状态

 hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm1

 hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm2

[jxlgzwh@slave01 ~]$ hadoop-2.7.2/sbin/yarn-daemon.sh start resourcemanager
starting resourcemanager, logging to /home/jxlgzwh/hadoop-2.7.2/logs/yarn-jxlgzwh-resourcemanager-slave01.out
[jxlgzwh@slave01 ~]$ jps
4160 DataNode
3986 NameNode
4853 ResourceManager
4885 Jps
3851 JournalNode
3502 QuorumPeerMain
4542 DFSZKFailoverController
[jxlgzwh@slave01 ~]$ hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm1
standby
[jxlgzwh@slave01 ~]$ hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm2
active
[jxlgzwh@slave01 ~]$ jps
4160 DataNode
5425 Jps
3986 NameNode
4853 ResourceManager
3851 JournalNode
3502 QuorumPeerMain
4542 DFSZKFailoverController
[jxlgzwh@slave01 ~]$ hadoop-2.7.2/sbin/yarn-daemon.sh stop resourcemanager
stopping resourcemanager
[jxlgzwh@slave01 ~]$ hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm1
active
[jxlgzwh@slave01 ~]$ hadoop-2.7.2/bin/yarn rmadmin -getServiceState rm2
16/11/27 23:44:42 INFO ipc.Client: Retrying connect to server: slave01/192.168.31.130:8033. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=1, sleepTime=1000 MILLISECONDS)
Operation failed: Call From slave01/192.168.31.130 to slave01:8033 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
[jxlgzwh@slave01 ~]$

参考文档

http://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html#RM_Failover

转载于:https://my.oschina.net/zhongwenhao/blog/795118

你可能感兴趣的文章
我的友情链接
查看>>
在C#调用C++的DLL简析(二)—— 生成托管dll
查看>>
Linux macos 常用终端操作
查看>>
企业网络的管理思路
查看>>
Linux磁盘分区与挂载
查看>>
J2se学习笔记一
查看>>
DNS视图及日志系统
查看>>
老李分享:Android性能优化之内存泄漏 3
查看>>
mysql命令
查看>>
来自极客标签10款最新设计素材-系列七
查看>>
极客技术专题【009期】:web技术开发小技巧
查看>>
PHP 简单计算器代码实现
查看>>
正则表达式的知识普及
查看>>
docker使用笔记
查看>>
华为eNSP模拟器上实现FTP服务
查看>>
【全球AI人才排行榜】美国第一,中国仅排名第7
查看>>
微信小程序输入框input
查看>>
MySql字符串函数使用技巧
查看>>
Doc2Vec,Word2Vec文本相似度 初体验。
查看>>
系统ghost后变成一个盘了别的分区的文件怎么找回
查看>>