I am trying to find a way to push a python script using Livy API (or client)
on the spark server. I have tried the following.
curl -X POST --data '{"file": "/user/test/pi.py"}' -H "Content-Type: application/json" localhost:8998/batches
, but when I see the logs it gives file not found because it is trying to find the path on the server.
- Using Livy Python Client.
r = client.upload_pyfile("/tmp/code/test.py")
, this returns a future object, but the batches are not created, (I am not even sure the file path it is uploading to).
Basically what I want is -
Able to upload the file through the API, on the Spark server using Livy.
submit a batch/ run trigger. using Livy.