[
https://issues.apache.org/jira/browse/HBASE-9116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13749131#comment-13749131
]
Ted Yu commented on HBASE-9116:
-------------------------------
{code}
+ for (ServerName sn: serverMgr.getOnlineServersList()) {
+ serverNameToServerNameWithoutCode.put(sn,
+ new ServerName(sn.getHostname(), sn.getPort(),
ServerName.NON_STARTCODE));
+ serverNameWithoutCodeToServerName.put(
+ new ServerName(sn.getHostname(), sn.getPort(),
ServerName.NON_STARTCODE), sn);
+ }
{code}
ServerName for (sn.getHostname(), sn.getPort(), ServerName.NON_STARTCODE) can
be created first, avoiding an extra instantiation.
{code}
+ List<ServerName> favoredNodes =
globalFavoredNodesAssignmentPlan.getFavoredNodes(region);
+ if (favoredNodes.get(0).equals(currentServerWithoutStartCode)) {
{code}
Is it possible that favoredNodes is null ?
> Add a view/edit tool for favored node mappings for regions
> ----------------------------------------------------------
>
> Key: HBASE-9116
> URL: https://issues.apache.org/jira/browse/HBASE-9116
> Project: HBase
> Issue Type: Improvement
> Components: Region Assignment
> Affects Versions: 0.95.0
> Reporter: Devaraj Das
> Assignee: Devaraj Das
> Fix For: 0.96.0
>
> Attachments: 9116-1.txt, 9116-2.txt, 9116-2.txt, 9116-2.txt,
> 9116-3.txt
>
>
> Add a tool that one can run offline to view the favored node mappings for
> regions, and also fix the mappings if needed. Such a tool exists in the
> 0.89-fb branch. Will port it over to trunk/0.95.
--
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