hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1672535 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java
Date Fri, 10 Apr 2015 03:51:02 GMT
Author: khorgath
Date: Fri Apr 10 03:51:02 2015
New Revision: 1672535

URL: http://svn.apache.org/r1672535
Log:
HIVE-10267 : HIVE-9664 makes hive depend on ivysettings.xml : trivial breakage fix (Sushanth
Sowmyan, reviewed by Thejas Nair)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java?rev=1672535&r1=1672534&r2=1672535&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/DependencyResolver.java Fri Apr
10 03:51:02 2015
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.ql.sessio
 
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -58,8 +59,11 @@ public class DependencyResolver {
 
     // 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");
+      URL ivysetttingsResource = ClassLoader.getSystemResource("ivysettings.xml");
+      if (ivysetttingsResource != null){
+        ivysettingsPath = ivysetttingsResource.getFile();
+        _console.printInfo("ivysettings.xml file not found in HIVE_HOME or HIVE_CONF_DIR,"
+ ivysettingsPath + " will be used");
+      }
     }
 
   }



Mime
View raw message