ChenSammi commented on code in PR #8972:
URL: https://github.com/apache/ozone/pull/8972#discussion_r2306897413


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/HeartbeatEndpointTask.java:
##########
@@ -258,9 +262,26 @@ private void addQueuedCommandCounts(
   }
 
   private void addDiskBalancerReport(SCMHeartbeatRequestProto.Builder 
requestBuilder) {
-    DiskBalancerInfo info = 
context.getParent().getContainer().getDiskBalancerInfo();
+    OzoneContainer ozoneContainer = context.getParent().getContainer();
+    DiskBalancerInfo info = ozoneContainer.getDiskBalancerInfo();

Review Comment:
   @Gargi-jais11 , please do some refactor, so that the DiskBalancerInfo 
returned by ozoneContainer.getDiskBalancerInfo() will carry the density info 
too.
   
   There is this “high cohesion, low coupling" rule of OOP, that we should put 
the low level code near together and in one component(class) as we can.  
HeartbeatEndpointTask.java doesn't need to know how density is calculated. 



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