swagle commented on a change in pull request #178: HDDS-2498. Fix sonar issues 
found in StorageContainerManager.
URL: https://github.com/apache/hadoop-ozone/pull/178#discussion_r347548436
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
 ##########
 @@ -763,22 +754,27 @@ public String getDatanodeRpcPort() {
    * Start service.
    */
   public void start() throws IOException {
-    LOG.info(
-        buildRpcServerStartMessage(
-            "StorageContainerLocationProtocol RPC server",
-            getClientRpcAddress()));
+    if (LOG.isInfoEnabled()) {
+      LOG.info(buildRpcServerStartMessage(
+          "StorageContainerLocationProtocol RPC server",
+          getClientRpcAddress()));
+    }
 
     ms = HddsUtils.initializeMetrics(configuration, "StorageContainerManager");
 
     commandWatcherLeaseManager.start();
     getClientProtocolServer().start();
 
-    LOG.info(buildRpcServerStartMessage("ScmBlockLocationProtocol RPC " +
-        "server", getBlockProtocolServer().getBlockRpcAddress()));
+    if (LOG.isInfoEnabled()) {
+      LOG.info(buildRpcServerStartMessage("ScmBlockLocationProtocol RPC " +
+          "server", getBlockProtocolServer().getBlockRpcAddress()));
+    }
     getBlockProtocolServer().start();
 
 Review comment:
   Unfortunately, slf4j does not yet support Supplier based parameters: 
https://jira.qos.ch/browse/SLF4J-371
   
   Kept things unchanged and got rid of the sonar warning. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to