mirror of
https://github.com/donnemartin/system-design-primer.git
synced 2025-12-15 17:38:56 +03:00
value --> values
Also fixed a copy-and-paste error
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user