oasislmf.execution.load_balancer¶
Attributes¶
Exceptions¶
Unspecified run-time error. |
Functions¶
|
try to get the index of the end of the event |
|
|
|
|
|
|
|
Load balance events for a list of input fil_path to a list of output fil_path |
|
Module Contents¶
- exception oasislmf.execution.load_balancer.ProducerStopped[source]¶
Bases:
RuntimeError
Unspecified run-time error.
- oasislmf.execution.load_balancer.get_next_event_index(read_buffer, last_event_index, last_event_id, max_cursor)[source]¶
try to get the index of the end of the event if found return the index and 0 to indicate it is found if not found return the index of the last item parsed and the last event id
- Parameters:
sub – byte array to parse
last_item_index – last index parsed
last_event_id – last event idea parsed (0 means no event)
- Returns:
last index parsed, last event idea parsed (0 means the chunk sub[:last_item_index] is a full event
- oasislmf.execution.load_balancer.consumer(out_stream, pipeline, write_size, sentinel, stopper)[source]¶
- oasislmf.execution.load_balancer.balance(pipe_in, pipe_out, read_size, write_size, queue_size)[source]¶
Load balance events for a list of input fil_path to a list of output fil_path
- Parameters:
pipe_in – list of fil_path fil_path to take as input
pipe_out – list of fil_path fil_path to take as input
read_size – int size of the maximum amount of Byte read from one input at a time
queue_size – int maximum size ofthe buffer queue