2015-12-02 34 views
0

将数据从HDFS传输到MySQL时,会生成MapReduce作业。但是,它卡住了,并没有完成。使用从HDFS到MYSQL的Sqoop传输数据时无法完成MR

sqoop export --connect jdbc:mysql://crxy2:3306/test --username root --password 19911130 --table info --export-dir sqoop_export 

我看到下面的日志:

Warning: /software/sqoop-1.4.6.alpha/../hbase does not exist! HBase imports will fail. 
Please set $HBASE_HOME to the root of your HBase installation. 
Warning: /software/sqoop-1.4.6.alpha/../hcatalog does not exist! HCatalog jobs will fail. 
Please set $HCAT_HOME to the root of your HCatalog installation. 
Warning: /software/sqoop-1.4.6.alpha/../accumulo does not exist! Accumulo imports will fail. 
Please set $ACCUMULO_HOME to the root of your Accumulo installation. 
Warning: /software/sqoop-1.4.6.alpha/../zookeeper does not exist! Accumulo imports will fail. 
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation. 
15/12/02 01:17:37 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6 
15/12/02 01:17:37 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 
15/12/02 01:17:37 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. 
15/12/02 01:17:37 INFO tool.CodeGenTool: Beginning code generation 
15/12/02 01:17:38 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `info` AS t LIMIT 1 
15/12/02 01:17:38 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `info` AS t LIMIT 1 
15/12/02 01:17:38 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /software/hadoop-2.6.0 
Note: /tmp/sqoop-root/compile/344126e97612def1e3976c1978c2e75e/info.java uses or overrides a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
15/12/02 01:17:42 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/344126e97612def1e3976c1978c2e75e/info.jar 
15/12/02 01:17:42 INFO mapreduce.ExportJobBase: Beginning export of info 
SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/software/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/software/hbase-0.98.8-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 
15/12/02 01:17:43 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar 
15/12/02 01:17:45 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative 
15/12/02 01:17:45 INFO Configuration.deprecation: mapred.map.tasks.speculative.execution is deprecated. Instead, use mapreduce.map.speculative 
15/12/02 01:17:45 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps 
15/12/02 01:17:46 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032 
15/12/02 01:17:50 INFO input.FileInputFormat: Total input paths to process : 1 
15/12/02 01:17:50 INFO input.FileInputFormat: Total input paths to process : 1 
15/12/02 01:17:50 INFO mapreduce.JobSubmitter: number of splits:4 
15/12/02 01:17:50 INFO Configuration.deprecation: mapred.map.tasks.speculative.execution is deprecated. Instead, use mapreduce.map.speculative 
15/12/02 01:17:50 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1449047829255_0001 
15/12/02 01:17:51 INFO impl.YarnClientImpl: Submitted application application_1449047829255_0001 
15/12/02 01:17:52 INFO mapreduce.Job: The url to track the job: http://crxy2:8088/proxy/application_1449047829255_0001/ 
15/12/02 01:17:52 INFO mapreduce.Job: Running job: job_1449047829255_0001 
15/12/02 01:18:12 INFO mapreduce.Job: Job job_1449047829255_0001 running in uber mode : false 
15/12/02 01:18:12 INFO mapreduce.Job: map 0% reduce 0% 
15/12/02 01:19:10 INFO mapreduce.Job: map 75% reduce 0% 
15/12/02 01:19:12 INFO mapreduce.Job: map 100% reduce 0% 
15/12/02 01:29:41 INFO mapreduce.Job: Task Id : attempt_1449047829255_0001_m_000001_0, Status : FAILED 
AttemptID:attempt_1449047829255_0001_m_000001_0 Timed out after 600 secs 
15/12/02 01:29:42 INFO mapreduce.Job: map 75% reduce 0% 
15/12/02 01:29:58 INFO mapreduce.Job: map 100% reduce 0% 
15/12/02 01:40:11 INFO mapreduce.Job: Task Id : attempt_1449047829255_0001_m_000001_1, Status : FAILED 
AttemptID:attempt_1449047829255_0001_m_000001_1 Timed out after 600 secs 
15/12/02 01:40:12 INFO mapreduce.Job: map 75% reduce 0% 
15/12/02 01:40:28 INFO mapreduce.Job: map 100% reduce 0% 
15/12/02 01:50:41 INFO mapreduce.Job: Task Id : attempt_1449047829255_0001_m_000001_2, Status : FAILED 
AttemptID:attempt_1449047829255_0001_m_000001_2 Timed out after 600 secs 
15/12/02 01:50:42 INFO mapreduce.Job: map 75% reduce 0% 
15/12/02 01:51:00 INFO mapreduce.Job: map 100% reduce 0% 
15/12/02 02:01:13 INFO mapreduce.Job: Job job_1449047829255_0001 failed with state FAILED due to: Task failed task_1449047829255_0001_m_000001 
Job failed as tasks failed. failedMaps:1 failedReduces:0 


