[
https://issues.apache.org/jira/browse/YARN-6517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984145#comment-15984145
]
Wilfred Spiegelenburg commented on YARN-6517:
---------------------------------------------
[~cheersyang] I have closed the two jiras I opened as duplicates of this one. A
couple of points, one already made by [~haibochen] in YARN-6513:
- A lot of indentation changes to re-use a return statement in both changes.
Far simpler changes are attached to YARN-6512 and YARN-6513
- If we simplify the change to return an empty set, we could pass 0 to the
HashSet constructor given that we don't reuse it.
- Checking procfsDir for null will hide the case of an incorrect configuration.
This currently could only happen in test cases but it could hide a broken test
and would be careful doing this.
if we really want to handle the null or empty procfsDir case we should do that
from a new jira.
> Fix warnings from Spotbugs in hadoop-yarn-common
> ------------------------------------------------
>
> Key: YARN-6517
> URL: https://issues.apache.org/jira/browse/YARN-6517
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Weiwei Yang
> Assignee: Weiwei Yang
> Labels: findbugs
> Attachments: YARN-6517.001.patch
>
>
> There are 2 findbugs warnings in hadoop-yarn-common project since switched to
> spotbugs,
> # Possible null pointer dereference in
> org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogValue.getPendingLogFilesToUpload(File)
> due to return value of called method
> # Possible null pointer dereference in
> org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.getProcessList() due to
> return value of called method
> see more in
> [https://builds.apache.org/job/PreCommit-HADOOP-Build/12157/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]