Class: MapRedus::Identity

Inherits:
Reducer show all
Defined in:
lib/mapredus/default_classes.rb

Overview

Emits the identity function on the map values.

The identity reducer should never actually have to reduce as a special class in mapredus, the values should just be copied from one key to a new key directly in redis.

Constant Summary

Constants inherited from Reducer

Reducer::DEFAULT_WAIT

Class Method Summary collapse

Methods inherited from Reducer

perform, wait

Methods inherited from QueueProcess

perform, queue

Class Method Details

.reduce(value_list) ⇒ Object



47
48
49
50
51
# File 'lib/mapredus/default_classes.rb', line 47

def self.reduce(value_list)
  value_list.each do |v|
    yield v 
  end
end

.reduce_perform(process, key) ⇒ Object



43
44
45
# File 'lib/mapredus/default_classes.rb', line 43

def self.reduce_perform(process, key)
  FileSystem.copy( process.map_key(key), process.reduce_key(key) )
end