This is an automated email from the ASF dual-hosted git repository.

slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2fcbc69311e HADOOP-19731. Fix SpotBugs warnings introduced after 
SpotBugs version upgrade. (#8053)
2fcbc69311e is described below

commit 2fcbc69311e9928e353ebd36ddc0933e775819a8
Author: zhtttylz <[email protected]>
AuthorDate: Tue Dec 9 23:31:40 2025 +0800

    HADOOP-19731. Fix SpotBugs warnings introduced after SpotBugs version 
upgrade. (#8053)
    
    * HADOOP-19731. Fix SpotBugs warnings introduced after SpotBugs version 
upgrade.
    
    Co-authored-by: Steve Loughran <[email protected]>
    Co-authored-by: Shilun Fan <[email protected]>
    Co-authored-by: Tsz-wo Sze <[email protected]>
    Reviewed-by: Steve Loughran <[email protected]>
    Reviewed-by: Shilun Fan <[email protected]>
    Reviewed-by: Tsz-wo Sze <[email protected]>
---
 dev-support/findbugs-exclude-global.xml            | 69 +++++++++++++++++++
 hadoop-cloud-storage-project/hadoop-cos/pom.xml    |  8 ++-
 .../hadoop-huaweicloud/pom.xml                     |  8 ++-
 hadoop-cloud-storage-project/hadoop-tos/pom.xml    |  8 ++-
 hadoop-common-project/hadoop-auth/pom.xml          |  6 +-
 hadoop-common-project/hadoop-kms/pom.xml           |  8 ++-
 hadoop-common-project/hadoop-minikdc/pom.xml       |  8 ++-
 hadoop-common-project/hadoop-nfs/pom.xml           |  8 ++-
 hadoop-common-project/hadoop-registry/pom.xml      |  7 +-
 hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml     |  6 +-
 hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml        | 16 +++++
 .../dev-support/findbugs-exclude.xml               | 58 +++++++++++++++-
 .../hadoop-mapreduce-client/pom.xml                |  6 +-
 .../dev-support/findbugs-exclude.xml               |  6 ++
 .../hadoop-mapreduce-examples/pom.xml              |  7 +-
 hadoop-mapreduce-project/pom.xml                   |  6 +-
 hadoop-project-dist/pom.xml                        |  5 +-
 hadoop-project/pom.xml                             | 17 +++++
 hadoop-tools/hadoop-aliyun/pom.xml                 |  8 ++-
 hadoop-tools/hadoop-archive-logs/pom.xml           | 11 ++-
 hadoop-tools/hadoop-aws/pom.xml                    |  8 ++-
 hadoop-tools/hadoop-azure/pom.xml                  |  8 ++-
 hadoop-tools/hadoop-benchmark/pom.xml              |  6 +-
 hadoop-tools/hadoop-datajoin/pom.xml               |  8 ++-
 hadoop-tools/hadoop-fs2img/pom.xml                 |  6 +-
 hadoop-tools/hadoop-gcp/pom.xml                    |  8 ++-
 hadoop-tools/hadoop-gridmix/pom.xml                |  6 +-
 hadoop-tools/hadoop-rumen/pom.xml                  |  6 +-
 hadoop-tools/hadoop-sls/pom.xml                    |  6 +-
 hadoop-tools/hadoop-streaming/pom.xml              |  6 +-
 .../hadoop-yarn/dev-support/findbugs-exclude.xml   | 80 ++++++++++++++++++++++
 hadoop-yarn-project/hadoop-yarn/pom.xml            |  6 +-
 32 files changed, 389 insertions(+), 41 deletions(-)

diff --git a/dev-support/findbugs-exclude-global.xml 
b/dev-support/findbugs-exclude-global.xml
new file mode 100644
index 00000000000..82ff69a451a
--- /dev/null
+++ b/dev-support/findbugs-exclude-global.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. See accompanying LICENSE file.
+-->
+<FindBugsFilter>
+    <Match>
+        <Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE,
+                      AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE,
+                      AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
+    </Match>
+    <Match>
+        <Bug pattern="CT_CONSTRUCTOR_THROW"/>
+    </Match>
+    <Match>
+        <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
+    </Match>
+    <Match>
+        <Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
+    </Match>
+    <Match>
+        <Bug pattern="SING_SINGLETON_IMPLEMENTS_SERIALIZABLE"/>
+    </Match>
+    <Match>
+        <Bug pattern="NN_NAKED_NOTIFY"/>
+    </Match>
+    <Match>
+        <Bug pattern="MS_EXPOSE_REP"/>
+    </Match>
+    <Match>
+        <Bug pattern="HSM_HIDING_METHOD"/>
+    </Match>
+    <Match>
+        <Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
+    </Match>
+    <Match>
+        <Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
+    </Match>
+    <Match>
+        <Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA"/>
+    </Match>
+    <Match>
+        <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
+    </Match>
+    <Match>
+        <Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
+    </Match>
+    <Match>
+        <Bug pattern="SS_SHOULD_BE_STATIC"/>
+    </Match>
+    <Match>
+        <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
+    </Match>
+    <Match>
+        <Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS"/>
+    </Match>
+    <Match>
+        <Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED"/>
+    </Match>
+</FindBugsFilter>
diff --git a/hadoop-cloud-storage-project/hadoop-cos/pom.xml 
b/hadoop-cloud-storage-project/hadoop-cos/pom.xml
index 4c1456cd95f..db90751d171 100644
--- a/hadoop-cloud-storage-project/hadoop-cos/pom.xml
+++ b/hadoop-cloud-storage-project/hadoop-cos/pom.xml
@@ -69,8 +69,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml 
b/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml
index d00dc1f22c7..f9b83218259 100755
--- a/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml
+++ b/hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml
@@ -64,8 +64,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-cloud-storage-project/hadoop-tos/pom.xml 
b/hadoop-cloud-storage-project/hadoop-tos/pom.xml
index 4495189da8f..c0562a3b4ba 100644
--- a/hadoop-cloud-storage-project/hadoop-tos/pom.xml
+++ b/hadoop-cloud-storage-project/hadoop-tos/pom.xml
@@ -174,8 +174,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-common-project/hadoop-auth/pom.xml 
b/hadoop-common-project/hadoop-auth/pom.xml
index eafc3fd5fa7..d9695c7aef4 100644
--- a/hadoop-common-project/hadoop-auth/pom.xml
+++ b/hadoop-common-project/hadoop-auth/pom.xml
@@ -267,7 +267,11 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
     </plugins>
diff --git a/hadoop-common-project/hadoop-kms/pom.xml 
b/hadoop-common-project/hadoop-kms/pom.xml
index abd4391d7c3..7b6975fc24f 100644
--- a/hadoop-common-project/hadoop-kms/pom.xml
+++ b/hadoop-common-project/hadoop-kms/pom.xml
@@ -244,8 +244,12 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
     </plugins>
diff --git a/hadoop-common-project/hadoop-minikdc/pom.xml 
b/hadoop-common-project/hadoop-minikdc/pom.xml
index ab314f9b756..e69107c2613 100644
--- a/hadoop-common-project/hadoop-minikdc/pom.xml
+++ b/hadoop-common-project/hadoop-minikdc/pom.xml
@@ -76,8 +76,12 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
     </plugins>
diff --git a/hadoop-common-project/hadoop-nfs/pom.xml 
b/hadoop-common-project/hadoop-nfs/pom.xml
index c7e57bf6c92..bc72f7fea11 100644
--- a/hadoop-common-project/hadoop-nfs/pom.xml
+++ b/hadoop-common-project/hadoop-nfs/pom.xml
@@ -125,8 +125,12 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
     </plugins>
diff --git a/hadoop-common-project/hadoop-registry/pom.xml 
b/hadoop-common-project/hadoop-registry/pom.xml
index 35485304220..45bdacd4c09 100644
--- a/hadoop-common-project/hadoop-registry/pom.xml
+++ b/hadoop-common-project/hadoop-registry/pom.xml
@@ -193,7 +193,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml 
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
index f5b647f927d..161eb06f25b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
@@ -365,7 +365,11 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
     </plugins>
diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
index 6989bbe9ae8..4051e06bc58 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
@@ -239,4 +239,20 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
     </profile>
   </profiles>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>com.github.spotbugs</groupId>
+        <artifactId>spotbugs-maven-plugin</artifactId>
+        <configuration>
+          <excludeFilterFiles>
+            <excludeFilterFile>
+              ${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
diff --git a/hadoop-mapreduce-project/dev-support/findbugs-exclude.xml 
b/hadoop-mapreduce-project/dev-support/findbugs-exclude.xml
index 8631ebba575..029389f9bc1 100644
--- a/hadoop-mapreduce-project/dev-support/findbugs-exclude.xml
+++ b/hadoop-mapreduce-project/dev-support/findbugs-exclude.xml
@@ -401,7 +401,7 @@
       <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
      </Match>
 
-     <!-- 
+     <!--
           False positive of FindBugs complaining that initializationPoller and
           started were accessed through
           CapacitySchedulerQueueRefresher.refreshQueues without explicitly 
holding
@@ -409,7 +409,7 @@
           JobTracker prior to calling QueueManager.refereshQueues - this is
           necessary to ensure the order of locking (TaskScheduler ->
           QueueManager).
-     --> 
+     -->
     <Match>
        <Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
        <Field name="initializationPoller" />
@@ -554,4 +554,58 @@
     <Method name="onSuccess" />
     <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
   </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.v2.util.MRApps" />
+    <Method name="setupDistributedCacheLocal" />
+    <Bug pattern="ENV_USE_PROPERTY_INSTEAD_OF_ENV" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.jobhistory.JobSubmitted" />
+    <Method name="customDecode" />
+    <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.jobhistory.MapAttemptFinished" />
+    <Method name="customDecode" />
+    <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.jobhistory.ReduceAttemptFinished" 
/>
+    <Method name="customDecode" />
+    <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.mapreduce.jobhistory.TaskAttemptUnsuccessfulCompletion" 
/>
+    <Method name="customDecode" />
+    <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
+    <Method name="isSetsidSupported" />
+    <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
+    <Method name="isProcessGroupAlive" />
+    <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.lib.db.DataDrivenDBInputFormat" />
+    <Method name="getSplits" />
+    <Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
+  </Match>
+
+  <Match>
+    <Class name="org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator" />
+    <Field name="containersReleased" />
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
  </FindBugsFilter>
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml
index 10c4f3ca97a..f236c8770d3 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml
@@ -179,7 +179,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
        </configuration>
      </plugin>
diff --git 
a/hadoop-mapreduce-project/hadoop-mapreduce-examples/dev-support/findbugs-exclude.xml
 
b/hadoop-mapreduce-project/hadoop-mapreduce-examples/dev-support/findbugs-exclude.xml
index 1215a3ef181..18f20069993 100644
--- 
a/hadoop-mapreduce-project/hadoop-mapreduce-examples/dev-support/findbugs-exclude.xml
+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-examples/dev-support/findbugs-exclude.xml
@@ -36,6 +36,12 @@
     <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
   </Match>
 
+  <Match>
+    <Class name="org.apache.hadoop.examples.DBCountPageView" />
+    <Method name="verify" />
+    <Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
+  </Match>
+
  <!-- Ignore the irrelevant closure warnings-->
   <Match>
     <Class name="org.apache.hadoop.examples.dancing.Pentomino$Piece" />
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml 
b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml
index 39e32a8c958..856b7aec6d5 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml
@@ -165,7 +165,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${mr.examples.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${mr.examples.basedir}/dev-support/findbugs-exclude.xml
+             </excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-mapreduce-project/pom.xml b/hadoop-mapreduce-project/pom.xml
index 968527039bd..05504891b4d 100644
--- a/hadoop-mapreduce-project/pom.xml
+++ b/hadoop-mapreduce-project/pom.xml
@@ -126,7 +126,11 @@
           <artifactId>spotbugs-maven-plugin</artifactId>
           <configuration>
             <xmlOutput>true</xmlOutput>
-            
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+            <excludeFilterFiles>
+              
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+              
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+              </excludeFilterFile>
+            </excludeFilterFiles>
             <effort>Max</effort>
           </configuration>
        </plugin>
diff --git a/hadoop-project-dist/pom.xml b/hadoop-project-dist/pom.xml
index ee636129bdd..68d29e84fbf 100644
--- a/hadoop-project-dist/pom.xml
+++ b/hadoop-project-dist/pom.xml
@@ -92,7 +92,10 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml</excludeFilterFile>
+          </excludeFilterFiles>
           <maxHeap>2048</maxHeap>
         </configuration>
       </plugin>
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index f913e14d2e2..8b65b09e0a1 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -2633,6 +2633,23 @@
         <groupId>com.google.code.maven-replacer-plugin</groupId>
         <artifactId>replacer</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.commonjava.maven.plugins</groupId>
+        <artifactId>directory-maven-plugin</artifactId>
+        <version>1.0</version>
+        <executions>
+          <execution>
+            <id>calc-repo-root</id>
+            <goals>
+              <goal>highest-basedir</goal>
+            </goals>
+            <phase>initialize</phase>
+            <configuration>
+              <property>repo.root</property>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/hadoop-tools/hadoop-aliyun/pom.xml 
b/hadoop-tools/hadoop-aliyun/pom.xml
index 273391cee49..2a141985a85 100644
--- a/hadoop-tools/hadoop-aliyun/pom.xml
+++ b/hadoop-tools/hadoop-aliyun/pom.xml
@@ -62,8 +62,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-archive-logs/pom.xml 
b/hadoop-tools/hadoop-archive-logs/pom.xml
index 702759a7830..a39f763fda4 100644
--- a/hadoop-tools/hadoop-archive-logs/pom.xml
+++ b/hadoop-tools/hadoop-archive-logs/pom.xml
@@ -214,9 +214,14 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>
-            ${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>
+              ${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            <excludeFilterFile>
+              ${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-aws/pom.xml b/hadoop-tools/hadoop-aws/pom.xml
index 3a0c0f53cf5..ecd7afe2715 100644
--- a/hadoop-tools/hadoop-aws/pom.xml
+++ b/hadoop-tools/hadoop-aws/pom.xml
@@ -329,8 +329,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-azure/pom.xml 
b/hadoop-tools/hadoop-azure/pom.xml
index bc853eb8c25..d0bfc6852be 100644
--- a/hadoop-tools/hadoop-azure/pom.xml
+++ b/hadoop-tools/hadoop-azure/pom.xml
@@ -56,8 +56,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-benchmark/pom.xml 
b/hadoop-tools/hadoop-benchmark/pom.xml
index eb30ea621ca..b109787beb9 100644
--- a/hadoop-tools/hadoop-benchmark/pom.xml
+++ b/hadoop-tools/hadoop-benchmark/pom.xml
@@ -75,7 +75,11 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          
<excludeFilterFile>${basedir}/src/main/findbugs/exclude.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/src/main/findbugs/exclude.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
         </configuration>
       </plugin>
       <plugin>
diff --git a/hadoop-tools/hadoop-datajoin/pom.xml 
b/hadoop-tools/hadoop-datajoin/pom.xml
index 1b6b6f18005..a1f9b1bd091 100644
--- a/hadoop-tools/hadoop-datajoin/pom.xml
+++ b/hadoop-tools/hadoop-datajoin/pom.xml
@@ -133,8 +133,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-fs2img/pom.xml 
b/hadoop-tools/hadoop-fs2img/pom.xml
index 33280e68b90..b9ae088e9a0 100644
--- a/hadoop-tools/hadoop-fs2img/pom.xml
+++ b/hadoop-tools/hadoop-fs2img/pom.xml
@@ -112,7 +112,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-gcp/pom.xml b/hadoop-tools/hadoop-gcp/pom.xml
index 934bc13da93..d8b1c007efe 100644
--- a/hadoop-tools/hadoop-gcp/pom.xml
+++ b/hadoop-tools/hadoop-gcp/pom.xml
@@ -368,8 +368,12 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
-          </excludeFilterFile>
+          <excludeFilterFiles>
+            <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
+            </excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-gridmix/pom.xml 
b/hadoop-tools/hadoop-gridmix/pom.xml
index 81f33680585..4b943398f61 100644
--- a/hadoop-tools/hadoop-gridmix/pom.xml
+++ b/hadoop-tools/hadoop-gridmix/pom.xml
@@ -148,7 +148,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-rumen/pom.xml 
b/hadoop-tools/hadoop-rumen/pom.xml
index 5ba323d6bb3..b453b17c1a0 100644
--- a/hadoop-tools/hadoop-rumen/pom.xml
+++ b/hadoop-tools/hadoop-rumen/pom.xml
@@ -127,7 +127,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-sls/pom.xml b/hadoop-tools/hadoop-sls/pom.xml
index a822372bd00..00e7e64b08f 100644
--- a/hadoop-tools/hadoop-sls/pom.xml
+++ b/hadoop-tools/hadoop-sls/pom.xml
@@ -137,7 +137,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+          <excludeFilterFiles>
+            
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+            
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+            </excludeFilterFile>
+          </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-tools/hadoop-streaming/pom.xml 
b/hadoop-tools/hadoop-streaming/pom.xml
index 7c2b48accb6..a638bc1337d 100644
--- a/hadoop-tools/hadoop-streaming/pom.xml
+++ b/hadoop-tools/hadoop-streaming/pom.xml
@@ -154,7 +154,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>
diff --git a/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml 
b/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
index b98ac0bd921..81db83645e7 100644
--- a/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
+++ b/hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml
@@ -726,4 +726,84 @@
     <Package 
name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.placement.schema"
 />
   </Match>
 
+  <!-- Ignore String == comparison in RMAdminCLI help builders -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.client.cli.RMAdminCLI" />
+    <Or>
+      <Method name="buildHelpMsg" />
+      <Method name="buildIndividualUsageMsg" />
+    </Or>
+    <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
+  </Match>
+
+  <!-- Ignore EI_EXPOSE_STATIC_REP2 for 
RMDelegationTokenIdentifier.Renewer#setSecretManager -->
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier$Renewer"
 />
+    <Method name="setSecretManager" />
+    <Bug pattern="EI_EXPOSE_STATIC_REP2" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.federation.cache.FederationCache$CacheRequest"
 />
+    <Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.sharedcachemanager.webapp.SCMWebServer$SCMWebApp"
 />
+    <Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager" />
+    <Field name="currentMasterKey" />
+    <Bug pattern="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager" />
+    <Field name="currentMasterKey" />
+    <Bug pattern="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter" />
+    <Method name="setDelegationTokenSecretManager" />
+    <Bug pattern="EI_EXPOSE_STATIC_REP2" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.timeline.security.TimelineAuthenticationFilter"
 />
+    <Method name="setTimelineDelegationTokenSecretManager" />
+    <Bug pattern="EI_EXPOSE_STATIC_REP2" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.nodemanager.webapp.ContainerShellWebSocket" 
/>
+    <Method name="init" />
+    <Bug pattern="EI_EXPOSE_STATIC_REP2" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch$UnixShellScriptBuilder"
 />
+    <Method name="errorCheck" />
+    <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService$PublicLocalizer"
 />
+    <Method name="run" />
+    <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.NvidiaDockerV2CommandPlugin"
 />
+    <Method name="updateDockerRunCommand" />
+    <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION" />
+  </Match>
+
+  <Match>
+    <Class 
name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.WeightQueueCapacityCalculator"
 />
+    <Method name="calculateMinimumResource" />
+    <Bug pattern="FE_FLOATING_POINT_EQUALITY" />
+  </Match>
 </FindBugsFilter>
diff --git a/hadoop-yarn-project/hadoop-yarn/pom.xml 
b/hadoop-yarn-project/hadoop-yarn/pom.xml
index cc02b6213f9..db4a50542fd 100644
--- a/hadoop-yarn-project/hadoop-yarn/pom.xml
+++ b/hadoop-yarn-project/hadoop-yarn/pom.xml
@@ -44,7 +44,11 @@
         <artifactId>spotbugs-maven-plugin</artifactId>
          <configuration>
           <xmlOutput>true</xmlOutput>
-          
<excludeFilterFile>${yarn.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+           <excludeFilterFiles>
+             
<excludeFilterFile>${yarn.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+             
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
+             </excludeFilterFile>
+           </excludeFilterFiles>
           <effort>Max</effort>
         </configuration>
       </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Reply via email to