Support Questions

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

Unable to import data from mysql to hive using sqoop

avatar
New Contributor

Hi ,

 

I have recently set-up VM CDH5.5 on my machine and tried to check commands for importing data into hive from mysql. Job gets stuck after below message in log:

 

 "Loading uploaded data into Hive

 Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties"

 

Can someone help why job stuck after this step and have i missed some configuration step.

 

Command Used:

 

sqoop import --connect "jdbc:mysql://localhost:3306/retail_db" \

--username retail_db \

-P \

--table customers --target-dir /user/hive/warehouse/sqoop_import --fields-terminated-by "," \

--hive-import --create-hive-table --hive-table sample.customers

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

avatar
Contributor

You can restart the new VM and login from there because once VM is having configuration issue then it will be difficult to get is resolved.

View solution in original post

4 REPLIES 4

avatar
New Contributor

Hi,

 

Most of the code written is correct except for the username.

 

Try the username as retail_dba instead

 

It should work

 

Regards

Sameer Sheth

avatar
New Contributor
Hi Sameer,

I tried to change the user name to retail_dba still having same issue, it works fine till creation of physical file and stuck at

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties

I am not sure if I missed some configuration settings.

avatar
Contributor

You can restart the new VM and login from there because once VM is having configuration issue then it will be difficult to get is resolved.

avatar
New Contributor

I have the same issue in real QA environment, please let me know any workaround?