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

Version Path
wukong-hadoop-0.2.0 bin/hdp-stream2
wukong-hadoop-0.1.1 bin/hdp-stream2
wukong-hadoop-0.1.0 bin/hdp-stream2
wukong-hadoop-0.0.2 bin/hdp-stream2
wukong-hadoop-0.0.1 bin/hdp-stream2
wukong-3.0.0.pre bin/hdp-stream2
wukong-2.0.2 bin/hdp-stream2
wukong-2.0.1 bin/hdp-stream2
wukong-2.0.0 bin/hdp-stream2
wukong-1.5.4 bin/hdp-stream2
wukong-1.5.3 bin/hdp-stream2
wukong-1.5.2 bin/hdp-stream2
wukong-1.5.1 bin/hdp-stream2
wukong-1.5.0 bin/hdp-stream2
wukong-1.4.12 bin/hdp-stream2
wukong-1.4.11 bin/hdp-stream2
wukong-1.4.10 bin/hdp-stream2
wukong-1.4.9 bin/hdp-stream2
wukong-1.4.7 bin/hdp-stream2
wukong-1.4.6 bin/hdp-stream2