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.

sqoop patch update in cdh 5.4.7

sqoop patch update in cdh 5.4.7

New Contributor

 

Hello All,

 

I installed cdh 5.4.7 and ran sqoop import command like

 

sqoop import --connect jdbc:mysql://10.240.0.8:3306/employees --username test --password test123 --table current_dept_emp --hive-import --hive-table=employee.current_dept_emp -m 1

 

Error:

15/10/24 14:23:36 INFO mapreduce.ImportJobBase: Transferred 9.6424 MB in 27.6827 seconds (356.6789 KB/sec)
15/10/24 14:23:36 INFO mapreduce.ImportJobBase: Retrieved 300024 records.
15/10/24 14:23:37 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `current_dept_emp` AS t LIMIT 1
15/10/24 14:23:37 WARN hive.TableDefWriter: Column from_date had to be cast to a less precise type in Hive
15/10/24 14:23:37 WARN hive.TableDefWriter: Column to_date had to be cast to a less precise type in Hive
15/10/24 14:23:37 INFO hive.HiveImport: Loading uploaded data into Hive
15/10/24 14:23:37 ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
15/10/24 14:23:37 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
	at org.apache.sqoop.hive.HiveConfig.addHiveConfigs(HiveConfig.java:61)
	at org.apache.sqoop.hive.HiveImport.getHiveArgs(HiveImport.java:392)
	at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:379)
	at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:337)
	at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:514)
	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

From the above, Sqoop is able to pull the data from mysql and write into hdfs but when it tries to load the data into hive it 's causing issue.

 

I do see a issue created and resolved in apache JIRA and the link is https://issues.apache.org/jira/browse/SQOOP-2535

 

How do i update my cdh 5.4.7 with this latest patch so that i can see if it resolve my issue?

 

Any thoughts?

 

-Ram

 

 

1 REPLY 1

Re: sqoop patch update in cdh 5.4.7

New Contributor

I have the same problem....

Then sqoop didn't work properly.

 

Any information about it?

 

 

Regards,

Fadjar340