大叔经验分享(9)yarn重要配置yarn.nodemanager.local-dirs
yarn中有一个比较重要的配置yarn.nodemanager.local-dirs,如果配置的不好,在饱和状态运行下集群会出现很多问题:
1 默认配置${hadoop.tmp.dir}/nm-local-dir,系统盘通常只有几百G,配置在这里会经常报磁盘空间不足的错误;
2 配置到其中1个数据盘,比如/data0/,这个数据盘会经常没有响应,或者直接坏掉;
3 正确的配置是配置到所有的数据盘,通常是12个,其实yarn的description写的很清楚
List of directories to store localized files in. An application's localized file directory will be found in:
${yarn.nodemanager.local-dirs}/usercache/${user}/appcache/application_${appid}.
Individual containers' work directories, called container_${contid}, will
be subdirectories of this.
yarn.nodemanager.local-dirs
${hadoop.tmp.dir}/nm-local-dir
hadoop.tmp.dir
/tmp/hadoop-tmp
A base for other temporary directories.
CDH建议