class Hasta::CombinedStorage
The file storage interface used by the local map/reduce jobs
Attributes
local_storage[R]
s3_storage[R]
Public Class Methods
new(s3_storage, local_storage)
click to toggle source
# File lib/hasta/combined_storage.rb, line 9 def initialize(s3_storage, local_storage) @s3_storage = s3_storage @local_storage = local_storage end
Public Instance Methods
files_for(s3_uri)
click to toggle source
# File lib/hasta/combined_storage.rb, line 14 def files_for(s3_uri) if local_storage.exists?(s3_uri) local_storage.files_for(s3_uri) else s3_storage.files_for(s3_uri) end end
write(s3_uri, data_source)
click to toggle source
# File lib/hasta/combined_storage.rb, line 22 def write(s3_uri, data_source) local_storage.write(s3_uri, data_source) end