0
私はこのチュートリアルhereに従って、Sparkライブラリを使用してPythonプログラミング用にEclipseを構成しました。Sparkライブラリを使用してPythonプログラムを実行しているEclipseのエラー
の操作を行います。
# Imports
# Take care about unused imports (and also unused variables),
# please comment them all, otherwise you will get any errors at the execution.
# Note that neither the directives "@PydevCodeAnalysisIgnore" nor "@UnusedImport"
# will be able to solve that issue.
#from pyspark.mllib.clustering import KMeans
from pyspark import SparkConf, SparkContext
import os
# Configure the Spark environment
sparkConf = SparkConf().setAppName("WordCounts").setMaster("local")
sc = SparkContext(conf = sparkConf)
# The WordCounts Spark program
textFile = sc.textFile(os.environ["SPARK_HOME"] + "/README.md")
wordCounts = textFile.flatMap(lambda line: line.split()).map(lambda word: (word, 1)).reduceByKey(lambda a, b: a+b)
for wc in wordCounts.collect(): print wc
私はこのようなエラーのリストを取得します。私は、このサンプル・プログラムを実行したら、私は、しかし...あらゆる問題なく
を段階的に続きます私は、パスを変更するか、それを動作させるために他の設定に従わなければなりませんか?