最近碰到这么一个异常:
Application application_1528180019666_0366 failed 2 times due to AM Container
for appattempt_1528180019666_0366 exited with exitCode: -1000
For more detailed output, check application tracking page:http://
datanode3:8088/proxy/application_1528180019666_0366 /Then, click on links to
logs of each attempt.Diagnostics: Not able to initialize user directories in
any of the configured local directories for user hadoop
Failing this attempt. Failing the application.
刚开始的时候看到这个问题的时候没有头绪,提交的spark程序从hadoop的日志来看,还没开始进行运算,也就是说在yarn初始化的时候出问题了。那么直接贴解决方案:
从错误信息上我们不难看出
Not able to initialize user directories in any of the configured local directories for user hadoop
这是是关于用户本地缓存资源无法初始化的问题,其实就是一个权限的问题。
最简便而受用的的方式是我们打开集群的yarn-site.xml 找到下面的属性: