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:
RuntimeErrorUnspecified 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:
read_buffer – int32 view of the input stream to parse
last_event_index – index (in int32 words) of the end of the last complete item parsed, where parsing resumes
last_event_id – id of the event currently being parsed (0 means none seen yet)
max_cursor – number of valid int32 words in read_buffer, parsing stops before it
- Returns:
last_item_index] is a full event
- Return type:
last index parsed, last event idea parsed (0 means the chunk sub[
- 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) – fil_path to take as input
pipe_out (list) – fil_path to write the balanced events to
read_size (int) – size of the maximum amount of Byte read from one input at a time
write_size (int) – size of the maximum amount of Byte written to one output at a time
queue_size (int) – maximum size ofthe buffer queue