This is an automated email from the ASF dual-hosted git repository.

tanvipenumudy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 23211c1932 HDDS-11381. Adding logging for sortByDistanceCost in 
NetworkTopologyImpl (#7133)
23211c1932 is described below

commit 23211c19324bb67e67874ac71797ce63b8e47eb9
Author: VarshaRavi <[email protected]>
AuthorDate: Thu Aug 29 16:29:03 2024 +0530

    HDDS-11381. Adding logging for sortByDistanceCost in NetworkTopologyImpl 
(#7133)
---
 .../java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
 
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
index 1f3d0f02e6..31e83f82d6 100644
--- 
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
+++ 
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
@@ -789,6 +789,9 @@ public class NetworkTopologyImpl implements NetworkTopology 
{
       List<N> shuffledNodes =
           new ArrayList<>(nodes.subList(0, activeLen));
       shuffleOperation.accept(shuffledNodes);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Sorted datanodes {}, result: {}", nodes, shuffledNodes);
+      }
       return shuffledNodes;
     }
     // Sort weights for the nodes array
@@ -815,6 +818,9 @@ public class NetworkTopologyImpl implements NetworkTopology 
{
 
     Preconditions.checkState(ret.size() == activeLen,
         "Wrong number of nodes sorted!");
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Sorted datanodes {} for client {}, result: {}", nodes, 
reader, ret);
+    }
     return ret;
   }
 


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

Reply via email to