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

Craig Condit commented on YARN-9562:
------------------------------------

{quote}I've added patch 005 which adds a new parameterized class and also 
parameterized the set function for container runtime data. I'm not quite sure 
if this is better since there's still an unchecked assignment in 
launchContainer when the we call getContainerRuntimeData(). Let me know whether 
or not this is what you had in mind. If not, let me know what you're looking 
for since I'm not sure how generics helps the situation. If they do help, then 
I'm clearly missing something so please explain it to me.
{quote}
[~ebadger], if you change the signatures to:

 {code}
void setContainerRuntimeData(ContainerRuntimeObject<?> containerRuntimeData);
<T> ContainerRuntimeObject<T> getContainerRuntimeData(Class<T> runtimeClazz);
{code}

... then you can validate the type before returning and avoid the cast in the 
caller (caller passes in the type it expects to receive).

> Add Java changes for the new RuncContainerRuntime
> -------------------------------------------------
>
>                 Key: YARN-9562
>                 URL: https://issues.apache.org/jira/browse/YARN-9562
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>            Priority: Major
>         Attachments: YARN-9562.001.patch, YARN-9562.002.patch, 
> YARN-9562.003.patch, YARN-9562.004.patch, YARN-9562.005.patch, 
> YARN-9562.006.patch
>
>
> This JIRA will be used to add the Java changes for the new 
> RuncContainerRuntime. This will work off of YARN-9560 to use much of the 
> existing DockerLinuxContainerRuntime code once it is moved up into an 
> abstract class that can be extended. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
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