hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weiwei Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6517) Fix warnings from Spotbugs in hadoop-yarn-common
Date Wed, 26 Apr 2017 09:46:04 GMT

    [ https://issues.apache.org/jira/browse/YARN-6517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984472#comment-15984472

Weiwei Yang commented on YARN-6517:

Hi [~wilfreds]

Appreciate that you to duplicate your work with this one and thanks for your comments. Quite

bq. A lot of indentation changes to re-use a return statement in both changes...
bq. 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.

Both are good suggestions, I've done that in latest patch. Thanks.

bq. 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

Like you said, that's better to have some better logic to handle the possibility of a null
{{procfsDir}}, removed this check from this patch since it aims to fix the findbugs warning.


> 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

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message