sadanand48 commented on code in PR #5560:
URL: https://github.com/apache/ozone/pull/5560#discussion_r1401681110


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java:
##########
@@ -97,19 +97,24 @@ void addPipeline(Pipeline pipeline) throws IOException {
    *
    * @param pipelineID - PipelineID of the pipeline to which container is added
    * @param containerID - ContainerID of the container to add
+   * @param  checkPipelineClosed - check if pipeline is closed
    * @throws IOException if pipeline is not in open state or does not exist
    */
-  void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
+  void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID,
+      boolean checkPipelineClosed)
       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()) {
-      throw new InvalidPipelineStateException(format(
-          "Cannot add container to pipeline=%s in closed state", pipelineID));
+    if (checkPipelineClosed) {

Review Comment:
   Done.



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