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

Eric Badger commented on YARN-9560:
-----------------------------------

Thanks for the review, [~Jim_Brennan]! I uploaded patch 002 to address your 
comments. However, there are a few things that I didn't fix. 

I removed {{ENV_DOCKER_CONTAINER_RUN_OVERRIDE_DISABLE}} and the associated 
{{YARN_CONTAINER_RUNTIME_DOCKER_RUN_OVERRIDE_DISABLE}} comment because 
{{ENV_DOCKER_CONTAINER_RUN_OVERRIDE_DISABLE}} was never referenced anywhere in 
the code. Same thing with {{YARN_SYSFS_PATH}}. 

bq. Seems like isDockerContainerRequested() will ultimately need to be pushed 
up to OCIContainerRuntime.
For this, I added a method in {{OCIContainerRuntime}} named 
{{isOCICompliantContainerRequested()}}. I believe that we need to have both 
separation between bare-metal lxc-based containers as well as docker vs. runc 
containers. 

bq. handleContainerStop(), handleContainerKill(), and handleContainerRemove() 
should be protected?
I removed the {{signalContainer()}} definition from {{OCIContainerRuntime}} and 
moved it back into {{DockerLinuxContainerRuntime}}. In the Docker case we need 
to worry about privileged containers and can't just signal the container. 
However, in the OCI-based containers, we can signal the container directly. So 
the functions can be defined differently. 

As for the protected vs package private, I'm not quite sure what the convention 
is here. Strictly speaking they don't need to be protected right now since they 
are only referenced within the same package. But, if it's better style to make 
them protected, then I'm fine with that as well. For now, I've made all of the 
package-private functions protected in {{OCIContainerRuntime}}

> Restructure DockerLinuxContainerRuntime to extend a new OCIContainerRuntime
> ---------------------------------------------------------------------------
>
>                 Key: YARN-9560
>                 URL: https://issues.apache.org/jira/browse/YARN-9560
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>            Priority: Major
>         Attachments: YARN-9560.001.patch, YARN-9560.002.patch
>
>
> Since the new OCI/squashFS/runc runtime will be using a lot of the same code 
> as DockerLinuxContainerRuntime, it would be good to move a bunch of the 
> DockerLinuxContainerRuntime code up a level to an abstract class that both of 
> the runtimes can extend. 
> The new structure will look like:
> {noformat}
> OCIContainerRuntime (abstract class)
>   - DockerLinuxContainerRuntime
>   - FSImageContainerRuntime (name negotiable)
> {noformat}
> This JIRA should only change the structure of the code, not the actual 
> semantics



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to