SparkR not working

0

I am trying to control a Spark cluster (using SparkR) from a Sagemaker notebook. I followed these instructions closely: https://aws.amazon.com/blogs/machine-learning/build-amazon-sagemaker-notebooks-backed-by-spark-in-amazon-emr/ and got it to work.

Today when I try to run the SageMaker notebook (using the exact same code as before) I inexplicably get this error:

An error was encountered:
[1] "Error in callJMethod(sparkSession, \"read\"): Invalid jobj 1. If SparkR was restarted, Spark operations need to be re-executed."

Does anyone know why this is? I terminated the SparkR kernel and am still getting this error.

AWS
專家
已提問 4 年前檢視次數 272 次
1 個回答
0
已接受的答案

You cannot have multiple SparkContexts in one JVM. The issue is resolved as WON'T FIX. You have to stop the spark session which spawned the sparkcontext (which you have already done).

sparkR.session.stop()

https://issues.apache.org/jira/browse/SPARK-2243

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南