chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r916526 - in /hadoop/chukwa/trunk: ./ bin/ conf/ src/web/hicc/WEB-INF/ tools/init.d/ tools/service/ tools/specs/
Date Fri, 26 Feb 2010 01:29:30 GMT
Author: eyang
Date: Fri Feb 26 01:29:29 2010
New Revision: 916526

URL: http://svn.apache.org/viewvc?rev=916526&view=rev
Log:
CHUKWA-446. Refactor start/stop scripts. (Eric Yang)

Removed:
    hadoop/chukwa/trunk/bin/UserDailySummary.sh
    hadoop/chukwa/trunk/bin/agent.sh
    hadoop/chukwa/trunk/bin/aggregator.sh
    hadoop/chukwa/trunk/bin/archive.sh
    hadoop/chukwa/trunk/bin/backfill.sh
    hadoop/chukwa/trunk/bin/dbAdmin.sh
    hadoop/chukwa/trunk/bin/dbLoader.sh
    hadoop/chukwa/trunk/bin/dbSetup.sh
    hadoop/chukwa/trunk/bin/demux.sh
    hadoop/chukwa/trunk/bin/dump.sh
    hadoop/chukwa/trunk/bin/dumpArchive.sh
    hadoop/chukwa/trunk/bin/dumpRecord.sh
    hadoop/chukwa/trunk/bin/exec-data-loader.sh
    hadoop/chukwa/trunk/bin/fsm-clienttrace-dn.sh
    hadoop/chukwa/trunk/bin/fsm-clienttrace-mr.sh
    hadoop/chukwa/trunk/bin/fsm-jobhist.sh
    hadoop/chukwa/trunk/bin/hicc.sh
    hadoop/chukwa/trunk/bin/jettyCollector.sh
    hadoop/chukwa/trunk/bin/jobhisttailstarter.sh
    hadoop/chukwa/trunk/bin/mdl.sh
    hadoop/chukwa/trunk/bin/netstat.sh
    hadoop/chukwa/trunk/bin/nodeActivityDataLoader.sh
    hadoop/chukwa/trunk/bin/postProcess.sh
    hadoop/chukwa/trunk/bin/start-probes.sh
    hadoop/chukwa/trunk/bin/startWatchingFile.sh
    hadoop/chukwa/trunk/bin/stop-probes.sh
    hadoop/chukwa/trunk/bin/systemDataLoader.sh
    hadoop/chukwa/trunk/bin/torqueDataLoader.sh
    hadoop/chukwa/trunk/bin/validateDemux.sh
    hadoop/chukwa/trunk/bin/watchdog.sh
    hadoop/chukwa/trunk/tools/init.d/
    hadoop/chukwa/trunk/tools/service/
Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/bin/README
    hadoop/chukwa/trunk/bin/VERSION
    hadoop/chukwa/trunk/bin/chukwa
    hadoop/chukwa/trunk/bin/chukwa-config.sh
    hadoop/chukwa/trunk/bin/chukwa-daemon.sh
    hadoop/chukwa/trunk/bin/chukwa-daemons.sh
    hadoop/chukwa/trunk/bin/start-agents.sh
    hadoop/chukwa/trunk/bin/start-all.sh
    hadoop/chukwa/trunk/bin/start-collectors.sh
    hadoop/chukwa/trunk/bin/start-data-processors.sh
    hadoop/chukwa/trunk/bin/stop-agents.sh
    hadoop/chukwa/trunk/bin/stop-all.sh
    hadoop/chukwa/trunk/bin/stop-collectors.sh
    hadoop/chukwa/trunk/bin/stop-data-processors.sh
    hadoop/chukwa/trunk/build.xml
    hadoop/chukwa/trunk/conf/initial_adaptors.template
    hadoop/chukwa/trunk/src/web/hicc/WEB-INF/jetty.xml
    hadoop/chukwa/trunk/tools/specs/chukwa.spec

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Fri Feb 26 01:29:29 2010
@@ -30,6 +30,8 @@
  
    IMPROVEMENTS
 
