Return-Path: X-Original-To: apmail-incubator-bigtop-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bigtop-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB387DB19 for ; Fri, 17 Aug 2012 20:54:31 +0000 (UTC) Received: (qmail 12942 invoked by uid 500); 17 Aug 2012 20:54:31 -0000 Delivered-To: apmail-incubator-bigtop-commits-archive@incubator.apache.org Received: (qmail 12875 invoked by uid 500); 17 Aug 2012 20:54:31 -0000 Mailing-List: contact bigtop-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bigtop-dev@incubator.apache.org Delivered-To: mailing list bigtop-commits@incubator.apache.org Received: (qmail 12868 invoked by uid 99); 17 Aug 2012 20:54:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 20:54:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 20:54:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E0B4A238896F; Fri, 17 Aug 2012 20:53:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1374434 - /incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init Date: Fri, 17 Aug 2012 20:53:44 -0000 To: bigtop-commits@incubator.apache.org From: rvs@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120817205344.E0B4A238896F@eris.apache.org> Author: rvs Date: Fri Aug 17 20:53:44 2012 New Revision: 1374434 URL: http://svn.apache.org/viewvc?rev=1374434&view=rev Log: BIGTOP-691. flume gets killed too fast when the service is asked to stop Modified: incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init Modified: incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init?rev=1374434&r1=1374433&r2=1374434&view=diff ============================================================================== --- incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init (original) +++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init Fri Aug 17 20:53:44 2012 @@ -73,6 +73,7 @@ done DEFAULT_FLUME_NODE_NAME="agent" FLUME_NODE_NAME=${FLUME_NODE_NAME:-${DEFAULT_FLUME_NODE_NAME}} +FLUME_SHUTDOWN_TIMEOUT=${FLUME_SHUTDOWN_TIMEOUT:-60} start() { [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED @@ -101,7 +102,10 @@ stop() { FLUME_PID=`cat $FLUME_PID_FILE` if [ -n $FLUME_PID ]; then kill -TERM ${FLUME_PID} &>/dev/null - sleep 5 + for i in `seq 1 ${FLUME_SHUTDOWN_TIMEOUT}` ; do + kill -0 ${FLUME_PID} &>/dev/null || break + sleep 1 + done kill -KILL ${FLUME_PID} &>/dev/null fi rm -f $LOCKFILE $FLUME_PID_FILE