Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 878 Bytes

README.md

File metadata and controls

29 lines (17 loc) · 878 Bytes

ruby-map-reduce

Some examples and notes about writing map reduces in ruby to run under Hadoop.

Examples

Things I've learned

  • Running locally without Apache Hadoop

You can test your maps/reduces on your shell prompt by just piping the source data from the source file to the map, sorting its output before piping it to the reduce.

cat my-source-file.txt | ruby map.rb | sort | ruby reduce.rb
  • The output of a map

Each output of a map must always be on the format key tab value newline

puts "#{key}\t#{value}"