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