Class: Pmux::Mapper
- Inherits:
-
Object
- Object
- Pmux::Mapper
- Defined in:
- lib/pmux/mapper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
-
#ifbase ⇒ Object
readonly
Returns the value of attribute ifbase.
-
#num_r ⇒ Object
Returns the value of attribute num_r.
-
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
Instance Method Summary collapse
- #do_map_task ⇒ Object
-
#initialize(task, tmp_dir, loop = nil) ⇒ Mapper
constructor
A new instance of Mapper.
- #result_body ⇒ Object
- #result_size ⇒ Object
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
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
6 7 8 |
# File 'lib/pmux/mapper.rb', line 6 def exitstatus @exitstatus end |
#ifbase ⇒ Object (readonly)
Returns the value of attribute ifbase.
5 6 7 |
# File 'lib/pmux/mapper.rb', line 5 def ifbase @ifbase end |
#num_r ⇒ Object
Returns the value of attribute num_r.
4 5 6 |
# File 'lib/pmux/mapper.rb', line 4 def num_r @num_r end |
#tmp_dir ⇒ Object
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_task ⇒ Object
26 |
# File 'lib/pmux/mapper.rb', line 26 def do_map_task; end |
#result_body ⇒ Object
28 |
# File 'lib/pmux/mapper.rb', line 28 def result_body; end |
#result_size ⇒ Object
27 |
# File 'lib/pmux/mapper.rb', line 27 def result_size; end |