15/12/02 02:01:13 INFO mapreduce.Job: Counters: 32 
File System Counters 
FILE: Number of bytes read=0 
FILE: Number of bytes written=370395 
FILE: Number of read operations=0 
FILE: Number of large read operations=0 
FILE: Number of write operations=0 
HDFS: Number of bytes read=556 
HDFS: Number of bytes written=0 
HDFS: Number of read operations=15 
HDFS: Number of large read operations=0 
HDFS: Number of write operations=0 
Job Counters 
Failed map tasks=4 
Launched map tasks=7 
Other local map tasks=3 
Data-local map tasks=4 
Total time spent by all maps in occupied slots (ms)=2732612 
Total time spent by all reduces in occupied slots (ms)=0 
Total time spent by all map tasks (ms)=2732612 
Total vcore-seconds taken by all map tasks=2732612 
Total megabyte-seconds taken by all map tasks=2798194688 
Map-Reduce Framework 
Map input records=0 
Map output records=0 
Input split bytes=504 
Spilled Records=0 
Failed Shuffles=0 
Merged Map outputs=0 
GC time elapsed (ms)=759 
CPU time spent (ms)=5170 
Physical memory (bytes) snapshot=245080064 
Virtual memory (bytes) snapshot=2529026048 
Total committed heap usage (bytes)=46792704 
File Input Format Counters 
Bytes Read=0 
File Output Format Counters 
Bytes Written=0 
15/12/02 02:01:13 INFO mapreduce.ExportJobBase: Transferred 556 bytes in 2,607.4894 seconds (0.2132 bytes/sec) 
15/12/02 02:01:13 INFO mapreduce.ExportJobBase: Exported 0 records. 
15/12/02 02:01:13 ERROR tool.ExportTool: Error during export: Export job failed! 

2015-12-02 08:01:15,791 INFO org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=root OPERATION=Application Finished - Succeeded TARGET=RMAppManager RESULT=SUCCESS APPID=application_1449047829255_0002 
2015-12-02 08:01:15,793 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Application Attempt appattempt_1449047829255_0002_000001 is done. finalState=FINISHED 
2015-12-02 08:01:15,793 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.AppSchedulingInfo: Application application_1449047829255_0002 requests cleared 
2015-12-02 08:01:15,794 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue: Application removed - appId: application_1449047829255_0002 user: root queue: default #user-pending-applications: 0 #user-active-applications: 0 #queue-pending-applications: 0 #queue-active-applications: 0 
2015-12-02 08:01:15,794 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue: Application removed - appId: application_1449047829255_0002 user: root leaf-queue of parent: root #applications: 0 
2015-12-02 08:01:15,794 INFO org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary: appId=application_1449047829255_0002,name=info.jar,user=root,queue=default,state=FINISHED,trackingUrl=http://crxy2:8088/proxy/application_1449047829255_0002/jobhistory/job/job_1449047829255_0002,appMasterHost=crxy2,startTime=1449069503787,finishTime=1449072069229,finalStatus=FAILED 
2015-12-02 08:01:15,796 INFO org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Cleaning master appattempt_1449047829255_0002_000001 
2015-12-02 08:01:15,873 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Null container completed... 
2015-12-02 08:01:15,873 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Null container completed... 
2015-12-02 08:01:16,879 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Null container completed... 
+0

您需要检查地图减少日志,以获得问题的根本原因。你可以检查日志并粘贴它作为缩小阶段的一部分抛出的错误吗? –

+0

我在上面添加了日志请帮我看一下。 – dennis

+0

信息不够好,您需要去reducer任务并提供reducer任务中产生的错误。以上细节来自作业日志,您需要深入到任务日志。 –

回答

0

发问看着不正确的日志。根据评论部分的建议,他可以通过检查失败的任务日志来解决问题。

相关问题