Class: Fairy::CSegSplit
- Defined in:
- lib/fairy/master/c-seg-split.rb
Instance Attribute Summary
Attributes inherited from CIOFilter
Attributes included from CInputtable
Instance Method Summary collapse
-
#each_export_by(njob, mapper, &block) ⇒ Object
Log::debug(self, “START_EXPORT: #expexp.class #href="exp">export2njob.class”) njob.start_export Log::debug(self, “START_EXPORT:EE”) exp end.
-
#initialize(controller, opts, n) ⇒ CSegSplit
constructor
DeepConnect.def_single_method_spec(self, “REF new(REF, VAL, VAL)”).
- #njob_creation_params ⇒ Object
-
#node_class_name ⇒ Object
def each_export(&block) each_node do |node| for exp in node.exports exp.no = @no_of_exports @no_of_exports += 1 block.call exp, node exp.output_no_import = 1 end end end.
Methods inherited from CIOFilter
Methods included from CInputtable
Methods inherited from CFilter
#abort_create_node, #add_node, #assgin_number_of_nodes?, #bind_export, #break_create_node, #break_running, #create_and_add_node, #create_import, #create_node, #create_nodes, #def_job_pool_variable, #each_assigned_filter, #each_node, #each_node_exist_only, #handle_exception, #input, #job_pool_dict, #job_pool_variable, #nodes, #number_of_nodes, #number_of_nodes=, #pool_dict, #postmapping_policy, #start_create_nodes, #start_export, #start_watch_node_status, #update_status, watch_status, watch_status=, #watch_status?
Constructor Details
#initialize(controller, opts, n) ⇒ CSegSplit
DeepConnect.def_single_method_spec(self, “REF new(REF, VAL, VAL)”)
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fairy/master/c-seg-split.rb', line 15 def initialize(controller, opts, n) super @no_split = n @no_of_exports = 0 @no_of_exports_mutex = Mutex.new # @exports = [] # @exports_mutex = Mutex.new # @exports_cv = XThread::ConditionVariable.new # @export2njob = {} # @exports_queue = Queue.new end |
Instance Method Details
#each_export_by(njob, mapper, &block) ⇒ Object
Log::debug(self, “START_EXPORT: #Fairy::CSegSplit.expexp.class #href="exp">export2njob.class”)
njob.start_export
Log::debug(self, “START_EXPORT:EE”)
exp
end
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/fairy/master/c-seg-split.rb', line 79 def each_export_by(njob, mapper, &block) njob.exports.each do |exp| @no_of_exports_mutex.synchronize do exp.no = @no_of_exports # exp.key = njob.key @no_of_exports += 1 end block.call exp end end |
#njob_creation_params ⇒ Object
106 107 108 |
# File 'lib/fairy/master/c-seg-split.rb', line 106 def njob_creation_params [@no_split] end |
#node_class_name ⇒ Object
def each_export(&block)
each_node do |node|
for exp in node.exports exp.no = @no_of_exports @no_of_exports += 1 block.call exp, node exp.output_no_import = 1 end
end
end
102 103 104 |
# File 'lib/fairy/master/c-seg-split.rb', line 102 def node_class_name "PSegSplit" end |