Java – About EMR error: Mahout of Java heap space

About EMR error: Mahout of Java heap space… here is a solution to the problem.

About EMR error: Mahout of Java heap space

I ran a cluster job on EMR.
The dataset is large. Everything works fine until:

2012-09-29 10:50:58,063 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 23%
2012-09-29 10:51:31,157 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 24%
2012-09-29 10:51:50,197 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 25%
2012-09-29 10:52:17,236 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 26%
2012-09-29 10:52:41,270 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 27%
2012-09-29 10:53:08,350 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 28%
2012-09-29 10:53:29,377 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 29%
2012-09-29 10:53:54,411 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 30%
2012-09-29 10:54:21,448 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 31%
2012-09-29 10:54:48,486 INFO org.apache.hadoop.mapred.JobClient (main):  map 100% reduce 32%
Error: Java heap space
attempt_201209271139_0004_r_000000_0: SLF4J: Class path contains multiple SLF4J bindings.
attempt_201209271139_0004_r_000000_0: SLF4J: Found binding in [jar:file:/home/hadoop/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
attempt_201209271139_0004_r_000000_0: SLF4J: Found binding in [jar:file:/mnt/var/lib/hadoop/mapred/taskTracker/hadoop/jobcache/job_201209271139_0004/jars/job.jar!/org/ slf4j/impl/StaticLoggerBinder.class]
attempt_201209271139_0004_r_000000_0: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

So. The basic question is how to solve this problem?

Solution

I created an instance of m1.large instead of m1.small and ran the s3://elasticmapreduce/bootstrap-actions/configurations/latest/memory-intensive bootstrap action. This is helpful.

So. I added 2 lines to my workflow creation command line:

> --master-instance-type m1.large --slave-instance-type m1.large \
> --bootstrap-action s3://elasticmapreduce/bootstrap-actions/configurations/latest/memory-intensive

That is.

Related Problems and Solutions