mapredus 0.0.4 → 0.0.5
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/lib/mapredus/inputter.rb +2 -2
- data/lib/mapredus/master.rb +5 -5
- metadata +4 -4
data/lib/mapredus/inputter.rb
CHANGED
@@ -14,13 +14,13 @@ module MapRedus
|
|
14
14
|
# scan(data_object) do |key, map_data|
|
15
15
|
# ...
|
16
16
|
# end
|
17
|
-
def self.scan(data_object)
|
17
|
+
def self.scan(*data_object)
|
18
18
|
raise InvalidInputStream
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.perform(pid, data_object)
|
22
22
|
process = Process.open(pid)
|
23
|
-
scan(data_object) do |key, map_data|
|
23
|
+
scan(*data_object) do |key, map_data|
|
24
24
|
FileSystem.hset(ProcessInfo.input(pid), key, map_data)
|
25
25
|
Master.enslave_map(process, key)
|
26
26
|
end
|
data/lib/mapredus/master.rb
CHANGED
@@ -22,7 +22,7 @@ module MapRedus
|
|
22
22
|
#
|
23
23
|
def self.perform( pid, data_object )
|
24
24
|
process = Process.open(pid)
|
25
|
-
enslave_inputter(process, data_object)
|
25
|
+
enslave_inputter(process, *data_object)
|
26
26
|
process.update(:state => INPUT_MAP_IN_PROGRESS)
|
27
27
|
end
|
28
28
|
|
@@ -31,11 +31,11 @@ module MapRedus
|
|
31
31
|
#
|
32
32
|
# The inputter sets off the mapper processes
|
33
33
|
#
|
34
|
-
def self.mapreduce( process, data_object )
|
34
|
+
def self.mapreduce( process, *data_object )
|
35
35
|
start_metrics(process.pid)
|
36
36
|
if process.synchronous
|
37
37
|
process.update(:state => INPUT_MAP_IN_PROGRESS)
|
38
|
-
enslave_inputter(process, data_object)
|
38
|
+
enslave_inputter(process, *data_object)
|
39
39
|
process.update(:state => REDUCE_IN_PROGRESS)
|
40
40
|
enslave_reducers(process)
|
41
41
|
process.update(:state => FINALIZER_IN_PROGRESS)
|
@@ -45,8 +45,8 @@ module MapRedus
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
def self.enslave_inputter(process, data_object)
|
49
|
-
enslave( process, process.inputter, process.pid, data_object )
|
48
|
+
def self.enslave_inputter(process, *data_object)
|
49
|
+
enslave( process, process.inputter, process.pid, *data_object )
|
50
50
|
end
|
51
51
|
|
52
52
|
# Enslave the reducers:
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapredus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Le
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-08-02 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|