2014-02-06 91 views
0

我正在使用talend打開工作室,我的工作包含sqoop和hdfsoutput。 我試圖把從MS-SQL服務器數據,以Hadoop的HDFS使用sqoop 我已經設置了configurations.But當我運行的工作,我得到下面的錯誤使用Sqoop將數據從MS-SQL服務器轉移到HDFS

14/02/06 16:23:12 INFO tool.CodeGenTool: Beginning code generation 
14/02/06 16:23:13 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM [Resource_Dim] AS t WHERE 1=0 
14/02/06 16:23:13 INFO orm.CompilationManager: $HADOOP_MAPRED_HOME is not set 
14/02/06 16:23:13 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE. 
14/02/06 16:23:13 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code. 
14/02/06 16:23:13 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it. 
14/02/06 16:23:13 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start Java compiler. 
       at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:176) 
       at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:83) 
       at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390) 
       at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476) 
       at org.apache.sqoop.Sqoop.run(Sqoop.java:145) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.tSqoopImport_1Process(SqoopConnect.java:435) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.tLibraryLoad_1Process(SqoopConnect.java:357) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.runJobInTOS(SqoopConnect.java:877) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.main(SqoopConnect.java:743) 

Exception in component tSqoopImport_1 
java.lang.Exception: The Sqoop import job has failed 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.tSqoopImport_1Process(SqoopConnect.java:437) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.tLibraryLoad_1Process(SqoopConnect.java:357) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.runJobInTOS(SqoopConnect.java:877) 
       at sampleproj.sqoopconnect_0_1.SqoopConnect.main(SqoopConnect.java:743) 

JDK安裝在系統中不仍然我正在得到上述錯誤。我已經嘗試使用sqoop命令行運行相同的事情,我能夠成功地運行該作業。 但是,當我運行使用talend顯示上述錯誤。請指導如何解決此錯誤。
我使用CDH4.5和拓藍開放工作室BigData 5.3.1

+0

什麼是 「回聲$ JAVA_HOME」 說什麼? – cyroxx

+0

此外,這個問題似乎是一個重複的[看起來好像你正在運行與JRE sqoop - 但JAVA_HOME設置爲JDK](http://stackoverflow.com/q/16101967/1388240) – cyroxx

回答

0

在Talend工作室的首選項,Java的路徑設置爲JRE,只是改變了這條道路從JRE到JDK,這解決了我的問題。

感謝, Bhagwant Bhobe

相關問題