Azure HDInsight Jupyter 和 pyspark 不工作
Azure HDInsight Jupyter and pyspark not working
我使用以下参数在 azure 上创建了一个 HDInsight 集群:
Spark 2.4 (HDI 4.0)
我用 PySpark Jupyter Notebook 尝试了 HDInsights for Apache Spark 的教程,它工作得很好。
但是自从我第二次重新运行笔记本还是开始新的,而且运行简单
from pyspark.sql import *
或其他命令,它们都以
结尾
The code failed because of a fatal error:
Session 7 did not start up in 180 seconds..
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.
在此之后,我还尝试了 pyspark 和 ssh。当我通过 ssh 和 运行
连接到集群时
$ pyspark
显示以下信息
SPARK_MAJOR_VERSION is set to 2, using Spark2
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
然后卡在那里。
我想知道我是否错过了任何手术?或者它是一个错误或什么的。我该如何解决这个问题?
根据我的观察,当您遇到“YARN”服务示例问题时,您会收到此错误消息:YARN 服务已停止。
错误:首先我停止了“YARN”服务。
现在我开始使用 Jupyter 笔记本,当我 运行 进行相同的查询时,遇到与您相同的错误消息。
演练:错误消息
成功:所有 Ambari 服务都运行没有任何问题。
要成功 运行 “Jupyter Notebook” 查询,请确保所有服务 运行ning 没有任何问题。
演练:成功消息
+++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++
以下是在 Azure HDInsight Spark 集群上创建 Jupyter notebook 和 运行 查询的步骤:
转到 Azure 门户 => 从 群集仪表板 => Select Jupyter Notebook => 创建 Pyspark notebook => 并如图所示执行查询。
您可以使用交互式 Apache 进行 运行ning Pyspark (Python) 查询:
参考: https://docs.microsoft.com/en-us/azure/hdinsight/spark/apache-spark-shell
我使用以下参数在 azure 上创建了一个 HDInsight 集群:
Spark 2.4 (HDI 4.0)
我用 PySpark Jupyter Notebook 尝试了 HDInsights for Apache Spark 的教程,它工作得很好。 但是自从我第二次重新运行笔记本还是开始新的,而且运行简单
from pyspark.sql import *
或其他命令,它们都以
结尾The code failed because of a fatal error:
Session 7 did not start up in 180 seconds..
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.
在此之后,我还尝试了 pyspark 和 ssh。当我通过 ssh 和 运行
连接到集群时$ pyspark
显示以下信息
SPARK_MAJOR_VERSION is set to 2, using Spark2
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
然后卡在那里。
我想知道我是否错过了任何手术?或者它是一个错误或什么的。我该如何解决这个问题?
根据我的观察,当您遇到“YARN”服务示例问题时,您会收到此错误消息:YARN 服务已停止。
错误:首先我停止了“YARN”服务。
现在我开始使用 Jupyter 笔记本,当我 运行 进行相同的查询时,遇到与您相同的错误消息。
演练:错误消息
成功:所有 Ambari 服务都运行没有任何问题。
要成功 运行 “Jupyter Notebook” 查询,请确保所有服务 运行ning 没有任何问题。
演练:成功消息
+++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++
以下是在 Azure HDInsight Spark 集群上创建 Jupyter notebook 和 运行 查询的步骤:
转到 Azure 门户 => 从 群集仪表板 => Select Jupyter Notebook => 创建 Pyspark notebook => 并如图所示执行查询。
您可以使用交互式 Apache 进行 运行ning Pyspark (Python) 查询:
参考: https://docs.microsoft.com/en-us/azure/hdinsight/spark/apache-spark-shell