コード例 #1
0
	def setUp(self):
	   conf = SparkConf().setAppName("appTest").setMaster("local[*]")
	   self.sc = SparkContext(conf=conf)
	   self.counter = YearsCounter() 
コード例 #2
0
 def read(self, filePlace, type):
     movies = self._sc.textFile(filePlace)
     counter = WordCounter()
     if type is 'Years':
         counter = YearsCounter()
     return counter.getMaxValues(movies)