这两天执行个wordcount或pi老是卡住或报错failed,查找了多种缘由,明确了跑个job时一些参数的设置;java
Job Finished in 16.602 seconds
java.io.FileNotFoundException: File does not exist: hdfs://dell:8020/user/root/QuasiMonteCarlo_1482373118226_505074045/out/reduce-outnode
而后我在nodemanager日志中看到:日志
container [pid=26086,containerID=container_1482373104195_0001_02_000001] is running beyond virtual memory limits. Current usage: 161.4 MB of 200 MB physical memory used; 879.8 MB of 420.0 MB virtual memory used. Killing container.blog
发现虚拟内存溢出了,因此查阅了相关资料;内存
1、it
yarn.nodemanager.vmem-pmem-ratio: 物理内存 与 虚拟内存的比率,每用1M物理内存,默认使用2.1M虚拟内存,(建议调大);io
或是将 yarn.nodemanager.vmem-check-enabled 虚拟内存的检查false掉,这一点很重要!sed