建立一个 SparkSession [英] Build a SparkSession

查看:31
本文介绍了建立一个 SparkSession的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Zeppelin 中担任口译员.我正在使用 Spark2.0,我建立了一个会话:创建

I have a spark as interpreter in Zeppelin. I'm using a Spark2.0, I built a Session: Create

推荐答案

通常,您不应在 Zeppelin 中初始化 SparkSessionSparkContext.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 设置为 False 最好进行测试?

Is set spark.driver.allowMultipleContexts to False is best to do a tests ?

您永远不应该使用 spark.driver.allowMultipleContexts - 它不受支持,并且不能保证正确的结果.

You should never use spark.driver.allowMultipleContexts - it not supported, and doesn't guarantee correct results.

这篇关于建立一个 SparkSession的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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