+    CHUKWA-446. Refactor start/stop scripts. (Eric Yang)
+
     CHUKWA-450. Ability to turn off sort in dumpchunks. (asrabkin)
 
     CHUKWA-359. Report detailed error on adaptor start failure. (asrabkin)

Modified: hadoop/chukwa/trunk/bin/README
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/README?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/README (original)
+++ hadoop/chukwa/trunk/bin/README Fri Feb 26 01:29:29 2010
@@ -14,10 +14,6 @@
 
 start-probes.sh - runs, in this order, systemDataLoader.sh, torqueDataLoader.sh, nodeActivityDataLoader.sh
 
-systemDataLoader.sh - every 60 seconds run: sar, iostat, top, top, df, netstat. //TODO: figure
out where these guys send their output
-torqueDataLoader.sh - //TODO: FILL THIS IN!
-nodeActivityDataLoader.sh - //TODO: FILL THIS IN!
-
 slaves.sh <command command_args ...> - run arbitrary commands on all hosts in conf/slaves
 
 jettycollector.sh - start a jetty based version of the Chukwa collector

Modified: hadoop/chukwa/trunk/bin/VERSION
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/VERSION?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/VERSION (original)
+++ hadoop/chukwa/trunk/bin/VERSION Fri Feb 26 01:29:29 2010
@@ -1 +1 @@
-0.3.0
+0.4.0

Modified: hadoop/chukwa/trunk/bin/chukwa
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/chukwa?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/chukwa (original)
+++ hadoop/chukwa/trunk/bin/chukwa Fri Feb 26 01:29:29 2010
@@ -18,12 +18,41 @@
 
 # The Chukwa command script
 #
+# Environment Variables
+#
+#   JAVA_HOME        The java implementation to use.  Overrides JAVA_HOME.
+#   CHUKWA_CONF_DIR  Alternate conf dir.  Default is ${CHUKWA_HOME}/conf.
+#
 
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
 . "$bin"/chukwa-config.sh
 
