eclipse调试时遇到如下问题:
12/02/09 10:06:30 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
12/02/09 10:06:30 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
12/02/09 10:06:30 INFO mapred.FileInputFormat: Total input paths to process : 2
12/02/09 10:06:30 INFO mapred.JobClient: Running job: job_local_0001
12/02/09 10:06:30 INFO mapred.FileInputFormat: Total input paths to process : 2
12/02/09 10:06:30 INFO mapred.MapTask: numReduceTasks: 1
12/02/09 10:06:30 INFO mapred.MapTask: io.sort.mb = 100
12/02/09 10:06:31 WARN mapred.LocalJobRunner: job_local_0001
java.lang.OutOfMemoryError: Java heap space
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.<init>(MapTask.java:781)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:350)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
12/02/09 10:06:31 INFO mapred.JobClient: map 0% reduce 0%
12/02/09 10:06:31 INFO mapred.JobClient: Job complete: job_local_0001
12/02/09 10:06:31 INFO mapred.JobClient: Counters: 0
java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1252)
at com.hadoop.test.Test1.main(Test1.java:50)
解决:
修改java类的vm内存run——>config——>vm argument,添加参数: -Xmx1024m。也可以修改hadoop-env.sh中的HADOOP_HEAPSIZE配置