Sha256: ee122f2dd00a166ca9dd7cd4ce13d5eec40dce8961c2abeda8ade54da39e0966
Contents?: true
Size: 311 Bytes
Versions: 4
Compression:
Stored size: 311 Bytes
Contents
# wordcount example # not necessary def setup(conf) ['test/inputs', 'test/outputs'] end def map(key, value, output, reporter) value.split.each do |word| output.collect(word, 1) end end def reduce(key, values, output, reporter) sum = 0 values.each {|v| sum += v } output.collect(key, sum) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jruby-on-hadoop-0.0.6 | examples/wordcount.rb |
jruby-on-hadoop-0.0.5 | examples/wordcount.rb |
jruby-on-hadoop-0.0.4 | examples/wordcount.rb |
jruby-on-hadoop-0.0.3 | examples/wordcount.rb |