+# if no args specified, show usage
+if [ $# = 0 ]; then
+  echo "Usage: chukwa [--config confdir] COMMAND"
+  echo "where COMMAND is one of:"
+  echo "  agent         run a Chukwa Agent"
+  echo "  archive       run the Archive Manager"
+  echo "  collector     run a Chukwa Collector"
+  echo "  demux         run the Demux Manager"
+  echo "  dp            run the Post Demux data processors"
+  echo "  hicc          run a HICC Webserver"
+  echo "  droll         run a daily rolling job (deprecated)"
+  echo "  hroll         run a hourly rolling job (deprecated)"
+  # Daily rolling and hourly rolling will be deprecated by retention processor
+  # echo "  retention     run the Retention Processor"
+  echo "  version       print the version"
+  echo "Utilities:"
+  echo "  backfill      run a back fill data loader utility"
+  echo "  dumpArchive   view an archive file"
+  echo "  dumpRecord    view a record file"
+  echo "  tail          start tailing a file"
+  echo "Most command print help when invoked w/o parameters."
+  exit 1
+fi
+
 # get arguments
 COMMAND=$1
 shift
@@ -32,4 +61,105 @@
   . "${CHUKWA_CONF_DIR}/chukwa-env.sh"
 fi
 
-exec "${CHUKWA_HOME}/bin/$@"
+# Java parameters
+if [ "$JAVA_HOME" != "" ]; then
+  JAVA_HOME=$JAVA_HOME
+fi
+
+if [ "$JAVA_HOME" = "" ]; then
+  echo "Error: JAVA_HOME is not set."
+  exit 1
+fi
+
+if [ "$HADOOP_CONF_DIR" != "" ]; then
+  CLASSPATH=${HADOOP_CONF_DIR}:${CLASSPATH}
+fi
+
+BACKGROUND="true"
+
+# configure command parameters
+if [ "$COMMAND" = "agent" ]; then
+  APP='agent'
+  CLASS='org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent'
+  PID="Agent"
+elif [ "$COMMAND" = "archive" ]; then
+  APP='archive'
+  CLASS='org.apache.hadoop.chukwa.extraction.archive.ChukwaArchiveManager'
+  PID='ArchiveManager'
+elif [ "$COMMAND" = "collector" ]; then
+  APP='collector'
+  CLASS='org.apache.hadoop.chukwa.datacollection.collector.CollectorStub'
+  PID="Collector"
+elif [ "$COMMAND" = "dp" ]; then
+  APP='postprocess'
+  CLASS='org.apache.hadoop.chukwa.extraction.demux.PostProcessorManager'
+  PID='PostProcessorManager'
+elif [ "$COMMAND" = "demux" ]; then
+  APP='Demux'
+  CLASS='org.apache.hadoop.chukwa.extraction.demux.DemuxManager'
+  PID='DemuxManager'
+elif [ "$COMMAND" = "hicc" ]; then
+  WEB_SERVICE_COMMON=`ls ${CHUKWA_HOME}/webapps/hicc.war`
+  APP='hicc'
+  CLASS='org.apache.hadoop.chukwa.hicc.HiccWebServer'
+  CLASSPATH=${CLASSPATH}:${WEB_SERVICE_COMMON}:${HICC_JAR}
+  PID="hicc"
+  HOST=`hostname`
+  JAVA_OPT="${JAVA_OPT} -Djetty.host=${HOST} -Djava.net.preferIPv4Stack=true"
+elif [ "$COMMAND" = "hroll" ]; then
+  APP='hroll'
+  CLASS='org.apache.hadoop.chukwa.extraction.demux.HourlyChukwaRecordRolling'
+  OPTS='rollInSequence true deleteRawdata true'
+  PID='HourlyChukwaRecordRolling'
+elif [ "$COMMAND" = "droll" ]; then
+  APP='droll'
+  CLASS='org.apache.hadoop.chukwa.extraction.demux.DailyChukwaRecordRolling'
+  OPTS='rollInSequence true deleteRawdata true'
+  PID='DailyChukwaRecordRolling'
+elif [ "$COMMAND" = "version" ]; then
+  echo `cat ${CHUKWA_HOME}/bin/VERSION`
+  exit 0
+elif [ "$COMMAND" = "backfill" ]; then
+  APP='backfill'
+  CLASS='org.apache.hadoop.chukwa.tools.backfilling.BackfillingLoader'
+elif [ "$COMMAND" = "dumpArchive" ]; then
+  APP='DumpArchive'
+  CLASS='org.apache.hadoop.chukwa.util.DumpArchive'
+  BACKGROUND="false"
+elif [ "$COMMAND" = "dumpRecord" ]; then
+  APP='DumpRecord'
+  CLASS='org.apache.hadoop.chukwa.util.DumpRecord'
+  BACKGROUND="false"
+elif [ "$COMMAND" = "dumpChunk" ]; then
+  APP='DumpChunk'
+  CLASS='org.apache.hadoop.chukwa.util.DumpChunks'
+  BACKGROUND="false"
+elif [ "$COMMAND" = "tail" ]; then
+  if [ $# = 0 -o $# -gt 2 ]; then
+    echo "usage: startWatchingFile <filename> [datatype]"
+    exit 1
+  fi
+
+  filename=$1
+
+  if [ $# -ge 2 ]; then
+    datatype=$2
+  else
+    datatype=raw
+  fi
+  echo "tailing $datatype: $filename"
+  echo "add org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.CharFileTailingAdaptorUTF8
 $datatype 0  $filename  0" | nc localhost 9093
+  exit 0
+fi
+
+if [ "$1" = "stop" ]; then
+  kill -TERM `cat ${CHUKWA_PID_DIR}/$PID.pid`
+else 
+  # run command
+  if [ "$BACKGROUND" = "false" ]; then
+    ${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME}
-DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR}
-DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CORE}:${HADOOP_JAR}:${COMMON}:${tools}
${CLASS} $OPTS $@
+  else
+    exec ${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME}
-DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR}
-DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CORE}:${HADOOP_JAR}:${COMMON}:${tools}
${CLASS} $OPTS $@ &
+  fi
+fi
+

