当我第一次运行时
lines = sc.textFile(os.path.join(folder_name),100)
进而
parsed_lines=lines.map(lambda line: parse_line(line, ["udid"])).persist(StorageLevel.MEMORY_AND_DISK).groupByKey(1000).take(10)
我收到以下错误:
...
ERROR YarnClientSchedulerBackend: Asked to remove non-existent executor 21
...
WARN TaskSetManager: Lost task 0.1 in stage 11.7 (TID 1151, <machine name>): FetchFailed(null, shuffleId=0, mapId=-1, reduceId=896, message=
org.apache.spark.shuffle.MetadataFetchFailedException: Missing an output location for shuffle 0
我尝试更改以下参数以及 groupbykey 中的拆分数和 textFile 函数中的分区数。
conf.set("spark.cores.max", "128")
conf.set("spark.akka.frameSize", "1024")
conf.set("spark.executor.memory", "6G")
conf.set("spark.shuffle.file.buffer.kb", "100")
我不确定如何根据 worker 的能力、输入大小和我将应用的转换来决定这些参数。
最佳答案
我收到了同样的错误。我通过减少我在 spark-defaults.conf 中请求的执行程序的数量解决了这个问题。
说它原来是:
spark.executor.instances 7
我把它改成阅读:
spark.executor.instances 4
我没有更改任何其他内容,并且能够避免该错误。
关于configuration - 错误 YarnClientSchedulerBackend : Asked to remove non-existent executor 21,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30993055/