bharatviswa504 commented on a change in pull request #749: HDDS-3322. 
StandAlone Pipelines are created in an infinite loop
URL: https://github.com/apache/hadoop-ozone/pull/749#discussion_r405255429
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/SimplePipelineProvider.java
 ##########
 @@ -32,18 +31,18 @@
 /**
  * Implements Api for creating stand alone pipelines.
  */
-public class SimplePipelineProvider implements PipelineProvider {
+public class SimplePipelineProvider extends PipelineProvider {
 
-  private final NodeManager nodeManager;
-
-  public SimplePipelineProvider(NodeManager nodeManager) {
-    this.nodeManager = nodeManager;
+  public SimplePipelineProvider(NodeManager nodeManager,
+      PipelineStateManager stateManager) {
+    super(nodeManager, stateManager);
   }
 
   @Override
   public Pipeline create(ReplicationFactor factor) throws IOException {
-    List<DatanodeDetails> dns =
-        nodeManager.getNodes(NodeState.HEALTHY);
+    List<DatanodeDetails> dns = pickNodesNeverUsed(ReplicationType.STAND_ALONE,
 
 Review comment:
   And also for Simple Pipeline Provider, we should not create pipeline with 
factor 3.
   This is an existing issue, but when looking into this patch found 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to