Differences
This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
courses:mapreduce-tutorial:step-5 [2012/01/24 19:04] straka vytvořeno |
courses:mapreduce-tutorial:step-5 [2012/01/24 22:08] straka |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== MapReduce Tutorial : ====== | + | ====== MapReduce Tutorial : Basic reducer |
+ | |||
+ | <file perl reducer.pl> | ||
+ | # | ||
+ | |||
+ | package Mapper; | ||
+ | use Moose; | ||
+ | with ' | ||
+ | |||
+ | sub map { | ||
+ | my ($self, $key, $value, $context) = @_; | ||
+ | |||
+ | $context-> | ||
+ | } | ||
+ | |||
+ | package Main; | ||
+ | use Hadoop:: | ||
+ | |||
+ | my $runner = Hadoop:: | ||
+ | mapper => Mapper-> | ||
+ | input_format => ' | ||
+ | output_format => ' | ||
+ | output_compression => 0); | ||
+ | |||
+ | $runner-> | ||
+ | </ |