Node client for Apache LIVY REST API for Spark
npm install node-livy-clientA comprehensive client in Node.js for Apache Livy. Livy is a REST service
for Apache Spark.
npm install node-livy-client
`` js
const LivyClient = require('node-livy-client');
const client = new LivyClient({ host: 'localhost' });
client.postSession({}, (err, res) => {
// will create a spark session by default
console.log("res: ", res);
});
`
See tests/functional/client.js for further API call examples.
All Livy API calls should be supported. Please open an issue if you discover any missing.
See lib/client.js for available options.
You must have Livy installed and running locally to run tests.
Download Livy here.
Go to directory where Livy has been downloaded.
export SPARK_HOME=${YOUR SPARK PATH}/libexec
Please make sure that in your livy.conf file, you include:
livy.file.local-dir-whitelist=${PATH TO NODE-LIVY-CLIENT DIRECTORY}
mkdir logs
./bin/livy-server
From within your node-livy-client directory:
npm test`