szetszwo commented on code in PR #10000:
URL: https://github.com/apache/ozone/pull/10000#discussion_r3183672411


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/MockPipelineManager.java:
##########


Review Comment:
   recordPendingAllocation(..) is not used anywhere.  Please remove it.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManager.java:
##########
@@ -232,6 +232,17 @@ void reinitialize(Table<PipelineID, Pipeline> 
pipelineStore)
    */
   boolean hasEnoughSpace(Pipeline pipeline);

Review Comment:
   hasEnoughSpace(..) is now only used in tests.  Please remove it.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########


Review Comment:
   hasSpaceForNewContainerAllocation and 
hasEffectiveAllocatableSpaceForNewContainer are also become unused.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerReportHandler.java:
##########
@@ -153,6 +154,7 @@ public void onMessage(final ContainerReportFromDatanode 
reportFromDatanode,
             containerReport.getReportsList();
         final Set<ContainerID> expectedContainersInDatanode =
             getNodeManager().getContainers(datanodeDetails);
+        DatanodeInfo datanodeInfo = 
getNodeManager().getDatanodeInfo(datanodeDetails);

Review Comment:
   datanodeDetails and datanodeInfo are the same object; see HDDS-15146.



##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/MockPipelineManager.java:
##########
@@ -335,7 +335,12 @@ public boolean isPipelineCreationFrozen() {
 
   @Override
   public boolean hasEnoughSpace(Pipeline pipeline) {
-    return false;
+    for (DatanodeDetails node : pipeline.getNodes()) {
+      if (!nodeManager.hasSpaceForNewContainerAllocation(node.getID())) {

Review Comment:
   After hasEnoughSpace(..) is removed, hasSpaceForNewContainerAllocation(..) 
is also only used in tests.  Please remove it.



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