nailo2c commented on code in PR #65991:
URL: https://github.com/apache/airflow/pull/65991#discussion_r3268505112
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -611,6 +629,28 @@ def submit(self, application: str = "", **kwargs: Any) ->
None:
)
self._process_spark_submit_log(iter(self._submit_sp.stdout)) # type:
ignore
+
+ if (
+ self._yarn_track_via_application_status
+ and self._is_yarn
+ and self._connection["deploy_mode"] == "cluster"
+ and self._yarn_application_id
+ and self._yarn_application_submitted
+ ):
+ # JVM is idle waiting for its stdout to be drained; terminate and
reap it,
+ # then switch to polling ResourceManager via `yarn application
-status`.
+ self._submit_sp.terminate()
+ try:
+ self._submit_sp.wait(timeout=30)
+ except subprocess.TimeoutExpired:
+ self._submit_sp.kill()
+ self._submit_sp.wait()
Review Comment:
done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]