[ 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-25 [2012/01/31 12:45]
straka
courses:mapreduce-tutorial:step-25 [2012/01/31 13:04]
straka
Line 191: Line 191:
  
 ===== Exercise ===== ===== Exercise =====
 +
 +Implement the [[.:step-13|sorting exercise]] in Java -- only the part with uniform keys.
 +
 +**Remark:** Values of type ''Text'' are sorted lexicographically, but values of type ''IntWritable'' are sorted according to value. Your mapper should therefore produce pairs of types (''IntWritable'', ''Text'').
 +
 +You can download the {{:courses:mapreduce-tutorial:step-25.txt|Sorting.java}} template and execute it.
 +
 +  wget --no-check-certificate 'https://wiki.ufal.ms.mff.cuni.cz/_media/courses:mapreduce-tutorial:step-25.txt' -O 'Sorting.java'
 +  # NOW VIEW THE FILE
 +  # $EDITOR Sorting.java
 +  make -f /net/projects/hadoop/java/Makefile Sorting.jar
 +  rm -rf step-25-out-sol; /net/projects/hadoop/bin/hadoop Sorting.jar -r 0 /home/straka/wiki/cs-text-small step-25-out-sol
 +  less step-25-out-sol/part-*
  
 ---- ----

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