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

Konstantin Shvachko commented on HDFS-544:
------------------------------------------

# Swap parameters in {{DataStorage.linkAllBlocks}}:
should be {{linkAllBlocks(from, to)}} where {{from}} is {{tmpDir}} and {{to}} 
is {{curDir}}
Otherwise it is inconsistent with {{linkBlocks(from, to, lv)}}
# Add empty line before {{linkBlocks()}} to separate methods.
# You may avoid creating current directory in the beginning of 
{{linkAllBlocks}}. Just replace {{to.mkdir()}} with {{to.mkdirs()}} in 
{{linkBlocks()}}.
# {{FSVolume.clearPath()}} should not throw IOException.
# {{FSDataset()}} should not set data-node fields, like {{datanode.data = 
this}}. This should be handled by DataNode itself.
# I think it is overkill to instantiate {{BlockSender()}} and send data to 
NullOutputStream only to verify that block data matches its crc. 
I see that BlockScanner does the same thing. But can we factor out some common 
reading code without sending, and call it here? May be it can be static.
I particularly don't like that the patch approach requires adding a new 
{{datanode}} field, which is used only for creating the {{BlockSender}}.
Besides, receiving valid block length via {{ChecksumException}} is asking for 
trouble.
Can we go through {{FSInputChecker}} or even {{ChecksumFileSystem}}. If not our 
only choice is to write a custom method {{getValidReplicaLength()}} or smth.

> Add a "rbw" sub directory to DataNode data directory
> ----------------------------------------------------
>
>                 Key: HDFS-544
>                 URL: https://issues.apache.org/jira/browse/HDFS-544
>             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: datanodeOnDiskLayout.patch
>
>
> Add a "rbw" sub directory to DataNode to persist RBW, RWR, and RUR replicas.

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