Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLCOMPUTE-1098 | fix error in parsing user spark args #3741

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions paasta_tools/cli/cmds/spark_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,21 +698,20 @@ def _parse_user_spark_args(
enable_compact_bin_packing: bool = False,
enable_spark_dra: bool = False,
) -> Dict[str, str]:
if not spark_args:
return {}

user_spark_opts = {}
for spark_arg in spark_args.split():
fields = spark_arg.split("=", 1)
if len(fields) != 2:
print(
PaastaColors.red(
"Spark option %s is not in format option=value." % spark_arg
),
file=sys.stderr,
)
sys.exit(1)
user_spark_opts[fields[0]] = fields[1]
if spark_args:
for spark_arg in spark_args.split():
fields = spark_arg.split("=", 1)
if len(fields) != 2:
print(
PaastaColors.red(
"Spark option %s is not in format option=value." % spark_arg
),
file=sys.stderr,
)
sys.exit(1)
user_spark_opts[fields[0]] = fields[1]

if enable_compact_bin_packing:
user_spark_opts["spark.kubernetes.executor.podTemplateFile"] = pod_template_path
Expand Down
Loading