Modified: hadoop/chukwa/trunk/bin/chukwa-config.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/chukwa-config.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/chukwa-config.sh (original)
+++ hadoop/chukwa/trunk/bin/chukwa-config.sh Fri Feb 26 01:29:29 2010
@@ -66,16 +66,6 @@
     fi
 fi
 
-#check to see if the conf dir is given as an optional argument
-if [ $# -gt 1 ]
-then
-    if [ "--watchdog" = "$1" ]
-          then
-              shift
-              WATCHDOG="true"
-    fi
-fi
-
 if [ -z ${CHUKWA_LOG_DIR} ]; then
     export CHUKWA_LOG_DIR="$CHUKWA_HOME/logs"
 fi

Modified: hadoop/chukwa/trunk/bin/chukwa-daemon.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/chukwa-daemon.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/chukwa-daemon.sh (original)
+++ hadoop/chukwa/trunk/bin/chukwa-daemon.sh Fri Feb 26 01:29:29 2010
@@ -96,41 +96,6 @@
 case $startStop in
 
   (start)
-    MAIL=`cat ${CHUKWA_CONF_DIR}/alert`
-
-    RANDOM=`date '+%s'`
-    PARTROL_HOUR=$[($RANDOM % 24)]
-    if [ ${PARTROL_HOUR} -gt 12 ]; then
-        PARTROL_HOUR2=$[${PARTROL_HOUR}-12]
-    else 
-        PARTROL_HOUR2=$[${PARTROL_HOUR}+12]
-    fi
-    if [ -n "${WATCHDOG}" ]; then
-        mkdir -p ${CHUKWA_HOME}/var/tmp >&/dev/null
-        crontab -l > ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-        crontest=$?
-
-        if [ "X${crontest}" != "X0" ]; then
-          echo "MAILTO=${MAIL}" > ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-        else
-          grep -v "${CHUKWA_HOME}/bin/watchdog.sh" ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
| grep -v MAILTO | grep -v "cat ${CHUKWA_HOME}/var/run/watchdog.out" | grep -v ${CHUKWA_HOME}/tools/expire.sh
> ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}.2
-          echo "MAILTO=${MAIL}" > ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-          cat ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}.2 >> ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-          rm -f ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}.2
-        fi
-        cat >> ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE} << CRON
-*/5 * * * * ${CHUKWA_HOME}/bin/watchdog.sh --config ${CHUKWA_CONF_DIR}  > ${CHUKWA_HOME}/var/run/watchdog.out
-1 ${PARTROL_HOUR},${PARTROL_HOUR2} * * * /bin/bash -c "cat ${CHUKWA_HOME}/var/run/watchdog.out;
cat /dev/null > ${CHUKWA_HOME}/var/run/watchdog.out"
-15 3 * * * ${CHUKWA_HOME}/tools/expire.sh 10 ${CHUKWA_LOG_DIR} nowait
-CRON
-
-        # save crontab
-        echo -n "Registering watchdog.."
-        mkdir -p ${CHUKWA_HOME}/var/tmp >&/dev/null
-        crontab ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE} > /dev/null 2>&1
-        rm -f ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-        echo "done"
-    fi
 
     mkdir -p "$CHUKWA_PID_DIR"
 
@@ -149,22 +114,15 @@
     chukwa_rotate_log $log
     echo starting $command, logging to $log
     cd "$CHUKWA_HOME"
-    nohup nice -n $CHUKWA_NICENESS "$CHUKWA_HOME"/bin/chukwa -config $command "$@" > "$log"
2>&1 < /dev/null &
+    nohup nice -n $CHUKWA_NICENESS "$CHUKWA_HOME"/bin/chukwa --config $CHUKWA_CONF_DIR $command
"$@" > "$log" 2>&1 < /dev/null &
     echo $! > $pid
     sleep 1; head "$log"
     ;;
           
   (stop)
 
-    if [ "${WATCHDOG}" != "" ]; then
-        # remove watchdog
-        crontab -l | grep -v ${CHUKWA_HOME}/bin/watchdog.sh | grep -v ${CHUKWA_HOME}/var/run/watchdog.out
| grep -v ${CHUKWA_HOME}/tools/expire.sh > ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-        crontab ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-        rm -f ${CHUKWA_HOME}/var/tmp/cron.${CURRENT_DATE}
-    fi
-
     if [ -f $CHUKWA_HOME/bin/$command ]; then
