Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to import data from mysql to hive using sqoop

SOLVED Go to solution

Unable to import data from mysql to hive using sqoop

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

Accepted Solutions
Highlighted

Re: Unable to import data from mysql to hive using sqoop

Explorer

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.

4 REPLIES 4

Re: Unable to import data from mysql to hive using sqoop

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

Re: Unable to import data from mysql to hive using sqoop

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.
Highlighted

Re: Unable to import data from mysql to hive using sqoop

Explorer

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.

Re: Unable to import data from mysql to hive using sqoop

New Contributor

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