Sha256: ce89707d5f79e3fac13512d7ad9ccc7e196b7adc4e34c382e234d8fb64e6f526
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
#!/usr/bin/env ruby require 'wukong' # Example usage: # # ~/ics/wukong/bin/hdp-stream2 input_path1,input_path2 output_path \ # "`which cuttab` 2,3,7" "`which uniq` -c" 1 3 -jobconf mapred.reduce.tasks=23 # options = Wukong::CONFIG[:runner_defaults].dup # cmdline_opts = Hash.zip( # [ :input_file, :output_file, # :map_command, :reduce_command, # :partition_fields, :sort_fields], # ARGV.map{|s| s.blank? ? nil : s } # ) # argvs = ARGV.slice!(0..5) ; # ARGV.unshift cmdline_opts[:input_file]; # ARGV.unshift cmdline_opts[:output_file] # p [argvs, ARGV] # # # cmdline_opts[:map_command] = `which cat`.chomp if cmdline_opts[:map_command].blank? # # cmdline_opts[:reduce_command] = nil if cmdline_opts[:reduce_command].blank? # cmdline_opts[:dry_run] = true # cmdline_opts[:run] = true #p cmdline_opts, Wukong::CONFIG[:runner_defaults] # Go script go! runner = Wukong::Script.new( nil, # use mapper_command nil, # use reducer_command :run => true ) # runner.options.merge cmdline_opts runner.options[:reuse_jvms] = true if runner.options[:reuse_jvms].blank? runner.run
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wukong-1.4.2 | bin/hdp-stream2 |
wukong-1.4.1 | bin/hdp-stream2 |