【ERROR】INFO: os::commit_memory(···) failed; error='Cannot allocate memory' (errn

318 阅读1分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

错误

在写完WordCount并打包成jar包以后,使用hadoop运行的时候,出现以下报错: 在这里插入图片描述


解决方法

可以看出最后几行的提示:

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 105381888 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/local/hadoop/hs_err_pid47756.log

大概就是内存不足,需要减少启动程序所需内存,或加大内存,如关闭一些程序。然后把后台的程序关了几个,再重新运行就可以得到正确的结果了。

(省略部分INFO) 在这里插入图片描述 参考文章:blog.csdn.net/weixin_4072…