简体   繁体   English

尝试将整个文件夹作为Mapreduce程序的输入时,我遇到“ Java堆空间错误”

[英]I'm facing “Java heap space error” ,when I'm trying to give entire folder as input to Mapreduce Program

I'm facing "Java Heap space error",when I'm trying to run the mapreduce program by giving entire folder as input to the MR Job.When I'm giving a single file as input to MR job,I'm facing no error.The job has run successfully. 当我尝试通过将整个文件夹作为MR Job的输入来运行mapreduce程序时,遇到“ Java堆空间错误”。当我将单个文件作为MR Job的输入时,我面临着没有错误。作业已成功运行。

Changes I tried in hadoop-env.sh file:
=====================================
I had increased the memory size from 1024 to 2048MB
export HADOOP_CLIENT_OPTS="-Xmx2048m $HADOOP_CLIENT_OPTS"

Changes in mapred-site.xml:
===========================
<property>
  <name>mapred.child.java.opts</name>
  <value>-Xmx2048m</value>
</property>

By making changes in these files also,I'm still facing the "Java heap space error". 通过对这些文件进行更改,我仍然面临着“ Java堆空间错误”。

Can anyone please suggest me on this issue ... 任何人都可以在这个问题上建议我...

You can turn on the HPROF profiling for your job with something like this, 您可以使用以下方式为您的工作打开HPROF配置文件,

conf.setBoolean("mapred.task.profile", true); conf.set("mapred.task.profile.params", "-agentlib:hprof=cpu=samples," + "heap=sites,depth=6,force=n,thread=y,verbose=n,file=%s"); conf.set("mapred.task.profile.maps", "0-2"); conf.set("mapred.task.profile.reduces", "0-2");

This will help you to diagnose what exhausted the heap. 这将帮助您诊断耗尽堆的原因。 See more details in "Hadoop The Definitive Guide" page 178-181." 请参阅“ Hadoop权威指南”第178-181页中的更多详细信息。

暂无
暂无

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

相关问题 尝试从Web服务获取响应时出现“ Java堆空间”错误 - “Java Heap Space” error when I'm trying to get the response from a webservice 为什么我在 Java 中遇到堆空间错误? - why i'm getting heap space error in java? 将 java 添加到 sql 时遇到问题 - I'm facing an issue when I'm adding java to sql 当我尝试在Ubuntu 18.04 m中安装JAVA 7时遇到一些问题 - When i am Trying to install JAVA 7 in Ubuntu 18.04 m facing some problem 运行mapreduce程序时出现“ Java堆空间不足内存错误” - “Java Heap space Out Of Memory Error” while running a mapreduce program 下面是 json 数据 m 试图通过 java 程序从文本文件中读取。 面临解析错误 - Below is json data m trying to read from text file through java program. facing parsing error 我试图在Java线程中运行控制台输入,但是我的程序在readLine()方法上挂断了 - I'm trying to run console input in a thread in Java but my program is getting hungup on the readLine() method 我在netbeans中遇到jcalender代码错误 - I'm facing an error with jcalender code in netbeans (Java)(SQL)我正在尝试检查数据库中的用户输入以登录,但我却发现参数类型不匹配错误? - (Java)(SQL) I'm trying to check a user input against my database to login but I'm getting and arguement type mismatch error? 我正在尝试制作一个可以创建密码的Java程序 - I'm trying to make a java program that creates passwords
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM