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

dhruba borthakur commented on HDFS-951:
---------------------------------------

This is actually more general that just a hang-on-close. A writer will not be 
able to allocate a new block for a file if a  previous (penultimate) block does 
not have any good replica. this case does happen in real-life if all the 
existing replicas of a block happen to fail, thus making the application hang 
indefinitely. can we somehow allow the application to get an IO error and bail 
out from the write/close call?

> DFSClient should handle all nodes in a pipeline failed.
> -------------------------------------------------------
>
>                 Key: HDFS-951
>                 URL: https://issues.apache.org/jira/browse/HDFS-951
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: He Yongqiang
>
> processDatanodeError-> setupPipelineForAppendOrRecovery  will set 
> streamerClosed to be true if all nodes in the pipeline failed in the past, 
> and just return.
> Back to run() in data streammer,  the logic 
>  if (streamerClosed || hasError || dataQueue.size() == 0 || !clientRunning) {
>                 continue;
>   }
> will just let set closed=true in closeInternal().
> And DataOutputStream will not get a chance to clean up. The DataOutputStream 
> will throw exception or return null for following write/close.
> It will leave the file in writing in incomplete state.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to