hunnguye commented on code in PR #71949:
URL: https://github.com/apache/airflow/pull/71949#discussion_r3846905287


##########
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:
   Excuse my ignorance, I was wondering, the _connection attribute is taken 
from the hook which is generated here:
   
https://github.com/apache/airflow/blob/c081c558f1c1edc9771d9d136995764d24251834/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py#L395
   
   And seeing it, i didn't thought a comma separated list of master hosts would 
be possible. Or is this for future proofing? If so I will revert my change / 
extend the logic for the rest_endpoint to include multiple hosts



-- 
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]

Reply via email to