[
https://issues.apache.org/jira/browse/HDFS-7761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317300#comment-14317300
]
Yi Liu commented on HDFS-7761:
------------------------------
Hi [~arpitagarwal], would you like to help review? Since you are the reviewer
of HDFS-7647, this JIRA is a follow-on refinement.
> cleanup unnecssary code logic in LocatedBlock
> ---------------------------------------------
>
> Key: HDFS-7761
> URL: https://issues.apache.org/jira/browse/HDFS-7761
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 2.7.0
> Reporter: Yi Liu
> Assignee: Yi Liu
> Priority: Minor
> Attachments: HDFS-7761.001.patch, HDFS-7761.002.patch
>
>
> # The usage of following two variables is unnecessary. We can remove them to
> make code a bit brief.
> {quote}
> private final boolean hasStorageIDs;
> private final boolean hasStorageTypes;
> {quote}
> # In HDFS-7647, no need to modify {{LocatedBlock#getStorageTypes}} and
> {{LocatedBlock#getStorageIDs}}, we just need to update the cached
> {{storageIDs}} and {{storageTypes}} after *sort*.
> # Another thing is we'd better setSoftwareVersion when constructing
> {{DatanodeInfoWithStorage}} from {{DatanodeInfo}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)