Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Currently we use the ServerName port for providing favored node hints. We should use the DN port from hdfs-site.xml instead to avoid warning messages in region server logs. The warnings will be from this section of HDFS code, it moves across classes.
private boolean[] getPinnings(DatanodeInfo[] nodes) { if (favoredNodes == null) { return null; } else { boolean[] pinnings = new boolean[nodes.length]; HashSet<String> favoredSet = new HashSet<>(Arrays.asList(favoredNodes)); for (int i = 0; i < nodes.length; i++) { pinnings[i] = favoredSet.remove(nodes[i].getXferAddrWithHostname()); LOG.debug("{} was chosen by name node (favored={}).", nodes[i].getXferAddrWithHostname(), pinnings[i]); } if (!favoredSet.isEmpty()) { // There is one or more favored nodes that were not allocated. LOG.warn("These favored nodes were specified but not chosen: " + favoredSet + " Specified favored nodes: " + Arrays.toString(favoredNodes)); } return pinnings; } }
Attachments
Attachments
Issue Links
- links to