[jira] [Commented] (YARN-1155) RM should resolve hostnames/ips in include/exclude files to support matching against both hostnames and ips

2013-09-06 Thread Steve Loughran (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760128#comment-13760128
 ] 

Steve Loughran commented on YARN-1155:
--

This would need to work for clusters where DNS doesn't resolve the hostnames, 
but instead /etc/hosts does the work. This is a not unusual setup in 
virtualized clusters when the VMs are on a virtual subnet

 RM should resolve hostnames/ips in include/exclude files to support matching 
 against both hostnames and ips
 ---

 Key: YARN-1155
 URL: https://issues.apache.org/jira/browse/YARN-1155
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: yeshavora
Assignee: Xuan Gong

 RM should be able to resolve both ips and host names from include and exclude 
 files. 

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


[jira] [Commented] (YARN-1155) RM should resolve hostnames/ips in include/exclude files to support matching against both hostnames and ips

2013-09-06 Thread Xuan Gong (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760632#comment-13760632
 ] 

Xuan Gong commented on YARN-1155:
-

Verified that we have test case to test this logic
{code}
// To test that IPs also work
String ip = NetUtils.normalizeHostName(localhost);
writeToHostsFile(host1, ip);

rm.getNodesListManager().refreshNodes(conf);

nodeHeartbeat = nm1.nodeHeartbeat(true);
Assert.assertTrue(NodeAction.NORMAL.equals(nodeHeartbeat.getNodeAction()));
Assert
.assertEquals(0, ClusterMetrics.getMetrics().getNumDecommisionedNMs());
{code}

 RM should resolve hostnames/ips in include/exclude files to support matching 
 against both hostnames and ips
 ---

 Key: YARN-1155
 URL: https://issues.apache.org/jira/browse/YARN-1155
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: yeshavora
Assignee: Xuan Gong

 RM should be able to resolve both ips and host names from include and exclude 
 files. 

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


[jira] [Commented] (YARN-1155) RM should resolve hostnames/ips in include/exclude files to support matching against both hostnames and ips

2013-09-06 Thread Xuan Gong (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760630#comment-13760630
 ] 

Xuan Gong commented on YARN-1155:
-

verified that we already have such logic:
{code}
  public boolean isValidNode(String hostName) {
synchronized (hostsReader) {
  SetString hostsList = hostsReader.getHosts();
  SetString excludeList = hostsReader.getExcludedHosts();
  String ip = NetUtils.normalizeHostName(hostName);
  return (hostsList.isEmpty() || hostsList.contains(hostName) || hostsList
  .contains(ip))
   !(excludeList.contains(hostName) || excludeList.contains(ip));
}
  }
{code}

 RM should resolve hostnames/ips in include/exclude files to support matching 
 against both hostnames and ips
 ---

 Key: YARN-1155
 URL: https://issues.apache.org/jira/browse/YARN-1155
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: yeshavora
Assignee: Xuan Gong

 RM should be able to resolve both ips and host names from include and exclude 
 files. 

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