[ 
https://issues.apache.org/jira/browse/YARN-5430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15413786#comment-15413786
 ] 

Varun Vasudev commented on YARN-5430:
-------------------------------------

Thanks for the patch [~jianhe].
1)
Can you please address the failing unit test?

2)
{code}
+  // LinuxContainerExecutor overrides this method and behaves differently.
+  public String[] getIpAndHost(Container container) {
+    String[] ipAndHost = new String[2];
+    try {
+      InetAddress address = InetAddress.getLocalHost();
+      ipAndHost[0] = address.getHostAddress();
+      ipAndHost[1] = address.getHostName();
+    } catch (UnknownHostException e) {
+      LOG.error("Unable to get Local hostname and ip for " + container
+          .getContainerId());
+    }
+    return ipAndHost;
+  }
{code}
and
{code}
+
+  // Return the host and ip of the container
+  String[] getIpAndHost(Container container);
{code}
Can you please a Javadoc about returning a comma separated list of ips as part 
of the return array? Also it looks like DefaultLinuxContainerRuntime.java has 
the same code as ContainerExecutor - any chance we can create a common function?

3)
Can you please address the checkstyle issues caught by Jenkins?

> Get container's ip and host from NM
> -----------------------------------
>
>                 Key: YARN-5430
>                 URL: https://issues.apache.org/jira/browse/YARN-5430
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Jian He
>            Assignee: Jian He
>         Attachments: YARN-5430.1.patch, YARN-5430.2.patch, YARN-5430.3.patch, 
> YARN-5430.4.patch, YARN-5430.5.patch
>
>
> In YARN-4757, we introduced a DNS mechanism for containers. That's based on 
> the assumption  that we can get the container's ip and host information and 
> store it in the registry-service. This jira aims to get the container's ip 
> and host from the NM, primarily docker container



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to