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

András Győri commented on YARN-11094:
-------------------------------------

Thanks for the change [~snemeth]. I had the following comments:
 * SLSRunner#L742: traceType could be null
 * SLSSchedulerCommons#L64: Missing generic type
 * The JsonJob created in SLSRunner#L458 actually contains invalid type. It is 
marked as Map<String, String>, however, in AMDefinitionSLS#L41 we clearly 
acquire a List<Map<String, String>> type from the map, so that should be 
Map<String, List<Map<String, String>>>. It is probably due to the fact, that 
jsonJob should be a class instead of a Map to be type safe, so I think we 
should use Map<String, ?> as its type to retain soundness.
 * AMDefinitionSLS#L41 should handle the case where the casting is failed.

> Follow up changes for YARN-10547
> --------------------------------
>
>                 Key: YARN-11094
>                 URL: https://issues.apache.org/jira/browse/YARN-11094
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: scheduler-load-simulator
>            Reporter: Szilard Nemeth
>            Assignee: Szilard Nemeth
>            Priority: Minor
>         Attachments: YARN-11094.001.patch, YARN-11094.002.patch
>
>
> As a follow up of YARN-10547, we need to fix the raw use of Map across the 
> following classes: 
> - AMDefinitionSLS
> - SLSRunner
> See [this 
> comment|https://issues.apache.org/jira/browse/YARN-10547?focusedCommentId=17510839&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17510839]
>  for details.
> The following methods are affected: 
> - org.apache.hadoop.yarn.sls.AMDefinitionFactory#createFromSlsTrace
> - org.apache.hadoop.yarn.sls.AMDefinitionFactory#getAMContainerResourceSLS
> - org.apache.hadoop.yarn.sls.AMDefinitionSLS#getTaskContainers
> - Methods of TaskContainerDefinition.Builder
> - org.apache.hadoop.yarn.sls.AMDefinitionSLS.Builder#create
> - org.apache.hadoop.yarn.sls.SLSRunner#startAMFromSLSTrace
> Moreover, some generic cleanup in SLSRunner could be performed to eliminate: 
> 1. Redundant @SuppressWarnings("unchecked") annotations
> 2. Explicit type arguments for some collections
> 3. Remove exceptions from methods that never throwing them



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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