incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tra...@apache.org
Subject svn commit: r1434483 - in /incubator/hcatalog/trunk: CHANGES.txt webhcat/svr/src/main/bin/webhcat_config.sh webhcat/svr/src/main/bin/webhcat_server.sh
Date Wed, 16 Jan 2013 23:25:27 GMT
Author: travis
Date: Wed Jan 16 23:25:27 2013
New Revision: 1434483

URL: http://svn.apache.org/viewvc?rev=1434483&view=rev
Log:
HCATALOG-573 Remove version number from WEBHCAT_JAR in webhcat_config.sh

Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_config.sh
    incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_server.sh

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1434483&r1=1434482&r2=1434483&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Wed Jan 16 23:25:27 2013
@@ -174,6 +174,8 @@ Release 0.5.0 - Unreleased
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-573 Remove version number from WEBHCAT_JAR in webhcat_config.sh (thejas via traviscrawford)
+
   HCAT-592 webhcat - handle change in hive table/partition not found error (thejas via gates)
 
   HCAT-586 checkstyle fails every time complaining that it's own header file does not have
the proper header (gates)

Modified: incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_config.sh
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_config.sh?rev=1434483&r1=1434482&r2=1434483&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_config.sh (original)
+++ incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_config.sh Wed Jan 16 23:25:27
2013
@@ -38,7 +38,7 @@ ERROR_LOG=${WEBHCAT_LOG_DIR}/webhcat-con
 CONSOLE_LOG=${WEBHCAT_LOG_DIR}/webhcat-console.log
 
 # The name of the webhcat jar file
-WEBHCAT_JAR=webhcat-0.5.0-SNAPSHOT.jar
+WEBHCAT_JAR='webhcat-*.jar'
 
 # How long to wait before testing that the process started correctly
 SLEEP_TIME_AFTER_START=10

Modified: incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_server.sh
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_server.sh?rev=1434483&r1=1434482&r2=1434483&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_server.sh (original)
+++ incubator/hcatalog/trunk/webhcat/svr/src/main/bin/webhcat_server.sh Wed Jan 16 23:25:27
2013
@@ -56,13 +56,21 @@ function log() {
         echo "webhcat: $@"
 }
 
-# Find the webhcat jar
+# return(print) the webhcat jar
 function find_jar_path() {
-        for dir in "." "build" "share/webhcat/svr/"; do
-                local jar="$base_dir/$dir/$WEBHCAT_JAR"
+         for dir in "." "build" "share/webhcat/svr/"; do
+                if (( `ls -1 $base_dir/$dir/$WEBHCAT_JAR 2>/dev/null| wc -l ` > 1 ))
; then
+                       echo "Error:  found more than one hcatalog jar in $base_dir/$dir/$WEBHCAT_JAR"
+                       exit 1
+                fi
+                if (( `ls -1 $base_dir/$dir/$WEBHCAT_JAR 2>/dev/null | wc -l` == 0 ))
; then
+                       continue
+                fi
+ 
+                local jar=`ls $base_dir/$dir/$WEBHCAT_JAR`
                 if [[ -f $jar ]]; then
-                        echo $jar
-                        break
+                       echo $jar
+                       break
                 fi
         done
 }
@@ -94,7 +102,7 @@ function find_classpath() {
 
         # Append hcat classpath
         local hcat_classpath
-        hcat_classpath=`hcat -classpath`
+        hcat_classpath=`$base_dir/bin/hcat -classpath`
         if [[ "$?" != "0" ]]; then
                 die "Unable to get the hcatalog classpath"
         fi
@@ -213,7 +221,7 @@ if [[ -z "$WEBHCAT_LOG4J" ]]; then
 fi
 
 export HADOOP_USER_CLASSPATH_FIRST=true
-export HADOOP_OPTS="-Dwebhcat.log.dir=$WEBHCAT_LOG_DIR -Dlog4j.configuration=$WEBHCAT_LOG4J"
+export HADOOP_OPTS="${HADOOP_OPTS} -Dwebhcat.log.dir=$WEBHCAT_LOG_DIR -Dlog4j.configuration=$WEBHCAT_LOG4J"
 
 start_cmd="$HADOOP_PREFIX/bin/hadoop jar $JAR org.apache.hcatalog.templeton.Main  "
 



Mime
View raw message