Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-5816

ArrayIndexOutOfBoundsException when using KeyFieldBasedComparator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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);
          }
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: