uranusjr commented on code in PR #30068:
URL: https://github.com/apache/airflow/pull/30068#discussion_r1133946656
##########
airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -206,15 +206,16 @@ def _resolve_connection(self) -> dict[str, Any]:
spark_binary = self._spark_binary or extra.get("spark-binary",
"spark-submit")
if spark_binary not in ALLOWED_SPARK_BINARIES:
raise RuntimeError(
- f"The `spark-binary` extra can be on of
{ALLOWED_SPARK_BINARIES} and it"
+ f"The `spark-binary` extra can be one of
{ALLOWED_SPARK_BINARIES} and it"
f" was `{spark_binary}`. Please make sure your spark
binary is one of the"
" allowed ones and that it is available on the PATH"
)
conn_spark_home = extra.get("spark-home")
if conn_spark_home:
raise RuntimeError(
- "The `spark-home` extra is not allowed any more. Please
make sure your `spark-submit` or"
- " `spark2-submit` are available on the PATH."
+ "The `spark-home` extra is not allowed any more. Please
make sure one of"
+ f" {ALLOWED_SPARK_BINARIES} is available on the PATH, and
set `spark-binary`"
Review Comment:
```suggestion
f" {ALLOWED_SPARK_BINARIES} is available on the PATH, or
set `spark-binary`"
```
I think only one of these need to be 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]