lokeshj1703 commented on a change in pull request #29: HDDS-2034. Async RATIS 
pipeline creation and destroy through heartbeat commands
URL: https://github.com/apache/hadoop-ozone/pull/29#discussion_r336172483
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/SCMPipelineManager.java
 ##########
 @@ -379,6 +418,44 @@ public void deactivatePipeline(PipelineID pipelineID)
     stateManager.deactivatePipeline(pipelineID);
   }
 
+  /**
+   * Wait a pipeline to be OPEN.
+   *
+   * @param pipelineID ID of the pipeline to wait for.
+   * @param timeout    wait timeout, millisecond
+   * @throws IOException in case of any Exception, such as timeout
+   */
+  @Override
+  public void waitPipelineReady(PipelineID pipelineID, long timeout)
+      throws IOException {
+    Pipeline pipeline;
+    try {
+      pipeline = stateManager.getPipeline(pipelineID);
+    } catch (PipelineNotFoundException e) {
+      throw new IOException(String.format("Pipeline %s cannot be found",
+          pipelineID));
+    }
 
 Review comment:
   We can throw PipelineNotFoundException itself.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to