hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r766151 - in /hadoop/zookeeper/trunk: ./ bin/ src/docs/src/documentation/content/xdocs/ src/java/main/org/apache/zookeeper/server/
Date Fri, 17 Apr 2009 20:48:30 GMT
Author: mahadev
Date: Fri Apr 17 20:48:29 2009
New Revision: 766151

URL: http://svn.apache.org/viewvc?rev=766151&view=rev
Log:
ZOOKEEPER-346. remove the kill command fro mthe client port. (phunt via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/bin/zkServer.sh
    hadoop/zookeeper/trunk/build.xml
    hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxn.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Apr 17 20:48:29 2009
@@ -58,6 +58,8 @@
   ZOOKEEPER-367. RecoveryTest failure - "unreasonable length" IOException
   (mahadev via phunt)
 
+  ZOOKEEPER-346. remove the kill command fro mthe client port. (phunt via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: hadoop/zookeeper/trunk/bin/zkServer.sh
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/bin/zkServer.sh?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/bin/zkServer.sh (original)
+++ hadoop/zookeeper/trunk/bin/zkServer.sh Fri Apr 17 20:48:29 2009
@@ -53,17 +53,28 @@
 
 . $ZOOBINDIR/zkEnv.sh
 
+ZOOPIDFILE=$(grep dataDir $ZOOCFG | sed -e 's/.*=//')/zookeeper_server.pid
+
+
 case $1 in
 start) 
-    echo -n "Starting zookeeper ... "
+    echo  "Starting zookeeper ... "
     java  "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}"
\
     -cp $CLASSPATH $JVMFLAGS $ZOOMAIN $ZOOCFG &
+    echo $! > $ZOOPIDFILE
     echo STARTED
     ;;
 stop) 
-    echo -n "Stopping zookeeper ... "
-    echo kill | nc localhost $(grep clientPort $ZOOCFG | sed -e 's/.*=//')
+    echo "Stopping zookeeper ... "
+    if [ ! -f $ZOOPIDFILE ]
+    then
+    echo "error: count not find file $ZOOPIDFILE"
+    exit 1
+    else 
+    kill -9 $(cat $ZOOPIDFILE)
+    rm $ZOOPIDFILE
     echo STOPPED
+    fi
     ;;
 upgrade)
     shift

Modified: hadoop/zookeeper/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Fri Apr 17 20:48:29 2009
@@ -656,7 +656,11 @@
 	<!-- yet to implement -->
     </target>
     
-    <target name="test-core" depends="test-init, test-category, junit.run, call-test-cppunit"/>

+    <target name="test-core-java" depends="test-init, test-category, junit.run"/> 
+
+    <target name="test-core-cppunit" depends="test-init, test-category, call-test-cppunit"/>

+
+    <target name="test-core" depends="test-core-java, test-core-cppunit"/> 
 
     <!-- ====================================================== -->
     <!-- Run optional third-party tool targets                  -->

Modified: hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml (original)
+++ hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml Fri
Apr 17 20:48:29 2009
@@ -860,15 +860,6 @@
         </varlistentry>
 
         <varlistentry>
-          <term>kill</term>
-
-          <listitem>
-            <para>Shuts down the server. This must be issued from the machine
-            the ZooKeeper server is running on.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
           <term>reqs</term>
 
           <listitem>

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java Fri
Apr 17 20:48:29 2009
@@ -564,10 +564,6 @@
                 sendBuffer(NIOServerCnxn.closeConn);
                 k.interestOps(SelectionKey.OP_WRITE);
                 return;
-            } else if (len == killCmd) {
-                LOG.info("Processing kill command from "
-                        + sock.socket().getRemoteSocketAddress());
-                System.exit(0);
             } else if (len == getTraceMaskCmd) {
                 LOG.info("Processing getracemask command from "
                         + sock.socket().getRemoteSocketAddress());

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxn.java?rev=766151&r1=766150&r2=766151&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxn.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxn.java Fri Apr
17 20:48:29 2009
@@ -35,8 +35,6 @@
      * See <a href="{@docRoot}/../../../docs/zookeeperAdmin.html#sc_zkCommands">
      * Zk Admin</a>. this link is for all the commands.
      */
-    final static int killCmd = ByteBuffer.wrap("kill".getBytes()).getInt();
-    
     final static int ruokCmd = ByteBuffer.wrap("ruok".getBytes()).getInt();
 
     final static int dumpCmd = ByteBuffer.wrap("dump".getBytes()).getInt();



Mime
View raw message