[
https://issues.apache.org/jira/browse/HBASE-8344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13670020#comment-13670020
]
Enis Soztutar commented on HBASE-8344:
--------------------------------------
A couple of comments:
{code}
+ for (Position p : Position.values()) {
+ if (favoredNodes.get(p.ordinal()).equals(server)) {
+ return p;
+ }
+ }
{code}
if favoredNodes.size < 3, you will get an out of bounds exception.
I also have some general questions not related to this patch, can do a follow
up.
FavoredNodes.favoredNodesMap is a ConcurrentHashMap, but
updateFavoredNodesMap() and getFavoredNodes() are also synchronized. Is this
intended?
FavoredNodeAssignmentHelper.FAVORED_NODES_NUM -> should this be read from
configuration default replication count for dfs? What if we are running with
replication 2 or 4, we would still have 3 favored nodes?
FavoredNodeAssignmentManager.initialize() looks expensive. Do you need to call
this for every roundRobin / random assignment. It seems that that info can only
change if RS are going down / up.
> Improve the assignment when node failures happen to choose the secondary RS
> as the new primary RS
> -------------------------------------------------------------------------------------------------
>
> Key: HBASE-8344
> URL: https://issues.apache.org/jira/browse/HBASE-8344
> Project: HBase
> Issue Type: Sub-task
> Reporter: Devaraj Das
> Assignee: Devaraj Das
> Priority: Critical
> Fix For: 0.95.2
>
> Attachments: hbase-8344-1.txt, hbase-8344-2.1.txt, hbase-8344-2.2.txt
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira