From 7e3641c25b82e6dfa1b257a73f567157d0a585b4 Mon Sep 17 00:00:00 2001 From: Christocracy Date: Fri, 25 Mar 2011 12:24:33 -0400 Subject: [PATCH] hack wukong to work with hadoop 0.21.0 which has a different path to hadoop-*streaming*.jar --- lib/wukong/script/hadoop_command.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/wukong/script/hadoop_command.rb b/lib/wukong/script/hadoop_command.rb index 919d0815..e810d117 100644 --- a/lib/wukong/script/hadoop_command.rb +++ b/lib/wukong/script/hadoop_command.rb @@ -54,13 +54,17 @@ def jobconf option # others # def execute_hadoop_workflow + + jar_path = File.join('contrib', 'streaming', 'hadoop-*streaming*.jar') + jar_path = File.join('mapred', jar_path) if options[:hadoop_home].include?("0.21.0") + # Input paths join by ',' input_paths = @input_paths.join(',') # # Use Settings[:hadoop_home] to set the path your config install. hadoop_commandline = [ - hadoop_runner, - "jar #{options[:hadoop_home]}/contrib/streaming/hadoop-*streaming*.jar", + hadoop_runner, + "jar #{File.join(options[:hadoop_home], jar_path)}", hadoop_jobconf_options, "-D mapred.job.name='#{job_name}'", hadoop_other_args,