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

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

Attached patch 007 that moves a bunch of the configs back into 
{{DockerLinuxContainerRuntime}} since we are choosing to have separate configs 
for Docker and Runc. My ideal final product would be to have the subclassed 
runtimes define variables (such as {{allowedRuntimes}}, and then have 
{{OCIContainerRuntime}} define the implementation of the methods that use them. 
However, at this time that isn't possible, since there will be enough 
difference between Docker and Runc. So for the time being, I've put the 
Docker-related configs in Docker if the implementation of the methods that use 
them in their current state cannot be shared between the runtimes.

I also added a formatted string type for the shared ENV variables in 
{{OCIContainerRuntime}} that will be defined by {{envConfigType}} which is 
defined by the subclassed runtimes. 

I went back and forth on a few different approaches before landing on this 
implementation. So your feedback is appreciated. 

cc [~Jim_Brennan], [~eyang], [~ccondit]

> 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
>              Labels: Docker
>         Attachments: YARN-9560.001.patch, YARN-9560.002.patch, 
> YARN-9560.003.patch, YARN-9560.004.patch, YARN-9560.005.patch, 
> YARN-9560.006.patch, YARN-9560.007.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