Skip to content

Commit

Permalink
[SPARK-49845][CORE] Make appArgs and environmentVariables optiona…
Browse files Browse the repository at this point in the history
…l in REST API
  • Loading branch information
dongjoon-hyun committed Oct 1, 2024
1 parent 3093ad6 commit b5b80ef
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ private[rest] class CreateSubmissionRequest extends SubmitRestProtocolRequest {
super.doValidate()
assert(sparkProperties != null, "No Spark properties set!")
assertFieldIsSet(appResource, "appResource")
assertFieldIsSet(appArgs, "appArgs")
assertFieldIsSet(environmentVariables, "environmentVariables")
assertPropertyIsSet("spark.app.name")
assertPropertyIsBoolean(config.DRIVER_SUPERVISE.key)
assertPropertyIsNumeric(config.DRIVER_CORES.key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ class SubmitRestProtocolSuite extends SparkFunSuite {
message.clientSparkVersion = "1.2.3"
message.appResource = "honey-walnut-cherry.jar"
message.mainClass = "org.apache.spark.examples.SparkPie"
message.appArgs = Array("two slices")
message.environmentVariables = Map("PATH" -> "/dev/null")
val conf = new SparkConf(false)
conf.set("spark.app.name", "SparkPie")
message.sparkProperties = conf.getAll.toMap
Expand Down
1 change: 0 additions & 1 deletion examples/src/main/scripts/submit_pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ PYTHON_FILE=${2:-https://raw.githubusercontent.com/apache/spark/master/examples/

curl -XPOST http://$SPARK_MASTER:6066/v1/submissions/create \
--data '{
"appResource": "",
"sparkProperties": {
"spark.submit.deployMode": "cluster",
"spark.app.name": "SparkPi",
Expand Down

0 comments on commit b5b80ef

Please sign in to comment.