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

addBlock() retry should return LocatedBlock with locations else client will get AIOBE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1-beta
    • Fix Version/s: 2.3.0
    • Component/s: hdfs-client, namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      addBlock() call retry should return the LocatedBlock with locations if the block was created in previous call and failover/restart of namenode happened.

      otherwise client will get ArrayIndexOutOfBoundsException while creating the block and write will fail.

      java.lang.ArrayIndexOutOfBoundsException: 0
      	at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1118)
      	at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1078)
      	at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:511)

        Attachments

        1. HDFS-5257.patch
          4 kB
          Vinayakumar B
        2. HDFS-5257.patch
          4 kB
          Vinayakumar B
        3. HDFS-5257.patch
          4 kB
          Vinayakumar B
        4. HDFS-5257.patch
          5 kB
          Vinayakumar B

          Activity

            People

            • Assignee:
              vinayakumarb Vinayakumar B
              Reporter:
              vinayakumarb Vinayakumar B
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: