hive中跑任务的时候报错
2014-10-09 10:40:27,368 Stage-1 map = 100%, reduce = 32%, Cumulative CPU 2772.48 sec
2014-10-09 10:40:28,426 Stage-1 map = 100%, reduce = 32%, Cumulative CPU 2772.48 sec
2014-10-09 10:40:29,481 Stage-1 map = 100%, reduce = 32%, Cumulative CPU 2774.12 sec
2014-10-09 10:40:30,885 Stage-1 map = 100%, reduce = 32%, Cumulative CPU 2774.36 sec
2014-10-09 10:40:31,963 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 2693.96 sec
2014-10-09 10:40:33,071 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 2693.96 sec
2014-10-09 10:40:34,126 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 2693.96 sec
2014-10-09 10:40:35,182 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 2693.96 sec
MapReduce Total cumulative CPU time: 44 minutes 53 seconds 960 msec
Ended Job = job_1409124602974_0745 with errors
Error during job, obtaining debugging information...
Examining task ID: task_1409124602974_0745_m_000003 (and more) from job job_1409124602974_0745
Examining task ID: task_1409124602974_0745_m_000002 (and more) from job job_1409124602974_0745
Examining task ID: task_1409124602974_0745_r_000000 (and more) from job job_1409124602974_0745
Examining task ID: task_1409124602974_0745_r_000006 (and more) from job job_1409124602974_0745 Task with the most failures(4):
-----
Task ID:
task_1409124602974_0745_r_000003 URL:
http://HADOOP2:8088/taskdetails.jsp?jobid=job_1409124602974_0745&tipid=task_1409124602974_0745_r_000003
-----
Diagnostic Messages for this Task:
Container [pid=22068,containerID=container_1409124602974_0745_01_000047] is running beyond physical memory limits. Current usage: 1.0 GB of 1 GB physical memory used; 2.6 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1409124602974_0745_01_000047 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 22087 22068 22068 22068 (java) 2536 833 2730713088 265378 /usr/jdk64/jdk1.6.0_31/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx2048m -Djava.io.tmpdir=/hadoop/yarn/local/usercache/root/appcache/application_1409124602974_0745/container_1409124602974_0745_01_000047/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/hadoop/yarn/log/application_1409124602974_0745/container_1409124602974_0745_01_000047 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA org.apache.hadoop.mapred.YarnChild 54.0.88.58 41150 attempt_1409124602974_0745_r_000003_3 47
|- 22068 2381 22068 22068 (bash) 1 1 110755840 302 /bin/bash -c /usr/jdk64/jdk1.6.0_31/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx2048m -Djava.io.tmpdir=/hadoop/yarn/local/usercache/root/appcache/application_1409124602974_0745/container_1409124602974_0745_01_000047/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/hadoop/yarn/log/application_1409124602974_0745/container_1409124602974_0745_01_000047 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA org.apache.hadoop.mapred.YarnChild 54.0.88.58 41150 attempt_1409124602974_0745_r_000003_3 47 1>/hadoop/yarn/log/application_1409124602974_0745/container_1409124602974_0745_01_000047/stdout 2>/hadoop/yarn/log/application_1409124602974_0745/container_1409124602974_0745_01_000047/stderr Container killed on request. Exit code is 143 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched:
Job 0: Map: 23 Reduce: 7 Cumulative CPU: 2693.96 sec HDFS Read: 6278784712 HDFS Write: 590228229 FAIL
Total MapReduce CPU Time Spent: 44 minutes 53 seconds 960 msec
原因:空间不足
解决办法:
在执行hive语句前加上
//只要大于1024,hive默认分配的内存分大一倍,也就是2048M
set mapreduce.map.memory.mb=1025;
set mapreduce.reduce.memory.mb=1025;