[ 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 Both sides next revision
courses:mapreduce-tutorial:perl-api [2012/01/23 21:33]
straka
courses:mapreduce-tutorial:perl-api [2012/01/23 21:33]
straka
Line 39: Line 39:
 requires 'map'; requires 'map';
  
-sub setup() { } +sub setup() {} 
-sub cleanup { }+sub cleanup {}
 </code> </code>
   * ''sub map($self, $key, $value, $context)'' -- executed for every (key, value) input pair. The variable '$content' has following methods:   * ''sub map($self, $key, $value, $context)'' -- executed for every (key, value) input pair. The variable '$content' has following methods:
Line 56: Line 56:
 requires 'reduce'; requires 'reduce';
  
-sub setup() { } +sub setup() {} 
-sub cleanup { }+sub cleanup {}
 </code> </code>
   * ''sub reduce($self, $key, $values, $context)'' -- executed for every ''$key''. The ''$values'' is an iterator with the following methods:   * ''sub reduce($self, $key, $values, $context)'' -- executed for every ''$key''. The ''$values'' is an iterator with the following methods:
Line 77: Line 77:
 requires 'getPartition'; requires 'getPartition';
  
-sub setup { } +sub setup {} 
-sub cleanup { }+sub cleanup {}
  
 </code> </code>

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