adoroszlai commented on code in PR #8295:
URL: https://github.com/apache/ozone/pull/8295#discussion_r2049157035


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -440,7 +440,7 @@ public RegisteredCommand register(
         if (updateDnsToDnIdMap(oldNode.getHostName(), oldNode.getIpAddress(),
             hostName, ipAddress, dnId)) {
           LOG.info("Updating datanode {} from {} to {}",
-                  datanodeDetails.getUuidString(),
+                  datanodeDetails,
                   oldNode,
                   datanodeDetails);

Review Comment:
   Now this message includes `datanodeDetails` twice.  Let's simplify it a bit:
   
   ```java
             LOG.info("Updating datanode from {} to {}", oldNode, 
datanodeDetails);
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java:
##########
@@ -947,24 +945,22 @@ private boolean moveContainer(DatanodeDetails source,
         if (ex != null) {
           LOG.info("Container move for container {} from source {} to " +
                   "target {} failed with exceptions.",
-              containerID.toString(),
-              source.getUuidString(),
-              moveSelection.getTargetNode().getUuidString(), ex);
+              containerID.toString(), source,

Review Comment:
   ```suggestion
                 containerID, source,
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceGreedy.java:
##########
@@ -165,21 +165,21 @@ public boolean canSizeLeaveSource(DatanodeDetails source, 
long size) {
       //3 after subtracting sizeLeavingAfterMove, the usage is bigger
       // than or equal to lowerLimit
       if (size <= 0) {
-        LOG.debug("{} bytes container cannot leave datanode {}", size, 
source.getUuidString());
+        LOG.debug("{} bytes container cannot leave datanode {}", size, source);
         return false;
       }
       if (sizeLeavingAfterMove > config.getMaxSizeLeavingSource()) {
         LOG.debug("{} bytes cannot leave datanode {} because 'size.leaving" +
                 ".source.max' limit is {} and {} bytes have already left.",
-            size, source.getUuidString(), config.getMaxSizeLeavingSource(),
+            size, source, config.getMaxSizeLeavingSource(),
             sizeLeavingNode.get(source));
         return false;
       }
       if (Double.compare(nodeManager.getUsageInfo(source)
           .calculateUtilization(-sizeLeavingAfterMove), lowerLimit) < 0) {
         LOG.debug("{} bytes cannot leave datanode {} because its utilization " 
+
                 "will drop below the lower limit of {}.", size,
-            source.getUuidString(), lowerLimit);
+            source, lowerLimit);

Review Comment:
   This can be one line:
   
   ```java
                   "will drop below the lower limit of {}.", size, source, 
lowerLimit);
   ```



##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/MockNodeManager.java:
##########
@@ -189,7 +189,7 @@ public MockNodeManager(
         } catch (NodeNotFoundException e) {
           LOG.warn("Could not find Datanode {} for adding containers to it. " +
                   "Skipping this node.", usageInfo
-              .getDatanodeDetails().getUuidString());
+              .getDatanodeDetails());

Review Comment:
   Let's put on one line:
   
   ```java
                     "Skipping this node.", usageInfo.getDatanodeDetails());
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/AbstractFindTargetGreedy.java:
##########
@@ -200,14 +200,14 @@ private boolean canSizeEnterTarget(DatanodeDetails 
target, long size) {
           .calculateUtilization(sizeEnteringAfterMove), upperLimit) > 0) {
         logger.debug("{} bytes cannot enter datanode {} because its " +
                 "utilization will exceed the upper limit of {}.", size,
-            target.getUuidString(), upperLimit);
+            target, upperLimit);
         return false;
       }
       return true;
     }
 
     logger.warn("No record of how much size has entered datanode {}",
-        target.getUuidString());
+        target);

Review Comment:
   Let's put on one line.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java:
##########
@@ -547,7 +547,7 @@ public void closeStalePipelines(DatanodeDetails 
datanodeDetails) {
             getStalePipelines(datanodeDetails);
     if (pipelinesWithStaleIpOrHostname.isEmpty()) {
       LOG.debug("No stale pipelines for datanode {}",
-              datanodeDetails.getUuidString());
+              datanodeDetails);

Review Comment:
   Let's put on one line.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNewNodeHandler.java:
##########
@@ -45,7 +45,7 @@ public void onMessage(DatanodeDetails datanodeDetails,
       nodeManager.addNodeToDB(datanodeDetails);
     } catch (IOException e) {
       LOG.error("Unable to add new node {} to Node DB.",
-          datanodeDetails.getUuidString());
+          datanodeDetails);

Review Comment:
   Let's put on one line.



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/ClosePipelineCommandHandler.java:
##########
@@ -140,18 +140,18 @@ public void handle(SCMCommand<?> command, OzoneContainer 
ozoneContainer,
           // well. It is a no-op for XceiverServerSpi implementations (e.g. 
XceiverServerGrpc)
           server.removeGroup(pipelineIdProto);
           LOG.info("Close Pipeline {} command on datanode {}.", pipelineID,
-              dn.getUuidString());
+              dn);

Review Comment:
   Let's put on single line.
   
   ```java
             LOG.info("Close Pipeline {} command on datanode {}.", pipelineID, 
dn);
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/AbstractFindTargetGreedy.java:
##########
@@ -164,8 +164,8 @@ private boolean containerMoveSatisfiesPlacementPolicy(
     boolean isPolicySatisfied = placementStatus.isPolicySatisfied();
     if (!isPolicySatisfied) {
       logger.debug("Moving container {} from source {} to target {} will not " 
+
-              "satisfy placement policy.", containerID, source.getUuidString(),
-          target.getUuidString());
+              "satisfy placement policy.", containerID, source,
+          target);

Review Comment:
   ```suggestion
                 "satisfy placement policy.", containerID, source, target);
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -1070,7 +1070,7 @@ private SCMNodeStat getNodeStatInternal(DatanodeDetails 
datanodeDetails) {
           freeSpaceToSpare);
     } catch (NodeNotFoundException e) {
       LOG.warn("Cannot generate NodeStat, datanode {} not found.",
-          datanodeDetails.getUuidString());
+          datanodeDetails);

Review Comment:
   Let's put on one line.



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to