[
https://issues.apache.org/jira/browse/YARN-10552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390981#comment-17390981
]
Szilard Nemeth commented on YARN-10552:
---------------------------------------
Thanks again [~sahuja] for your comments
[here|https://issues.apache.org/jira/browse/YARN-10552?focusedCommentId=17277991&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17277991].
Let me try to answer them one by one:
1. I don't want to be picky here, but assigning nulls to fields in general
doesn't give too much clarity or better programming style for me, as default
values for object fields are always null, and for boolean primitives it's
always set to false.
I suppose you meant to initialize the fields 'scheduler' and 'schedulerMetrics'
to null, right?
I can also see 'metricsON' is not explicitly initialized to false, but I don't
think this is a problem.
Even IntelliJ says that the null initializer is redundant in those cases.
Do you mind if I skip this proposal?
2. Good point, fixed it.
3. Good findings, thanks, also fixed this.
4. Fixed
5. Very good finding, thanks. I can't recall whether I also found this out when
I was initially working on this patch. Anyway, I think the way forward would be
to reuse the Map from the superclass (AbstracyYarnScheduler).
Considering that the size of the patch is ~40K, this change would add a
significant amount of code changes, I suppose.
Are you okay with fixing this separately? If so, I can file a follow-up jira
and will take care of this issue separately.
6. Again, good finding. With this, I remember it was kind of clear to me that
this must have been a bug. I don't see any reason to handle the
APP_ATTEMPT_REMOVED and APP_ATTEMPT_ADDED events differently for schedulers.
Maybe this would be cleared out more with the follow-up I proposed at point 5.
> Eliminate code duplication in SLSCapacityScheduler and SLSFairScheduler
> -----------------------------------------------------------------------
>
> Key: YARN-10552
> URL: https://issues.apache.org/jira/browse/YARN-10552
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: Szilard Nemeth
> Assignee: Szilard Nemeth
> Priority: Minor
> Attachments: YARN-10552.001.patch, YARN-10552.002.patch
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]