[
https://issues.apache.org/jira/browse/YARN-10014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18045337#comment-18045337
]
ASF GitHub Bot commented on YARN-10014:
---------------------------------------
github-actions[bot] commented on PR #1746:
URL: https://github.com/apache/hadoop/pull/1746#issuecomment-3658149751
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.
> Refactor boolean flag based approach in SchedConfCLI#run
> --------------------------------------------------------
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: Prabhu Joseph
> Assignee: Oleg Bonar
> Priority: Major
>
> Boolean-flag based approach in
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run:
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the
> condition below the hasOption-conditions happy. The flag is set to true even
> for parameter that don't have an option (like 'getConf') at all, this is very
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
> System.err.println("Invalid Command Usage: ");
> printUsage();
> return -1;
> }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are
> unnecessary.
> cc [~snemeth]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]