使用 HDI Jupyter Spark (Scala) notebook 配置外部 jar
Configure external jars with HDI Jupyter Spark (Scala) notebook
我有一个外部自定义 jar,我想将其与 Azure HDInsight Jupyter 笔记本一起使用; HDI 中的 Jupyter 笔记本使用 Spark Magic 和 Livy。
在笔记本的第一个单元格中,我尝试使用 jars
配置:
%%configure -f
{"jars": ["wasb://$container$@$account#.blob.core.windows.net/folder/my-custom-jar.jar"]}
但是我收到的错误信息是:
Starting Spark application
The code failed because of a fatal error:
Status 'shutting_down' not supported by session..
Some things to try:
a) Make sure Spark has enough available resources for Jupyter to create a Spark context. For instructions on how to assign resources see http://go.microsoft.com/fwlink/?LinkId=717038
b) Contact your cluster administrator to make sure the Spark magics library is configured correctly.
Current session configs: {u'jars': [u'wasb://$container$@$account#.blob.core.windows.net/folder/my-custom-jar.jar'], u'kind': 'spark'}
An error was encountered:
Status 'shutting_down' not supported by session.
我想知道我是否只是不了解 Livy 在这种情况下的工作方式,因为我能够在同一集群上成功包含一个 spark-package (GraphFrames):
%%configure -f
{ "conf": {"spark.jars.packages": "graphframes:graphframes:0.3.0-spark2.0-s_2.11" }}
一些可能有用的其他参考资料(以防万一我遗漏了什么):
哦,我已经弄清楚了,忘记更新我的问题了。如果将 jar 放在 HDI 集群的默认存储帐户中,这就可以工作。
HTH!
以防有人来这里在 EMR 上添加 jar。
%%configure -f
{"name": "sparkTest", "conf": {"spark.jars": "s3://somebucket/artifacts/jars/spark-avro_2.11-2.4.4.jar"}}
与document相反,直接使用jars
是不行的。
我有一个外部自定义 jar,我想将其与 Azure HDInsight Jupyter 笔记本一起使用; HDI 中的 Jupyter 笔记本使用 Spark Magic 和 Livy。
在笔记本的第一个单元格中,我尝试使用 jars
配置:
%%configure -f
{"jars": ["wasb://$container$@$account#.blob.core.windows.net/folder/my-custom-jar.jar"]}
但是我收到的错误信息是:
Starting Spark application
The code failed because of a fatal error:
Status 'shutting_down' not supported by session..
Some things to try:
a) Make sure Spark has enough available resources for Jupyter to create a Spark context. For instructions on how to assign resources see http://go.microsoft.com/fwlink/?LinkId=717038
b) Contact your cluster administrator to make sure the Spark magics library is configured correctly.
Current session configs: {u'jars': [u'wasb://$container$@$account#.blob.core.windows.net/folder/my-custom-jar.jar'], u'kind': 'spark'}
An error was encountered:
Status 'shutting_down' not supported by session.
我想知道我是否只是不了解 Livy 在这种情况下的工作方式,因为我能够在同一集群上成功包含一个 spark-package (GraphFrames):
%%configure -f
{ "conf": {"spark.jars.packages": "graphframes:graphframes:0.3.0-spark2.0-s_2.11" }}
一些可能有用的其他参考资料(以防万一我遗漏了什么):
哦,我已经弄清楚了,忘记更新我的问题了。如果将 jar 放在 HDI 集群的默认存储帐户中,这就可以工作。
HTH!
以防有人来这里在 EMR 上添加 jar。
%%configure -f
{"name": "sparkTest", "conf": {"spark.jars": "s3://somebucket/artifacts/jars/spark-avro_2.11-2.4.4.jar"}}
与document相反,直接使用jars
是不行的。