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

Wangda Tan commented on YARN-7935:
----------------------------------

Thanks [~suma.shivaprasad] for working on the change, several questions while 
reviewing the patch: 

1) This patch introduced a new env to let apps set hostname of containers by 
theirselves, is this required? Or letting YARN set container's hostname is 
enough. And I'm not sure if allow app to choose container hostname could 
introduce any risks to the cluster or not. 

2) Regarding to implementation: {{a.setHostnameinEnv}} is called by 
{{prepareContainer}}, and {{b.setHostname}} is called by {{launchContainer}}. 
Since a is called prior to b, does this mean all user specified hostname will 
be overwrite by YARN defined hostname (which is generated from container-id).

> Expose container's hostname to applications running within the docker 
> container
> -------------------------------------------------------------------------------
>
>                 Key: YARN-7935
>                 URL: https://issues.apache.org/jira/browse/YARN-7935
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>            Reporter: Suma Shivaprasad
>            Assignee: Suma Shivaprasad
>            Priority: Major
>         Attachments: YARN-7935.1.patch, YARN-7935.2.patch, YARN-7935.3.patch
>
>
> Some applications have a need to bind to the container's hostname (like 
> Spark) which is different from the NodeManager's hostname(NM_HOST which is 
> available as an env during container launch) when launched through Docker 
> runtime. The container's hostname can be exposed to applications via an env 
> CONTAINER_HOSTNAME. Another potential candidate is the container's IP but 
> this can be addressed in a separate jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to