[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
courses:mapreduce-tutorial:perl-api [2012/01/27 17:45]
straka
courses:mapreduce-tutorial:perl-api [2012/01/31 09:38] (current)
straka Change Perl commandline syntax.
Line 33: Line 33:
 ==== Command line arguments supported by Hadoop::Runner::run() ==== ==== Command line arguments supported by Hadoop::Runner::run() ====
  
-  script.pl run [-jt/--jobtracker jobtracker | -c/--cluster machines [-w/--wait secs]] [-r/--reducers reducers] [generic Hadoop optionsinput_path output_path +  script.pl [-jt jobtracker | -c number_of_machines [-w secs]] [-r reducers] [-Dname=value -Dname=value ...input output 
-  script.pl map number_of_reducers +  script.pl --map number_of_reducers 
-  script.pl reduce +  script.pl --reduce 
-  script.pl combine+  script.pl --combine
  
 ===== Hadoop::Mapper ===== ===== Hadoop::Mapper =====
Line 69: Line 69:
     * ''$values%%->%%value()'' -- returns the current value, undef if there is any.     * ''$values%%->%%value()'' -- returns the current value, undef if there is any.
     * ''$values%%->%%next()'' -- advance to next value. Returns true if there is any, false otherwise.     * ''$values%%->%%next()'' -- advance to next value. Returns true if there is any, false otherwise.
-    * At the beginning there is no current value, the first value should be obtained by calling 'next'.+    * At the beginning there is no current value, the first value should be obtained by calling ''next''.
   * ''sub reduce($self, $key, $values, $context)'' -- the variable ''$content'' has following methods:   * ''sub reduce($self, $key, $values, $context)'' -- the variable ''$content'' has following methods:
     * ''$content%%->%%write($key, $value)'' -- output the (''$key'', ''$value'') pair     * ''$content%%->%%write($key, $value)'' -- output the (''$key'', ''$value'') pair

[ Back to the navigation ] [ Back to the content ]