[ 
https://issues.apache.org/jira/browse/HDFS-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hairong Kuang updated HDFS-543:
-------------------------------

    Attachment: writeToReplica1.patch

 >  1.  BlockReceiver.java - when clientName is empty, the block being written 
 > to is considered temporary. Should it be more explicit that this? Can a real 
 > client set its name to empty also?
This is what we do in the trunk. A real client's name is guaranteed to be not 
empty.

 >  2. BlockReceiver.java - for client append the current code checks for 
 > finalized and isRecovery to be true. Is there a need to use isRecovery? Also 
 > what happens in the case finalized is true and isRecovery false?
This is also what the trunk does now. In the append case, isRecovery must be 
true. If isFinalized is true and isRecovery is false, BlockReciever will throw 
an exception BlockAlreadyExists.

For comments 5, 6, and 7, I simplified the updateBlock logic by calling 
stopWriter. This part will be rewritten anyway in the future.

The new patch incorporates all remaining comments.

> Break FSDatasetInterface#writeToBlock() into writeToTemporary, writeToRBW, 
> and append
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-543
>                 URL: https://issues.apache.org/jira/browse/HDFS-543
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: Append Branch
>
>         Attachments: writeToReplica.patch, writeToReplica1.patch
>
>
> FSDatasetInterface#writeToBlock() currently allows to create/recover a 
> temporary replica, create/recover a RBW replica, or append to a replica. The 
> implementation of the method in FSDataset is very complicated and error 
> prone. I'd like to break this method into 3:
> 1. writeToTemporary allows to create a Temporary replica or recover from a 
> packet error for a Tempoary replica;
> 2. writeToRBW allows to create a RBW replica or recover from a packet error 
> for a RBW replica;
> 3. append allows to append to an existing Finalized replica.

-- 
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