nemo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] johnyangk commented on a change in pull request #187: [NEMO-324] Distinguish Beam's run and waitUntilFinish methods
Date Mon, 21 Jan 2019 05:17:02 GMT
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

Mime
View raw message