Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3B3917E3A for ; Wed, 8 Apr 2015 21:24:12 +0000 (UTC) Received: (qmail 64974 invoked by uid 500); 8 Apr 2015 21:24:12 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 64953 invoked by uid 500); 8 Apr 2015 21:24:12 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 64942 invoked by uid 99); 8 Apr 2015 21:24:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 21:24:12 +0000 Date: Wed, 8 Apr 2015 21:24:12 +0000 (UTC) From: "Sushanth Sowmyan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-10251) HIVE-9664 makes hive depend on ivysettings.xml MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-10251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486083#comment-14486083 ] Sushanth Sowmyan commented on HIVE-10251: ----------------------------------------- Created HIVE-10267 for tracking that. > 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.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.(DependencyResolver.java:61) > at org.apache.hadoop.hive.ql.session.SessionState.(SessionState.java:343) > at org.apache.hadoop.hive.ql.session.SessionState.(SessionState.java:334) > at org.apache.hadoop.hive.cli.CliSessionState.(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)