Class: Fairy::CWC::CPostFilter

Inherits:
Fairy::CIOFilter show all
Defined in:
lib/fairy/master/c-wc.rb

Instance Attribute Summary collapse

Attributes inherited from Fairy::CIOFilter

#input

Attributes included from Fairy::CInputtable

#input

Instance Method Summary collapse

Methods inherited from Fairy::CIOFilter

#node_class, #output=

Methods included from Fairy::CInputtable

#break_running, #inputtable?

Methods inherited from Fairy::CFilter

#abort_create_node, #add_node, #assgin_number_of_nodes?, #bind_export, #break_create_node, #break_running, #create_and_add_node, #create_node, #create_nodes, #def_job_pool_variable, #each_assigned_filter, #each_export_by, #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) ⇒ CPostFilter

Returns a new instance of CPostFilter.



181
182
183
184
185
# File 'lib/fairy/master/c-wc.rb', line 181

def initialize(controller, opts)
	super

	@hash_seed = controller.hash_seed
end

Instance Attribute Details

#hash_seedObject (readonly)

Returns the value of attribute hash_seed.



187
188
189
# File 'lib/fairy/master/c-wc.rb', line 187

def hash_seed
  @hash_seed
end

Instance Method Details

#all_node_outputted?Boolean

Returns:

  • (Boolean)


221
222
223
224
225
226
227
228
229
230
231
# File 'lib/fairy/master/c-wc.rb', line 221

def all_node_outputted?

	return false unless @number_of_nodes

	all_outputted = true
	each_node(:exist_only) do |node|
	  st = @nodes_status[node]
	  all_outputted &&= [:ST_FINISH, :ST_OUTPUT_FINISH].include?(st)
	end
	all_outputted
end

#create_import(processor) ⇒ Object



205
206
207
208
209
210
# File 'lib/fairy/master/c-wc.rb', line 205

def create_import(processor)
	policy = @opts[:postfilter_prequeuing_policy]
	policy ||= @opts[:prequeuing_policy]
	
	processor.create_import(policy)
end

#njob_creation_paramsObject



193
194
195
# File 'lib/fairy/master/c-wc.rb', line 193

def njob_creation_params
	[@vfile]
end

#node_class_nameObject



189
190
191
# File 'lib/fairy/master/c-wc.rb', line 189

def node_class_name
	"PWC::PPostFilter"
end

#output(vf) ⇒ Object



197
198
199
# File 'lib/fairy/master/c-wc.rb', line 197

def output(vf)
	@vfile = vf
end

#wait_all_output_finishedObject



213
214
215
216
217
218
219
# File 'lib/fairy/master/c-wc.rb', line 213

def wait_all_output_finished
	@nodes_status_mutex.synchronize do
	  while !all_node_outputted?
	    @nodes_status_cv.wait(@nodes_status_mutex)
	  end
	end
end