2017-04-05 101 views

回答

0

假设你写了这个代码:在文档

from pyspark import SparkContext 

sc = SparkContext("local", "Simple App") 

# This will stop your app 
sc.stop() 

由于descibes: http://spark.apache.org/docs/latest/api/python/pyspark.html?highlight=stop#pyspark.SparkContext.stop

+0

这难道不是创建一个新的,独立的SparkContext? –

+0

如果您将在您的应用程序中调用sc.stop(),则将停止SparkContext,否则不会。我添加SparkContext的初始值以明确** sc ** –

+0

@ cricket_007它会终止该Spark应用程序中的所有作业。我只想杀死一个特定的工作。 – shivanshuiitg

相关问题