-      $CHUKWA_HOME/bin/$command stop
+      $CHUKWA_HOME/bin/chukwa --config $CHUKWA_CONF_DIR $command stop
       rm -f $pid
     else
       if [ -f $pid ]; then

Modified: hadoop/chukwa/trunk/bin/chukwa-daemons.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/chukwa-daemons.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/chukwa-daemons.sh (original)
+++ hadoop/chukwa/trunk/bin/chukwa-daemons.sh Fri Feb 26 01:29:29 2010
@@ -31,8 +31,4 @@
 
 . $bin/chukwa-config.sh
 
-if [ -n ${WATCHDOG} ]; then
-  exec "$bin/slaves.sh" --config $CHUKWA_CONF_DIR cd "$CHUKWA_HOME" \; "$bin/chukwa-daemon.sh"
--config $CHUKWA_CONF_DIR --watchdog "$@"
-else
-  exec "$bin/slaves.sh" --config $CHUKWA_CONF_DIR cd "$CHUKWA_HOME" \; "$bin/chukwa-daemon.sh"
--config $CHUKWA_CONF_DIR "$@"
-fi
+exec "$bin/slaves.sh" --config $CHUKWA_CONF_DIR cd "$CHUKWA_HOME" \; "$bin/chukwa-daemon.sh"
--config $CHUKWA_CONF_DIR "$@"

Modified: hadoop/chukwa/trunk/bin/start-agents.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/start-agents.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/start-agents.sh (original)
+++ hadoop/chukwa/trunk/bin/start-agents.sh Fri Feb 26 01:29:29 2010
@@ -28,4 +28,4 @@
 . "$bin"/chukwa-config.sh
 
 # start chukwa agents
-"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts agents start agent.sh
+"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts agents start chukwa agent

Modified: hadoop/chukwa/trunk/bin/start-all.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/start-all.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/start-all.sh (original)
+++ hadoop/chukwa/trunk/bin/start-all.sh Fri Feb 26 01:29:29 2010
@@ -29,8 +29,5 @@
 # start agents
 "$bin"/start-agents.sh --config $CHUKWA_CONF_DIR
 
-# start probes
-"$bin"/start-probes.sh --config $CHUKWA_CONF_DIR
-
 # start data processors
 "$bin"/start-data-processors.sh --config $CHUKWA_CONF_DIR

Modified: hadoop/chukwa/trunk/bin/start-collectors.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/start-collectors.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/start-collectors.sh (original)
+++ hadoop/chukwa/trunk/bin/start-collectors.sh Fri Feb 26 01:29:29 2010
@@ -28,4 +28,4 @@
 . "$bin"/chukwa-config.sh
 
 # start jetty collectors
-"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts collectors --watchdog start jettyCollector.sh
+"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts collectors start "$bin"/chukwa
collector

Modified: hadoop/chukwa/trunk/bin/start-data-processors.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/start-data-processors.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/start-data-processors.sh (original)
+++ hadoop/chukwa/trunk/bin/start-data-processors.sh Fri Feb 26 01:29:29 2010
@@ -20,24 +20,8 @@
 java=$JAVA_HOME/bin/java
 
 . "$bin"/chukwa-config.sh
-if [ ! -d ${CHUKWA_HOME}/opt/apache-tomcat-6.0.16 ]; then
-  if [ -f ${CHUKWA_HOME}/opt/apache-tomcat-6.0.16.tar.gz ]; then
-    tar fxz ${CHUKWA_HOME}/opt/apache-tomcat-6.0.16.tar.gz -C ${CHUKWA_HOME}/opt
-  fi
-fi
-
-if [ ! -f ${CHUKWA_HOME}/opt/apache-tomcat-6.0.16/webapps/hicc-${CHUKWA_VERSION}.war ]; then
-  if [ -f ${CHUKWA_HOME}/hicc-${CHUKWA_VERSION}.war ]; then
-    cp ${CHUKWA_HOME}/hicc-${CHUKWA_VERSION}.war ${CHUKWA_HOME}/opt/apache-tomcat-6.0.16/webapps
-  fi
-fi 
 
 # start data processors
