use of org.apache.flink.streaming.api.operators.async.queue.UnorderedStreamElementQueue in project flink by apache.
the class AsyncWaitOperator method setup.
@Override
public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output) {
super.setup(containingTask, config, output);
this.checkpointingLock = getContainingTask().getCheckpointLock();
this.inStreamElementSerializer = new StreamElementSerializer<>(getOperatorConfig().<IN>getTypeSerializerIn1(getUserCodeClassloader()));
// create the operators executor for the complete operations of the queue entries
this.executor = Executors.newSingleThreadExecutor();
switch(outputMode) {
case ORDERED:
queue = new OrderedStreamElementQueue(capacity, executor, this);
break;
case UNORDERED:
queue = new UnorderedStreamElementQueue(capacity, executor, this);
break;
default:
throw new IllegalStateException("Unknown async mode: " + outputMode + '.');
}
}
Aggregations