While running a python script on an EMR cluster using the spark submit
command the process got stuck on 10% (can be seen through yarn application --list
) and when I examined the logs, all cores executers presented the following type of message as there recent error:
Could not find valid SPARK_HOME while searching ['/mnt1/yarn/usercache/hadoop/appcache/application_x_0001', '/mnt/yarn/usercache/hadoop/filecache/11/pyspark.zip/pyspark', '/mnt1/yarn/usercache/hadoop/appcache/application_x_0001/container_x_0001_01_000002/pyspark.zip/pyspark', '/mnt1/yarn/usercache/hadoop/appcache/application_x_0001/container_x_0001_01_000002']
The code ran well localy, and since Spark was installed on all cores, I couldn't figure what is the cause for this issue and how to solve this error. Beside one post in Portuguese, without a clear answer i couldn't find any post with a solution for this issue.