parent
615a66fa41
commit
d4df81c7bd
|
@ -25,7 +25,7 @@ class SalesRanker(MRJob):
|
||||||
if self.within_past_week(timestamp):
|
if self.within_past_week(timestamp):
|
||||||
yield (category, product_id), quantity
|
yield (category, product_id), quantity
|
||||||
|
|
||||||
def reducer(self, key, value):
|
def reducer(self, key, values):
|
||||||
"""Sum values for each key.
|
"""Sum values for each key.
|
||||||
|
|
||||||
(foo, p1), 2
|
(foo, p1), 2
|
||||||
|
@ -74,4 +74,4 @@ class SalesRanker(MRJob):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
HitCounts.run()
|
SalesRanker.run()
|
||||||
|
|
Loading…
Reference in New Issue