trafficbroker-mandy 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/mandy-hadoop +6 -0
- data/lib/task.rb +4 -1
- data/readme.md +3 -1
- metadata +2 -2
data/bin/mandy-hadoop
CHANGED
@@ -17,6 +17,10 @@ OptionParser.new do |opts|
|
|
17
17
|
options.config = config
|
18
18
|
end
|
19
19
|
|
20
|
+
opts.on("-v", '--variables name=value', "Pass additional parameters to jobs") do |config|
|
21
|
+
options.cmdenv = config
|
22
|
+
end
|
23
|
+
|
20
24
|
opts.on_tail("-h", "--help", "Show this message") do
|
21
25
|
puts opts
|
22
26
|
exit
|
@@ -33,6 +37,7 @@ input = ARGV[1]
|
|
33
37
|
output_folder = ARGV[2]
|
34
38
|
config = options.config || 'cluster.xml'
|
35
39
|
payload = options.payload ? Mandy::Packer.pack(options.payload) : ARGV[0]
|
40
|
+
cmdenv = options.cmdenv
|
36
41
|
|
37
42
|
at_exit { Mandy::Packer.cleanup!(payload) }
|
38
43
|
|
@@ -51,6 +56,7 @@ Mandy::Job.jobs.each_with_index do |job, i|
|
|
51
56
|
-mapper "mandy-map #{filename} '#{job.name}' #{File.basename(payload)}" \
|
52
57
|
-reducer "mandy-reduce #{filename} '#{job.name}' #{File.basename(payload)}" \
|
53
58
|
-file "#{payload}" \
|
59
|
+
-cmdenv #{cmdenv} \
|
54
60
|
-output "#{output}")
|
55
61
|
|
56
62
|
`#{command}`
|
data/lib/task.rb
CHANGED
data/readme.md
CHANGED
@@ -6,4 +6,6 @@ Mandy hides the differences and complexities between running map/reduce tasks lo
|
|
6
6
|
It provides a simple DSL to define new jobs for distribution. See examples/word_count.rb for a demo of some functionality.
|
7
7
|
Run the word count example locally with...
|
8
8
|
|
9
|
-
mandy-local examples/word_count.rb examples/alice.txt examples/output
|
9
|
+
mandy-local examples/word_count.rb examples/alice.txt examples/output
|
10
|
+
|
11
|
+
Mandy is licensed under the MIT Licence, please see LICENCE for further information.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trafficbroker-mandy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Kent
|
@@ -63,7 +63,7 @@ files:
|
|
63
63
|
- lib/ruby-hbase/xml_decoder.rb
|
64
64
|
- lib/test_runner.rb
|
65
65
|
has_rdoc: false
|
66
|
-
homepage:
|
66
|
+
homepage: http://github.com/trafficbroker/mandy
|
67
67
|
licenses:
|
68
68
|
post_install_message:
|
69
69
|
rdoc_options: []
|