-#"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR --watchdog start processSinkFiles.sh watchdog
-"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR --watchdog start archive.sh watchdog
-"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR --watchdog start demux.sh watchdog
-"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR --watchdog start postProcess.sh watchdog
-
-
-# start database admin script
-"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR start dbAdmin.sh
+"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR start chukwa archive
+"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR start chukwa demux
+"$bin"/chukwa-daemon.sh --config $CHUKWA_CONF_DIR start chukwa dataloader

Modified: hadoop/chukwa/trunk/bin/stop-agents.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/stop-agents.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/stop-agents.sh (original)
+++ hadoop/chukwa/trunk/bin/stop-agents.sh Fri Feb 26 01:29:29 2010
@@ -23,4 +23,4 @@
 
 . "$bin"/chukwa-config.sh
 
-"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts agents stop agent.sh
+"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts agents stop "$bin"/chukwa agent
stop

Modified: hadoop/chukwa/trunk/bin/stop-all.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/stop-all.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/stop-all.sh (original)
+++ hadoop/chukwa/trunk/bin/stop-all.sh Fri Feb 26 01:29:29 2010
@@ -23,7 +23,6 @@
 
 . "$bin"/chukwa-config.sh
 
-"$bin"/stop-probes.sh --config $CHUKWA_CONF_DIR
 "$bin"/stop-data-processors.sh --config $CHUKWA_CONF_DIR
 "$bin"/stop-agents.sh --config $CHUKWA_CONF_DIR
 "$bin"/stop-collectors.sh --config $CHUKWA_CONF_DIR

Modified: hadoop/chukwa/trunk/bin/stop-collectors.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/stop-collectors.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/stop-collectors.sh (original)
+++ hadoop/chukwa/trunk/bin/stop-collectors.sh Fri Feb 26 01:29:29 2010
@@ -23,4 +23,4 @@
 
 . "$bin"/chukwa-config.sh
 
-"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts collectors --watchdog stop jettyCollector.sh
+"$bin"/chukwa-daemons.sh --config $CHUKWA_CONF_DIR --hosts collectors stop "$bin"/chukwa
stop collector

Modified: hadoop/chukwa/trunk/bin/stop-data-processors.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/stop-data-processors.sh?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/stop-data-processors.sh (original)
+++ hadoop/chukwa/trunk/bin/stop-data-processors.sh Fri Feb 26 01:29:29 2010
@@ -21,33 +21,6 @@
 
 . "$bin"/chukwa-config.sh
 
-# stop processSinkFiles.sh
-pidFile=$CHUKWA_PID_DIR/ProcessSinkFiles.pid
-if [ -f $pidFile ]; then  
-   echo -n "Shutting down Data Processors.."
-   DP_PID=`head ${pidFile}`
-   kill -TERM ${DP_PID} > /dev/null 2>&1
-   for i in 1 2 5; do
-       test_pid=`ps ax | grep ${DP_PID} | grep -v grep | grep processSinkFiles.sh | wc -l`
-       if [ $test_pid -ge 1 ]; then
-           sleep $i
-           kill -TERM ${DP_PID} > /dev/null 2>&1
-       else
-           break
-       fi
-   done
-   test_pid=`ps ax | grep ${DP_PID} | grep -v grep | grep processSinkFiles.sh | wc -l`
-   if [ $test_pid -ge 1 ]; then
-       kill -9 ${DBADMIN_PID} > /dev/null 2>&1
-   fi
-   rm -f ${pidFile}
-   rm -f $CHUKWA_PID_DIR/chukwa-$CHUKWA_IDENT_STRING-processSinkFiles.sh.pid
-   echo "done"
-else
-  echo " no $pidFile"
-fi
-
-
 # stop demux.sh
 pidFile=$CHUKWA_PID_DIR/DemuxManager.pid
 if [ -f $pidFile ]; then

