You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Jose Luis López (Jira)" <ji...@apache.org> on 2026/09/25 08:44:00 UTC

[jira] [Created] (YARN-11993) Suppress false-positive in ResourceLocalizationService.PublicLocalizer.run()

Jose Luis López created YARN-11993:
--------------------------------------

             Summary: Suppress false-positive in ResourceLocalizationService.PublicLocalizer.run()
                 Key: YARN-11993
                 URL: https://issues.apache.org/jira/browse/YARN-11993
             Project: Hadoop YARN
          Issue Type: Bug
          Components: nodemanager
            Reporter: Jose Luis López


hadoop-yarn-server-nodemanager currently has one extant SpotBugs warning on
trunk, so Yetus votes -1 spotbugs on every PR whose module list includes
NodeManager, regardless of what the PR actually changes.

  NP_NULL_ON_SOME_PATH_EXCEPTION
  org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer
      .ResourceLocalizationService$PublicLocalizer.run()
  Value "assoc" dereferenced at line 997; null value at 986; known null at 987.

This is a false positive. "assoc" is only null on the path that logs
"Localized unknown resource" and returns early at line 989. The only source of
ExecutionException inside that try block is completed.get() at line 991, which
follows the early return -- FileUtil.getDU(File) and EventHandler.handle(T)
declare no checked exceptions. SpotBugs models exception paths conservatively
and treats the handler as reachable from the point where "assoc" is known null.

The warning is in fact already suppressed in
hadoop-yarn/dev-support/findbugs-exclude.xml, but the <Method> name has gone
stale:

  - HADOOP-19670 (2025-11-21) made PublicLocalizer extend
    SubjectInheritingThread, renaming run() to work().
  - YARN-11912 (2025-12-23) updated the filter from "run" to "work",
    which silenced the warning.
  - The revert of HADOOP-19668/19670 (2026-07-06, apache/hadoop#8568) restored
    run() in the Java but left the filter saying "work", so it now matches
    nothing and the warning is live again.

Fix: point the filter back at "run" and add a comment recording why the
suppression exists, so a future rename is less likely to silently break it.

Verified locally with:
  mvn -pl hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager \
      -DskipTests test-compile spotbugs:spotbugs
target/spotbugsXml.xml contains exactly one BugInstance before the change and
zero after.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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