2016-11-26 53 views
0

我試圖從MySQL表導入HDFS,但抵達該處暫停如下:Sqoop進口越來越暫停

sqoop import --connect jdbc:mysql://localhost/movielens --username root --table tutorials_tbl --m 1 

16/11/26 10:47:33 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. 

16/11/26 10:47:33 INFO tool.CodeGenTool: Beginning code generation 

16/11/26 10:47:34 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `tutorials_tbl` AS t LIMIT 1 

16/11/26 10:47:34 INFO orm.CompilationManager: HADOOP_HOME is /usr/lib/hadoop 

16/11/26 10:47:34 INFO orm.CompilationManager: Found hadoop core jar at: /usr/lib/hadoop/hadoop-core.jar 

16/11/26 10:47:36 ERROR orm.CompilationManager: Could not rename /tmp/sqoop-training/compile/f150b283edf7b39ed9facc57a781542e/tutorials_tbl.java to /home/training/./tutorials_tbl.java 

java.io.IOException: Destination '/home/training/./tutorials_tbl.java' already exists 
     at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:1811) 
     at com.cloudera.sqoop.orm.CompilationManager.compile(CompilationManager.java:229) 
     at com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:85) 
     at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:369) 
     at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:455) 
     at com.cloudera.sqoop.Sqoop.run(Sqoop.java:146) 
     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) 
     at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:182) 
     at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:221) 
     at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:230) 
     at com.cloudera.sqoop.Sqoop.main(Sqoop.java:239) 
16/11/26 10:47:36 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-training/compile/f150b283edf7b39ed9facc57a781542e/tutorials_tbl.jar 

16/11/26 10:47:36 WARN manager.MySQLManager: It looks like you are importing from mysql. 

16/11/26 10:47:36 WARN manager.MySQLManager: This transfer can be faster! Use the --direct 

16/11/26 10:47:36 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path. 

16/11/26 10:47:36 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql) 

16/11/26 10:47:36 INFO mapreduce.ImportJobBase: Beginning import of tutorials_tbl 

這是工作的最後一道防線。 在此先感謝!

+0

檢查你的紗線日誌是否有錯誤。 –

回答

0

Sqoop是一個Map only工作,因此遵循MR的所有語義。

請刪除「/home/training/./tutorials_tbl.java」並重新運行您的工作。