简体   繁体   English

Hadoop Java映射器-copyFromLocal堆大小错误

[英]Hadoop java mapper -copyFromLocal heap size error

As part of my Java mapper I have a command executes some code on the local node and copies a local output file to the hadoop fs. 作为Java映射器的一部分,我有一个命令在本地节点上执行一些代码,并将本地输出文件复制到hadoop fs。 Unfortunately I'm getting the following output: 不幸的是,我得到以下输出:

Error occurred during initialization of VM VM初始化期间发生错误

Could not reserve enough space for object heap 无法为对象堆保留足够的空间

I've tried adjusting mapred.map.child.java.opts to -Xmx512M, but unfortunately no luck. 我尝试将mapred.map.child.java.opts调整为-Xmx512M,但是不幸的是没有运气。

When I ssh into the node, I can run the -copyFromLocal command without any issues. 当我SSH进入节点时,我可以运行-copyFromLocal命令而没有任何问题。 The ouput files are also quite small like around 100kb. 输出文件也非常小,大约100kb。

Any help would be greatly appreciated! 任何帮助将不胜感激!

An infinite loop in the mapper or reducer can cause Out of memory errors. 映射器或化简器中的无限循环会导致内存不足错误。

I ran into an OoM once when I had a while-loop with iterator.hasNext() as the condition, for the reducer values, and was not calling iterator.next() inside the loop. 当我有一个使用iterator.hasNext()作为条件,用于化简器值的条件循环并且没有在循环内调用iterator.next()时,我遇到了一个OoM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM