[
https://issues.apache.org/jira/browse/YARN-11256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035181#comment-18035181
]
ASF GitHub Bot commented on YARN-11256:
---------------------------------------
github-actions[bot] commented on PR #4831:
URL: https://github.com/apache/hadoop/pull/4831#issuecomment-3483176919
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> 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
> Labels: pull-request-available
>
> 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: [email protected]
For additional commands, e-mail: [email protected]