zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1074994 - in /zookeeper/trunk: CHANGES.txt bin/zkCleanup.sh bin/zkCli.sh bin/zkEnv.sh bin/zkServer.sh
Date Sun, 27 Feb 2011 07:02:00 GMT
Author: phunt
Date: Sun Feb 27 07:02:00 2011
New Revision: 1074994

URL: http://svn.apache.org/viewvc?rev=1074994&view=rev
Log:
ZOOKEEPER-976. ZooKeeper startup script doesn't use JAVA_HOME (phunt)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/bin/zkCleanup.sh
    zookeeper/trunk/bin/zkCli.sh
    zookeeper/trunk/bin/zkEnv.sh
    zookeeper/trunk/bin/zkServer.sh

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1074994&r1=1074993&r2=1074994&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Sun Feb 27 07:02:00 2011
@@ -178,6 +178,8 @@ BUGFIXES: 
 
   ZOOKEEPER-983. running zkServer.sh start remotely using ssh hangs (phunt)
 
+  ZOOKEEPER-976. ZooKeeper startup script doesn't use JAVA_HOME (phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: zookeeper/trunk/bin/zkCleanup.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkCleanup.sh?rev=1074994&r1=1074993&r2=1074994&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkCleanup.sh (original)
+++ zookeeper/trunk/bin/zkCleanup.sh Sun Feb 27 07:02:00 2011
@@ -41,11 +41,11 @@ ZOODATALOGDIR=$(grep '^dataLogDir=' "$ZO
 
 if [ "x$ZOODATALOGDIR" = "x" ]
 then
-java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
+$JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
      -cp "$CLASSPATH" $JVMFLAGS \
      org.apache.zookeeper.server.PurgeTxnLog "$ZOODATADIR" $*
 else
-java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
+$JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
      -cp "$CLASSPATH" $JVMFLAGS \
      org.apache.zookeeper.server.PurgeTxnLog "$ZOODATALOGDIR" "$ZOODATADIR" $*
 fi

Modified: zookeeper/trunk/bin/zkCli.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkCli.sh?rev=1074994&r1=1074993&r2=1074994&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkCli.sh (original)
+++ zookeeper/trunk/bin/zkCli.sh Sun Feb 27 07:02:00 2011
@@ -36,6 +36,6 @@ ZOOBINDIR=`dirname "$ZOOBIN"`
 
 . "$ZOOBINDIR"/zkEnv.sh
 
-java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
+$JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
      -cp "$CLASSPATH" $JVMFLAGS \
      org.apache.zookeeper.ZooKeeperMain $@

Modified: zookeeper/trunk/bin/zkEnv.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkEnv.sh?rev=1074994&r1=1074993&r2=1074994&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkEnv.sh (original)
+++ zookeeper/trunk/bin/zkEnv.sh Sun Feb 27 07:02:00 2011
@@ -54,6 +54,12 @@ then
     ZOO_LOG4J_PROP="INFO,CONSOLE"
 fi
 
+if [ "$JAVA_HOME" != "" ]; then
+  JAVA="$JAVA_HOME/bin/java"
+else
+  JAVA=java
+fi
+
 #add the zoocfg dir to classpath
 CLASSPATH="$ZOOCFGDIR:$CLASSPATH"
 

Modified: zookeeper/trunk/bin/zkServer.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkServer.sh?rev=1074994&r1=1074993&r2=1074994&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkServer.sh (original)
+++ zookeeper/trunk/bin/zkServer.sh Sun Feb 27 07:02:00 2011
@@ -91,17 +91,17 @@ _ZOO_DAEMON_OUT="$ZOO_LOG_DIR/zookeeper.
 case $1 in
 start)
     echo  "Starting zookeeper ... "
-    java  "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
+    $JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
     -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG" > "$_ZOO_DAEMON_OUT" 2>&1 <
/dev/null &
     /bin/echo -n $! > "$ZOOPIDFILE"
     echo STARTED
     ;;
 start-foreground)
-    java  "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
+    $JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
     -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG"
     ;;
 print-cmd)
-    echo "java -Dzookeeper.log.dir=\"${ZOO_LOG_DIR}\" -Dzookeeper.root.logger=\"${ZOO_LOG4J_PROP}\"
-cp \"$CLASSPATH\" $JVMFLAGS $ZOOMAIN \"$ZOOCFG\" > \"$_ZOO_DAEMON_OUT\" 2>&1 <
/dev/null"
+    echo "$JAVA -Dzookeeper.log.dir=\"${ZOO_LOG_DIR}\" -Dzookeeper.root.logger=\"${ZOO_LOG4J_PROP}\"
-cp \"$CLASSPATH\" $JVMFLAGS $ZOOMAIN \"$ZOOCFG\" > \"$_ZOO_DAEMON_OUT\" 2>&1 <
/dev/null"
     ;;
 stop)
     echo "Stopping zookeeper ... "
@@ -118,7 +118,7 @@ stop)
 upgrade)
     shift
     echo "upgrading the servers to 3.*"
-    java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
+    $JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
     -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.server.upgrade.UpgradeMain ${@}
     echo "Upgrading ... "
     ;;



Mime
View raw message