Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
courses:mapreduce-tutorial:step-4 [2012/01/29 23:38] majlis |
courses:mapreduce-tutorial:step-4 [2012/01/31 09:40] (current) straka Change Perl commandline syntax. |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Sometimes it is useful to count events differently than outputting them as (key, value) pairs. For that reason Hadoop offers simple counter framework. | Sometimes it is useful to count events differently than outputting them as (key, value) pairs. For that reason Hadoop offers simple counter framework. | ||
| - | Hadoop maintains a collection of pre-defined and user-defined counters. Every counter is identified by its group name and counter name. To increment a counter, the following code can be used: | + | Hadoop maintains a collection of pre-defined and user-defined counters. Every counter is identified by its group name and counter name. The group name and counter name is an arbitrary string -- for example group " |
| <code perl> | <code perl> | ||
| Line 21: | Line 21: | ||
| # NOW EDIT THE FILE | # NOW EDIT THE FILE | ||
| # $EDITOR step-4-exercise.pl | # $EDITOR step-4-exercise.pl | ||
| - | rm -rf step-4-out-ex; | + | rm -rf step-4-out-ex; |
| less step-4-out-ex/ | less step-4-out-ex/ | ||
| Line 27: | Line 27: | ||
| You can also download the solution {{: | You can also download the solution {{: | ||
| wget --no-check-certificate ' | wget --no-check-certificate ' | ||
| - | # NOW EDIT THE FILE | + | # NOW VIEW THE FILE |
| - | # $EDITOR step-4-solution.pl | + | # $EDITOR step-3-solution.pl |
| - | rm -rf step-4-out-sol; | + | rm -rf step-4-out-sol; |
| less step-4-out-sol/ | less step-4-out-sol/ | ||
