Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为然后创建一个对象SparkContext,您不需要指定self参数。另外,删除不需要的参数的名称。
SparkContext
self
如下代码有效:
from pyspark import SparkConf from pyspark.context import SparkContext sc = SparkContext.getOrCreate(SparkConf()) sc.setCheckpointDir(‘path/to/checkpoint/dir’)