Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use PATH to find elastic-mapreduce, if not defined in YAML

  • Loading branch information...
commit a3145986098e6860749acf73a4a9c0b5ceeda8bd 1 parent 98eb992
Oren Held authored March 03, 2013

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. 11  lib/wukong/script/emr_command.rb
11  lib/wukong/script/emr_command.rb
@@ -146,7 +146,16 @@ def execute_emr_runner
146 146
       command_args += Settings[:emr_extra_args] unless Settings[:emr_extra_args].blank?
147 147
       command_args += hadoop_options_for_emr_runner
148 148
       Log.info 'Follow along at http://localhost:9000/job'
149  
-      execute_command!( File.expand_path(Settings.emr_runner), *command_args )
  149
+
  150
+      execute_command!( emr_runner_command, *command_args )
  151
+    end
  152
+
  153
+    def emr_runner_command
  154
+      if Settings.emr_runner.nil?
  155
+        "elastic-mapreduce" # Not defined in YAML, trust the system PATH, as when gem is installed
  156
+      else
  157
+        Settings.emr_runner
  158
+      end
150 159
     end
151 160
 
152 161
     def emr_credentials

0 notes on commit a314598

Please sign in to comment.
Something went wrong with that request. Please try again.