starfish 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/LICENSE +10 -0
  2. data/README +136 -0
  3. data/Rakefile +89 -0
  4. data/bin/starfish +27 -0
  5. data/doc/classes/MapReduce/ActiveRecord/Base/Client.html +177 -0
  6. data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000016.html +19 -0
  7. data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000017.html +20 -0
  8. data/doc/classes/MapReduce/ActiveRecord/Base/Client.src/M000018.html +18 -0
  9. data/doc/classes/MapReduce/ActiveRecord/Base.html +170 -0
  10. data/doc/classes/MapReduce/ActiveRecord/Base.src/M000015.html +39 -0
  11. data/doc/classes/MapReduce/ActiveRecord.html +111 -0
  12. data/doc/classes/MapReduce/Array.html +105 -0
  13. data/doc/classes/MapReduce/File.html +105 -0
  14. data/doc/classes/MapReduce.html +395 -0
  15. data/doc/classes/MapReduce.src/M000001.html +31 -0
  16. data/doc/classes/MapReduce.src/M000002.html +18 -0
  17. data/doc/classes/MapReduce.src/M000003.html +25 -0
  18. data/doc/classes/MapReduce.src/M000004.html +21 -0
  19. data/doc/classes/MapReduce.src/M000005.html +18 -0
  20. data/doc/classes/MapReduce.src/M000006.html +18 -0
  21. data/doc/classes/MapReduce.src/M000007.html +19 -0
  22. data/doc/classes/MapReduce.src/M000008.html +18 -0
  23. data/doc/classes/MapReduce.src/M000009.html +19 -0
  24. data/doc/classes/MapReduce.src/M000010.html +23 -0
  25. data/doc/classes/MapReduce.src/M000011.html +24 -0
  26. data/doc/classes/MapReduce.src/M000012.html +23 -0
  27. data/doc/classes/MapReduce.src/M000013.html +18 -0
  28. data/doc/classes/MapReduce.src/M000014.html +26 -0
  29. data/doc/classes/MapReduceError.html +111 -0
  30. data/doc/classes/Starfish/RingFinger.html +131 -0
  31. data/doc/classes/Starfish/RingFinger.src/M000031.html +20 -0
  32. data/doc/classes/Starfish.html +357 -0
  33. data/doc/classes/Starfish.src/M000019.html +19 -0
  34. data/doc/classes/Starfish.src/M000020.html +18 -0
  35. data/doc/classes/Starfish.src/M000021.html +45 -0
  36. data/doc/classes/Starfish.src/M000022.html +71 -0
  37. data/doc/classes/Starfish.src/M000023.html +23 -0
  38. data/doc/classes/Starfish.src/M000024.html +36 -0
  39. data/doc/classes/Starfish.src/M000025.html +35 -0
  40. data/doc/classes/Starfish.src/M000026.html +18 -0
  41. data/doc/classes/Starfish.src/M000027.html +22 -0
  42. data/doc/classes/Starfish.src/M000028.html +18 -0
  43. data/doc/classes/Starfish.src/M000029.html +18 -0
  44. data/doc/classes/Starfish.src/M000030.html +18 -0
  45. data/doc/classes/StarfishError.html +111 -0
  46. data/doc/created.rid +1 -0
  47. data/doc/files/README.html +336 -0
  48. data/doc/files/lib/map_reduce/active_record_rb.html +109 -0
  49. data/doc/files/lib/map_reduce/array_rb.html +101 -0
  50. data/doc/files/lib/map_reduce/file_rb.html +101 -0
  51. data/doc/files/lib/map_reduce_rb.html +111 -0
  52. data/doc/files/lib/starfish_rb.html +114 -0
  53. data/doc/fr_class_index.html +36 -0
  54. data/doc/fr_file_index.html +32 -0
  55. data/doc/fr_method_index.html +57 -0
  56. data/doc/index.html +24 -0
  57. data/doc/rdoc-style.css +208 -0
  58. data/examples/foo.rb +20 -0
  59. data/examples/map_reduce/active_record.rb +10 -0
  60. data/examples/map_reduce/file.rb +11 -0
  61. data/lib/map_reduce/active_record.rb +98 -0
  62. data/lib/map_reduce/array.rb +4 -0
  63. data/lib/map_reduce/file.rb +4 -0
  64. data/lib/map_reduce.rb +121 -0
  65. data/lib/starfish.rb +200 -0
  66. metadata +124 -0
