Apache Zeppelin - 设置默认解释器 [英] Apache Zeppelin - Set default interpreter
问题描述
在 Zeppelin 中,我必须在每一行都提供解释器.有没有办法为整个会话设置解释器.
In Zeppelin, at each row I am having to provide the interpreter at each row. Is there a way to set the interpreter for the whole session.
%pyspark
import re
用了 0 秒.
import pandas as pd
控制台:1:错误:'.'预期但找到标识符.将熊猫导入为 pd
console :1: error: '.' expected but identifier found. import pandas as pd
%pyspark
import pandas as pd
用了 0 秒.
如何为整个会话设置解释器?
How do I set the interpreter for the whole session?
推荐答案
Spark Interpreter group 目前有 4 个解释器,如下所列...
The Spark Interpreter group currently has 4 interpreter as listed here...
https://zeppelin.incubator.apache.org/docs/0.5.0-incubating/interpreter/spark.html
默认解释器是 %spark
并且默认解释器是根据 zeppelin-site 的 zeppelin.interpreters
属性中列出的解释器的顺序选择的.xml 配置文件.
The default interpreter is %spark
and default interpreter is selected based on the order of the interpreter listed in the zeppelin.interpreters
property in zeppelin-site.xml config file.
您的 zeppelin-site.xml(zeppelin.interpreters
属性)中解释器的当前顺序将是这个 ...
The current order of interpreter in your zeppelin-site.xml (zeppelin.interpreters
property) will be this ...
org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter
修改为...
org.apache.zeppelin.spark.PySparkInterpreter, org.apache.zeppelin.spark.SparkInterpreter
并重启 Zeppelin (zeppelin-daemon.sh restart
)
and restart Zeppelin (zeppelin-daemon.sh restart
)
这将使 %pyspark
成为默认解释器.
This will make %pyspark
as default interpreter.
谢谢
这篇关于Apache Zeppelin - 设置默认解释器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!