[
https://issues.apache.org/jira/browse/HDFS-7761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yi Liu updated HDFS-7761:
-------------------------
Description:
# 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}}
was:
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}
Another thing is we'd better setSoftwareVersion when constructing
{{DatanodeInfoWithStorage}} from {{DatanodeInfo}}
> 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)