Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 27270 invoked from network); 18 May 2010 05:21:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 May 2010 05:21:09 -0000 Received: (qmail 11944 invoked by uid 500); 18 May 2010 05:21:09 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 11856 invoked by uid 500); 18 May 2010 05:21:08 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 11848 invoked by uid 99); 18 May 2010 05:21:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 May 2010 05:21:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Tue, 18 May 2010 05:21:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4I5KhOT012763 for ; Tue, 18 May 2010 05:20:43 GMT Message-ID: <18769211.99051274160043625.JavaMail.jira@thor> Date: Tue, 18 May 2010 01:20:43 -0400 (EDT) From: "Konstantin Boudnik (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Commented: (MAPREDUCE-1793) Exception exculsion functionality is not working correctly. In-Reply-To: <27952676.80281274092963637.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-1793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868535#action_12868535 ] Konstantin Boudnik commented on MAPREDUCE-1793: ----------------------------------------------- oops, you are right. I have misread the proposed fix. Sorry. I guess this is the absence of a patch to blame ;-) > Exception exculsion functionality is not working correctly. > ----------------------------------------------------------- > > Key: MAPREDUCE-1793 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-1793 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: test > Reporter: Vinay Kumar Thota > Assignee: Balaji Rajagopalan > > 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.