hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r732645 - in /hadoop/core/branches/branch-0.20: ./ src/contrib/chukwa/ src/contrib/chukwa/bin/ src/contrib/chukwa/tools/init.d/
Date Thu, 08 Jan 2009 08:51:05 GMT
Author: cdouglas
Date: Thu Jan  8 00:51:04 2009
New Revision: 732645

URL: http://svn.apache.org/viewvc?rev=732645&view=rev
Log:
HADOOP-4916. Make user/location of Chukwa installation configurable by an
external properties file. Contributed by Eric Yang.

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/bin/agent.sh
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/build.xml
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/default.properties
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-agent
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-collector
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-data-processors
    hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-system-metrics

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Thu Jan  8 00:51:04 2009
@@ -520,6 +520,9 @@
     HADOOP-4884. Make tool tip date format match standard HICC format. (Eric
     Yang via cdouglas)
 
+    HADOOP-4916. Make user/location of Chukwa installation configurable by an
+    external properties file. (Eric Yang via cdouglas)
+
 Release 0.19.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/bin/agent.sh
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/bin/agent.sh?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/bin/agent.sh (original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/bin/agent.sh Thu Jan  8 00:51:04 2009
@@ -22,11 +22,11 @@
 . "$bin"/chukwa-config.sh
 
 echo "hadoop jar for agent is " ${HADOOP_JAR}
-trap '${JPS} | grep ChukwaAgent | grep -v grep | cut -f 1 -d" " | xargs kill -TERM ; exit
0' 1 2 15
+trap '${JPS} | grep ChukwaAgent | grep -v grep | grep -o "[^ ].*" | 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 | grep -v grep | cut -f 1 -d" "`
+  JETTY_PID=`${JPS} | grep ChukwaAgent | grep -v grep | grep -o "[^ ].*" | cut -f 1 -d" "`
   kill -TERM ${JETTY_PID} >&/dev/null
   echo "done"
   exit 0

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/build.xml
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/build.xml?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/build.xml (original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/build.xml Thu Jan  8 00:51:04 2009
@@ -789,10 +789,22 @@
 mv %{buildroot}/%{name}-%{version} %{buildroot}%{_prefix}/%{name}
 cd %{buildroot}%{_prefix}
 mkdir -p %{buildroot}/etc/init.d
-cat %{name}/tools/init.d/chukwa-data-processors | sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:'
> %{buildroot}/etc/init.d
-cat %{name}/tools/init.d/chukwa-collector | sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:'
> %{buildroot}/etc/init.d
-cat %{name}/tools/init.d/chukwa-agent | sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:'
> %{buildroot}/etc/init.d
-cat %{name}/tools/init.d/chukwa-system-metrics | sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:'
> %{buildroot}/etc/init.d
+cat %{name}/tools/init.d/chukwa-data-processors | \
+sed 's:- chukwa -c:- %{uid} -c:' | \
+sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:' | \
+sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' > %{buildroot}/etc/init.d/chukwa-data-processors
+cat %{name}/tools/init.d/chukwa-collector | \
+sed 's:- chukwa -c:- %{uid} -c:' | \
+sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:' | \
+sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' > %{buildroot}/etc/init.d/chukwa-collector
+cat %{name}/tools/init.d/chukwa-agent | \
+sed 's:- chukwa -c:- %{uid} -c:' | \
+sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:' | \
+sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' > %{buildroot}/etc/init.d/chukwa-agent
+cat %{name}/tools/init.d/chukwa-system-metrics | \
+sed 's:- chukwa -c:- %{uid} -c:' | \
+sed 's:CHUKWA_HOME=/usr/local:CHUKWA_HOME=%{_prefix}:' | \
+sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' > %{buildroot}/etc/init.d/chukwa-system-metrics
 chmod a+x %{buildroot}/etc/init.d/chukwa-*
 rm -rf %{buildroot}%{_prefix}/%{name}/src
 rm -rf %{buildroot}%{_prefix}/%{name}/build.xml

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/default.properties
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/default.properties?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/default.properties (original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/default.properties Thu Jan  8 00:51:04
2009
@@ -13,5 +13,7 @@
 #   See the License for the specific language governing permissions and
 #   limitations under the License.
 rpm.prefix=/usr/local
+rpm.conf.dir=/usr/local/chukwa/conf
+hadoop.conf=/usr/local/hadoop
 rpm.uid=chukwa
 rpm.gid=users

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-agent
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-agent?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-agent (original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-agent Thu Jan
 8 00:51:04 2009
@@ -32,13 +32,14 @@
 
 config () {
         CHUKWA_HOME=/usr/local/chukwa
+        CHUKWA_CONF_DIR=/usr/local/chukwa/conf
 }
 
 start () {
         echo -n $"Starting $prog: "
         config
         # start daemon
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog start agent.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh --config=${CHUKWA_CONF_DIR} --watchdog
start agent.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
@@ -49,7 +50,7 @@
         # stop daemon
         echo -n $"Stopping $prog: "
         config
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog stop agent.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh --config=${CHUKWA_CONF_DIR} --watchdog
stop agent.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-collector
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-collector?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-collector (original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-collector Thu
Jan  8 00:51:04 2009
@@ -31,14 +31,15 @@
 prog=chukwa-collector
 
 config () {
-        CHUKWA_HOME=/usr/local/chukwa
+                CHUKWA_HOME=/usr/local/chukwa
+                CHUKWA_CONF_DIR=/usr/local/chukwa/conf
 }
 
 start () {
         echo -n $"Starting $prog: "
         config
         # start daemon
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog start jettyCollector.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh  --config=${CHUKWA_CONF_DIR} --watchdog
start jettyCollector.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
@@ -49,7 +50,7 @@
         # stop daemon
         config
         echo -n $"Stopping $prog: "
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog stop jettyCollector.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh  --config=${CHUKWA_CONF_DIR} --watchdog
stop jettyCollector.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-data-processors
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-data-processors?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-data-processors
(original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-data-processors
Thu Jan  8 00:51:04 2009
@@ -30,13 +30,14 @@
 
 config () {
         CHUKWA_HOME=/usr/local/chukwa
+        CHUKWA_CONF_DIR=/usr/local/chukwa/conf
 }
 
 start () {
         echo -n $"Starting $prog: "
         config
         # start daemon
-	sudo -u gmon ${CHUKWA_HOME}/bin/start-data-processors.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/start-data-processors.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
@@ -47,7 +48,7 @@
         # stop daemon
         echo -n $"Stopping $prog: "
         config
-	sudo -u gmon ${CHUKWA_HOME}/bin/stop-data-processors.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/stop-data-processors.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog

Modified: hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-system-metrics
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-system-metrics?rev=732645&r1=732644&r2=732645&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-system-metrics
(original)
+++ hadoop/core/branches/branch-0.20/src/contrib/chukwa/tools/init.d/chukwa-system-metrics
Thu Jan  8 00:51:04 2009
@@ -32,13 +32,14 @@
 
 config () {
         CHUKWA_HOME=/usr/local/chukwa
+        CHUKWA_CONF_DIR=/usr/local/chukwa/conf
 }
 
 start () {
         echo -n $"Starting $prog: "
         config
         # start daemon
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh start systemDataLoader.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh --config=${CHUKWA_CONF_DIR} start systemDataLoader.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
@@ -49,7 +50,7 @@
         # stop daemon
         echo -n $"Stopping $prog: "
         config
-	sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh stop systemDataLoader.sh
+	su - chukwa -c "${CHUKWA_HOME}/bin/chukwa-daemon.sh  --config=${CHUKWA_CONF_DIR} stop systemDataLoader.sh"
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog



Mime
View raw message