Return-Path: X-Original-To: apmail-incubator-chukwa-commits-archive@www.apache.org Delivered-To: apmail-incubator-chukwa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F2F2DE87 for ; Tue, 18 Dec 2012 02:26:36 +0000 (UTC) Received: (qmail 53533 invoked by uid 500); 18 Dec 2012 02:26:36 -0000 Delivered-To: apmail-incubator-chukwa-commits-archive@incubator.apache.org Received: (qmail 53451 invoked by uid 500); 18 Dec 2012 02:26:34 -0000 Mailing-List: contact chukwa-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-commits@incubator.apache.org Received: (qmail 53404 invoked by uid 99); 18 Dec 2012 02:26:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 02:26:33 +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; Tue, 18 Dec 2012 02:26:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 47A98238896F; Tue, 18 Dec 2012 02:26:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1423254 - in /incubator/chukwa/trunk: CHANGES.txt src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java Date: Tue, 18 Dec 2012 02:26:08 -0000 To: chukwa-commits@incubator.apache.org From: asrabkin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121218022612.47A98238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: asrabkin Date: Tue Dec 18 02:26:02 2012 New Revision: 1423254 URL: http://svn.apache.org/viewvc?rev=1423254&view=rev Log: CHUKWA-675. Bad sleeping condition in FileTailer.java. Contributed by Sourygna Luangsay. Modified: incubator/chukwa/trunk/CHANGES.txt incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1423254&r1=1423253&r2=1423254&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Tue Dec 18 02:26:02 2012 @@ -26,6 +26,8 @@ Trunk (unreleased changes) BUGS + CHUKWA-675. Bad sleeping condition in FileTailer.java (Sourygna Luangsay via asrabkin) + CHUKWA-668. Fix infinite loop in FileTailingAdaptor. (Sourygna Luangsay via Eric Yang) CHUKWA-653. Added pre-compile JSP code profile for build process. (Jie Huang via Eric Yang) Modified: incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java?rev=1423254&r1=1423253&r2=1423254&view=diff ============================================================================== --- incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java (original) +++ incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailer.java Tue Dec 18 02:26:02 2012 @@ -84,7 +84,7 @@ class FileTailer extends Thread { long timeToReadFiles = System.currentTimeMillis() - startTime; if(timeToReadFiles > MAX_SAMPLE_PERIOD) log.warn("took " + timeToReadFiles + " ms to check all files being tailed"); - if (timeToReadFiles < SAMPLE_PERIOD_MS || shouldISleep) { + if (timeToReadFiles < SAMPLE_PERIOD_MS && shouldISleep) { Thread.sleep(SAMPLE_PERIOD_MS); } } catch (Throwable e) {