[ 
https://issues.apache.org/jira/browse/HDFS-15783?focusedWorklogId=537727&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-537727
 ]

ASF GitHub Bot logged work on HDFS-15783:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Jan/21 10:11
            Start Date: 19/Jan/21 10:11
    Worklog Time Spent: 10m 
      Work Description: aajisaka opened a new pull request #2626:
URL: https://github.com/apache/hadoop/pull/2626


   JIRA: https://issues.apache.org/jira/browse/HDFS-15783
   
   - Remove the usage of `TreeSet#add`, whose time complexity is `O(logN)`.
   - This fix is similar to https://issues.apache.org/jira/browse/HDFS-14102


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 537727)
    Remaining Estimate: 0h
            Time Spent: 10m

> Speed up BlockPlacementPolicyRackFaultTolerant#verifyBlockPlacement
> -------------------------------------------------------------------
>
>                 Key: HDFS-15783
>                 URL: https://issues.apache.org/jira/browse/HDFS-15783
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: block placement
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> Set<String> racks = new TreeSet<>();
> for (DatanodeInfo dn : locs) {
>   racks.add(dn.getNetworkLocation());
> }
> return new BlockPlacementStatusDefault(racks.size(), numberOfReplicas,
>     clusterMap.getNumOfRacks());{code}
> Here, HashMap should be used instead of TreeSet.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to