You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2009/09/21 23:53:44 UTC

svn commit: r817425 - in /hadoop/hive/trunk: CHANGES.txt conf/hive-default.xml hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java

Author: namit
Date: Mon Sep 21 21:53:43 2009
New Revision: 817425

URL: http://svn.apache.org/viewvc?rev=817425&view=rev
Log:
HIVE-817. hive.hwi.war.file incorrectly tries to use environment variables to locate war file
(Edward Capriolo via namit)

Summary:

Trac Bug: #

Blame Rev:

Reviewed By: njain@facebook.com

Test Plan:

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/conf/hive-default.xml
    hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=817425&r1=817424&r2=817425&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Mon Sep 21 21:53:43 2009
@@ -129,6 +129,9 @@
     HIVE-844. Remove ASTPartitionPruner from genmapredTasks.
     (Namit Jain via zshao)
 
+    HIVE-817. hive.hwi.war.file incorrectly tries to use environment variables to locate war file
+    (Edward Capriolo via namit)
+
 Release 0.4.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/conf/hive-default.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/conf/hive-default.xml?rev=817425&r1=817424&r2=817425&view=diff
==============================================================================
--- hadoop/hive/trunk/conf/hive-default.xml (original)
+++ hadoop/hive/trunk/conf/hive-default.xml Mon Sep 21 21:53:43 2009
@@ -305,8 +305,8 @@
 
 <property>
   <name>hive.hwi.war.file</name>
-  <value>${HIVE_HOME}/lib/hive-hwi.war</value>
-  <description>This is the WAR file with the jsp content for Hive Web Interface</description>
+  <value>lib/hive_hwi.war</value>
+  <description>path appended to HIVE_HOME to locate the HWI WAR file</description>
 </property>
 
 <property>

Modified: hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java?rev=817425&r1=817424&r2=817425&view=diff
==============================================================================
--- hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java (original)
+++ hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java Mon Sep 21 21:53:43 2009
@@ -57,12 +57,16 @@
 
 	
 	    String hwiWAR = conf.getVar(HiveConf.ConfVars.HIVEHWIWARFILE);
-	    if (! new File (hwiWAR).exists() ){
+ 	    String hivehome = System.getenv().get("HIVE_HOME");
+ 	    File hwiWARFile = new File(hivehome,hwiWAR);
+	    if (! hwiWARFile.exists() ){
 	    	l4j.fatal("HWI WAR file not found at "+ hwiWAR );
+                System.exit(1);
 	    }
 	    
+	    
         webServer = ShimLoader.getJettyShims().startServer(listen, port);
-        webServer.addWar(hwiWAR, "/hwi");
+        webServer.addWar(hwiWARFile.toString(), "/hwi");
 	    
 	    /*The command line args may be used by multiple components. Rather by setting
 	     * these as a system property we avoid having to specifically pass them