[
https://issues.apache.org/jira/browse/YARN-7654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472597#comment-16472597
]
Jason Lowe commented on YARN-7654:
----------------------------------
Thanks for updating the patch!
AbstractLauncher still has a setCommand method which is no longer necessary.
DockerProviderService should call addCommand instead of setCommand. The only
other place commands can be added to AbstractLauncher is in
AbstractProviderService#buildLaunchCommand which DockerProviderService
overrides.
The try-with-resources was added to only one of the writeCommandToTempFile
methods (yes, oddly there are two), and the one that matters was not the one
that was updated. As a result the OutputStreamWriter is not closed if anything
throws, and the printWriter is not closed if some exceptions are thrown. My
apologies for missing this earlier. The clue was only one of them is checking
for DockerRunCommand instances.
My previous comment on putAll was misconstrued. I wasn't asking for
DockerRunCommand to have a putAll method, rather that the addEnv method should
be implemented in terms of userEnv.putAll. putAll is not a very useful method
name for DockerRunCommand since it's not clear what "all" is. It's not clear
that it's environment variables that are being added to the command. What I
originally meant was for DockerRunCommand#addEnv to simply be this:
{code:java}
public final void addEnv(Map<String, String> environment) {
userEnv.putAll(environment);
}
{code}
typo: "use_entry_pont" s/b "use_entry_point"
> Support ENTRY_POINT for docker container
> ----------------------------------------
>
> Key: YARN-7654
> URL: https://issues.apache.org/jira/browse/YARN-7654
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: yarn
> Affects Versions: 3.1.0
> Reporter: Eric Yang
> Assignee: Eric Yang
> Priority: Blocker
> Labels: Docker
> Attachments: YARN-7654.001.patch, YARN-7654.002.patch,
> YARN-7654.003.patch, YARN-7654.004.patch, YARN-7654.005.patch,
> YARN-7654.006.patch, YARN-7654.007.patch, YARN-7654.008.patch,
> YARN-7654.009.patch, YARN-7654.010.patch, YARN-7654.011.patch,
> YARN-7654.012.patch, YARN-7654.013.patch, YARN-7654.014.patch,
> YARN-7654.015.patch, YARN-7654.016.patch, YARN-7654.017.patch,
> YARN-7654.018.patch, YARN-7654.019.patch, YARN-7654.020.patch,
> YARN-7654.021.patch, YARN-7654.022.patch, YARN-7654.023.patch
>
>
> Docker image may have ENTRY_POINT predefined, but this is not supported in
> the current implementation. It would be nice if we can detect existence of
> {{launch_command}} and base on this variable launch docker container in
> different ways:
> h3. Launch command exists
> {code}
> docker run [image]:[version]
> docker exec [container_id] [launch_command]
> {code}
> h3. Use ENTRY_POINT
> {code}
> docker run [image]:[version]
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]