小编Nou*_*ene的帖子

pyspark Py4J 错误使用 canopy :PythonAccumulatorV2([class java.lang.String, class java.lang.Integer, class java.lang.String]) 不存在

我在 Windows 以及 python 和 pyspark 上安装了 canopy IDE。在执行程序代码时,出现了sparK Context的问题:

findspark.init()
conf = SparkConf().setMaster('local').setAppName('MonEssai')
sc = SparkContext.getOrCreate();
lines = sc.textFile("file:///PremiéreEssai/ file9.txt")
fun = lines.flatMap(listsGraph)
results =fun.collect()

for result1 in results:
  if(result1): 
    if ((result1[0].strip().startswith("sub_"))|(result1[0].strip().startswith("start"))):
      for k in range(0,len(result1)):
           if result1[k] not in Loc: 
                Loc.append(result1[k])
    else :
        for j in range(0,len(result1)):
           if result1[j] not in Ext: 
                Ext.append(result1[j])

result3 = sc.parallelize(Ext)
ExtSimilarity= result3.map(MatchExt).filter(lambda x: x != None).collect() 
#print(ExtSimilarity)         

#print(Loc)
result3 = sc.parallelize(Loc)
result9= result3.map(pos_debut)
result11= result9.map(opcode)
VectOpcode= result11.flatMapValues(f).flatMap(lambda X: [((X[0],len(X[1])))]).groupByKey().mapValues(list)
VectOpcode2 = VectOpcode.collect() …
Run Code Online (Sandbox Code Playgroud)

python canopy apache-spark pyspark

2
推荐指数
1
解决办法
4821
查看次数

标签 统计

apache-spark ×1

canopy ×1

pyspark ×1

python ×1