需要使用Python中的Spark的库(PySpark)

2024-03-29 12:10:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Django中的PySpark并使用SparkSession连接到spark主节点,以在集群上执行作业。在

我的问题是我需要在本地机器上安装完整的spark吗?所有文档都让我安装spark,然后将PySpark库添加到python路径中。我不认为我需要所有~500mb的内存来连接到现有的集群。我想减轻我的码头集装箱。在

谢谢你的帮助。在


Tags: django内存文档路径机器节点集装箱作业
1条回答
网友
1楼 · 发布于 2024-03-29 12:10:57

虽然我还没有测试过,但是从spark2.1开始,PyPi可以提供PySpark(用于通过pip安装),这正是针对您这样的情况。从docs

The Python packaging for Spark is not intended to replace all of the other use cases. This Python packaged version of Spark is suitable for interacting with an existing cluster (be it Spark standalone, YARN, or Mesos) - but does not contain the tools required to setup your own standalone Spark cluster. You can download the full version of Spark from the Apache Spark downloads page.

NOTE: If you are using this with a Spark standalone cluster you must ensure that the version (including minor version) matches or you may experience odd errors

相关问题 更多 >