mandy 0.4.995 → 0.4.996
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/mandy-hadoop +9 -1
- data/lib/mandy/job.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.996
|
data/bin/mandy-hadoop
CHANGED
@@ -48,6 +48,13 @@ def gemfile(file)
|
|
48
48
|
File.exist?(path) ? path : nil
|
49
49
|
end
|
50
50
|
|
51
|
+
def set_env(opts_string)
|
52
|
+
opts_string.split(' ').each do |pair|
|
53
|
+
key, value = pair.split("=")
|
54
|
+
ENV[key] = value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
51
58
|
file = ARGV[0]
|
52
59
|
filename = File.basename(file)
|
53
60
|
inputs = ARGV[1].split(",")
|
@@ -56,8 +63,9 @@ input = inputs.map {|path| "-input \"#{path}\""}.join(" ")
|
|
56
63
|
output_folder = ARGV[2]
|
57
64
|
config = absolute_path(options.config || 'cluster.xml')
|
58
65
|
puts "Packaging code for distribution..."
|
59
|
-
payload = Mandy::Packer.pack(file, options.payload || ARGV[0], gemfile(options.gemfile))
|
66
|
+
payload = Mandy::Packer.pack(file, options.payload || ARGV[0], gemfile(options.gemfile))
|
60
67
|
cmdenv = options.cmdenv
|
68
|
+
set_env(cmdenv)
|
61
69
|
|
62
70
|
at_exit do
|
63
71
|
puts
|
data/lib/mandy/job.rb
CHANGED