incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1327751 - in /incubator/bigtop/trunk/bigtop-packages/src: common/zookeeper/install_zookeeper.sh rpm/zookeeper/SPECS/zookeeper.spec
Date Thu, 19 Apr 2012 00:01:54 GMT
Author: rvs
Date: Thu Apr 19 00:01:53 2012
New Revision: 1327751

URL: http://svn.apache.org/viewvc?rev=1327751&view=rev
Log:
BIGTOP-544. zookeeper-server init doesn't work

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

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=1327751&r1=1327750&r2=1327751&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 Thu Apr
19 00:01:53 2012
@@ -121,8 +121,10 @@ ln -s $CONF_DIR $PREFIX/$LIB_DIR/conf
 
 # Copy in the /usr/bin/zookeeper-server wrapper
 install -d -m 0755 $PREFIX/$LIB_DIR/bin
+# FIXME: a workaround in preparation for Zookeeper 3.5
+echo '#!/bin/bash' > $BUILD_DIR/bin/zkServer-initialize.sh
 
-for i in zkServer.sh zkEnv.sh zkCli.sh zkCleanup.sh
+for i in zkServer.sh zkEnv.sh zkCli.sh zkCleanup.sh zkServer-initialize.sh
 	do cp $BUILD_DIR/bin/$i $PREFIX/$LIB_DIR/bin
 	chmod 755 $PREFIX/$LIB_DIR/bin/$i
 done
@@ -147,8 +149,9 @@ env CLASSPATH=\$CLASSPATH /usr/lib/zooke
 EOF
 chmod 755 $wrapper
 
-wrapper=$PREFIX/usr/bin/zookeeper-server
-cat > $wrapper <<EOF
+for bin_wrapper in zookeeper-server zookeeper-server-initialize ; do
+  wrapper=$PREFIX/usr/bin/$bin_wrapper
+  cat > $wrapper <<EOF
 #!/bin/sh
 
 # Autodetect JAVA_HOME if not defined
@@ -166,9 +169,11 @@ export CLASSPATH=\$CLASSPATH:\$ZOOKEEPER
 export ZOO_LOG_DIR=/var/log/zookeeper
 export ZOO_LOG4J_PROP=INFO,ROLLINGFILE
 export JVMFLAGS=-Dzookeeper.log.threshold=INFO
-env CLASSPATH=\$CLASSPATH /usr/lib/zookeeper/bin/zkServer.sh "\$@"
+export ZOO_DATADIR_AUTOCREATE_DISABLE=true
+env CLASSPATH=\$CLASSPATH /usr/lib/zookeeper/bin/zkServer${bin_wrapper#zookeeper-server}.sh
"\$@"
 EOF
-chmod 755 $wrapper
+  chmod 755 $wrapper
+done
 
 # Copy in the docs
 install -d -m 0755 $PREFIX/$DOC_DIR

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=1327751&r1=1327750&r2=1327751&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 Thu Apr
19 00:01:53 2012
@@ -151,7 +151,7 @@ chmod 755 $init_file
 
 %pre
 getent group zookeeper >/dev/null || groupadd -r zookeeper
-getent passwd zookeeper > /dev/null || useradd -c "ZooKeeper" -s /sbin/nologin -g zookeeper
-r -d %{run_zookeeper} zookeeper 2> /dev/null || :
+getent passwd zookeeper > /dev/null || useradd -c "ZooKeeper" -s /sbin/nologin -g zookeeper
-r -d %{vlb_zookeeper} zookeeper 2> /dev/null || :
 
 %__install -d -o zookeeper -g zookeeper -m 0755 %{run_zookeeper}
 %__install -d -o zookeeper -g zookeeper -m 0755 %{log_zookeeper}
@@ -191,6 +191,7 @@ fi
 %config(noreplace) %{etc_zookeeper}/conf.dist
 %{lib_zookeeper}
 %{bin_zookeeper}/zookeeper-server
+%{bin_zookeeper}/zookeeper-server-initialize
 %{bin_zookeeper}/zookeeper-client
 %doc %{doc_zookeeper}
 %{man_dir}/man1/zookeeper.1.*



Mime
View raw message