CDH5动静态资源池配置与回滚

关于动态 静态资源池的配置以前都有提过,可以从以下几篇了解:

YARN动态资源池配置案例 https://yq.aliyun.com/ziliao/346856#

Hadoop YARN配置参数剖析(4)—Fair Scheduler相关参数

Hadoop YARN配置参数剖析(5)—Capacity Scheduler相关参数

Hadoop YARN配置参数剖析(5)—Capacity Scheduler相关参数

Hadoop 2.0中Capacity Scheduler与Fair Scheduler对比

Hadoop权限管理

而如果不小配错了想回滚怎么办???

动态池还好说重设刷新资源状态就好, 静态的可以参考如下:

 



解决办法:
英文好的就看原文吧:

  1. Disabling Static Service Pools
  2.  
  3. To disable static service pools, disable cgroup-based resource management for all hosts in all clusters:
  4.  
  5. 1.In the main navigation bar, click Hosts.
  6. 2.Click the Configuration tab.
  7. 3.Click the Resource Management category, uncheck the Enable Cgroup-based Resource Management property, then click Save Changes.
  8. 4.Restart all services. 
  9. Static resource management is disabled, but the percentages you set when you configured the pools, and all the changed settings (for example, heap sizes), are retained by the services. The percentages and settings will also be used when you re-enable static service pools. If you want to revert to the settings you had before static service pools were enabled, follow the procedures in Viewing and Reverting Configuration Changes.
复制代码





译文:不当之处多多指正
停止静态服务池

停止静态服务池,停止集群上所有主机的resource management

1.在主导航栏上,单击“主机。
2.单击“配置”选项卡。
3.单击Resource Management,取消Cgroup-based资源管理属性,然后保存改变。
4.重启所有服务
静态资源管理是禁用的,但是配置的静态服务池,以及其它改变的设置(例如heap size ),已被服务保存。当你重新启用静态服务池,这些百分比及设置都会生效。如果你想恢复到之前的配置,按照下面的程序,恢复改变即可

 

静态池配置重启后遇到的坑:

spark  yarn-client 模式报错:

ERROR spark.SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.

yarn log:

Application application_1547969490810_0012 failed 2 times due to AM Container for appattempt_1547969490810_0012_000002 exited with exitCode: -1000

For more detailed output, check application tracking page:http://master:8088/proxy/application_1547969490810_0012/Then, click on links to logs of each attempt.

Diagnostics: Application application_1547969490810_0012 initialization failed (exitCode=255) with output: main : command provided 0

main : run as user is nobody

main : requested yarn user is hdfs

Can't create directory /data/yarn/nm/usercache/hdfs/appcache/application_1547969490810_0012 - Permission denied

Did not create any app directories

Failing this attempt. Failing the application.

解决方案:

1.检查 spark_home 

2.检查hdfs下spakr相关jar

3.网上说清除yarn相关usercache:  rm -rf /data/yarn/nm/usercache/*

我查了看了下目录权限 变了,各个节点改回来试了不行,还是删了

ll /data/yarn/nm/usercache/
总用量 32
drwxr-s---. 4 nobody yarn 1024 9月  29 20:10 hdfs
drwxr-x---. 4 yarn   yarn 1024 10月 24 15:45 hue_ro
drwxr-x---. 4 yarn   yarn 1024 1月  16 15:32 root
drwxr-x---. 4 yarn   yarn 1024 1月  16 14:00 test

chown yarn:yarn /data/yarn/nm/usercache/hdfs

 

转载于:https://my.oschina.net/hblt147/blog/3003797

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值