Class: Pmux::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/pmux/mapper.rb

Direct Known Subclasses

StreamingMapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task, tmp_dir, loop = nil) ⇒ Mapper

Returns a new instance of Mapper.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/pmux/mapper.rb', line 8

def initialize task, tmp_dir, loop=nil
  @task = task
  @tmp_dir = tmp_dir
  @exitstatus = nil
  job_id, task_id, fusion_id =
    task.values_at 'job_id', 'task_id', 'fusion_id'
  @path = task['path']
  @num_r = task['num_r'] || 0
  @loop = loop
  @on_receive = nil
  @on_success = nil
  @on_error = nil
  if false
  else
    @ifbase = "#{tmp_dir}/m#{fusion_id or task_id}"
  end
end

Instance Attribute Details

#exitstatusObject (readonly)

Returns the value of attribute exitstatus.



6
7
8
# File 'lib/pmux/mapper.rb', line 6

def exitstatus
  @exitstatus
end

#ifbaseObject (readonly)

Returns the value of attribute ifbase.



5
6
7
# File 'lib/pmux/mapper.rb', line 5

def ifbase
  @ifbase
end

#num_rObject

Returns the value of attribute num_r.



4
5
6
# File 'lib/pmux/mapper.rb', line 4

def num_r
  @num_r
end

#tmp_dirObject

Returns the value of attribute tmp_dir.



3
4
5
# File 'lib/pmux/mapper.rb', line 3

def tmp_dir
  @tmp_dir
end

Instance Method Details

#do_map_taskObject



26
# File 'lib/pmux/mapper.rb', line 26

def do_map_task; end

#result_bodyObject



28
# File 'lib/pmux/mapper.rb', line 28

def result_body; end

#result_sizeObject



27
# File 'lib/pmux/mapper.rb', line 27

def result_size; end