You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/06/22 20:16:19 UTC

[GitHub] [beam] kennknowles commented on a change in pull request #12041: [BEAM-10286] Fix race in direct runner

kennknowles commented on a change in pull request #12041:
URL: https://github.com/apache/beam/pull/12041#discussion_r443800518



##########
File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamEnumerableConverter.java
##########
@@ -201,7 +204,9 @@ private static void runCollector(PipelineOptions options, BeamRelNode node) {
     PCollection<Row> resultCollection = BeamSqlRelUtils.toPCollection(pipeline, node);
     resultCollection.apply(ParDo.of(new Collector()));
     PipelineResult result = pipeline.run();
-    result.waitUntilFinish();
+    if (PipelineResult.State.FAILED.equals(result.waitUntilFinish())) {
+      throw new RuntimeException("Pipeline failed for unknown reason");

Review comment:
       Noting that for the DirectRunner, we want `result.waitUntilFinish()` to always throw an exception when there's a failure. I think it is always a bug if you get FAILED status without throwing.




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