You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@nemo.apache.org by GitBox <gi...@apache.org> on 2019/01/21 05:17:02 UTC

[GitHub] johnyangk commented on a change in pull request #187: [NEMO-324] Distinguish Beam's run and waitUntilFinish methods

johnyangk commented on a change in pull request #187: [NEMO-324] Distinguish Beam's run and waitUntilFinish methods
URL: https://github.com/apache/incubator-nemo/pull/187#discussion_r249327189
 
 

 ##########
 File path: compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/NemoRunner.java
 ##########
 @@ -79,7 +81,9 @@ public NemoPipelineResult run(final Pipeline pipeline) {
     final PipelineVisitor pipelineVisitor = new PipelineVisitor(pipeline, nemoPipelineOptions);
     pipeline.traverseTopologically(pipelineVisitor);
     final NemoPipelineResult nemoPipelineResult = new NemoPipelineResult();
-    JobLauncher.launchDAG(pipelineVisitor.getConvertedPipeline(), nemoPipelineOptions.getJobName());
+    CompletableFuture.runAsync(() ->
+      JobLauncher.launchDAG(pipelineVisitor.getConvertedPipeline(), nemoPipelineOptions.getJobName()))
+      .thenRun(nemoPipelineResult::triggerJobDone);
     return nemoPipelineResult;
 
 Review comment:
   I believe now we're expecting `NemoPipelineResult#getState` to return a value that is not `PipelineResult#RUNNING`, if `NemoPipelineResult#waitUntilFinish` was invoked first. Can you add a unit test to check that?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services