error: 'local path ______ cannot be added to user session' in Apache Livy
Asked Answered
T

0

6

I am trying to submit Python file to REST API but it is always giving the error. I am using the local mode and the command which I am running is given below:

$curl -X POST --data '{"file":"/Users/neha/Desktop/spark_project/examples/spark_livy_ex3.py"}' -H "Content-Type: application/json" localhost:8998/batches

"requirement failed: Local path /Users/neha/Desktop/spark_project/examples/spark_livy_ex3.py cannot be added to user sessions."

From this link https://groups.google.com/a/cloudera.org/forum/#!topic/livy-user/mm-XEhANDHU I found that I have to modify the livy.conf by modifying the livy.conf by adding /Users/neha/Desktop/spark_project/examples/ directory to livy.file.local-dir-whitelist. Again I run the code with above curl command but now also I am getting the same error.

Note that 'spark_livy_ex3.py' is my python file which I want to run.

How I can resolve this problem?

Tinker answered 11/9, 2017 at 8:14 Comment(1)
is there any update on it? were you able to fix it? i too am having same problemHonorific

© 2022 - 2024 — McMap. All rights reserved.