neptune 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/README +4 -0
  2. data/doc/BabelHelper.html +393 -376
  3. data/doc/BadConfigurationException.html +121 -127
  4. data/doc/CommonFunctions.html +237 -265
  5. data/doc/ExodusHelper.html +820 -0
  6. data/doc/ExodusTaskInfo.html +263 -0
  7. data/doc/FileNotFoundException.html +121 -127
  8. data/doc/NeptuneHelper.html +527 -592
  9. data/doc/NeptuneManagerClient.html +696 -0
  10. data/doc/NeptuneManagerException.html +139 -0
  11. data/doc/Object.html +334 -236
  12. data/doc/TaskInfo.html +428 -0
  13. data/doc/created.rid +8 -5
  14. data/doc/images/add.png +0 -0
  15. data/doc/images/delete.png +0 -0
  16. data/doc/images/tag_blue.png +0 -0
  17. data/doc/images/transparent.png +0 -0
  18. data/doc/index.html +74 -142
  19. data/doc/js/darkfish.js +99 -62
  20. data/doc/js/jquery.js +15 -29
  21. data/doc/js/navigation.js +142 -0
  22. data/doc/js/search.js +94 -0
  23. data/doc/js/search_index.js +1 -0
  24. data/doc/js/searcher.js +228 -0
  25. data/doc/table_of_contents.html +226 -0
  26. data/lib/babel.rb +116 -50
  27. data/lib/custom_exceptions.rb +2 -2
  28. data/lib/exodus.rb +311 -0
  29. data/lib/exodus_task_info.rb +36 -0
  30. data/lib/neptune.rb +52 -18
  31. data/lib/{app_controller_client.rb → neptune_manager_client.rb} +54 -38
  32. data/lib/task_info.rb +155 -0
  33. data/test/{unit/test_babel.rb → test_babel.rb} +161 -26
  34. data/test/{unit/test_common_functions.rb → test_common_functions.rb} +1 -1
  35. data/test/test_exodus.rb +687 -0
  36. data/test/{unit/test_neptune.rb → test_neptune.rb} +28 -17
  37. data/test/{unit/test_app_controller_client.rb → test_neptune_manager_client.rb} +15 -16
  38. data/test/test_task_info.rb +32 -0
  39. data/test/{unit/ts_all.rb → ts_all.rb} +3 -1
  40. metadata +30 -34
  41. data/doc/AppControllerClient.html +0 -702
  42. data/doc/AppControllerException.html +0 -145
  43. data/doc/bin/neptune.html +0 -56
  44. data/doc/js/quicksearch.js +0 -114
  45. data/doc/js/thickbox-compressed.js +0 -10
  46. data/doc/lib/app_controller_client_rb.html +0 -60
  47. data/doc/lib/babel_rb.html +0 -68
  48. data/doc/lib/common_functions_rb.html +0 -70
  49. data/doc/lib/custom_exceptions_rb.html +0 -54
  50. data/doc/lib/neptune_rb.html +0 -60
  51. data/test/integration/tc_c.rb +0 -57
  52. data/test/integration/tc_dfsp.rb +0 -37
  53. data/test/integration/tc_dwssa.rb +0 -38
  54. data/test/integration/tc_erlang.rb +0 -183
  55. data/test/integration/tc_mapreduce.rb +0 -282
  56. data/test/integration/tc_mpi.rb +0 -160
  57. data/test/integration/tc_storage.rb +0 -209
  58. data/test/integration/tc_upc.rb +0 -75
  59. data/test/integration/tc_x10.rb +0 -94
  60. data/test/integration/test_helper.rb +0 -135
  61. data/test/integration/ts_neptune.rb +0 -40
