Permalink
Browse files

--run=local checks for a reducer for now and only adds the reducer_co…

…mmandline on the condition that there is one, before was placing an additional "|" in the command
  • Loading branch information...
1 parent fd90ae0 commit 70b215885159920b165a9e12166709d12761def4 @thedatachef thedatachef committed Feb 21, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/wukong/script/local_command.rb
@@ -25,7 +25,13 @@ def local_commandline
@input_paths = input_paths.map(&:strip).join(' ')
cmd_input_str = (input_paths == '-') ? "" : "cat '#{input_paths}' | "
cmd_output_str = (output_path == '-') ? "" : "> '#{output_path}'"
- %Q{ #{cmd_input_str} #{mapper_commandline} | #{local_mode_sort_commandline} | #{reducer_commandline} #{cmd_output_str} }
+
+ if (reducer || options[:reduce_command])
+ %Q{ #{cmd_input_str} #{mapper_commandline} | #{local_mode_sort_commandline} | #{reducer_commandline} #{cmd_output_str} }
+ else
+ %Q{ #{cmd_input_str} #{mapper_commandline} | #{local_mode_sort_commandline} #{cmd_output_str} }
+ end
+
end
end

0 comments on commit 70b2158

Please sign in to comment.