Class: Pmux::Reducer
- Inherits:
-
Object
- Object
- Pmux::Reducer
- Defined in:
- lib/pmux/reducer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
Instance Method Summary collapse
- #do_reduce_task ⇒ Object
-
#initialize(task, tmp_dir, loop = nil) ⇒ Reducer
constructor
A new instance of Reducer.
Constructor Details
#initialize(task, tmp_dir, loop = nil) ⇒ Reducer
Returns a new instance of Reducer.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/pmux/reducer.rb', line 6 def initialize task, tmp_dir, loop=nil @task = task @tmp_dir = tmp_dir @loop = loop @paths = Dir.glob("#{tmp_dir}/t*-#{task['pindex']}") @output_path = nil @on_receive = nil @on_success = nil @on_error = nil raise RuntimeError, 'no input files' if @paths.empty? end |
Instance Attribute Details
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
3 4 5 |
# File 'lib/pmux/reducer.rb', line 3 def exitstatus @exitstatus end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
3 4 5 |
# File 'lib/pmux/reducer.rb', line 3 def output_path @output_path end |
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
4 5 6 |
# File 'lib/pmux/reducer.rb', line 4 def tmp_dir @tmp_dir end |
Instance Method Details
#do_reduce_task ⇒ Object
18 |
# File 'lib/pmux/reducer.rb', line 18 def do_reduce_task; end |