hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Boudnik (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-6788) Exception exclusion functionality is not working correctly.
Date Wed, 02 Jun 2010 05:46:37 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-6788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Konstantin Boudnik updated HADOOP-6788:
---------------------------------------

               Status: Patch Available  (was: Open)
         Hadoop Flags: [Reviewed]
    Affects Version/s: 0.21.0

To make sure that everything is all right.

> Exception exclusion 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
>    Affects Versions: 0.21.0
>            Reporter: Vinay Kumar Thota
>            Assignee: Balaji Rajagopalan
>         Attachments: 6788-ydist-security.patch, 6788-ydist-security.patch, HADOOP-6788.patch,
HADOOP-6788.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.


Mime
View raw message