starfish 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +10 -0
- data/README +136 -0
- data/Rakefile +89 -0
- data/bin/starfish +27 -0
- data/doc/classes/MapReduce/ActiveRecord/Base/Client.html +177 -0
- data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000016.html +19 -0
- data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000017.html +20 -0
- data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000018.html +18 -0
- data/doc/classes/MapReduce/ActiveRecord/Base.html +170 -0
- data/doc/classes/MapReduce/ActiveRecord/Base.src/M000015.html +39 -0
- data/doc/classes/MapReduce/ActiveRecord.html +111 -0
- data/doc/classes/MapReduce/Array.html +105 -0
- data/doc/classes/MapReduce/File.html +105 -0
- data/doc/classes/MapReduce.html +395 -0
- data/doc/classes/MapReduce.src/M000001.html +31 -0
- data/doc/classes/MapReduce.src/M000002.html +18 -0
- data/doc/classes/MapReduce.src/M000003.html +25 -0
- data/doc/classes/MapReduce.src/M000004.html +21 -0
- data/doc/classes/MapReduce.src/M000005.html +18 -0
- data/doc/classes/MapReduce.src/M000006.html +18 -0
- data/doc/classes/MapReduce.src/M000007.html +19 -0
- data/doc/classes/MapReduce.src/M000008.html +18 -0
- data/doc/classes/MapReduce.src/M000009.html +19 -0
- data/doc/classes/MapReduce.src/M000010.html +23 -0
- data/doc/classes/MapReduce.src/M000011.html +24 -0
- data/doc/classes/MapReduce.src/M000012.html +23 -0
- data/doc/classes/MapReduce.src/M000013.html +18 -0
- data/doc/classes/MapReduce.src/M000014.html +26 -0
- data/doc/classes/MapReduceError.html +111 -0
- data/doc/classes/Starfish/RingFinger.html +131 -0
- data/doc/classes/Starfish/RingFinger.src/M000031.html +20 -0
- data/doc/classes/Starfish.html +357 -0
- data/doc/classes/Starfish.src/M000019.html +19 -0
- data/doc/classes/Starfish.src/M000020.html +18 -0
- data/doc/classes/Starfish.src/M000021.html +45 -0
- data/doc/classes/Starfish.src/M000022.html +71 -0
- data/doc/classes/Starfish.src/M000023.html +23 -0
- data/doc/classes/Starfish.src/M000024.html +36 -0
- data/doc/classes/Starfish.src/M000025.html +35 -0
- data/doc/classes/Starfish.src/M000026.html +18 -0
- data/doc/classes/Starfish.src/M000027.html +22 -0
- data/doc/classes/Starfish.src/M000028.html +18 -0
- data/doc/classes/Starfish.src/M000029.html +18 -0
- data/doc/classes/Starfish.src/M000030.html +18 -0
- data/doc/classes/StarfishError.html +111 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +336 -0
- data/doc/files/lib/map_reduce/active_record_rb.html +109 -0
- data/doc/files/lib/map_reduce/array_rb.html +101 -0
- data/doc/files/lib/map_reduce/file_rb.html +101 -0
- data/doc/files/lib/map_reduce_rb.html +111 -0
- data/doc/files/lib/starfish_rb.html +114 -0
- data/doc/fr_class_index.html +36 -0
- data/doc/fr_file_index.html +32 -0
- data/doc/fr_method_index.html +57 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/examples/foo.rb +20 -0
- data/examples/map_reduce/active_record.rb +10 -0
- data/examples/map_reduce/file.rb +11 -0
- data/lib/map_reduce/active_record.rb +98 -0
- data/lib/map_reduce/array.rb +4 -0
- data/lib/map_reduce/file.rb +4 -0
- data/lib/map_reduce.rb +121 -0
- data/lib/starfish.rb +200 -0
- metadata +124 -0
@@ -0,0 +1,395 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: MapReduce</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">MapReduce</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/map_reduce_rb.html">
|
59
|
+
lib/map_reduce.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/map_reduce/active_record_rb.html">
|
63
|
+
lib/map_reduce/active_record.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/map_reduce/array_rb.html">
|
67
|
+
lib/map_reduce/array.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../files/lib/map_reduce/file_rb.html">
|
71
|
+
lib/map_reduce/file.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
|
77
|
+
<tr class="top-aligned-row">
|
78
|
+
<td><strong>Parent:</strong></td>
|
79
|
+
<td>
|
80
|
+
Object
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
</table>
|
84
|
+
</div>
|
85
|
+
<!-- banner header -->
|
86
|
+
|
87
|
+
<div id="bodyContent">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<div id="contextContent">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div id="method-list">
|
98
|
+
<h3 class="section-bar">Methods</h3>
|
99
|
+
|
100
|
+
<div class="name-list">
|
101
|
+
<a href="#M000002">add_time_spent_processing_objects</a>
|
102
|
+
<a href="#M000014">base_type</a>
|
103
|
+
<a href="#M000005">base_type_to_s</a>
|
104
|
+
<a href="#M000013">map_reduce?</a>
|
105
|
+
<a href="#M000011">method_missing</a>
|
106
|
+
<a href="#M000001">new</a>
|
107
|
+
<a href="#M000012">raise_if_invalid!</a>
|
108
|
+
<a href="#M000007">spool=</a>
|
109
|
+
<a href="#M000003">stats</a>
|
110
|
+
<a href="#M000004">type=</a>
|
111
|
+
<a href="#M000006">type_to_s</a>
|
112
|
+
<a href="#M000008">valid?</a>
|
113
|
+
<a href="#M000010">valid_input?</a>
|
114
|
+
<a href="#M000009">valid_type?</a>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
<!-- if includes -->
|
122
|
+
|
123
|
+
<div id="section">
|
124
|
+
|
125
|
+
<div id="class-list">
|
126
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
127
|
+
|
128
|
+
Module <a href="MapReduce/ActiveRecord.html" class="link">MapReduce::ActiveRecord</a><br />
|
129
|
+
Module <a href="MapReduce/Array.html" class="link">MapReduce::Array</a><br />
|
130
|
+
Module <a href="MapReduce/File.html" class="link">MapReduce::File</a><br />
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
<div id="aliases-list">
|
136
|
+
<h3 class="section-bar">External Aliases</h3>
|
137
|
+
|
138
|
+
<div class="name-list">
|
139
|
+
<table summary="aliases">
|
140
|
+
<tr class="top-aligned-row context-row">
|
141
|
+
<td class="context-item-name">input</td>
|
142
|
+
<td>-></td>
|
143
|
+
<td class="context-item-value">conditions</td>
|
144
|
+
</tr>
|
145
|
+
<tr class="top-aligned-row context-row">
|
146
|
+
<td class="context-item-name">input=</td>
|
147
|
+
<td>-></td>
|
148
|
+
<td class="context-item-value">conditions=</td>
|
149
|
+
</tr>
|
150
|
+
</table>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
<div id="attribute-list">
|
156
|
+
<h3 class="section-bar">Attributes</h3>
|
157
|
+
|
158
|
+
<div class="name-list">
|
159
|
+
<table>
|
160
|
+
<tr class="top-aligned-row context-row">
|
161
|
+
<td class="context-item-name">input</td>
|
162
|
+
<td class="context-item-value"> [RW] </td>
|
163
|
+
<td class="context-item-desc"></td>
|
164
|
+
</tr>
|
165
|
+
<tr class="top-aligned-row context-row">
|
166
|
+
<td class="context-item-name">limit</td>
|
167
|
+
<td class="context-item-value"> [RW] </td>
|
168
|
+
<td class="context-item-desc"></td>
|
169
|
+
</tr>
|
170
|
+
<tr class="top-aligned-row context-row">
|
171
|
+
<td class="context-item-name">type</td>
|
172
|
+
<td class="context-item-value"> [RW] </td>
|
173
|
+
<td class="context-item-desc"></td>
|
174
|
+
</tr>
|
175
|
+
</table>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<!-- if method_list -->
|
182
|
+
<div id="methods">
|
183
|
+
<h3 class="section-bar">Public Class methods</h3>
|
184
|
+
|
185
|
+
<div id="method-M000001" class="method-detail">
|
186
|
+
<a name="M000001"></a>
|
187
|
+
|
188
|
+
<div class="method-heading">
|
189
|
+
<a href="MapReduce.src/M000001.html" target="Code" class="method-signature"
|
190
|
+
onclick="popupCode('MapReduce.src/M000001.html');return false;">
|
191
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
192
|
+
</a>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<div class="method-description">
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
200
|
+
|
201
|
+
<div id="method-M000002" class="method-detail">
|
202
|
+
<a name="M000002"></a>
|
203
|
+
|
204
|
+
<div class="method-heading">
|
205
|
+
<a href="MapReduce.src/M000002.html" target="Code" class="method-signature"
|
206
|
+
onclick="popupCode('MapReduce.src/M000002.html');return false;">
|
207
|
+
<span class="method-name">add_time_spent_processing_objects</span><span class="method-args">(time)</span>
|
208
|
+
</a>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="method-description">
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div id="method-M000014" class="method-detail">
|
216
|
+
<a name="M000014"></a>
|
217
|
+
|
218
|
+
<div class="method-heading">
|
219
|
+
<a href="MapReduce.src/M000014.html" target="Code" class="method-signature"
|
220
|
+
onclick="popupCode('MapReduce.src/M000014.html');return false;">
|
221
|
+
<span class="method-name">base_type</span><span class="method-args">()</span>
|
222
|
+
</a>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
<div class="method-description">
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div id="method-M000005" class="method-detail">
|
230
|
+
<a name="M000005"></a>
|
231
|
+
|
232
|
+
<div class="method-heading">
|
233
|
+
<a href="MapReduce.src/M000005.html" target="Code" class="method-signature"
|
234
|
+
onclick="popupCode('MapReduce.src/M000005.html');return false;">
|
235
|
+
<span class="method-name">base_type_to_s</span><span class="method-args">()</span>
|
236
|
+
</a>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
<div class="method-description">
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div id="method-M000013" class="method-detail">
|
244
|
+
<a name="M000013"></a>
|
245
|
+
|
246
|
+
<div class="method-heading">
|
247
|
+
<a href="MapReduce.src/M000013.html" target="Code" class="method-signature"
|
248
|
+
onclick="popupCode('MapReduce.src/M000013.html');return false;">
|
249
|
+
<span class="method-name">map_reduce?</span><span class="method-args">()</span>
|
250
|
+
</a>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div class="method-description">
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div id="method-M000011" class="method-detail">
|
258
|
+
<a name="M000011"></a>
|
259
|
+
|
260
|
+
<div class="method-heading">
|
261
|
+
<a href="MapReduce.src/M000011.html" target="Code" class="method-signature"
|
262
|
+
onclick="popupCode('MapReduce.src/M000011.html');return false;">
|
263
|
+
<span class="method-name">method_missing</span><span class="method-args">(name, *args)</span>
|
264
|
+
</a>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div class="method-description">
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div id="method-M000012" class="method-detail">
|
272
|
+
<a name="M000012"></a>
|
273
|
+
|
274
|
+
<div class="method-heading">
|
275
|
+
<a href="MapReduce.src/M000012.html" target="Code" class="method-signature"
|
276
|
+
onclick="popupCode('MapReduce.src/M000012.html');return false;">
|
277
|
+
<span class="method-name">raise_if_invalid!</span><span class="method-args">()</span>
|
278
|
+
</a>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div class="method-description">
|
282
|
+
</div>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div id="method-M000007" class="method-detail">
|
286
|
+
<a name="M000007"></a>
|
287
|
+
|
288
|
+
<div class="method-heading">
|
289
|
+
<a href="MapReduce.src/M000007.html" target="Code" class="method-signature"
|
290
|
+
onclick="popupCode('MapReduce.src/M000007.html');return false;">
|
291
|
+
<span class="method-name">spool=</span><span class="method-args">(type, input)</span>
|
292
|
+
</a>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
<div class="method-description">
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div id="method-M000003" class="method-detail">
|
300
|
+
<a name="M000003"></a>
|
301
|
+
|
302
|
+
<div class="method-heading">
|
303
|
+
<a href="MapReduce.src/M000003.html" target="Code" class="method-signature"
|
304
|
+
onclick="popupCode('MapReduce.src/M000003.html');return false;">
|
305
|
+
<span class="method-name">stats</span><span class="method-args">()</span>
|
306
|
+
</a>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
<div class="method-description">
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
|
313
|
+
<div id="method-M000004" class="method-detail">
|
314
|
+
<a name="M000004"></a>
|
315
|
+
|
316
|
+
<div class="method-heading">
|
317
|
+
<a href="MapReduce.src/M000004.html" target="Code" class="method-signature"
|
318
|
+
onclick="popupCode('MapReduce.src/M000004.html');return false;">
|
319
|
+
<span class="method-name">type=</span><span class="method-args">(type)</span>
|
320
|
+
</a>
|
321
|
+
</div>
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
</div>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
<div id="method-M000006" class="method-detail">
|
328
|
+
<a name="M000006"></a>
|
329
|
+
|
330
|
+
<div class="method-heading">
|
331
|
+
<a href="MapReduce.src/M000006.html" target="Code" class="method-signature"
|
332
|
+
onclick="popupCode('MapReduce.src/M000006.html');return false;">
|
333
|
+
<span class="method-name">type_to_s</span><span class="method-args">()</span>
|
334
|
+
</a>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div class="method-description">
|
338
|
+
</div>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
<div id="method-M000008" class="method-detail">
|
342
|
+
<a name="M000008"></a>
|
343
|
+
|
344
|
+
<div class="method-heading">
|
345
|
+
<a href="MapReduce.src/M000008.html" target="Code" class="method-signature"
|
346
|
+
onclick="popupCode('MapReduce.src/M000008.html');return false;">
|
347
|
+
<span class="method-name">valid?</span><span class="method-args">()</span>
|
348
|
+
</a>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
<div class="method-description">
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<div id="method-M000010" class="method-detail">
|
356
|
+
<a name="M000010"></a>
|
357
|
+
|
358
|
+
<div class="method-heading">
|
359
|
+
<a href="MapReduce.src/M000010.html" target="Code" class="method-signature"
|
360
|
+
onclick="popupCode('MapReduce.src/M000010.html');return false;">
|
361
|
+
<span class="method-name">valid_input?</span><span class="method-args">()</span>
|
362
|
+
</a>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
<div class="method-description">
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div id="method-M000009" class="method-detail">
|
370
|
+
<a name="M000009"></a>
|
371
|
+
|
372
|
+
<div class="method-heading">
|
373
|
+
<a href="MapReduce.src/M000009.html" target="Code" class="method-signature"
|
374
|
+
onclick="popupCode('MapReduce.src/M000009.html');return false;">
|
375
|
+
<span class="method-name">valid_type?</span><span class="method-args">()</span>
|
376
|
+
</a>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div class="method-description">
|
380
|
+
</div>
|
381
|
+
</div>
|
382
|
+
|
383
|
+
|
384
|
+
</div>
|
385
|
+
|
386
|
+
|
387
|
+
</div>
|
388
|
+
|
389
|
+
|
390
|
+
<div id="validator-badges">
|
391
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
392
|
+
</div>
|
393
|
+
|
394
|
+
</body>
|
395
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 17</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
15
|
+
<span class="ruby-ivar">@lock</span> = <span class="ruby-keyword kw">false</span>
|
16
|
+
<span class="ruby-ivar">@offset</span> = <span class="ruby-value">0</span>
|
17
|
+
<span class="ruby-ivar">@limit</span> = <span class="ruby-value">1</span>
|
18
|
+
|
19
|
+
<span class="ruby-ivar">@time_began</span> = <span class="ruby-value">0</span>
|
20
|
+
|
21
|
+
<span class="ruby-ivar">@num_objects_grabbed</span> = <span class="ruby-value">0</span>
|
22
|
+
<span class="ruby-ivar">@time_spent_grabbing_objects</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
23
|
+
<span class="ruby-ivar">@time_spent_processing_objects</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
24
|
+
|
25
|
+
<span class="ruby-ivar">@num_queues_grabbed</span> = <span class="ruby-value">0</span>
|
26
|
+
<span class="ruby-ivar">@time_spent_grabbing_queues</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
27
|
+
|
28
|
+
<span class="ruby-ivar">@queue</span> = []
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_time_spent_processing_objects (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 34</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_time_spent_processing_objects</span>(<span class="ruby-identifier">time</span>)
|
15
|
+
<span class="ruby-ivar">@time_spent_processing_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">time</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>stats (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 38</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span>
|
15
|
+
{
|
16
|
+
<span class="ruby-identifier">:time_began</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@time_began</span>,
|
17
|
+
<span class="ruby-identifier">:num_queues_grabbed</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@num_queues_grabbed</span>,
|
18
|
+
<span class="ruby-identifier">:time_spent_grabbing_queues</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@time_spent_grabbing_objects</span>,
|
19
|
+
<span class="ruby-identifier">:num_objects_grabbed</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@num_objects_grabbed</span>,
|
20
|
+
<span class="ruby-identifier">:time_spent_grabbing_objects</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@time_spent_grabbing_objects</span>,
|
21
|
+
<span class="ruby-identifier">:time_spent_processing_objects</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@time_spent_processing_objects</span>
|
22
|
+
}
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>type= (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 49</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type=</span>(<span class="ruby-identifier">type</span>)
|
15
|
+
<span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_type?</span>
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-node">"include MapReduce::#{base_type}"</span>
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>base_type_to_s (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 56</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_type_to_s</span>
|
15
|
+
<span class="ruby-identifier">base_type</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_type?</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>type_to_s (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 60</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type_to_s</span>
|
15
|
+
<span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_type?</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>spool= (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 64</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spool=</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">input</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type</span>
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">input</span> = <span class="ruby-identifier">input</span>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>valid? (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
|
15
|
+
<span class="ruby-identifier">valid_type?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">valid_input?</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>valid_type? (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 73</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_type?</span>
|
15
|
+
<span class="ruby-ivar">@@types</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@type</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">type</span>)}
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>valid_input? (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 78</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_input?</span>
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">valid_type?</span>
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
17
|
+
<span class="ruby-keyword kw">else</span>
|
18
|
+
<span class="ruby-constant">Array</span>(<span class="ruby-ivar">@@types</span>[<span class="ruby-identifier">base_type</span>]).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">input_type</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-identifier">input_type</span>)}
|
19
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">MapReduceError</span>, <span class="ruby-node">"invalid input (#{@input.inspect}) for type: #{base_type}. Try one of the following: #{Array(@@types[base_type]).join(", ")}"</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>method_missing (MapReduce)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/map_reduce.rb, line 87</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.*)=$/</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>)
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword kw">do</span>
|
17
|
+
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">$1</span>, <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>])
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-keyword kw">super</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|