hadoop-005-YARN HA如何配置

发布时间:2021-12-07 14:49:53 作者:小新
来源:亿速云 阅读:157

这篇文章主要介绍了hadoop-005-YARN HA如何配置,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

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

hadoop-005-YARN HA如何配置

<?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 ~]$

感谢你能够认真阅读完这篇文章,希望小编分享的“hadoop-005-YARN HA如何配置”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!

推荐阅读:
  1. Hadoop完全分布式部署
  2. hadoop跟mysql的区别有哪些

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

hadoop yarn

上一篇:Spring Boot中的yaml怎么配置

下一篇:OAuth协议的授权模式有哪些

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》