hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r725832 - in /hadoop/core/trunk: CHANGES.txt src/contrib/chukwa/bin/agent.sh src/contrib/chukwa/bin/chukwa-config.sh src/contrib/chukwa/bin/jettyCollector.sh
Date Thu, 11 Dec 2008 22:05:49 GMT
Author: cdouglas
Date: Thu Dec 11 14:05:49 2008
New Revision: 725832

URL: http://svn.apache.org/viewvc?rev=725832&view=rev
Log:
HADOOP-4825. Use ps instead of jps for querying process status in Chukwa. Contributed by Eric
Yang.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/chukwa/bin/agent.sh
    hadoop/core/trunk/src/contrib/chukwa/bin/chukwa-config.sh
    hadoop/core/trunk/src/contrib/chukwa/bin/jettyCollector.sh

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=725832&r1=725831&r2=725832&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Dec 11 14:05:49 2008
@@ -343,6 +343,9 @@
     HADOOP-4837. Move HADOOP_CONF_DIR configuration to chukwa-env.sh (Jerome
     Boulon via cdouglas)
 
+    HADOOP-4825. Use ps instead of jps for querying process status in Chukwa.
+    (Eric Yang via cdouglas)
+
 Release 0.19.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/src/contrib/chukwa/bin/agent.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/bin/agent.sh?rev=725832&r1=725831&r2=725832&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/bin/agent.sh (original)
+++ hadoop/core/trunk/src/contrib/chukwa/bin/agent.sh Thu Dec 11 14:05:49 2008
@@ -22,11 +22,11 @@
 . "$bin"/chukwa-config.sh
 
 echo "hadoop jar for agent is " ${HADOOP_JAR}
-trap '${JPS} | grep ChukwaAgent | cut -f 1 -d" " | xargs kill -TERM ; exit 0' 1 2 15
+trap '${JPS} | grep ChukwaAgent | grep -v grep | cut -f 1 -d" " | xargs kill -TERM ; exit
0' 1 2 15
 
 if [ "X$1" = "Xstop" ]; then
   echo -n "Shutting down agent..."
-  JETTY_PID=`${JPS} | grep ChukwaAgent | cut -f 1 -d" "`
+  JETTY_PID=`${JPS} | grep ChukwaAgent | grep -v grep | cut -f 1 -d" "`
   kill -TERM ${JETTY_PID} >&/dev/null
   echo "done"
   exit 0

Modified: hadoop/core/trunk/src/contrib/chukwa/bin/chukwa-config.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/bin/chukwa-config.sh?rev=725832&r1=725831&r2=725832&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/bin/chukwa-config.sh (original)
+++ hadoop/core/trunk/src/contrib/chukwa/bin/chukwa-config.sh Thu Dec 11 14:05:49 2008
@@ -98,8 +98,8 @@
 export DATACONFIG=${CHUKWA_CONF_DIR}/mdl.xml
 COMMON=`ls ${CHUKWA_HOME}/lib/*.jar ${CHUKWA_HOME}/hadoopjars/commons*.jar`
 export COMMON=`echo ${COMMON} | sed 'y/ /:/'`
-export CHUKWA_CORE=${CHUKWA_HOME}/build/chukwa-core-${CHUKWA_VERSION}.jar
-export CHUKWA_AGENT=${CHUKWA_HOME}/build/chukwa-agent-${CHUKWA_VERSION}.jar
+export CHUKWA_CORE=${CHUKWA_HOME}/chukwa-core-${CHUKWA_VERSION}.jar
+export CHUKWA_AGENT=${CHUKWA_HOME}/chukwa-agent-${CHUKWA_VERSION}.jar
 export CURRENT_DATE=`date +%Y%m%d%H%M`
 
 if [ -z ${HADOOP_JAR} ]; then
@@ -107,9 +107,9 @@
         export HADOOP_HOME=../../..
     fi
     if [ -d ${HADOOP_HOME} ]; then
-        export HADOOP_JAR=`ls ${HADOOP_HOME}/build/hadoop-*-core.jar`
+        export HADOOP_JAR=`ls ${HADOOP_HOME}/hadoop-*-core.jar`
         if [ -z ${HADOOP_JAR} ]; then
-            echo "Please make sure hadoop-*-core.jar exists in ${HADOOP_HOME}/build"
+            echo "Please make sure hadoop-*-core.jar exists in ${HADOOP_HOME}"
             exit -1
         fi
     else
@@ -127,5 +127,5 @@
   echo ERROR! You forgot to set JAVA_HOME in conf/chukwa-env.sh   
 fi
 
-export JPS=${JAVA_HOME}/bin/jps
+export JPS="ps ax"
 

Modified: hadoop/core/trunk/src/contrib/chukwa/bin/jettyCollector.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/bin/jettyCollector.sh?rev=725832&r1=725831&r2=725832&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/bin/jettyCollector.sh (original)
+++ hadoop/core/trunk/src/contrib/chukwa/bin/jettyCollector.sh Thu Dec 11 14:05:49 2008
@@ -25,7 +25,7 @@
 
 function stop {
   echo -n "Shutting down Collector..."
-  ${JPS} | grep CollectorStub | cut -f 1 -d" " | xargs kill -TERM >&/dev/null
+  ${JPS} | grep CollectorStub | grep -v grep | cut -f 1 -d" " | xargs kill -TERM >&/dev/null
   echo "done"
   exit 0
 }



Mime
View raw message