Method: Nodule::Cassandra#run
- Defined in:
- lib/nodule/cassandra.rb
#run ⇒ Object
Run the download or untar the cached tarball. Configure then start Cassandra.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/nodule/cassandra.rb', line 184 def run FileUtils.mkdir_p @data FileUtils.mkdir_p @caches FileUtils.mkdir_p @commit cached = CACHEDIRS.select { |path| File.exists? File.join(path, TARBALL) } if cached.any? untar! File.join(cached.first, TARBALL) else file = cache_tarball! download untar! file end configure! # will start Cassandra process super # wait for Cassandra to say it's ready @mutex.synchronize do @cv.wait @mutex end end |