问题描述:
0/12/07 23:36:07 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.21.132:8032
20/12/07 23:36:12 INFO input.FileInputFormat: Total input paths to process : 1
20/12/07 23:36:13 INFO mapreduce.JobSubmitter: number of splits:1
20/12/07 23:36:14 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1607355221856_0001
20/12/07 23:36:16 INFO impl.YarnClientImpl: Submitted application application_1607355221856_0001
20/12/07 23:36:16 INFO mapreduce.Job: The url to track the job: http://master:8088/proxy/application_1607355221856_0001/
20/12/07 23:36:16 INFO mapreduce.Job: Running job: job_1607355221856_0001
20/12/07 23:37:03 INFO mapreduce.Job: Job job_1607355221856_0001 running in uber mode : false
20/12/07 23:37:03 INFO mapreduce.Job: map 0% reduce 0%
20/12/07 23:37:21 INFO mapreduce.Job: map 100% reduce 0%
20/12/07 23:37:21 INFO mapreduce.Job: Task Id : attempt_1607355221856_0001_m_000000_0, Status : FAILED
Container [pid=7204,containerID=container_1607355221856_0001_01_000002] is running beyond virtual memory limits. Current usage: 53.3 MB of 1 GB physical memory used; 2.1 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1607355221856_0001_01_000002 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 7204 7202 7204 7204 (bash) 3 13 227827712 768 /bin/bash -c /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000002/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000002 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_0 2 1>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000002/stdout 2>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000002/stderr
|- 7208 7204 7204 7204 (java) 365 396 2067255296 12880 /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000002/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000002 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_0 2
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
20/12/07 23:37:22 INFO mapreduce.Job: map 0% reduce 0%
20/12/07 23:37:30 INFO mapreduce.Job: Task Id : attempt_1607355221856_0001_m_000000_1, Status : FAILED
Container [pid=7237,containerID=container_1607355221856_0001_01_000003] is running beyond virtual memory limits. Current usage: 77.4 MB of 1 GB physical memory used; 2.1 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1607355221856_0001_01_000003 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 7241 7237 7237 7237 (java) 585 279 2067902464 19041 /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000003/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000003 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_1 3
|- 7237 7235 7237 7237 (bash) 0 1 227827712 772 /bin/bash -c /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000003/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000003 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_1 3 1>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000003/stdout 2>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000003/stderr
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
20/12/07 23:37:37 INFO mapreduce.Job: Task Id : attempt_1607355221856_0001_m_000000_2, Status : FAILED
Container [pid=6822,containerID=container_1607355221856_0001_01_000004] is running beyond virtual memory limits. Current usage: 61.0 MB of 1 GB physical memory used; 2.1 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1607355221856_0001_01_000004 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 6822 6819 6822 6822 (bash) 1 5 227827712 765 /bin/bash -c /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000004/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000004 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_2 4 1>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000004/stdout 2>/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000004/stderr
|- 6826 6822 6822 6822 (java) 239 388 2067853312 14846 /opt/java/jdk1.8/bin/java -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx200m -Djava.io.tmpdir=/opt/tmp/nm-local-dir/usercache/master/appcache/application_1607355221856_0001/container_1607355221856_0001_01_000004/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/opt/hadoop/hadoop2/logs/userlogs/application_1607355221856_0001/container_1607355221856_0001_01_000004 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog org.apache.hadoop.mapred.YarnChild 192.168.21.134 42851 attempt_1607355221856_0001_m_000000_2 4
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
20/12/07 23:37:45 INFO mapreduce.Job: map 100% reduce 100%
20/12/07 23:37:46 INFO mapreduce.Job: Job job_1607355221856_0001 failed with state FAILED due to: Task failed task_1607355221856_0001_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0
20/12/07 23:37:46 INFO mapreduce.Job: Counters: 16
Job Counters
Failed map tasks=4
Killed reduce tasks=1
Launched map tasks=4
Other local map tasks=3
Data-local map tasks=1
Total time spent by all maps in occupied slots (ms)=30090
Total time spent by all reduces in occupied slots (ms)=0
Total time spent by all map tasks (ms)=30090
Total time spent by all reduce tasks (ms)=0
Total vcore-milliseconds taken by all map tasks=30090
Total vcore-milliseconds taken by all reduce tasks=0
Total megabyte-milliseconds taken by all map tasks=30812160
Total megabyte-milliseconds taken by all reduce tasks=0
Map-Reduce Framework
CPU time spent (ms)=0
Physical memory (bytes) snapshot=0
Virtual memory (bytes) snapshot=0
解决:
Container [pid=7237,containerID=container_1607355221856_0001_01_000003] is running beyond virtual memory limits.:Yarn容器虚拟内存率不足:
修改Hadoop_HOME/etc/hadoop/yarn-site.xml文件
<property>
<name>yarn.nodemanager.vmem-pmem-ratio</name>
<value>3.0</value>
</property>