Hi folks,

I'm getting the following exception:

*Exception in thread "main" java.io.IOException: Cannot run program
"E:\Software\spark-1.6.1\bin\spark-submit.cmd": CreateProcess error=5,
Access is denied*
* at java.lang.ProcessBuilder.start(Unknown Source)*
* at
org.apache.spark.launcher.SparkLauncher.startApplication(SparkLauncher.java:418)*
* at com.wwa.spark.poc.SimpleAppLauncher.main(SimpleAppLauncher.java:13)*
*Caused by: java.io.IOException: CreateProcess error=5, Access is denied*
* at java.lang.ProcessImpl.create(Native Method)*
* at java.lang.ProcessImpl.<init>(Unknown Source)*
* at java.lang.ProcessImpl.start(Unknown Source)*
* ... 3 more*

When I'm trying to run the SparkLauncher example from
https://github.com/apache/spark/blob/master/launcher/src/main/java/org/apache/spark/launcher/package-info.java

My code is:

public static void main(String[] args) throws IOException {
SparkAppHandle handle = new
SparkLauncher().setAppResource("E:/spark-poc-0.0.1-SNAPSHOT.jar")
.setMainClass("com.wwa.spark.poc.SimpleApp").setMaster("spark://spark1:7077").setConf(SparkLauncher.DRIVER_MEMORY,
"2g")
.startApplication();
}


I've tried changing the permissions on the spark-submit.cmd file, but with
no luck. Then, I tried to ensure all my spark installation had the correct
permissions and granted permission to run to all logged in users, but that
also resulted in the error pasted above.

It works perfectly if I run spark-submit.cmd from the command line.


Cheers,
Augusto

Reply via email to