Hadoop Common
  1. Hadoop Common
  2. HADOOP-5816

ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.19.1
    • Fix Version/s: 0.19.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

        
         if (!key.numeric) {
            compareResult = compareBytes(first, start1, end1, second, start2, end2);
          }
      

      those lines above, compare two byte arrays in a wrong way, it will cause an ArrayIndexOutOfBoundsException, that should be

        
         if (!key.numeric) {
            compareResult = compareBytes(first, start1, end1-start1, second, start2, end2-start2);
          }
      

        Activity

          People

          • Assignee:
            He Yongqiang
            Reporter:
            Min Zhou
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development