Mark Grover created SQOOP-2147:
----------------------------------
Summary: configure-sqoop can corrupt the classpath in some cases
Key: SQOOP-2147
URL: https://issues.apache.org/jira/browse/SQOOP-2147
Project: Sqoop
Issue Type: Bug
Components: tools
Affects Versions: 1.4.6
Reporter: Mark Grover
On my cluster, I had the following as hadoop classpath when running a sqoop
import command:
{code}
...:/opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive-hcatalog/bin/hcat:
Cannot find lib dir within HIVE_HOME : /home/mgrover/hive:....
{code}
Yup, that's an error message in the classpath. Now, you may wonder how that
happened.
In configure-sqoop, we call (see
[here|https://github.com/apache/sqoop/blob/trunk/bin/configure-sqoop#L174]
{code}
hcat -classpath
{code}
However, hcat script is not perfect. It prints out error messages on stdout
instead of stderr (see
[here|https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L103] and
since configure-sqoop doesn't do any error checking, the error message gets
appended to classpath.
I'd recommend the script to check for exit code when calling hcat -classpath
and only append if the exit code is 0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)