Sha256: 0d3039334c7fdd2669a03e76044b286c71cd4e77e08a284d965b71b88519d370
Contents?: true
Size: 674 Bytes
Versions: 7
Compression:
Stored size: 674 Bytes
Contents
module Wukong module LocalCommand # =========================================================================== # # Local execution Options # # program, including arg, to sort input between mapper and reducer in local # mode. You could override to for example run 'sort -n' (numeric sort). def sort_command 'sort' end def local_command input_path, output_path cmd_input_str = (input_path == '-') ? "" : "cat '#{input_path}' | " cmd_output_str = (output_path == '-') ? "" : "> '#{output_path}'" %Q{ #{cmd_input_str} #{map_command} | #{sort_command} | #{reduce_command} #{cmd_output_str} } end end end
Version data entries
7 entries across 7 versions & 1 rubygems