You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Samrat Deb (Jira)" <ji...@apache.org> on 2022/08/19 09:29:00 UTC
[jira] [Updated] (YARN-11256) buildCommandExecutor function leverages redundant params
[ https://issues.apache.org/jira/browse/YARN-11256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Samrat Deb updated YARN-11256:
------------------------------
Description:
Current signature of `buildCommandExecutor` passes redundant params which can be reduced by passing container reference
protected CommandExecutor buildCommandExecutor(String wrapperScriptPath,
String containerIdStr, String user, Path pidFile, Resource resource,
File workDir, Map<String, String> environment)
- `containerIdStr` can be derived from `container.getContainerId().toString()`
- `resource` can be derived from `container.getResource()`
- `environment` can be derived from container reference
this will allow extention of the function without constraining to paramters of the method
Container reference is safe as it is pass by reference it wont copy the entire the container object
was:
Current signature of `buildCommandExecutor` passes redundant params which can be reduced by passing container reference
```
protected CommandExecutor buildCommandExecutor(String wrapperScriptPath,
String containerIdStr, String user, Path pidFile, Resource resource,
File workDir, Map<String, String> environment)
```
- `containerIdStr` can be derived from `container.getContainerId().toString()`
- `resource` can be derived from `container.getResource()`
- `environment` can be derived from container reference
this will allow extention of the function without constraining to paramters of the method
Container reference is safe as it is pass by reference it wont copy the entire the container object
> buildCommandExecutor function leverages redundant params
> ---------------------------------------------------------
>
> Key: YARN-11256
> URL: https://issues.apache.org/jira/browse/YARN-11256
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: Samrat Deb
> Assignee: Samrat Deb
> Priority: Minor
>
> Current signature of `buildCommandExecutor` passes redundant params which can be reduced by passing container reference
>
> protected CommandExecutor buildCommandExecutor(String wrapperScriptPath,
> String containerIdStr, String user, Path pidFile, Resource resource,
> File workDir, Map<String, String> environment)
>
> - `containerIdStr` can be derived from `container.getContainerId().toString()`
> - `resource` can be derived from `container.getResource()`
> - `environment` can be derived from container reference
> this will allow extention of the function without constraining to paramters of the method
> Container reference is safe as it is pass by reference it wont copy the entire the container object
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org