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 "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/30 17:28:00 UTC
[jira] [Commented] (YARN-11256) buildCommandExecutor function leverages redundant params
[ https://issues.apache.org/jira/browse/YARN-11256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17597992#comment-17597992 ]
ASF GitHub Bot commented on YARN-11256:
---------------------------------------
Samrat002 opened a new pull request, #4831:
URL: https://github.com/apache/hadoop/pull/4831
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
[YARN-11256](https://issues.apache.org/jira/browse/YARN-11256)
### How was this patch tested?
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
- [x] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
- [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [x] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
> buildCommandExecutor function leverages redundant params
> ---------------------------------------------------------
>
> Key: YARN-11256
> URL: https://issues.apache.org/jira/browse/YARN-11256
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: yarn
> Reporter: Samrat Deb
> Assignee: Samrat Deb
> Priority: Minor
>
> Current signature of `buildCommandExecutor` passes redundant params which can be reduced by passing container reference
>
> {code:java}
> protected CommandExecutor buildCommandExecutor(String wrapperScriptPath,
> String containerIdStr, String user, Path pidFile, Resource resource,
> File workDir, Map<String, String> environment){code}
>
> - `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