ashishkumar50 commented on code in PR #5226:
URL: https://github.com/apache/ozone/pull/5226#discussion_r1309694714


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/IncrementalContainerReportHandler.java:
##########
@@ -108,9 +108,14 @@ public void onMessage(final 
IncrementalContainerReportFromDatanode report,
         } catch (ContainerReplicaNotFoundException e) {
           LOG.warn("Container {} replica not found!",
               replicaProto.getContainerID());
-        } catch (NotLeaderException nle) {
-          LOG.warn("Failed to process " + replicaProto.getState()
-              + " Container " + id + " due to " + nle);
+        } catch (SCMException ex) {
+          if (ex.getResult() == SCMException.ResultCodes.SCM_NOT_LEADER) {
+            LOG.warn("Failed to process {} container {}",
+                replicaProto.getState(), id, ex);

Review Comment:
   Updated thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to