Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11719

Arrays.fill() wrong index in BlockSender.readChecksum() exception handling

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 3.1.2
    • Component/s: datanode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In BlockSender.readChecksum() exception handling part:
      Arrays.fill(buf, checksumOffset, checksumLen, (byte) 0);

      Actually the paramters should be: Arrays.fill(buf, <startIndex>, <endIndex>, value);
      So it should be changed to:
      Arrays.fill(buf, checksumOffset, checksumOffset + checksumLen, (byte) 0);

        Attachments

        1. HADOOP-11719.003.patch
          1 kB
          Mingliang Liu
        2. HADOOP-11719.002.patch
          1.0 kB
          Mingliang Liu
        3. HADOOP-11719.001.patch
          1.0 kB
          Tao Zhang

          Activity

            People

            • Assignee:
              thinktaocs Tao Zhang
              Reporter:
              thinktaocs Tao Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: