You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by bm...@apache.org on 2011/10/27 00:55:12 UTC

svn commit: r1189522 - in /incubator/bigtop/trunk/bigtop-packages/src: common/zookeeper/hadoop-zookeeper.sh common/zookeeper/hadoop-zookeeper.sh.suse common/zookeeper/install_zookeeper.sh deb/zookeeper/control rpm/zookeeper/SPECS/zookeeper.spec

Author: bmahe
Date: Wed Oct 26 22:55:11 2011
New Revision: 1189522

URL: http://svn.apache.org/viewvc?rev=1189522&view=rev
Log:
BIGTOP-190. All of Zookeeper wrapper scripts and init.d scripts need to start include find-java code from bigtop-utils

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh
    incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse
    incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/install_zookeeper.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/zookeeper/control
    incubator/bigtop/trunk/bigtop-packages/src/rpm/zookeeper/SPECS/zookeeper.spec

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh?rev=1189522&r1=1189521&r2=1189522&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh Wed Oct 26 22:55:11 2011
@@ -31,6 +31,13 @@
 ### END INIT INFO
 set -e
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON_SCRIPT="/usr/bin/zookeeper-server"
 

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse?rev=1189522&r1=1189521&r2=1189522&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse Wed Oct 26 22:55:11 2011
@@ -33,6 +33,13 @@
 
 source /lib/lsb/init-functions
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 STATUS_RUNNING=0
 STATUS_DEAD=1
 STATUS_DEAD_AND_LOCK=2

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/install_zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/install_zookeeper.sh?rev=1189522&r1=1189521&r2=1189522&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/install_zookeeper.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/zookeeper/install_zookeeper.sh Wed Oct 26 22:55:11 2011
@@ -133,6 +133,14 @@ wrapper=$PREFIX/usr/bin/zookeeper-client
 install -d -m 0755 `dirname $wrapper`
 cat > $wrapper <<EOF
 #!/bin/sh
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
 export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}
 export CLASSPATH=\$CLASSPATH:\$ZOOKEEPER_CONF:\$ZOOKEEPER_HOME/*:\$ZOOKEEPER_HOME/lib/*
@@ -144,6 +152,14 @@ chmod 755 $wrapper
 wrapper=$PREFIX/usr/bin/zookeeper-server
 cat > $wrapper <<EOF
 #!/bin/sh
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  source /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  source /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 export ZOOPIDFILE=\${ZOOPIDFILE:-/var/run/zookeeper/zookeeper-server.pid}
 export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
 export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/zookeeper/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/zookeeper/control?rev=1189522&r1=1189521&r2=1189522&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/zookeeper/control (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/zookeeper/control Wed Oct 26 22:55:11 2011
@@ -24,6 +24,7 @@ Package: hadoop-zookeeper
 Architecture: all
 Conflicts: zookeeper
 Replaces: zookeeper
+Depends: bigtop-utils
 Description: A high-performance coordination service for distributed applications.
  ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.  All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
 

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/zookeeper/SPECS/zookeeper.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/zookeeper/SPECS/zookeeper.spec?rev=1189522&r1=1189521&r2=1189522&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/zookeeper/SPECS/zookeeper.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/zookeeper/SPECS/zookeeper.spec Wed Oct 26 22:55:11 2011
@@ -76,6 +76,7 @@ BuildRequires: ant, autoconf, automake, 
 Requires(pre): coreutils, shadow-utils, /usr/sbin/groupadd, /usr/sbin/useradd
 Requires(post): %{alternatives_dep}
 Requires(preun): %{alternatives_dep}
+Requires: bigtop-utils
 
 %description 
 ZooKeeper is a centralized service for maintaining configuration information,