aswinshakil commented on a change in pull request #2745:
URL: https://github.com/apache/ozone/pull/2745#discussion_r734107935



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -104,6 +104,33 @@ void addContainerToPipeline(PipelineID pipelineID, 
ContainerID containerID)
     pipeline2container.get(pipelineID).add(containerID);
   }
 
+  /**
+   * Add container to an existing pipeline during SCM Start.
+   *
+   * @param pipelineID - PipelineID of the pipeline to which container is added
+   * @param containerID - ContainerID of the container to add
+   */
+  void addContainerToPipelineSCMStart(PipelineID pipelineID,
+      ContainerID containerID) throws IOException {
+    Preconditions.checkNotNull(pipelineID,
+            "Pipeline Id cannot be null");
+    Preconditions.checkNotNull(containerID,
+            "Container Id cannot be null");
+
+    Pipeline pipeline = getPipeline(pipelineID);
+    if (pipeline.isClosed()) {
+      /*
+      When SCM restarts it can be an inconsistent state where some

Review comment:
       I will update them




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