pastebin example: fix pseudo code bug
This should make it clear that the code the developer writes for the reduce steps indeed gets an iterable of values, not only a single value.pull/85/head
parent
17e5fb7d32
commit
b2b18cbca1
|
@ -218,7 +218,7 @@ class HitCounts(MRJob):
|
|||
period = self.extract_year_month(line)
|
||||
yield (period, url), 1
|
||||
|
||||
def reducer(self, key, value):
|
||||
def reducer(self, key, values):
|
||||
"""Sum values for each key.
|
||||
|
||||
(2016-01, url0), 2
|
||||
|
|
Loading…
Reference in New Issue