data/LICENSE ADDED
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2006, Lucas Carlson
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+ Neither the name of the Lucas Carlson nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10
+
data/README ADDED
@@ -0,0 +1,136 @@
1
+ == Welcome to Starfish
2
+
3
+ Starfish is a utility born from abstracting code from a highly popular website (http://mog.com) to make distributed programming ridiculously easy.
4
+
5
+ == Download
6
+
7
+ * gem install starfish
8
+ * http://rubyforge.org/projects/starfish
9
+ * svn co svn://rubyforge.org//var/svn/starfish
10
+
11
+ == Usage
12
+
13
+ Make a file and define the server and client. What follows is a simple example:
14
+
15
+ # foo.rb
16
+ class Foo
17
+ attr_reader :i
18
+
19
+ def initialize
20
+ @i = 0
21
+ end
22
+
23
+ def inc
24
+ logger.info "YAY it incremented by 1 up to #{@i}"
25
+ @i += 1
26
+ end
27
+ end
28
+
29
+ server do |object|
30
+ object = Foo.new
31
+ end
32
+
33
+ client do |object|
34
+ object.inc
35
+ end
36
+
37
+ Notice that you need not specify any network code, nor learn a foreign API like DRb or Rinda. You need not even define logger, starfish takes care of it for you at runtime. You just tell it how to serve an object and how to process the object. To run this code, simply run:
38
+
39
+ starfish foo.rb
40
+
41
+ This starts a server AND a client to start processing that object. The client runs in a continuous loop. If you call starfish foo.rb subsequent times from either the local machine or any machine on the local network, more clients will start processing the server concurrently.
42
+
43
+ By default, the server will start a log file at /tmp/foo.rb.log. You can override this behaviour.
44
+
45
+ server :log => "/var/log/foo.log" do |object|
46
+ object = Foo.new
47
+ end
48
+
49
+ The :log parameter is intelligent and can take various other formats including nil for no logging or instances of any kind of logger class you prefer to use.
50
+
51
+ == MapReduce
52
+
53
+ The crown jewel of Starfish is actually a library built on Starfish called MapReduce. Inspired by Google's MapReduce (http://en.wikipedia.org/wiki/MapReduce), it automates the process of divide and conquer for large data sets. Currently, Starfish's implementation only works with the ActiveRecord ORM from Ruby on Rails. The idea is that you have a very large data set that would be unmanageable to process otherwise. For example, let's say your database table has 30GB of information in it. It would be very difficult to keep 30GB of records in RAM at one time; even if you processed them serially, it would take a very long time. The idea is to have many clients grabbing chunks of the database at a time making much faster work, even on a single processor machine, than would otherwise be feasible.
54
+
55
+ Here is the basic code that will get you up and running with MapReduce in Starfish.
56
+
57
+ # item.rb
58
+ ActiveRecord::Base.establish_connection(
59
+ :adapter => "mysql",
60
+ :host => "localhost",
61
+ :username => "root",
62
+ :password => "",
63
+ :database => "some_database"
64
+ )
65
+
66
+ class Item < ActiveRecord::Base; end
67
+
68
+ server do |map_reduce|
69
+ map_reduce.type = Item
70
+ end
71
+
72
+ client do |item|
73
+ logger.info item.id
74
+ end
75
+
76
+ Just like the previous example, just run:
77
+
78
+ starfish item.rb
79
+
80
+ Starfish takes care of the rest. The code above does the following:
81
+
82
+ * The server grabs all the items via: Item.find(:all)
83
+ * Each of the clients grab an item from the collection
84
+ * When there are no more items to be grabbed, everything shuts down
85
+
86
+ However there are cases when you might want some fancier behaviour.
87
+
88
+ server do |map_reduce|
89
+ map_reduce.type = Item
90
+ map_reduce.conditions = ["some_important_flag = ?", 1]
91
+ map_reduce.vigilant = true
92
+ map_reduce.queue_size = 1000
93
+ end
94
+
95
+ Here are three new options: conditions, vigilant, and queue_size. Conditions simply limits what is grabbed via ActiveRecord. It is equivalent to saying: Item.find(:all, :conditions => ["some_important_flag = ?", 1]). Vigilant simply keeps the clients alive and when Item.find(:all) runs out of items, it will vigilantly poll for newly created items periodically. Queue size specifies the number of items buffered in the server queue. In the case of the 30GB database table, you do not want to grab all 30GB at once, instead you grab 1000 at a time as needed by your clients.
96
+
97
+ Another options you have when you use the vigilant option is map_reduce.empty_queue_wait which specifies how long to wait between polls for new information.
98
+
99
+ There is yet a third main run-mode for MapReduce under ActiveRecord.
100
+
101
+ server do |map_reduce|
102
+ map_reduce.type = Item
103
+ map_reduce.rescan_when_complete = true
104
+ end
105
+
106
+ The events follow like this when the rescan_when_complete option is enabled:
107
+
108
+ * The server grabs all the items via: Item.find(:all)
109
+ * Each of the clients grab an item from the collection
110
+ * When there are no more items to be grabbed, the queue is re-filled via Item.find(:all) and the process starts again
111
+
112
+ If you need to continuously check over data for integrity, this option will meet your demands.
113
+
114
+ Another bonus you get while using MapReduce is automatic statistics. Simply call:
115
+
116
+ starfish item.rb stats
117
+
118
+ And you will be returned a YAML hash of statistics.
119
+
120
+ ---
121
+ time_spent_grabbing_objects: 0.090328
122
+ time_spent_processing_objects: 0.023431
123
+ time_began: 2006-08-16 09:30:32.926399 -07:00
124
+ num_queues_grabbed: 5
125
+ time_spent_grabbing_queues: 0.090328
126
+ num_objects_grabbed: 10
127
+
128
+ == Examples
129
+
130
+ See the examples/ directory.
131
+
132
+ == Authors
133
+ * Lucas Carlson from MOG (mailto:lucas@rufy.com) - http://mog.com
134
+
135
+ This library is released under the terms of the BSD.
136
+
data/Rakefile ADDED
@@ -0,0 +1,89 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rake/rdoctask'
5
+ require 'rake/gempackagetask'
6
+ require 'rake/contrib/rubyforgepublisher'
7
+ require 'lib/starfish'
8
+
9
+ PKG_VERSION = Starfish::VERSION
10
+
11
+ PKG_FILES = FileList[
12
+ "lib/**/*", "bin/*", "test/**/*", "[A-Z]*", "Rakefile", "doc/**/*", "examples/**/*"
13
+ ]
14
+
15
+ desc "Default Task"
16
+ task :default => [ :test ]
17
+
18
+ # Run the unit tests
19
+ desc "Run all unit tests"
20
+ Rake::TestTask.new("test") { |t|
21
+ t.libs << "lib"
22
+ t.pattern = 'test/*/*_test.rb'
23
+ t.verbose = true
24
+ }
25
+
26
+ # Make a console, useful when working on tests
27
+ desc "Generate a test console"
28
+ task :console do
29
+ verbose( false ) { sh "irb -I lib/ -r 'starfish'" }
30
+ end
31
+
32
+ # Genereate the RDoc documentation
33
+ desc "Create documentation"
34
+ Rake::RDocTask.new("doc") { |rdoc|
35
+ rdoc.title = "Starfish - ridiculously easy distributed programming with Ruby"
36
+ rdoc.rdoc_dir = 'doc'
37
+ rdoc.rdoc_files.include('README')
38
+ rdoc.rdoc_files.include('lib/**/*.rb')
39
+ }
40
+
41
+ # Genereate the package
42
+ spec = Gem::Specification.new do |s|
43
+
44
+ #### Basic information.
45
+
46
+ s.name = 'starfish'
47
+ s.version = PKG_VERSION
48
+ s.summary = <<-EOF
49
+ Starfish is a utility to make distributed programming ridiculously easy.
50
+ EOF
51
+ s.description = <<-EOF
52
+ Starfish is a utility to make distributed programming ridiculously easy.
53
+ EOF
54
+
55
+ #### Which files are to be included in this gem? Everything! (Except CVS directories.)
56
+
57
+ s.files = PKG_FILES
58
+
59
+ #### Load-time details: library and application (you will need one or both).
60
+
61
+ s.bindir = 'bin'
62
+ s.executables = ['starfish']
63
+ s.require_path = 'lib'
64
+ s.autorequire = 'starfish'
65
+
66
+ #### Documentation and testing.
67
+
68
+ s.has_rdoc = true
69
+
70
+ #### Author and project details.
71
+
72
+ s.author = "Lucas Carlson"
73
+ s.email = "lucas@rufy.com"
74
+ s.homepage = "http://rubyforge.org/projects/starfish"
75
+ end
76
+
77
+ Rake::GemPackageTask.new(spec) do |pkg|
78
+ pkg.need_zip = true
79
+ pkg.need_tar = true
80
+ end
81
+
82
+ desc "Report code statistics (KLOCs, etc) from the application"
83
+ task :stats do
84
+ require 'code_statistics'
85
+ CodeStatistics.new(
86
+ ["Library", "lib"],
87
+ ["Units", "test"]
88
+ ).to_s
89
+ end
data/bin/starfish ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift(File.dirname(__FILE__)+'/../lib') unless
3
+ $:.include?(File.dirname(__FILE__)+'/../lib') || $:.include?(File.expand_path(File.dirname(__FILE__)+'/../lib'))
4
+
5
+ require 'starfish'
6
+
7
+ def server(options={}, &block)
8
+ Starfish.options = options
9
+ Starfish.server = block
10
+ end
11
+
12
+ def client(options={}, &block)
13
+ Starfish.options = options
14
+ Starfish.client = block
15
+ end
16
+
17
+ require ARGV.first
18
+
19
+ if ARGV.include?('stop')
20
+ Starfish.new.stop
21
+ elsif ARGV.include?('server')
22
+ Starfish.new.server
23
+ elsif ARGV.include?('stats')
24
+ Starfish.new.stats
25
+ else
26
+ Starfish.new.client
27
+ end
@@ -0,0 +1,177 @@
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::ActiveRecord::Base::Client</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::ActiveRecord::Base::Client</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/map_reduce/active_record_rb.html">
59
+ lib/map_reduce/active_record.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000017">each</a>&nbsp;&nbsp;
90
+ <a href="#M000018">logger</a>&nbsp;&nbsp;
91
+ <a href="#M000016">new</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+ <div id="includes">
100
+ <h3 class="section-bar">Included Modules</h3>
101
+
102
+ <div id="includes-list">
103
+ <span class="include-name">DRbUndumped</span>
104
+ <span class="include-name">Enumerable</span>
105
+ </div>
106
+ </div>
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+ <div id="methods">
119
+ <h3 class="section-bar">Public Class methods</h3>
120
+
121
+ <div id="method-M000016" class="method-detail">
122
+ <a name="M000016"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="Client.src/M000016.html" target="Code" class="method-signature"
126
+ onclick="popupCode('Client.src/M000016.html');return false;">
127
+ <span class="method-name">new</span><span class="method-args">(server_object)</span>
128
+ </a>
129
+ </div>
130
+
131
+ <div class="method-description">
132
+ </div>
133
+ </div>
134
+
135
+ <h3 class="section-bar">Public Instance methods</h3>
136
+
137
+ <div id="method-M000017" class="method-detail">
138
+ <a name="M000017"></a>
139
+
140
+ <div class="method-heading">
141
+ <a href="Client.src/M000017.html" target="Code" class="method-signature"
142
+ onclick="popupCode('Client.src/M000017.html');return false;">
143
+ <span class="method-name">each</span><span class="method-args">() {|get_value_from(@server_object.get_id)| ...}</span>
144
+ </a>
145
+ </div>
146
+
147
+ <div class="method-description">
148
+ </div>
149
+ </div>
150
+
151
+ <div id="method-M000018" class="method-detail">
152
+ <a name="M000018"></a>
153
+
154
+ <div class="method-heading">
155
+ <a href="Client.src/M000018.html" target="Code" class="method-signature"
156
+ onclick="popupCode('Client.src/M000018.html');return false;">
157
+ <span class="method-name">logger</span><span class="method-args">(*args)</span>
158
+ </a>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+ </div>
163
+ </div>
164
+
165
+
166
+ </div>
167
+
168
+
169
+ </div>
170
+
171
+
172
+ <div id="validator-badges">
173
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
174
+ </div>
175
+
176
+ </body>
177
+ </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>new (MapReduce::ActiveRecord::Base::Client)</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/active_record.rb, line 14</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server_object</span>)
15
+ <span class="ruby-ivar">@server_object</span> = <span class="ruby-identifier">server_object</span>
16
+ <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">server_object</span>.<span class="ruby-identifier">type_to_s</span>)
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,20 @@
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>each (MapReduce::ActiveRecord::Base::Client)</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/active_record.rb, line 19</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>
15
+ <span class="ruby-ivar">@server_object</span>.<span class="ruby-identifier">limit</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
16
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">get_value_from</span>(<span class="ruby-ivar">@server_object</span>.<span class="ruby-identifier">get_id</span>)
17
+ <span class="ruby-keyword kw">end</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </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>logger (MapReduce::ActiveRecord::Base::Client)</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/active_record.rb, line 25</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logger</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
+ <span class="ruby-ivar">@server_object</span>.<span class="ruby-identifier">logger</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,170 @@
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>Module: MapReduce::ActiveRecord::Base</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>Module</strong></td>
53
+ <td class="class-name-in-header">MapReduce::ActiveRecord::Base</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/map_reduce/active_record_rb.html">
59
+ lib/map_reduce/active_record.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000015">get_id</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+ <div id="class-list">
95
+ <h3 class="section-bar">Classes and Modules</h3>
96
+
97
+ Class <a href="Base/Client.html" class="link">MapReduce::ActiveRecord::Base::Client</a><br />
98
+
99
+ </div>
100
+
101
+
102
+
103
+
104
+ <div id="attribute-list">
105
+ <h3 class="section-bar">Attributes</h3>
106
+
107
+ <div class="name-list">
108
+ <table>
109
+ <tr class="top-aligned-row context-row">
110
+ <td class="context-item-name">empty_queue_wait</td>
111
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
112
+ <td class="context-item-desc"></td>
113
+ </tr>
114
+ <tr class="top-aligned-row context-row">
115
+ <td class="context-item-name">locked_queue_wait</td>
116
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
117
+ <td class="context-item-desc"></td>
118
+ </tr>
119
+ <tr class="top-aligned-row context-row">
120
+ <td class="context-item-name">queue_size</td>
121
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
122
+ <td class="context-item-desc"></td>
123
+ </tr>
124
+ <tr class="top-aligned-row context-row">
125
+ <td class="context-item-name">rescan_when_complete</td>
126
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
127
+ <td class="context-item-desc"></td>
128
+ </tr>
129
+ <tr class="top-aligned-row context-row">
130
+ <td class="context-item-name">vigilant</td>
131
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
132
+ <td class="context-item-desc"></td>
133
+ </tr>
134
+ </table>
135
+ </div>
136
+ </div>
137
+
138
+
139
+
140
+ <!-- if method_list -->
141
+ <div id="methods">
142
+ <h3 class="section-bar">Public Instance methods</h3>
143
+
144
+ <div id="method-M000015" class="method-detail">
145
+ <a name="M000015"></a>
146
+
147
+ <div class="method-heading">
148
+ <a href="Base.src/M000015.html" target="Code" class="method-signature"
149
+ onclick="popupCode('Base.src/M000015.html');return false;">
150
+ <span class="method-name">get_id</span><span class="method-args">()</span>
151
+ </a>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+ </div>
156
+ </div>
157
+
158
+
159
+ </div>
160
+
161
+
162
+ </div>
163
+
164
+
165
+ <div id="validator-badges">
166
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
167
+ </div>
168
+
169
+ </body>
170
+ </html>