Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to post a Spark Job as JAR via Livy interactive REST interface

avatar
New Member

I am new to Livy. I am able to run scala code through Livy api POST statement as described here -

https://livy.incubator.apache.org/examples/

How can I submit a Jar file using API?

1 ACCEPTED SOLUTION

avatar

@Mukesh Chouhan

Try adding jars using the jars option while posting to session like described in the livy rest documentation:

https://livy.incubator.apache.org/docs/latest/rest-api.html

curl -X POST -d '{"conf": {"jars": "hdfs://localhost:8020/tmp/package.jar"}}' -H "Content-Type: application/json" localhost:8998/sessions

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.

View solution in original post

10 REPLIES 10

avatar
@Mukesh Chouhan

In order to use the jars present in local filesystem. Please follow below.

1. Place the jars in a directory on livy node and add the directory to `livy.file.local-dir-whitelist`.This configuration should be set in livy.conf.

2. Add all the required jars to "jars" field in the curl command, note it should be added in URI format with "file" scheme, like "file://<livy.file.local-dir-whitelist>/xxx.jar".