构建一个SparkSession [英] Build a SparkSession

查看:127
本文介绍了构建一个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天全站免登陆