Last active
October 22, 2024 05:45
-
-
Save arturmkrtchyan/5d8559b2911ac951d34a to your computer and use it in GitHub Desktop.
Apache Spark Hidden REST API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"action" : "SubmissionStatusResponse", | |
"driverState" : "FINISHED", | |
"serverSparkVersion" : "1.5.0", | |
"submissionId" : "driver-20151008145126-0000", | |
"success" : true, | |
"workerHostPort" : "192.168.3.153:46894", | |
"workerId" : "worker-20151007093409-192.168.3.153-46894" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST http://spark-cluster-ip:6066/v1/submissions/kill/driver-20151008145126-0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"action" : "KillSubmissionResponse", | |
"message" : "Kill request for driver-20151008145126-0000 submitted", | |
"serverSparkVersion" : "1.5.0", | |
"submissionId" : "driver-20151008145126-0000", | |
"success" : true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST http://spark-cluster-ip:6066/v1/submissions/create --header "Content-Type:application/json;charset=UTF-8" --data '{ | |
"action" : "CreateSubmissionRequest", | |
"appArgs" : [ "myAppArgument1" ], | |
"appResource" : "file:/myfilepath/spark-job-1.0.jar", | |
"clientSparkVersion" : "1.5.0", | |
"environmentVariables" : { | |
"SPARK_ENV_LOADED" : "1" | |
}, | |
"mainClass" : "com.mycompany.MyJob", | |
"sparkProperties" : { | |
"spark.jars" : "file:/myfilepath/spark-job-1.0.jar", | |
"spark.driver.supervise" : "false", | |
"spark.app.name" : "MyJob", | |
"spark.eventLog.enabled": "true", | |
"spark.submit.deployMode" : "cluster", | |
"spark.master" : "spark://spark-cluster-ip:6066" | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"action" : "CreateSubmissionResponse", | |
"message" : "Driver successfully submitted as driver-20151008145126-0000", | |
"serverSparkVersion" : "1.5.0", | |
"submissionId" : "driver-20151008145126-0000", | |
"success" : true | |
} |
@LasseJacobs Hi, how can we update the values.yaml to do so. I can't get it right, since the current empty dir volumemount is conflicting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, the rest API has to be enabled. Here is an example config:
and then mount the volume: