在笔记本中不会自动创建sc [英] sc is not created automatically in notebook

查看:83
本文介绍了在笔记本中不会自动创建sc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我昨天在DSX中创建的一个笔记本已停止工作-无法找到sc对象的错误

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"

我重新启动了内核,但无法创建它。我没有其他运行的内核。
我创建了一个新笔记本-使用Python 2的Spark 2.0,除了其中几乎没有任何内容:

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

然后返回空白。我期待有关SparkContext对象的详细信息。万一我发疯了,我会仔细检查 docs 并说它应该是自动的:

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:


分别为sc和
sqlContext为您创建了SparkContext和SQLContext

The SparkContext and SQLContext are created for you as sc and sqlContext respectively

是否发生了更改,或者有人知道如何在DSX中创建sc?希望我缺少明显的东西。我按照 this 尝试了SparkContext函数,但是得到了NPE 。

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.

推荐答案

这是笔记本内核要连接的Spark服务中的一个小故障。请联系DSX支持。每页右下角都有一个支持按钮。

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.

这篇关于在笔记本中不会自动创建sc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