[
https://issues.apache.org/jira/browse/HIVE-9664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484482#comment-14484482
]
Sushanth Sowmyan commented on HIVE-9664:
----------------------------------------
Hi [~cwsteinbach]/[~nntnag17]/[~erwaman], this patch seems to have broken
CliSessionState instantiation with a NPE:
{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.
Could someone please fix this please?
> Hive "add jar" command should be able to download and add jars from a
> repository
> --------------------------------------------------------------------------------
>
> Key: HIVE-9664
> URL: https://issues.apache.org/jira/browse/HIVE-9664
> Project: Hive
> Issue Type: Improvement
> Affects Versions: 0.14.0
> Reporter: Anant Nag
> Assignee: Anant Nag
> Labels: TODOC1.2, hive, patch
> Fix For: 1.2.0
>
> Attachments: HIVE-9664.4.patch, HIVE-9664.5.patch, HIVE-9664.patch,
> HIVE-9664.patch, HIVE-9664.patch
>
>
> Currently Hive's "add jar" command takes a local path to the dependency jar.
> This clutters the local file-system as users may forget to remove this jar
> later
> It would be nice if Hive supported a Gradle like notation to download the jar
> from a repository.
> Example: add jar org:module:version
>
> It should also be backward compatible and should take jar from the local
> file-system as well.
> RB: https://reviews.apache.org/r/31628/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)