Modified: hadoop/chukwa/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/build.xml?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/build.xml (original)
+++ hadoop/chukwa/trunk/build.xml Fri Feb 26 01:29:29 2010
@@ -20,7 +20,7 @@
 <project name="chukwa" default="main" xmlns:ivy="antlib:org.apache.ivy.ant">
 
 	<property name="name" value="chukwa" />
-	<property name="chukwaVersion" value="0.3.0" />
+	<property name="chukwaVersion" value="0.4.0" />
 	<property name="chukwaRelease" value="dev" />
 	<property name="final.name" value="${name}-${chukwaVersion}" />
 	<property name="contrib.dir" value="${basedir}/contrib"/>
@@ -510,7 +510,7 @@
                 </copy>
                 <copy file="${basedir}/conf/log4j.properties" tofile="${test.build.dir}/conf/log4j.properties"></copy>
                 <copy file="${build.dir}/hicc.war" tofile="${test.build.classes}/webapps/hicc.war"></copy>
-                <copy file="${basedir}/conf/auth.conf" tofile="${test.build.dir}/var/auth.conf"></copy>
+                <copy file="${basedir}/conf/auth.conf" tofile="${test.build.dir}/conf/auth.conf"></copy>
 		<junit showoutput="${test.output}" fork="yes" printsummary="${test.printsummary}" forkmode="${test.junit.fork.mode}"
maxmemory="${test.junit.maxmemory}" dir="${test.build.dir}/classes/" timeout="${test.timeout}"
errorProperty="tests.failed" failureProperty="tests.failed">
 			<classpath refid="testClasspath" />
 			<env key="CHUKWA_CONF_DIR" value="${test.build.dir}/conf" />

Modified: hadoop/chukwa/trunk/conf/initial_adaptors.template
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/conf/initial_adaptors.template?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/conf/initial_adaptors.template (original)
+++ hadoop/chukwa/trunk/conf/initial_adaptors.template Fri Feb 26 01:29:29 2010
@@ -0,0 +1,4 @@
+add org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Iostat 60 /usr/bin/iostat
-x -k 55 2 0
+add org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Df 60 /bin/df -l 0
+add org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Sar 60 /usr/bin/sar -q -r
-n ALL 55 0
+add org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Top 60 /usr/bin/top -b -n
1 -c 0

Modified: hadoop/chukwa/trunk/src/web/hicc/WEB-INF/jetty.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/web/hicc/WEB-INF/jetty.xml?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/web/hicc/WEB-INF/jetty.xml (original)
+++ hadoop/chukwa/trunk/src/web/hicc/WEB-INF/jetty.xml Fri Feb 26 01:29:29 2010
@@ -86,7 +86,7 @@
     <Item>
     <New class="org.mortbay.jetty.security.HashUserRealm">
     <Set name="name">Auth</Set>
-    <Set name="config"><SystemProperty name="CHUKWA_DATA_DIR" default="."/>/auth.conf</Set>
+    <Set name="config"><SystemProperty name="CHUKWA_CONF_DIR" default="."/>/auth.conf</Set>
     <Set name="refreshInterval">0</Set>
     </New>
     </Item>

Modified: hadoop/chukwa/trunk/tools/specs/chukwa.spec
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/tools/specs/chukwa.spec?rev=916526&r1=916525&r2=916526&view=diff
==============================================================================
--- hadoop/chukwa/trunk/tools/specs/chukwa.spec (original)
+++ hadoop/chukwa/trunk/tools/specs/chukwa.spec Fri Feb 26 01:29:29 2010
@@ -60,154 +60,15 @@
 fi
 mv %{buildroot}/%{name}-%{version} %{buildroot}%{_prefix}
 cd %{buildroot}%{_prefix}
