umamaheswararao commented on a change in pull request #2910:
URL: https://github.com/apache/ozone/pull/2910#discussion_r769104085



##########
File path: 
hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/MultiNodePipelineBlockAllocator.java
##########
@@ -21,68 +21,103 @@
 import org.apache.hadoop.hdds.conf.ConfigurationSource;
 import org.apache.hadoop.hdds.conf.OzoneConfiguration;
 import org.apache.hadoop.hdds.conf.StorageUnit;
+import org.apache.hadoop.hdds.protocol.DatanodeDetails;
 import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
+import org.apache.hadoop.hdds.scm.container.common.helpers.ExcludeList;
 import org.apache.hadoop.ozone.OzoneConfigKeys;
 import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Random;
+import java.util.Set;
 
 /**
  * Allocates the block with required number of nodes in the pipeline.
  */
 public class MultiNodePipelineBlockAllocator implements MockBlockAllocator {
-  public static final Random RANDOM = new Random();
   private long blockId;
   private int requiredNodes;
   private final ConfigurationSource conf;
+  private List<HddsProtos.DatanodeDetailsProto> clusterDns = new ArrayList<>();
+  private int start = 0;
 
   public MultiNodePipelineBlockAllocator(OzoneConfiguration conf,
-      int requiredNodes) {
+      int requiredNodes, int clusterSize) {

Review comment:
       I added the documentation for the mock allocatBlock API to explain how 
we choose nodes.




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