Sha256: 2c661ff740aa28c5f295456d220c99c993153741d049c07f9ccc9d204304180e

Contents?: true

Size: 739 Bytes

Versions: 4

Compression:

Stored size: 739 Bytes

Contents

#!/usr/bin/env ruby
Dir[File.dirname(__FILE__)+'/vendor/**/lib'].each{|dir| $: << dir }
require 'rubygems'
require 'wukong/script'
require 'wukong/script/emr_command'

#
# * Copy the emr.yaml from here into ~/.wukong/emr.yaml
#   and edit it to suit.
# * Download the Amazon elastic-mapreduce runner. Get a copy from
#   http://elasticmapreduce.s3.amazonaws.com/elastic-mapreduce-ruby.zip
# * Find out what breaks, fix it or ask us for help (coders@infochimps.org) and
#   submit a patch
#

class FooStreamer < Wukong::Streamer::LineStreamer
  def initialize *args
    super *args
    @line_no = 0
  end

  def process *args
    yield ["%5d" % @line_no, *args]
    @line_no += 1
  end
end

Wukong::Script.new(FooStreamer, FooStreamer).run

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wukong-3.0.0.pre old/examples/emr/elastic_mapreduce_example.rb
wukong-2.0.2 examples/emr/elastic_mapreduce_example.rb
wukong-2.0.1 examples/emr/elastic_mapreduce_example.rb
wukong-2.0.0 examples/emr/elastic_mapreduce_example.rb