mandy 0.5.3 → 0.5.5
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 +8 -1
- data/lib/mandy/packer.rb +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/bin/mandy-hadoop
CHANGED
@@ -11,6 +11,10 @@ options = OpenStruct.new
|
|
11
11
|
OptionParser.new do |opts|
|
12
12
|
opts.banner = "USAGE: mandy-hadoop script input output [options]"
|
13
13
|
|
14
|
+
opts.on("-i", "--input-format class", "Set the hadoop input format type") do |format_class|
|
15
|
+
options.input_format = format_class
|
16
|
+
end
|
17
|
+
|
14
18
|
opts.on("-p", "--payload PAYLOAD", "Add a working directory to be sent to the cluster.") do |payload|
|
15
19
|
options.payload = payload
|
16
20
|
end
|
@@ -68,6 +72,8 @@ payload = Mandy::Packer.pack(file, options.payload || ARGV[0], gemfile(options.g
|
|
68
72
|
cmdenv = options.cmdenv
|
69
73
|
set_env(cmdenv)
|
70
74
|
|
75
|
+
inputformat = !options.input_format.nil? ? options.input_format : "TextInputFormat"
|
76
|
+
|
71
77
|
at_exit do
|
72
78
|
puts
|
73
79
|
puts "Cleaning up..."
|
@@ -93,13 +99,14 @@ begin
|
|
93
99
|
command = %($HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/contrib/streaming/hadoop-*-streaming.jar #{jobconf}\
|
94
100
|
-files "#{payload}","#{bootstrap_file}" \
|
95
101
|
-conf '#{config}' \
|
102
|
+
-inputformat '#{inputformat}' \
|
96
103
|
#{input} \
|
97
104
|
#{ inputreader.nil? ? '' : "-inputreader \"#{inputreader}\"" } \
|
98
105
|
-mapper "ruby bootstrap.rb #{File.basename(payload)} map #{filename} '#{job.name}'" \
|
99
106
|
-reducer "ruby bootstrap.rb #{File.basename(payload)} reduce #{filename} '#{job.name}'" \
|
100
107
|
#{ cmdenv.nil? ? '' : "-cmdenv #{cmdenv}" }\
|
101
108
|
-output "#{output}" 2>&1)
|
102
|
-
|
109
|
+
|
103
110
|
result = []
|
104
111
|
IO.popen(command, 'r') do |subprocess|
|
105
112
|
while line = subprocess.gets
|
data/lib/mandy/packer.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 5
|
9
|
+
version: 0.5.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andy Kent
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2010-08-20 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|