[ 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
Last revision Both sides next revision
courses:mapreduce-tutorial:step-5 [2012/01/29 23:46]
majlis
courses:mapreduce-tutorial:step-5 [2012/01/31 09:40]
straka Change Perl commandline syntax.
Line 6: Line 6:
  
 <file perl> <file perl>
-package Mapper;+package My::Mapper;
 use Moose; use Moose;
 with 'Hadoop::Mapper'; with 'Hadoop::Mapper';
Line 16: Line 16:
 } }
  
-package Reducer;+package My::Reducer;
 use Moose; use Moose;
 with 'Hadoop::Reducer'; with 'Hadoop::Reducer';
Line 28: Line 28:
 } }
  
-package Main;+package main;
 use Hadoop::Runner; use Hadoop::Runner;
  
 my $runner = Hadoop::Runner->new( my $runner = Hadoop::Runner->new(
-  mapper => Mapper->new(), +  mapper => My::Mapper->new(), 
-  reducer => Reducer->new());+  reducer => My::Reducer->new());
  
 $runner->run(); $runner->run();
Line 52: Line 52:
   # NOW EDIT THE FILE   # NOW EDIT THE FILE
   # $EDITOR step-5-exercise1.pl   # $EDITOR step-5-exercise1.pl
-  rm -rf step-5-out-ex1; perl step-5-exercise1.pl run /home/straka/wiki/cs-text-medium/ step-5-out-ex1+  rm -rf step-5-out-ex1; perl step-5-exercise1.pl /home/straka/wiki/cs-text-medium/ step-5-out-ex1
   less step-5-out-ex1/part-*   less step-5-out-ex1/part-*
  
Line 60: Line 60:
   # NOW VIEW THE FILE   # NOW VIEW THE FILE
   # $EDITOR step-5-solution1.pl   # $EDITOR step-5-solution1.pl
-  rm -rf step-5-out-sol1; perl step-5-solution1.pl run /home/straka/wiki/cs-text-medium/ step-5-out-sol1+  rm -rf step-5-out-sol1; perl step-5-solution1.pl /home/straka/wiki/cs-text-medium/ step-5-out-sol1
   less step-5-out-sol1/part-*   less step-5-out-sol1/part-*
  
Line 70: Line 70:
   # NOW EDIT THE FILE   # NOW EDIT THE FILE
   # $EDITOR step-5-exercise2.pl   # $EDITOR step-5-exercise2.pl
-  rm -rf step-5-out-ex2; perl step-5-exercise2.pl run /home/straka/wiki/cs-text-small/ step-5-out-ex2+  rm -rf step-5-out-ex2; perl step-5-exercise2.pl /home/straka/wiki/cs-text-small/ step-5-out-ex2
   less step-5-out-ex2/part-*   less step-5-out-ex2/part-*
  
Line 78: Line 78:
   # NOW VIEW THE FILE   # NOW VIEW THE FILE
   # $EDITOR step-5-solution2.pl   # $EDITOR step-5-solution2.pl
-  rm -rf step-5-out-sol2; perl step-5-solution2.pl run /home/straka/wiki/cs-text-small/ step-5-out-sol2+  rm -rf step-5-out-sol2; perl step-5-solution2.pl /home/straka/wiki/cs-text-small/ step-5-out-sol2
   less step-5-out-sol2/part-*   less step-5-out-sol2/part-*
  

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