aaron-y-chen commented on code in PR #71949:
URL: https://github.com/apache/airflow/pull/71949#discussion_r3849204937
##########
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -212,22 +212,16 @@ def submit_job(self, context: Context) -> str | None:
return driver_id
def get_job_status(self, external_id: str, context: Context) -> str:
- scheme = self.hook._connection.get("rest_scheme", "http")
- rest_port = self.hook._connection.get("rest_port", 6066)
- # HA master URLs can look like spark://m1:7077,m2:7077 — try each host
in order.
- # The master URL port (e.g. 7077) is the RPC port — not the REST API
port.
- # Use rest-port connection extra to override spark.master.rest.port
(default 6066).
- master_urls = self.hook._connection["master"].replace("spark://",
"").split(",")
+
last_exc: Exception = RuntimeError("No Spark masters to query")
- for m in master_urls:
Review Comment:
Yes, `master` can contain multiple comma-separated master endpoints in Spark
Standalone HA
([ref](https://spark.apache.org/docs/3.5.6/spark-standalone.html#standby-masters-with-zookeeper)).
The existing HA unit tests cover failover across these endpoints, and all
three currently fail after this change. Please preserve the per-master failover
behavior.
--
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]