Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 18984 invoked from network); 27 May 2010 05:06:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 May 2010 05:06:00 -0000 Received: (qmail 29744 invoked by uid 500); 27 May 2010 05:05:59 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 29622 invoked by uid 500); 27 May 2010 05:05:59 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 29612 invoked by uid 99); 27 May 2010 05:05:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 05:05:58 +0000 X-ASF-Spam-Status: No, hits=-1470.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 05:05:58 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4R55bNi019910 for ; Thu, 27 May 2010 05:05:37 GMT Message-ID: <31123137.15791274936737576.JavaMail.jira@thor> Date: Thu, 27 May 2010 01:05:37 -0400 (EDT) From: "Vinay Kumar Thota (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Updated: (HADOOP-6788) Exception exculsion functionality is not working correctly. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-6788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vinay Kumar Thota updated HADOOP-6788: -------------------------------------- Attachment: 6788-ydist-security.patch Fixed the issue and patch attached for yahoo distribution security branch. > Exception exculsion functionality is not working correctly. > ----------------------------------------------------------- > > Key: HADOOP-6788 > URL: https://issues.apache.org/jira/browse/HADOOP-6788 > Project: Hadoop Common > Issue Type: Bug > Components: test > Reporter: Vinay Kumar Thota > Assignee: Balaji Rajagopalan > Attachments: 6788-ydist-security.patch > > > Exception exclusion functionality is not working correctly because of that tests are failing by not matching the error count. > I debugged the issue and found that the problem with shell command which is generating in the getNumberOfMatchesInLogFile function. > Currently building the shell command in the following way. > if(list != null){ > for(int i =0; i < list.length; ++i) > { > filePattern.append(" | grep -v " + list[i] ); > } > } > String[] cmd = > new String[] { > "bash", > "-c", > "grep -c " > + pattern + " " + filePattern > + " | awk -F: '{s+=$2} END {print s}'" }; > However, The above commnad won't work correctly because you are counting the exceptions in the file before excluding the known exceptions. > In this case it gives the mismatch error counts everytime.The shell command should be in the following way to work correctly. > if (list != null) { > int index = 0; > for (String excludeExp : list) { > filePattern.append((++index < list.length)? "| grep -v " : > "| grep -vc " + list[i] ); > } > } > String[] cmd = > new String[] { > "bash", > "-c", > "grep " > + pattern + " " + filePattern > + " | awk -F: '{s+=$2} END {print s}'" }; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.