Skip to content

Commit

Permalink
HDDS-12080. fix rat and spotbugs issues (add exclusions)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava Tutrinov committed Jan 23, 2025
1 parent 6d438f2 commit 47d4d13
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-support/rat/rat-exclusions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ src/test/resources/additionalfields.container
src/test/resources/incorrect.checksum.container
src/test/resources/incorrect.container
src/test/resources/test.db.ini
src/test/resources/metadata/**

# hadoop-hdds/docs
**/themes/ozonedoc/**
Expand Down
12 changes: 12 additions & 0 deletions hadoop-hdds/container-service/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,16 @@
<Class name="org.apache.hadoop.ozone.container.ozoneimpl.TestBackgroundContainerMetadataScanner"/>
<Bug pattern="RU_INVOKE_RUN, RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
</Match>
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">
<Class name="org.apache.hadoop.ozone.container.ozoneimpl.TestOzoneContainer"/>
<Method name="testCleanUpMetadataDirInCaseOfDeadNodeState"/>
</Bug>
</Match>
<Match>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT">
<Class name="org.apache.hadoop.ozone.container.ozoneimpl.TestOzoneContainer"/>
<Method name="testCleanUpMetadataDirInCaseOfDeadNodeState"/>
</Bug>
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,13 @@ public DatanodeDetails getDatanodeDetails() {
private void cleanUpRatisMetadataDirectory()
throws IOException {
if (scmConnectionManager != null) {
Collection<InetSocketAddress> scmAddressesForDatanodes = HddsUtils.getSCMAddressForDatanodes(config);
Collection<InetSocketAddress> scmAddressesForDatanodes;
try {
scmAddressesForDatanodes = HddsUtils.getSCMAddressForDatanodes(config);
} catch (IllegalArgumentException e) {
LOG.error("Failed to get SCM addresses for datanodes: {}", e.getMessage());
return;
}
for (InetSocketAddress scmAddress : scmAddressesForDatanodes) {
scmConnectionManager.addSCMServer(scmAddress, context.getThreadNamePrefix());
context.addEndpoint(scmAddress);
Expand Down

0 comments on commit 47d4d13

Please sign in to comment.