sqoop导入到hdfs时内存不足的错误情况

使用sqoop将postgresql的数据导入到hdfs,运行mapreduce job时出现错误情况。
报错信息如下:
18/08/02 21:54:49 INFO mapreduce.Job: Job job_1533215502568_0002 running in uber mode : false
18/08/02 21:54:49 INFO mapreduce.Job: map 0% reduce 0%
18/08/02 21:54:49 INFO mapreduce.Job: Job job_1533215502568_0002 failed with state FAILED due to: Application application_1533215502568_0002 failed 2 times due to AM Container for appattempt_1533215502568_0002_000002 exited with exitCode: -104
For more detailed output, check application tracking
page:http://master:8088/cluster/app/application_1533215502568_0002Then, click on links to logs of each attempt.
Diagnostics: Container [pid=13688,containerID=container_e07_1533215502568_0002_02_000001] is running beyond physical memory limits. Current usage: 180.2 MB of 170 MB physical memory used; 1.9 GB of 357.0 MB virtual memory used. Killing container.
Dump of the process-tree for container_e07_1533215502568_0002_02_000001 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 13741 13688 13688 13688 (java) 2016 950 1949843456 45774 /usr/jdk64/jdk1.8.0_40/bin/java -Djava.io.tmpdir=/hadoop/yarn/local/usercache/sqoop/appcache/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/hadoop/yarn/log/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog -Dhdp.version=2.3.6.0-3796 -Xmx136m -Dhdp.version=2.3.6.0-3796 org.apache.hadoop.mapreduce.v2.app.MRAppMaster
|- 13688 13686 13688 13688 (bash) 2 5 108789760 363 /bin/bash -c /usr/jdk64/jdk1.8.0_40/bin/java -Djava.io.tmpdir=/hadoop/yarn/local/usercache/sqoop/appcache/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=/hadoop/yarn/log/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog -Dhdp.version=2.3.6.0-3796 -Xmx136m -Dhdp.version=2.3.6.0-3796 org.apache.hadoop.mapreduce.v2.app.MRAppMaster 1>/hadoop/yarn/log/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001/stdout 2>/hadoop/yarn/log/application_1533215502568_0002/container_e07_1533215502568_0002_02_000001/stderr

Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
Failing this attempt. Failing the application.
18/08/02 21:54:50 INFO mapreduce.Job: Counters: 0
18/08/02 21:54:50 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
18/08/02 21:54:50 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 181.329 seconds (0 bytes/sec)
18/08/02 21:54:50 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
18/08/02 21:54:50 INFO mapreduce.ImportJobBase: Retrieved 0 records.
18/08/02 21:54:50 ERROR tool.ImportTool: Error during import: Import job failed!

得知mapreduce的运行内存不足,主要为这一段
Diagnostics: Container [pid=13688,containerID=container_e07_1533215502568_0002_02_000001] is running beyond physical memory limits. Current usage: 180.2 MB of 170 MB physical memory used; 1.9 GB of 357.0 MB virtual memory used. Killing container.
需要的内存为180.2而当前内存为170,在yarn.site 中设置 yarn.scheduler.minimum-allocation-mb 的值为256MB问题解决

你可能感兴趣的:(大数据学习内容)