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` (without a timeout) 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:
[email protected]
With regards,
Apache Git Services