Apache9 commented on pull request #3575:
URL: https://github.com/apache/hbase/pull/3575#issuecomment-896656322


   This is the comment for BalancerClusterStatus
   
   >  An efficient array based implementation similar to ClusterState for 
keeping the status of the
   >  cluster in terms of region assignment and distribution. LoadBalancers, 
such as
   >  StochasticLoadBalancer uses this Cluster object because of hundreds of 
thousands of hashmap
   >  manipulations are very costly, which is why this class uses mostly 
indexes and arrays.
   
   It explains that why we use arrays instead of HashMap here.
   
   But looking at the code, we even do not use binary search when locating a 
value in the array, this is also very costly.
   
   Maybe we could implement something like a primitive HashMap to gain both the 
benefits here.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to