[ 
https://issues.apache.org/jira/browse/HDFS-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13805562#comment-13805562
 ] 

Jing Zhao commented on HDFS-5257:
---------------------------------

The failed test should be unrelated. I will commit the patch shortly.

In the meanwhile, for the current fix, can we move "add new chosen targets to 
already allocated block" part from getAdditionalBlock directly into 
analyzeFileState, so that we do not need to wrap the LocatedBlock twice? This 
is a minor issue and we can address it in a separate jira if necessary.

> addBlock() retry should return LocatedBlock with locations else client will 
> get AIOBE
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-5257
>                 URL: https://issues.apache.org/jira/browse/HDFS-5257
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client, namenode
>    Affects Versions: 2.1.1-beta
>            Reporter: Vinay
>            Assignee: Vinay
>            Priority: Critical
>         Attachments: HDFS-5257.patch, HDFS-5257.patch, HDFS-5257.patch, 
> HDFS-5257.patch
>
>
> {{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.
> {noformat}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){noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to