You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Min Zhou (JIRA)" <ji...@apache.org> on 2009/05/13 04:04:46 UTC

[jira] Created: (HADOOP-5816) ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator
-----------------------------------------------------------------

                 Key: HADOOP-5816
                 URL: https://issues.apache.org/jira/browse/HADOOP-5816
             Project: Hadoop Core
          Issue Type: Bug
          Components: mapred
    Affects Versions: 0.19.1
            Reporter: Min Zhou
            Priority: Minor


{code:java}  
   if (!key.numeric) {
      compareResult = compareBytes(first, start1, end1, second, start2, end2);
    }
{code}
those lines above, compare two byte arrays in a wrong way, it will cause an ArrayIndexOutOfBoundsException,  that should be 
{code:java}  
   if (!key.numeric) {
      compareResult = compareBytes(first, start1, end1-start1, second, start2, end2-start2);
    }
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5816) ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-5816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

He Yongqiang updated HADOOP-5816:
---------------------------------

    Attachment: hadoop-5816-2009-05-24.patch

Talked with Min about this bug two weeks ago. This is an obvious bug.  However, in most situations when used in MapReduce jobs like TestKeyFieldBasedComparator does, this bug will not trigger IndexOutofBoundException but will misbehave, that is because the byte array in MapOutBuffer is large enough. So i inclued in TestKeyFieldBasedComparator a test without running mapreduce job. 

> ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator
> -----------------------------------------------------------------
>
>                 Key: HADOOP-5816
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5816
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.19.1
>            Reporter: Min Zhou
>            Priority: Minor
>         Attachments: hadoop-5816-2009-05-24.patch
>
>
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1, second, start2, end2);
>     }
> {code}
> those lines above, compare two byte arrays in a wrong way, it will cause an ArrayIndexOutOfBoundsException,  that should be 
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1-start1, second, start2, end2-start2);
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5816) ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-5816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

He Yongqiang updated HADOOP-5816:
---------------------------------

    Status: Patch Available  (was: Open)

> ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator
> -----------------------------------------------------------------
>
>                 Key: HADOOP-5816
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5816
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.19.1
>            Reporter: Min Zhou
>            Priority: Minor
>         Attachments: hadoop-5816-2009-05-24.patch
>
>
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1, second, start2, end2);
>     }
> {code}
> those lines above, compare two byte arrays in a wrong way, it will cause an ArrayIndexOutOfBoundsException,  that should be 
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1-start1, second, start2, end2-start2);
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5816) ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-5816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Devaraj Das updated HADOOP-5816:
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.19.2
         Assignee: He Yongqiang
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

I just committed this. Thanks, He!

> ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator
> -----------------------------------------------------------------
>
>                 Key: HADOOP-5816
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5816
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.19.1
>            Reporter: Min Zhou
>            Assignee: He Yongqiang
>            Priority: Minor
>             Fix For: 0.19.2
>
>         Attachments: hadoop-5816-2009-05-24.patch
>
>
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1, second, start2, end2);
>     }
> {code}
> those lines above, compare two byte arrays in a wrong way, it will cause an ArrayIndexOutOfBoundsException,  that should be 
> {code:java}  
>    if (!key.numeric) {
>       compareResult = compareBytes(first, start1, end1-start1, second, start2, end2-start2);
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.