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

关于动态 静态资源池的配置之前都有提过,能够从如下几篇了解:apache

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

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

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

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

Hadoop 2.0中Capacity Scheduler与Fair Scheduler对比spa

Hadoop权限管理hadoop

而若是不小配错了想回滚怎么办???ci

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

 



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

  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 ),已被服务保存。当你从新启用静态服务池,这些百分比及设置都会生效。若是你想恢复到以前的配置,按照下面的程序,恢复改变便可get

 

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

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

相关文章
相关标签/搜索