ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Cannot run program "hive": error=2, No such file or directory

0 votes

The file is getting created in hdfs but when it starts loading in hive I get an error

sqoop import --connect jdbc:mysql://localhost/edureka_kp --username root --password Edurekasql_123 --table prod --target-dir /sqoop/prod-imp --fields-terminated-by "," --hive-import --hive-table prod

19/03/20 04:06:19 INFO hive.HiveImport: Loading uploaded data into Hive
19/03/20 04:06:19 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Cannot run program "hive": error=2, No such file or directory

>>> sqlContext.sql("show databases").show()
+------------+
|databaseName|
+------------+
| default|
+------------+

>>> sqlContext.sql("show tables").show()
+--------+---------+-----------+
|database|tableName|isTemporary|
+--------+---------+-----------+
| default| prod| false|
+--------+---------+-----------+

>>> sqlContext.sql("select * from prod").show()
+---+---------+----------+---+
| id|prod_name|prod_price|qty|
+---+---------+----------+---+
+---+---------+----------+---+
Jul 29 in Big Data Hadoop by Rasheed
70 views

1 answer to this question.

0 votes

The tables look fine. Follow these steps and see if it works:

Step 1:

Create a database

image

Step 2:

Check for the table in mysql.

image

Step 3:

Sqoop command execution.

image

Here new_hive is the database name.

Step 4:

Now check for the new table in the hive database.

image

answered Jul 29 by Kiran

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

“no such file or directory" in case of hadoop fs -ls

The behaviour that you are seeing is ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 10,800 points

edited May 9, 2018 by nitinrawat895 2,767 views
0 votes
1 answer

Hadoop: `.' no such file or directory while installing

Try hadoop fs -mkdir -p /user/[Username] and then run ...READ MORE

answered Nov 2, 2018 in Big Data Hadoop by Omkar
• 68,480 points
84 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,800 points
3,576 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,800 points
454 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
18,431 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,280 points
1,333 views
0 votes
1 answer
0 votes
1 answer

Hadoop Pipe: shared libraries, No such file or directory error

Add -rpath my.zip/lib to LDFLAGS_HDP. For compilation to work, you ...READ MORE

answered Aug 30, 2018 in Big Data Hadoop by Frankie
• 9,810 points
85 views