Class: MrMongo::Application

Inherits:
Thor
  • Object
show all
Defined in:
lib/mr_mongo/application.rb

Constant Summary collapse

DEFAULT_URI =
'mongodb://localhost:27017/test'

Instance Method Summary collapse

Instance Method Details

#exec(*files) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/mr_mongo/application.rb', line 13

def exec(*files)
  files.each do |file|
    puts "Executing #{file}..."
    pp loader.load(file).exec
    puts
  end

  puts "Finished MapReduce execution."
end

#exec_on_memory(*files) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/mr_mongo/application.rb', line 26

def exec_on_memory(*files)
  files.each do |file|
    puts "Executing #{file} on memory..."
    pp loader.load(file).exec_on_memory
    puts
  end

  puts "Finished MapReduce execution (on memory)."
end