How to set Spark App-Name while submitting batch job from Apache Livy?
Asked
Active
Viewed 588 times
1 Answers
2
You can use name
tag in your post request.
import json
import requests
host = 'http://ip:8998/batches'
headers = {'Content-Type': 'application/json'}
data = {
'file': '/path/to/spark.jar',
'className': 'class.to.Job',
'numExecutors': 2,
'executorMemory': '512m',
'driverMemory': '512m',
'name': 'Name your application'
}
r = requests.post(host, data=json.dumps(data), headers=headers)

lvnt
- 487
- 3
- 10