Anaconda(4.2)python2.7.14:确保工人已经注册并且有足够的资源

2024-09-24 20:39:26 发布

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

有人能帮我修一下下面的代码吗

import pyspark
from pyspark import SparkContext, SparkConf
conf = SparkConf()
conf.setMaster('yarn-cluster')
conf.setAppName('test')
sc = SparkContext.getOrCreate()
r = sc.textFile("data.csv")
r.collect()

出现以下错误:

WARN cluster.YarnScheduler: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources

我希望收集结果会打印出来

谢谢


Tags: 代码fromtestimportconfpysparkresourcescluster