[
https://issues.apache.org/jira/browse/HDFS-5157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13763128#comment-13763128
]
Tsz Wo (Nicholas), SZE commented on HDFS-5157:
----------------------------------------------
Junping and Eric, you brought up a very good design question. How do
BlockPlacementPolicy (in NN) and VolumeChoosingPolicy (in DN) work with storage
types? There are two different ways:
# Client specifies the required storage type when calling addBlock(..) to NN.
BlockPlacementPolicy in NN chooses a set of datanodes accounting for the
storage type. Then, client passes the required storage type to the datanode
set and each datanode chooses a particular storage using a VolumeChoosingPolicy.
# Same as before, client specifies the required storage type when calling
addBlock(..) to NN. Now, BlockPlacementPolicy in NN chooses a set of storages
(instead of datanodes). Then, client writes to the corresponding storages.
VolumeChoosingPolicy is no longer needed and it should be removed.
#1 is similar to the current implementation in trunk and branch-1 (i.e. client
calls addBlock(..) to NN. BlockPlacementPolicy in NN chooses a set of
datanodes. Client send a write request to the datanode set. Each datanode
chooses a particular storage using a VolumeChoosingPolicy.)
However, I don't see why we need two policies. It seems to me that #2 is
better. What do you think?
> Datanode should allow choosing the target storage
> -------------------------------------------------
>
> Key: HDFS-5157
> URL: https://issues.apache.org/jira/browse/HDFS-5157
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode
> Affects Versions: Heterogeneous Storage (HDFS-2832)
> Reporter: Arpit Agarwal
> Assignee: Junping Du
> Attachments: HDFS-5157-v1.patch, HDFS-5157-v2.patch
>
>
> Datanode should allow should choosing a target Storage or target Storage Type
> as a parameter when creating a new block. Currently there are two ways in
> which the target volume is chosen (via {{VolumeChoosingPolicy#chooseVolume}}.
> # AvailableSpaceVolumeChoosingPolicy
> # RoundRobinVolumeChoosingPolicy
> BlockReceiver and receiveBlock should also accept a new parameter for target
> storage or storage type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira