All posts

Spark Submit Command Formatter tool

Paste a spark-submit command and get it back formatted across lines or minified onto one line, with every Spark option resolved to the configuration property it sets and your application's own arguments kept separate.

Updated Sep 11, 2026 Interactive tool Spark

TL;DR

  • Paste a spark-submit command written on one line and get it back split across lines with a trailing backslash per option, or minified back to one line.
  • Each Spark option is resolved to the configuration property it actually sets, so --num-executors shows as spark.executor.instances and you can compare a command against spark-defaults.conf directly.
  • Your application’s own arguments are kept separate from Spark’s, so a job that takes --input and --output no longer has them mistaken for Spark options.
  • Quoted values survive the round trip intact, including an extraJavaOptions string containing spaces.

Spark Submit Command Formatter/Minifier

Format a spark-submit command across lines for review, or minify it back onto one line for a scheduler that wants a single string. Both directions preserve the command exactly.

The useful part is the breakdown underneath. A long spark-submit line hides duplicated or contradictory settings, and the same setting can arrive as either a flag or a --conf, which makes them hard to compare by eye. The parameter table resolves every option to its configuration property, so --executor-memory 18g and --conf spark.executor.memory=18g line up as the same row.

The option-to-property mapping follows the OptionAssigner list in SparkSubmit.scala and the flag names in SparkSubmitOptionParser.java at the Spark v4.2.0 tag, so --principal and --keytab resolve to spark.kerberos.principal and spark.kerberos.keytab rather than the pre-Spark-3 spark.yarn.* names.

Spark Submit Command

Formatted Spark Submit Command


            

Spark Configuration Parameters

Configuration property Value Set by

Application Arguments

# Argument passed to your application

References

Found this useful?

These posts and tools are free. If one saved you an afternoon, you can buy me a coffee.

Buy me a coffee