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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1-beta
    • 2.3.0
    • hdfs-client, namenode
    • None
    • 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

            vinayakumarb Vinayakumar B
            vinayakumarb Vinayakumar B
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: