hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sushanth Sowmyan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-10251) HIVE-9664 makes hive depend on ivysettings.xml
Date Fri, 24 Apr 2015 21:15:38 GMT

    [ https://issues.apache.org/jira/browse/HIVE-10251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14511761#comment-14511761
] 

Sushanth Sowmyan commented on HIVE-10251:
-----------------------------------------

Hi Anant,

One more note - HIVE09664 also makes changes in itests/pom.xml that are not portable:

{code}
diff --git a/itests/pom.xml b/itests/pom.xml
index fd4bb41fd8f74cdf261b791d1944dbca4b04f927..6f6cf742c41a11647589692ac4f266f467be2812 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -93,6 +93,9 @@
                   mkdir -p $DOWNLOAD_DIR
                   download "http://d3jw87u4immizc.cloudfront.net/spark-tarball/spark-${spark.version}-bin-hadoop2-without-hive.tgz"
"spark"
                   cp -f $HIVE_ROOT/data/conf/spark/log4j.properties $BASE_DIR/spark/conf/
+                  sed '/package /d' ${basedir}/${hive.path.to.root}/contrib/src/java/org/apache/hadoop/hive/contrib/udf/example/UDFExampleAdd.java
> /tmp/UDFExampleAdd.java
+                  javac -cp  ${settings.localRepository}/org/apache/hive/hive-exec/${project.version}/hive-exec-${project.version}.jar
/tmp/UDFExampleAdd.java -d /tmp
+                  jar -cf /tmp/udfexampleadd-1.0.jar -C /tmp UDFExampleAdd.class
                 </echo>
               </target>
             </configuration>
{code}

sed is not something that's available in windows, and instead of compiling UDFExampleAdd.java
in here, it might be better to create another quick jar build in the contrib package, and
depend on it from the qtests to show that we're able to appropriately add jars.

> HIVE-9664 makes hive depend on ivysettings.xml
> ----------------------------------------------
>
>                 Key: HIVE-10251
>                 URL: https://issues.apache.org/jira/browse/HIVE-10251
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Sushanth Sowmyan
>            Assignee: Anant Nag
>              Labels: patch
>         Attachments: HIVE-10251.1.patch, HIVE-10251.2.patch, HIVE-10251.3.patch, HIVE-10251.simple.patch
>
>
> HIVE-9664 makes hive depend on the existence of ivysettings.xml, and if it is not present,
it makes hive NPE when instantiating a CLISessionState.
> {noformat}
> java.lang.NullPointerException
> at org.apache.hadoop.hive.ql.session.DependencyResolver.<init>(DependencyResolver.java:61)
> at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:343)
> at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:334)
> at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60)
> {noformat}
> This happens because of the following bit:
> {noformat}
>     // If HIVE_HOME is not defined or file is not found in HIVE_HOME/conf then load default
ivysettings.xml from class loader
>     if (ivysettingsPath == null || !(new File(ivysettingsPath).exists())) {
>       ivysettingsPath = ClassLoader.getSystemResource("ivysettings.xml").getFile();
>       _console.printInfo("ivysettings.xml file not found in HIVE_HOME or HIVE_CONF_DIR,"
+ ivysettingsPath + " will be used");
>     }
> {noformat}
> This makes it so that an attempt to instantiate CliSessionState without an ivysettings.xml
file will cause hive to fail with an NPE. Hive should not have a hard dependency on a ivysettings,xml
being present, and this feature should gracefully fail in that case instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message