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, 2019 in Big Data Hadoop by Rasheed
2,094 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

Step 2:

Check for the table in mysql.

Step 3:

Sqoop command execution.

Here new_hive is the database name.

Step 4:

Now check for the new table in the hive database.

answered Jul 29, 2019 by Kiran

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Hadoop: Error: slave: bash: line 0: cd: /opt/hadoop-1.1.0/libexec/..: No such file or directory

Hi,   In this case, it is searching ...READ MORE

answered Aug 7, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,503 views
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
• 11,380 points

edited May 9, 2018 by nitinrawat895 8,265 views
+1 vote
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
• 11,380 points
11,076 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
• 11,380 points
2,574 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,071 views
–1 vote
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,350 points
4,642 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,830 points
1,059 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP