sqoop导mysql数据到hdfs报错,mapreduce任务失败

16/09/09 15:22:22 INFO mapreduce.Job: Running job: job_1462370365985_0020
16/09/09 15:22:40 INFO mapreduce.Job: Job job_1462370365985_0020 running in uber mode : false
16/09/09 15:22:40 INFO mapreduce.Job: map 0% reduce 0%
16/09/09 15:22:40 INFO mapreduce.Job: Job job_1462370365985_0020 failed with state FAILED due to: Application application_1462370365985_0020 failed 2 times due to AM Container for appattempt_1462370365985_0020_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://liujunjie-1:8088/proxy/ ... /Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1462370365985_0020_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:543)
at org.apache.hadoop.util.Shell.run(Shell.java:460)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:720)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.
16/09/09 15:22:40 INFO mapreduce.Job: Counters: 0
16/09/09 15:22:40 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
16/09/09 15:22:40 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 24.0458 seconds (0 bytes/sec)
16/09/09 15:22:40 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
16/09/09 15:22:40 INFO mapreduce.ImportJobBase: Retrieved 0 records.
16/09/09 15:22:40 ERROR tool.ImportTool: Error during import: Import job failed!

wangxiaolei

赞同来自:

hadoop集群环境跑wordcount能成功吗? sqoop使用的命令是什么?

唯思可达

赞同来自:

sqoop import --connect jdbc:mysql://liujunjie-4:3306/sqoop --username root --password 8184604 --table user_info -m 1   刚测试了一下hadoop集群,reduce总是执行失败

wangxiaolei

赞同来自:

先解决集群的问题,用yarn logs -applicationId xxxx命令看日志

要回复问题请先登录注册