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

Ming Ma commented on HDFS-8688:
-------------------------------

Thanks [~walter.k.su] for the investigation. According to the description of 
DNSToSwitchMapper.java, the switch means the layer above rack. But according to 
AbstractDNSToSwitchMapping description, isSingleSwitch is used to decide if it 
is single rack or multi racks, in that sense they are the same. My main 
question is which component actually uses isSingleSwitch API. 
[[email protected]] added this in HADOOP-7777 and might have some input.

Regardless we don't need to deal with that in this jira. For this patch, there 
is a scenario where it might change the behavior.

* Script file is defined.
* There is only one rack in the cluster.
* All blocks' replicas are corrupted.

Before this patch, blockHasEnoughRacks will return false. After this patch 
blockHasEnoughRacks will return true. So maybe we can just remove the check of 
{{this.shouldCheckForEnoughRacks}} at the beginning of the function?

> replace shouldCheckForEnoughRacks with hasClusterEverBeenMultiRack
> ------------------------------------------------------------------
>
>                 Key: HDFS-8688
>                 URL: https://issues.apache.org/jira/browse/HDFS-8688
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Walter Su
>            Assignee: Walter Su
>         Attachments: HDFS-8688.01.patch, HDFS-8688.02.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to