module Wukong::Hadoop::LocalInvocation

Provides methods for executing a map/reduce job locally on the command-line.

Public Instance Methods

local_commandline() click to toggle source

Returns the full local command used by Wukong-Hadoop when simulating a map/reduce job on the command-line.

You should be able to run this commmand directly to simulate the job yourself.

@return [String]

# File lib/wukong-hadoop/runner/local_invocation.rb, line 16
def local_commandline
  [
   [cat_input, mapper_commandline].tap do |pipeline|
     pipeline.concat([sort_commandline, reducer_commandline]) if reduce?
   end.flatten.compact.join(' | '),
   cat_output
  ].flatten.compact.join(' ')
end
sort_commandline() click to toggle source

Returns the sort command used by Wukong-Hadoop when simulating a map/reduce job on the command-line.

@return [String]

# File lib/wukong-hadoop/runner/local_invocation.rb, line 29
def sort_commandline
  settings[:sort_command]
end