blcksrx commented on code in PR #61528:
URL: https://github.com/apache/airflow/pull/61528#discussion_r2774643163
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -265,10 +265,23 @@ def _resolve_connection(self) -> dict[str, Any]:
# Master can be local, yarn, spark://HOST:PORT, mesos://HOST:PORT
and
# k8s://https://<HOST>:<PORT>
conn = self.get_connection(self._conn_id)
- if conn.port:
- conn_data["master"] = f"{conn.host}:{conn.port}"
+
+ # connection comes from UI or it's a spark-master
+ if conn.conn_type == "spark":
+ if conn.host and ("://" in conn.host or not conn.port):
Review Comment:
Since I have used the `Connection(uri="spark://local", ...)` the spark://
part would be extracted to the Connection schema by the airflow and the
`conn.host` would be equal to the `local` only, this is equivalent to create a
Connection with `Connection(conn_type="spark", host="local", ...)`
So in the end, the spark master would be `local`
--
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]