Hi Lee, The box should work as a Hive client. that is, if you are running your import app on that box, Configuring Hadoop(client) and Hive(client) are prerequisites.
HTH, Youngwoo On Wed, Jul 22, 2015 at 10:40 AM, Lee S <[email protected]> wrote: > I import into hive through java programming not the sqoop client itself. > > And my program is running on another computer not on the same cluster > where hadoop and hive are installed. > > Importing into hdfs is successful but into hive failed. > > On Wed, Jul 22, 2015 at 4:54 AM, Abraham Elmahrek <[email protected]> > wrote: > >> Sqoop needs hive/hive libs to execute a hive "LOAD" statement. I'd make >> sure you hive installed on the same machine Sqoop is running. Also, make >> sure you've set HIVE_HOME appropriately as well as per: >> http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_importing_data_into_hive >> . >> >> On Mon, Jul 20, 2015 at 6:42 PM, Lee S <[email protected]> wrote: >> >>> Hi all: >>> I try to import data from mysql to hive in another computer not on the >>> same cluster where hive installed. >>> And I programmed with java to submit sqoop job with SqoopOptions and >>> ImportTool, but encountered an exception as below. >>> Data was successfully transferred to hdfs. The job is submitted >>> successfully, >>> but loading into hive failed. And I read the code of HiveImport, it >>> seems to >>> find hive in the computer I run the programme not on the clusters, any >>> idea? >>> or can I set hive_home as a remote uri? >>> >>> ERROR org.apache.sqoop.tool.ImportTool - Encountered IOException >>> running import job: java.io.IOException: Cannot run program "hive": >>> error=2, No such file or directory >>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) >>> at java.lang.Runtime.exec(Runtime.java:617) >>> at java.lang.Runtime.exec(Runtime.java:528) >>> at org.apache.sqoop.util.Executor.exec(Executor.java:76) >>> at >>> org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:382) >>> at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:335) >>> at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:239) >>> at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:425) >>> at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506) >>> at Sqoop.main(Sqoop.java:22) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) >>> >> >> >
