Search in sources :

Example 1 with OperatorEventHandler

use of org.apache.flink.runtime.operators.coordination.OperatorEventHandler in project flink by apache.

the class OperatorEventDispatcherImpl method dispatchEventToHandlers.

void dispatchEventToHandlers(OperatorID operatorID, SerializedValue<OperatorEvent> serializedEvent) throws FlinkException {
    final OperatorEvent evt;
    try {
        evt = serializedEvent.deserializeValue(classLoader);
    } catch (IOException | ClassNotFoundException e) {
        throw new FlinkException("Could not deserialize operator event", e);
    }
    final OperatorEventHandler handler = handlers.get(operatorID);
    if (handler != null) {
        handler.handleOperatorEvent(evt);
    } else {
        throw new FlinkException("Operator not registered for operator events");
    }
}
Also used : OperatorEventHandler(org.apache.flink.runtime.operators.coordination.OperatorEventHandler) OperatorEvent(org.apache.flink.runtime.operators.coordination.OperatorEvent) IOException(java.io.IOException) FlinkException(org.apache.flink.util.FlinkException)

Aggregations

IOException (java.io.IOException)1 OperatorEvent (org.apache.flink.runtime.operators.coordination.OperatorEvent)1 OperatorEventHandler (org.apache.flink.runtime.operators.coordination.OperatorEventHandler)1 FlinkException (org.apache.flink.util.FlinkException)1