[
https://issues.apache.org/jira/browse/HDFS-11450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15881691#comment-15881691
]
Chen Liang commented on HDFS-11450:
-----------------------------------
Thanks [~liuml07] for the review and comments!
Yes, there are code duplicates there, I would definitely want to make the
separation probably by using abstract classes, like I discussed offline with
[~arpitagarwal]. But this potentially means refactoring current
{{NetworkTopology}} and {{InnerNodeImpl}} classes. Since {{NetworkTopology}} is
already being used in so many places, I'm considering doing this in a later
sub-task if needed, to not to introduce regression, and to make this patch
smaller to review, .
And all the the current access to {{childrenStorageInfo}} are in
{{synchronized}} blocks (I believe). So I considered a {{HashMap}} should be
sufficient here. Totally possible to change this later if needed though.
> HDFS specific network topology classes with storage type info included
> ----------------------------------------------------------------------
>
> Key: HDFS-11450
> URL: https://issues.apache.org/jira/browse/HDFS-11450
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Reporter: Chen Liang
> Assignee: Chen Liang
> Attachments: HDFS-11450.001.patch
>
>
> This JIRA adds storage type info into network topology.
> More specifically, this JIRA adds a storage type map by extending
> {{InnerNodeImpl}} to describe the available storages under the current node's
> subtree. This map is updated when a node is added/removed from the subtree.
> With this info, when choosing a random node with storage type requirement,
> the search could then decide to/not to go deeper into a subtree by examining
> the available storage types first.
> One to-do item still, is that, we might still need to separately handle the
> cases where a Datanodes restarts, or a disk is hot-swapped, will file another
> JIRA in that case.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]