-mkdir -p %{buildroot}/etc/init.d
-
-cat %{buildroot}%{_prefix}/tools/init.d/chukwa-data-processors | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa: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 %{buildroot}%{_prefix}/tools/init.d/chukwa-collector | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' > %{buildroot}/etc/init.d/chukwa-collector
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-agent/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-agent/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-agent/run.new %{buildroot}%{_prefix}/tools/service/chukwa-agent/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-df/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-df/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-df/run.new %{buildroot}%{_prefix}/tools/service/chukwa-df/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-iostat/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-iostat/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-iostat/run.new %{buildroot}%{_prefix}/tools/service/chukwa-iostat/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-netstat/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-netstat/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-netstat/run.new %{buildroot}%{_prefix}/tools/service/chukwa-netstat/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-sar/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-sar/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-sar/run.new %{buildroot}%{_prefix}/tools/service/chukwa-sar/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-top/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-top/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-top/run.new %{buildroot}%{_prefix}/tools/service/chukwa-top/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-ps/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-ps/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-ps/run.new %{buildroot}%{_prefix}/tools/service/chukwa-ps/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-collector/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-collector/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-collector/run.new %{buildroot}%{_prefix}/tools/service/chukwa-collector/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-pbsnodes/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-pbsnodes/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-pbsnodes/run.new %{buildroot}%{_prefix}/tools/service/chukwa-pbsnodes/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-torque/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-torque/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-torque/run.new %{buildroot}%{_prefix}/tools/service/chukwa-torque/run
-
-cat %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run | \
-sed "s:CHUKWA_USER=chukwa:CHUKWA_USER=${hdfsusage_uid}:" | \
-sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
-sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
-> %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run.new
-mv %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run.new %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run
 
 chmod a+x %{buildroot}%{_prefix}/tools/expire.sh
-chmod a+x %{buildroot}/etc/init.d/chukwa-*
-chmod -R a+x %{buildroot}%{_prefix}/tools/service/chukwa-*
 rm -rf %{buildroot}%{_prefix}/src
 rm -rf %{buildroot}%{_prefix}/build.xml
 %post
-if [ -d /service/chukwa-agent ]; then
-  if [ ! -L /service/chukwa-agent ]; then
-    rm -rf /service/chukwa-agent
-  fi
-fi
-if [ -d /service/chukwa-df ]; then
-  if [ ! -L /service/chukwa-df ]; then
-    rm -rf /service/chukwa-df
-  fi
-fi
-if [ -d /service/chukwa-iostat ]; then
-  if [ ! -L /service/chukwa-iostat ]; then
-    rm -rf /service/chukwa-iostat
-  fi
-fi
-if [ -d /service/chukwa-netstat ]; then
-  if [ ! -L /service/chukwa-netstat ]; then
-    rm -rf /service/chukwa-netstat
-  fi
-fi
-if [ -d /service/chukwa-ps ]; then
-  if [ ! -L /service/chukwa-ps ]; then
-    rm -rf /service/chukwa-ps
-  fi
-fi
-if [ -d /service/chukwa-sar ]; then
-  if [ ! -L /service/chukwa-sar ]; then
-    rm -rf /service/chukwa-sar
-  fi
-fi
-if [ -d /service/chukwa-top ]; then
-  if [ ! -L /service/chukwa-top ]; then
-    rm -rf /service/chukwa-top
-  fi
-fi
-mkdir -p %{_prefix}
-ln -sf %{_prefix}/tools/service/chukwa-agent /service/chukwa-agent
-ln -sf %{_prefix}/tools/service/chukwa-df /service/chukwa-df
-ln -sf %{_prefix}/tools/service/chukwa-iostat /service/chukwa-iostat
-ln -sf %{_prefix}/tools/service/chukwa-netstat /service/chukwa-netstat
-ln -sf %{_prefix}/tools/service/chukwa-sar /service/chukwa-sar
-ln -sf %{_prefix}/tools/service/chukwa-top /service/chukwa-top
-ln -sf %{_prefix}/tools/service/chukwa-ps /service/chukwa-ps
 echo "Congratulation!  You have successfully installed Chukwa."
 %preun
 echo
 %postun
-if [ ! -f /etc/init.d/chukwa-collector ]; then
-  rm -f /service/chukwa-*
-fi
 %files
 %defattr(-,%{uid},%{gid})
 %{_prefix}
-%defattr(-,root,root)
-/etc/init.d/chukwa-data-processors
-/etc/init.d/chukwa-collector



Mime
View raw message