hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r697287 - in /hadoop/core/trunk: CHANGES.txt src/contrib/hive/bin/hive src/contrib/hive/conf/hive-default.xml
Date Fri, 19 Sep 2008 23:50:38 GMT
Author: dhruba
Date: Fri Sep 19 16:50:38 2008
New Revision: 697287

URL: http://svn.apache.org/viewvc?rev=697287&view=rev
Log:
HADOOP-4090. The hive scripts pick up hadoop from HADOOP_HOME
and then the path. (Raghotham Murthy via dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/hive/bin/hive
    hadoop/core/trunk/src/contrib/hive/conf/hive-default.xml

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=697287&r1=697286&r2=697287&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Sep 19 16:50:38 2008
@@ -709,6 +709,9 @@
     HADOOP-4120. Hive interactive shell records the time taken by a 
     query.  (Raghotham Murthy via dhruba)
 
+    HADOOP-4090. The hive scripts pick up hadoop from HADOOP_HOME
+    and then the path. (Raghotham Murthy via dhruba)
+
 Release 0.18.1 - 2008-09-17
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/src/contrib/hive/bin/hive
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hive/bin/hive?rev=697287&r1=697286&r2=697287&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hive/bin/hive (original)
+++ hadoop/core/trunk/src/contrib/hive/bin/hive Fri Sep 19 16:50:38 2008
@@ -65,14 +65,19 @@
 # pass classpath to hadoop
 export HADOOP_CLASSPATH=${CLASSPATH}
 
-# point to the first available hadoop instance
+# check for hadoop in the path
 HADOOP_IN_PATH=`which hadoop 2>/dev/null`
-HADOOP=${HADOOP:-$HADOOP_IN_PATH}
-if [ "$HADOOP" == "" ]; then
-  echo "Cannot find hadoop installation: 'hadoop' must be in your path or specified via \$HADOOP";
+if [ -f ${HADOOP_IN_PATH} ]; then
+  HADOOP_DIR=`dirname "$HADOOP_IN_PATH"`/..
+fi
+# HADOOP_HOME env variable overrides hadoop in the path
+HADOOP_HOME=${HADOOP_HOME:-$HADOOP_DIR}
+if [ "$HADOOP_HOME" == "" ]; then
+  echo "Cannot find hadoop installation: \$HADOOP_HOME must be set or hadoop must be in the
path";
   exit 4;
 fi
 
+HADOOP=$HADOOP_HOME/bin/hadoop
 if [ ! -f ${HADOOP} ]; then
   echo "Cannot find hadoop installation: \"$HADOOP\" does not exist";
   exit 4;

Modified: hadoop/core/trunk/src/contrib/hive/conf/hive-default.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hive/conf/hive-default.xml?rev=697287&r1=697286&r2=697287&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hive/conf/hive-default.xml (original)
+++ hadoop/core/trunk/src/contrib/hive/conf/hive-default.xml Fri Sep 19 16:50:38 2008
@@ -9,21 +9,6 @@
 <!-- users do not have to edit hadoop configuration files (that may be managed as a centralized
-->
 <!-- resource).                                                                      
          -->
 
-<!-- Hadoop Setup -->
-<property>
-  <name>hadoop.bin.path</name>
-  <value>${user.dir}/../../../bin/hadoop</value>
-  <!-- note that the hive shell script also uses this property name -->
-  <description>Path to hadoop binary. Assumes that by default we are executing from
hive</description>
-</property>
-
-<property>
-  <name>hadoop.config.dir</name>
-  <value>${user.dir}/../../../conf</value>
-  <!-- note that the hive shell script also uses this property name -->
-  <description>Path to hadoop configuration. Again assumes that by default we are executing
from hive/</description>
-</property>
-
 <!-- Hive Execution Parameters -->
 <property>
   <name>hive.exec.scratchdir</name>



Mime
View raw message