packages: cassandra-bin/cassandra-bin.spec, cassandra-bin/cassandra.init, c...

matkor matkor at pld-linux.org
Mon Jan 3 16:21:40 CET 2011


Author: matkor                       Date: Mon Jan  3 15:21:40 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:

- Updated to rc4.
  Fixed working as cassandra user.
  Fixed java class path to use java-jna.
  Working restart, though not using PLD scripts on stop.

---- Files affected:
packages/cassandra-bin:
   cassandra-bin.spec (1.4 -> 1.5) , cassandra.init (1.2 -> 1.3) , cassandra.in.sh (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/cassandra-bin/cassandra-bin.spec
diff -u packages/cassandra-bin/cassandra-bin.spec:1.4 packages/cassandra-bin/cassandra-bin.spec:1.5
--- packages/cassandra-bin/cassandra-bin.spec:1.4	Thu Dec 30 10:53:29 2010
+++ packages/cassandra-bin/cassandra-bin.spec	Mon Jan  3 16:21:34 2011
@@ -1,19 +1,23 @@
 # $Revision$, $Date$
 %include	/usr/lib/rpm/macros.java
 # TODO: Fix .init  cassandra status does not work now.
-# TODO: Fix .init restarts, now seems stopping does not wait until cassandra is really stopped ?
+# TODO: Fix .init stop routine it is now subset of PLD default one
+# TODO: Fix of data/ cassandra created dirs/files privilages (now they are all readable)
+# TODO: Consider adding          
+#                   cassandra       -       memlock         unlimited
+#   to /etc/security/limits.conf ?
 
 %define     shname cassandra
-%define     rccode rc3
+%define     rccode rc4
 Summary:	Cassandra database binary package
 Summary(pl.UTF-8):	Baza danych Cassandra wersja binarna.
 Name:		cassandra-bin
 Version:	0.7.0
-Release:	0.%{rccode}.3
+Release:	0.%{rccode}.1
 License:	ASF
 Group:		Applications/Databases
 Source0:	http://mirror.nyi.net/apache//cassandra/%{version}/apache-cassandra-%{version}-%{rccode}-bin.tar.gz
-# Source0-md5:	8e5cfc07178cd57e05ef81cad18ef170
+# Source0-md5:	19b26eb1d25454a2da0731b769ab3066
 Source1:	cassandra.in.sh
 Source2:	%{shname}.init
 URL:		http://cassandra.apache.org/
@@ -122,6 +126,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2011/01/03 15:21:34  matkor
+
+- Updated to rc4.
+  Fixed working as cassandra user.
+  Fixed java class path to use java-jna.
+  Working restart, though not using PLD scripts on stop.
+
 Revision 1.4  2010/12/30 09:53:29  matkor
 - Release 3. Suggests:jna -> java-jna change.
 

================================================================
Index: packages/cassandra-bin/cassandra.init
diff -u packages/cassandra-bin/cassandra.init:1.2 packages/cassandra-bin/cassandra.init:1.3
--- packages/cassandra-bin/cassandra.init:1.2	Wed Dec 29 11:39:27 2010
+++ packages/cassandra-bin/cassandra.init	Mon Jan  3 16:21:34 2011
@@ -34,7 +34,7 @@
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/cassandra ]; then
 		msg_starting cassandra
-		daemon /usr/sbin/cassandra  -p /var/run/cassandra.pid  
+		daemon --user cassandra /usr/sbin/cassandra  -p /var/run/cassandra/cassandra.pid  
 		RETVAL=$?
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/cassandra
 	else
@@ -47,8 +47,31 @@
 	if [ -f /var/lock/subsys/cassandra ]; then
 		# Stop daemons.
 		msg_stopping cassandra
-		killproc --pidfile /var/run/cassandra.pid cassandra -TERM
-		rm -f /var/lock/subsys/cassandra
+		# TODO: Fix it to work it properly with default PLD starting script scheme
+		# I do not know how to make 
+		pid=$(cat /var/run/cassandra/cassandra.pid)
+		## echo "DEBUG: Using pid=$pid."
+		kill -TERM  $pid  
+		# 0 - call succeed
+                RETVAL=$?
+		if [ $RETVAL -eq 0 ]; then # Success, giving some time for cassandra to flush.
+		    checkpid $pid && sleep 1
+		    checkpid $pid && sleep 3
+		    checkpid $pid && sleep 5
+		    if checkpid $pid;  then
+			fail
+			log_failed "cassandra shutdown (timeout after -TERM)"
+		    else
+			ok
+			log_success "cassandra shutdown"
+		    fi
+		    rm -f /var/lock/subsys/cassandra
+		else
+		# rm /var/lock/subsys/cassandra
+                     fail
+                     log_failed "cassandra shutdown (signalling error)"
+		fi
+		## echo "DEBUG: kill retval: $RETVAL"
 	else
 		msg_not_running cassandra
 	fi

================================================================
Index: packages/cassandra-bin/cassandra.in.sh
diff -u packages/cassandra-bin/cassandra.in.sh:1.2 packages/cassandra-bin/cassandra.in.sh:1.3
--- packages/cassandra-bin/cassandra.in.sh:1.2	Wed Dec 29 11:39:27 2010
+++ packages/cassandra-bin/cassandra.in.sh	Mon Jan  3 16:21:34 2011
@@ -48,5 +48,5 @@
 # for jar in /usr/share/cassandra/*.jar; do
 #     CLASSPATH=$CLASSPATH:$jar
 # done
-CLASSPATH=$CLASSPATH:/usr/share/cassandra/*
+CLASSPATH=$CLASSPATH:/usr/share/cassandra/*:/usr/share/java/*
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cassandra-bin/cassandra-bin.spec?r1=1.4&r2=1.5&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cassandra-bin/cassandra.init?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cassandra-bin/cassandra.in.sh?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list