Sha256: a356222c324390f2124ede51044c4ea19c8c288e20faa6590a906b6cee277b0e
Contents?: true
Size: 1.08 KB
Versions: 21
Compression:
Stored size: 1.08 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 = Settings[: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, Settings[: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
21 entries across 21 versions & 2 rubygems