@@ -0,0 +1,428 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class TaskInfo - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/task_info.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link"><a href="Object.html">Object</a>
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-c-new">::new</a>
74
+
75
+ <li><a href="#method-i-stderr">#stderr</a>
76
+
77
+ <li><a href="#method-i-stdout">#stdout</a>
78
+
79
+ <li><a href="#method-i-success-3F">#success?</a>
80
+
81
+ <li><a href="#method-i-to_json">#to_json</a>
82
+
83
+ <li><a href="#method-i-to_s">#to_s</a>
84
+
85
+ </ul>
86
+ </nav>
87
+
88
+ </div>
89
+
90
+ <div id="project-metadata">
91
+
92
+ <nav id="classindex-section" class="section project-section">
93
+ <h3 class="section-header">Class and Module Index</h3>
94
+
95
+ <ul class="link-list">
96
+
97
+ <li><a href="./BabelHelper.html">BabelHelper</a>
98
+
99
+ <li><a href="./BadConfigurationException.html">BadConfigurationException</a>
100
+
101
+ <li><a href="./CommonFunctions.html">CommonFunctions</a>
102
+
103
+ <li><a href="./ExodusHelper.html">ExodusHelper</a>
104
+
105
+ <li><a href="./ExodusTaskInfo.html">ExodusTaskInfo</a>
106
+
107
+ <li><a href="./FileNotFoundException.html">FileNotFoundException</a>
108
+
109
+ <li><a href="./NeptuneHelper.html">NeptuneHelper</a>
110
+
111
+ <li><a href="./NeptuneManagerClient.html">NeptuneManagerClient</a>
112
+
113
+ <li><a href="./NeptuneManagerException.html">NeptuneManagerException</a>
114
+
115
+ <li><a href="./Object.html">Object</a>
116
+
117
+ <li><a href="./TaskInfo.html">TaskInfo</a>
118
+
119
+ </ul>
120
+ </nav>
121
+
122
+ </div>
123
+ </nav>
124
+
125
+ <div id="documentation">
126
+ <h1 class="class">class TaskInfo</h1>
127
+
128
+ <div id="description" class="description">
129
+
130
+ <p><a href="TaskInfo.html">TaskInfo</a> represents the result of a babel call,
131
+ an object with all the information that the user would be interested in
132
+ relating to their task. At the simplest level, this is just the output of
133
+ their job, but it also can includes profiling information (e.g.,
134
+ performance and cost), as well as information that may help with debugging
135
+ (e.g. info about the environment we executed the task in).</p>
136
+
137
+ </div><!-- description -->
138
+
139
+
140
+
141
+
142
+ <section id="5Buntitled-5D" class="documentation-section">
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <!-- Attributes -->
151
+ <section id="attribute-method-details" class="method-section section">
152
+ <h3 class="section-header">Attributes</h3>
153
+
154
+
155
+ <div id="attribute-i-job_data" class="method-detail">
156
+ <div class="method-heading attribute-method-heading">
157
+ <span class="method-name">job_data</span><span
158
+ class="attribute-access-type">[RW]</span>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+
163
+ <p>A Hash consisting of the parameters that the user passed to babel().</p>
164
+
165
+ </div>
166
+ </div>
167
+
168
+ </section><!-- attribute-method-details -->
169
+
170
+
171
+ <!-- Methods -->
172
+
173
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
174
+ <h3 class="section-header">Public Instance Methods</h3>
175
+
176
+
177
+ <div id="method-i-stderr" class="method-detail ">
178
+
179
+ <div class="method-heading">
180
+ <span class="method-name">stderr</span><span
181
+ class="method-args">()</span>
182
+ <span class="method-click-advice">click to toggle source</span>
183
+ </div>
184
+
185
+
186
+ <div class="method-description">
187
+
188
+ <p>Returns a string with the standard error produced by this Babel task. While
189
+ all jobs should produce standard output, they may not produce standard
190
+ error, so it is reasonable that this could return an empty string to the
191
+ user.</p>
192
+
193
+
194
+
195
+ <div class="method-source-code" id="stderr-source">
196
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 85</span>
197
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">stderr</span>
198
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@error</span>.<span class="ruby-identifier">nil?</span>
199
+ <span class="ruby-ivar">@lock</span>.<span class="ruby-identifier">synchronize</span> {
200
+ <span class="ruby-ivar">@error</span> = <span class="ruby-constant">BabelHelper</span>.<span class="ruby-identifier">wait_and_get_output</span>(<span class="ruby-ivar">@job_data</span>, <span class="ruby-ivar">@job_data</span>[<span class="ruby-string">'@error'</span>])
201
+ }
202
+ <span class="ruby-keyword">end</span>
203
+
204
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@error</span>
205
+ <span class="ruby-keyword">end</span></pre>
206
+ </div><!-- stderr-source -->
207
+
208
+ </div>
209
+
210
+
211
+
212
+
213
+ </div><!-- stderr-method -->
214
+
215
+
216
+ <div id="method-i-stdout" class="method-detail ">
217
+
218
+ <div class="method-heading">
219
+ <span class="method-name">stdout</span><span
220
+ class="method-args">()</span>
221
+ <span class="method-click-advice">click to toggle source</span>
222
+ </div>
223
+
224
+
225
+ <div class="method-description">
226
+
227
+ <p>Returns a string with the standard output produced by this Babel task. If
228
+ the task has not yet completed, this call blocks until it completes.</p>
229
+
230
+
231
+
232
+ <div class="method-source-code" id="stdout-source">
233
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 69</span>
234
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">stdout</span>
235
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">nil?</span>
236
+ <span class="ruby-ivar">@lock</span>.<span class="ruby-identifier">synchronize</span> {
237
+ <span class="ruby-ivar">@output</span> = <span class="ruby-constant">BabelHelper</span>.<span class="ruby-identifier">wait_and_get_output</span>(<span class="ruby-ivar">@job_data</span>,
238
+ <span class="ruby-ivar">@job_data</span>[<span class="ruby-string">'@output'</span>])
239
+ }
240
+ <span class="ruby-keyword">end</span>
241
+
242
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@output</span>
243
+ <span class="ruby-keyword">end</span></pre>
244
+ </div><!-- stdout-source -->
245
+
246
+ </div>
247
+
248
+
249
+
250
+
251
+ </div><!-- stdout-method -->
252
+
253
+
254
+ <div id="method-i-success-3F" class="method-detail ">
255
+
256
+ <div class="method-heading">
257
+ <span class="method-name">success?</span><span
258
+ class="method-args">()</span>
259
+ <span class="method-click-advice">click to toggle source</span>
260
+ </div>
261
+
262
+
263
+ <div class="method-description">
264
+
265
+ <p>A common operation that users may perform is asking if the task executed
266
+ successfully, indicated by a return value of zero. This method provides a
267
+ quick alias for that functionality.</p>
268
+
269
+
270
+
271
+ <div class="method-source-code" id="success-3F-source">
272
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 105</span>
273
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">success?</span>
274
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">return_value</span>.<span class="ruby-identifier">zero?</span>
275
+ <span class="ruby-keyword">end</span></pre>
276
+ </div><!-- success-3F-source -->
277
+
278
+ </div>
279
+
280
+
281
+
282
+
283
+ </div><!-- success-3F-method -->
284
+
285
+
286
+ <div id="method-i-to_json" class="method-detail ">
287
+
288
+ <div class="method-heading">
289
+ <span class="method-name">to_json</span><span
290
+ class="method-args">()</span>
291
+ <span class="method-click-advice">click to toggle source</span>
292
+ </div>
293
+
294
+
295
+ <div class="method-description">
296
+
297
+ <p>Converts this object to JSON, so that it can be written to disk or passed
298
+ over the network. Since our stdout/stderr/metadata objects are all locally
299
+ cached, we don’t need to write them (and thus can potentially save a lot
300
+ of space).</p>
301
+
302
+
303
+
304
+ <div class="method-source-code" id="to_json-source">
305
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 114</span>
306
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_json</span>
307
+ <span class="ruby-keyword">return</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-ivar">@job_data</span>)
308
+ <span class="ruby-keyword">end</span></pre>
309
+ </div><!-- to_json-source -->
310
+
311
+ </div>
312
+
313
+
314
+
315
+
316
+ </div><!-- to_json-method -->
317
+
318
+
319
+ <div id="method-i-to_s" class="method-detail ">
320
+
321
+ <div class="method-heading">
322
+ <span class="method-name">to_s</span><span
323
+ class="method-args">()</span>
324
+ <span class="method-click-advice">click to toggle source</span>
325
+ </div>
326
+
327
+
328
+ <div class="method-description">
329
+
330
+ <p>An alias for stdout.</p>
331
+
332
+
333
+
334
+ <div class="method-source-code" id="to_s-source">
335
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 97</span>
336
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
337
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">stdout</span>
338
+ <span class="ruby-keyword">end</span></pre>
339
+ </div><!-- to_s-source -->
340
+
341
+ </div>
342
+
343
+
344
+
345
+
346
+ </div><!-- to_s-method -->
347
+
348
+
349
+ </section><!-- public-instance-method-details -->
350
+
351
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
352
+ <h3 class="section-header">Public Class Methods</h3>
353
+
354
+
355
+ <div id="method-c-new" class="method-detail ">
356
+
357
+ <div class="method-heading">
358
+ <span class="method-name">new</span><span
359
+ class="method-args">(job_data)</span>
360
+ <span class="method-click-advice">click to toggle source</span>
361
+ </div>
362
+
363
+
364
+ <div class="method-description">
365
+
366
+ <p>Creates a new <a href="TaskInfo.html">TaskInfo</a> object, storing the
367
+ parameters the user gave us to invoke the job for later use. The user can
368
+ give us a Hash containing the parameters that the job was started with, or
369
+ a String that is the JSON-dumped version of that data (also obtainable from
370
+ <a href="TaskInfo.html">TaskInfo</a> objects via <a
371
+ href="TaskInfo.html#method-i-to_json">#to_json</a>).</p>
372
+
373
+
374
+
375
+ <div class="method-source-code" id="new-source">
376
+ <pre><span class="ruby-comment"># File lib/task_info.rb, line 36</span>
377
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">job_data</span>)
378
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">job_data</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span>
379
+ <span class="ruby-keyword">begin</span>
380
+ <span class="ruby-identifier">job_data</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">job_data</span>)
381
+ <span class="ruby-keyword">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span>
382
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BadConfigurationException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;job data not JSONable&quot;</span>)
383
+ <span class="ruby-keyword">end</span>
384
+ <span class="ruby-keyword">end</span>
385
+
386
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">job_data</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Hash</span>
387
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BadConfigurationException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;job data not a Hash&quot;</span>)
388
+ <span class="ruby-keyword">end</span>
389
+ <span class="ruby-ivar">@job_data</span> = <span class="ruby-identifier">job_data</span>
390
+
391
+ <span class="ruby-comment"># To prevent us from repeatedly grabbing (potentially) large files over the</span>
392
+ <span class="ruby-comment"># network repeatedly, we keep a local, cached copy of the task's standard</span>
393
+ <span class="ruby-comment"># output, error, and metadata - initially empty, but pulled in the first</span>
394
+ <span class="ruby-comment"># time that the user asks for it. Since we expose this functionality through</span>
395
+ <span class="ruby-comment"># the accessor methods below, we should not use attr_accessor or attr_reader</span>
396
+ <span class="ruby-comment"># to directly expose this variables.</span>
397
+ <span class="ruby-ivar">@output</span> = <span class="ruby-keyword">nil</span>
398
+ <span class="ruby-ivar">@error</span> = <span class="ruby-keyword">nil</span>
399
+ <span class="ruby-ivar">@metadata</span> = <span class="ruby-keyword">nil</span>
400
+
401
+ <span class="ruby-comment"># To prevent concurrent threads from pulling in output multiple times, we</span>
402
+ <span class="ruby-comment"># guard access to remotely grabbing output/error/metadata with this</span>
403
+ <span class="ruby-comment"># lock.</span>
404
+ <span class="ruby-ivar">@lock</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
405
+ <span class="ruby-keyword">end</span></pre>
406
+ </div><!-- new-source -->
407
+
408
+ </div>
409
+
410
+
411
+
412
+
413
+ </div><!-- new-method -->
414
+
415
+
416
+ </section><!-- public-class-method-details -->
417
+
418
+ </section><!-- 5Buntitled-5D -->
419
+
420
+ </div><!-- documentation -->
421
+
422
+
423
+ <footer id="validator-badges">
424
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
425
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
426
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
427
+ </footer>
428
+
@@ -1,7 +1,10 @@
1
- Sun, 12 Feb 2012 16:40:58 -0800
1
+ Mon, 30 Jul 2012 17:12:01 -0700
2
2
  bin/neptune Sun, 12 Feb 2012 16:12:33 -0800
3
- lib/babel.rb Sun, 12 Feb 2012 16:35:05 -0800
4
- lib/neptune.rb Sun, 12 Feb 2012 16:34:30 -0800
5
- lib/custom_exceptions.rb Sun, 12 Feb 2012 16:18:29 -0800
6
- lib/app_controller_client.rb Sun, 12 Feb 2012 16:13:32 -0800
3
+ lib/exodus.rb Mon, 28 May 2012 21:02:31 -0700
4
+ lib/task_info.rb Mon, 28 May 2012 16:24:14 -0700
5
+ lib/babel.rb Mon, 30 Jul 2012 17:10:06 -0700
6
+ lib/neptune_manager_client.rb Mon, 04 Jun 2012 13:53:07 -0700
7
7
  lib/common_functions.rb Sun, 12 Feb 2012 16:18:14 -0800
8
+ lib/neptune.rb Mon, 30 Jul 2012 17:09:09 -0700
9
+ lib/custom_exceptions.rb Mon, 28 May 2012 16:23:52 -0700
10
+ lib/exodus_task_info.rb Mon, 28 May 2012 21:03:03 -0700
Binary file
Binary file
Binary file