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

Andrew Purtell commented on HBASE-20546:
----------------------------------------

I think we may need to make hostToServerName a concurrent hash map or otherwise 
protect it with synchronized access. Otherwise the load balancer could crash 
with CME. 

Map needs to be cleared first too, like [~chia7712] mentioned.

How much are we saving? Seems the rebuild of the map is still pretty expensive. 
Can we incrementally update this state somehow instead? Or reuse state from 
somewhere else? Is there another place in the master we do frequent lookups of 
ServerNames from hostname? In the AM somewhere  maybe?

> Improve perf of RegionLocationFinder.mapHostNameToServerName
> ------------------------------------------------------------
>
>                 Key: HBASE-20546
>                 URL: https://issues.apache.org/jira/browse/HBASE-20546
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 1.4.4, 2.0.0
>            Reporter: Thiruvel Thirumoolan
>            Assignee: Thiruvel Thirumoolan
>            Priority: Major
>             Fix For: 1.5.0, 2.0.1, 1.4.5
>
>         Attachments: HBASE-20546.branch-1.4.001.patch
>
>
> RegionLocationFinder.getTopBlockLocations() is called multiple times during 
> balancer. While profiling on a large table balance, mapHostNameToServerName() 
> seem to take a lot of time. One of the maps is repeatedly created for each 
> iteration, while we can just initialize it once.
> Goes into both branch-1 and branch-2, although patches differ slightly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to