Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

(NEW INSTALL) Sqoop 1.4.7.7 / CDP 7.1.3 hive.HiveImport get error: java.io.IOException: Hive exited with status 4

avatar
Explorer

I'm trying to test Sqoop action in the following environment:

  • CDP 7.1.3  (new instalation)
  • Sqoop 1.4.7

Via the command line, the following sqoop command works:

sudo -su hdfs sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter = true" --connect jdbc:oracle:thin:@XXXXXXXXXXXX:1521/orcl --username XXXXX --password XXXX --table "HR.JOBS" --delete-target-dir --as-parquetfile --null-string '\\N' --null-non-string '\\N' --hive-import --create-hive-table --hive-table default.jobs

 

Sqoop connects in Oracle Database and write parquet files into HDFS. 

 

But when try load data into Hive. getting this error: Import failed: java.io.IOException: Hive exited with status 4:

 

20/09/30 23:32:03 INFO hive.HiveImport: Loading uploaded data into Hive
20/09/30 23:32:03 INFO hive.HiveImport: Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the path
20/09/30 23:32:03 ERROR tool.ImportTool: Import failed: java.io.IOException: Hive exited with status 4
at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:253)
at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:206)
at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:273)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:564)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:655)
at org.apache.sqoop.Sqoop.run(Sqoop.java:151)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:187)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:241)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:250)
at org.apache.sqoop.Sqoop.main(Sqoop.java:259)

 

Any help would be greatly appreciated!

Thanks

2 ACCEPTED SOLUTIONS

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login