nandakumar131 commented on code in PR #8033:
URL: https://github.com/apache/ozone/pull/8033#discussion_r2018092695


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/AbstractContainerReportHandler.java:
##########
@@ -61,12 +62,46 @@ public class AbstractContainerReportHandler {
   AbstractContainerReportHandler(final ContainerManager containerManager,
                                  final SCMContext scmContext,
                                  final Logger logger) {
-    Preconditions.checkNotNull(containerManager);
-    Preconditions.checkNotNull(scmContext);
-    Preconditions.checkNotNull(logger);
-    this.containerManager = containerManager;
-    this.scmContext = scmContext;
-    this.logger = logger;
+    this.containerManager = Objects.requireNonNull(containerManager, 
"containerManager == null");
+    this.scmContext = Objects.requireNonNull(scmContext, "scmContext == null");
+    this.logger = Objects.requireNonNull(logger, "logger == null");
+  }
+
+  public Logger getLogger() {
+    return logger;
+  }
+
+  /** @return the container in SCM and the replica from a datanode details for 
logging. */
+  static Object getDetailsForLogging(ContainerInfo container, 
ContainerReplicaProto replica, DatanodeDetails datanode) {

Review Comment:
   We could use `supplier#get` in the log statement, but this looks better.
   Thanks for the explanation. 



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