diff --git spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java index ce2f9b6..4143113 100644 --- spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java +++ spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java @@ -354,6 +354,11 @@ public void call(JavaFutureAction future, if (sparkCounters != null) { counters = sparkCounters.snapshot(); } + // make sure job has really succeeded + // at this point, future.get shall not block us + for (JavaFutureAction future : jobs) { + future.get(); + } protocol.jobFinished(req.id, result, null, counters); } catch (Throwable t) { // Catch throwables in a best-effort to report job status back to the client. It's