pyspark - 在 Amazon EMR 集群上运行 jupyter notebook 时出现 Pyspark 内核错误
问题描述
我是 AWS EMR 的新手。我想使用 pyspark 内核从命令行在我的集群上运行 jupyter notebook。
为了创建集群,我运行了如下命令:
aws emr create-cluster --release-label emr-5.32.0 --name 'spark_jupyter_2'
--applications Name=Hadoop Name=Spark Name=Livy Name=JupyterEnterpriseGateway Name=Hive
--ec2-attributes KeyName=…………..,InstanceProfile=EMR_EC2_DefaultRole --service-role EMR_DefaultRole
--instance-groups InstanceGroupType=MASTER,
InstanceCount=1,InstanceType=m5.xlarge InstanceGroupType=CORE,InstanceCount=2,InstanceType=m5.xlarge
--region eu-central-1 --log-uri s3://………….../logs/ --no-termination-protected
然后我安装了jupytersudo pip3 install jupyter
然后我再次登录ssh -i "…………...pem" -L 8888:localhost:8888 hadoop@ec2-…………..compute.amazonaws.com
,运行命令jupyter notebook
并从屏幕上的链接转到网页。
直到这一步一切都很顺利,但是当我尝试使用 pyspark 内核运行笔记本时,我得到了“内核错误”
我不完全明白为什么会这样。当我从命令行运行pyspark
时,没有错误。
我该怎么做才能在没有任何错误的情况下使用 pyspark 内核运行 jupyter?1.
解决方案
推荐阅读
- python - 无法读取 Pandas 数据框中的 TweetId
- vba - 在 Chrome 中访问 DOM 嵌入的 PDF
- ios - 为什么 NavigationBar 背景颜色不会改变?
- python - Python for循环浮点数减法
- python - 如何为 Pandas 数据框中的不平衡面板生成滞后变量?
- azure - 将 delta Lake 文件从一个存储移动到另一个存储
- java - 我的应用程序抛出运行时异常并崩溃。我必须添加一些东西吗?
- c# - 如何将字节数组插入数据库中的 blob 单元格?
- javascript - TypeError:无法读取cryptoJS中未定义的属性“长度”
- linux - 使用 deezer/spleeter 时找不到“audio_example.mp3”