问题描述
我在Zeppelin担任口译员时颇有火花.我使用的是Spark2.0,我建立了一个会话:创建
I have a spark as interpreter in Zeppelin.I'm using a Spark2.0, I built a Session: Create
推荐答案
通常,您不应在Zeppelin中初始化SparkSession
或SparkContext
. Zeppelin笔记本配置为为您创建会话,其正确行为取决于使用提供的对象.
In general you should not initialize SparkSession
nor SparkContext
in Zeppelin. Zeppelin notebooks are configured to create session for you, and their correct behavior depends on using provided objects.
初始化SparkSession
会破坏Zeppelin的核心功能,而多个SparkContexts
会在最坏的情况下完全破坏东西.
Initializing your SparkSession
will break core Zeppelin functionalities, and multiple SparkContexts
will break things completely in the worst case scenario.
您永远不要使用spark.driver.allowMultipleContexts
-它不受支持,并且不能保证正确的结果.
You should never use spark.driver.allowMultipleContexts
- it not supported, and doesn't guarantee correct results.
这篇关于构建一个SparkSession的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!