问题
A notebook I created yesterday in DSX has stoped working - errors re can't find the sc object
"NameError: global name 'sc' is not defined"
I restarted the kernel but can't get it created. I have no other kernel running. I created a new notebook - Spark 2.0 with Python 2 and literally nothing in it except:
sc
And that comes back as blank. I am expecting details on my SparkContext object. In case I am going mad I double checked docs and it says it should be automatic:
The SparkContext and SQLContext are created for you as sc and sqlContext respectively
Has something changed or anyone know how I can get the sc created in DSX? Hope I'm missing something obvious. I tried the SparkContext function as per this but get an NPE.
回答1:
This is a glitch in the Spark service your notebook kernel wants to connect to. Please contact DSX support. There is a support button on the bottom right of each page.
来源:https://stackoverflow.com/questions/43409358/sc-is-not-created-automatically-in-notebook