Search in sources :

Example 1 with TimerHandler

use of org.apache.flink.streaming.api.operators.python.timer.TimerHandler in project flink by apache.

the class PythonKeyedProcessOperator method open.

@Override
public void open() throws Exception {
    internalTimerService = getInternalTimerService("user-timers", namespaceSerializer, this);
    keyTypeInfo = new RowTypeInfo(((RowTypeInfo) this.getInputTypeInfo()).getTypeAt(0));
    keyTypeSerializer = PythonTypeUtils.TypeInfoToSerializerConverter.typeInfoSerializerConverter(keyTypeInfo);
    timerDataTypeInfo = createTimerDataTypeInfo(keyTypeInfo);
    timerDataSerializer = PythonTypeUtils.TypeInfoToSerializerConverter.typeInfoSerializerConverter(timerDataTypeInfo);
    timerHandler = new TimerHandler();
    super.open();
}
Also used : TimerHandler(org.apache.flink.streaming.api.operators.python.timer.TimerHandler) RowTypeInfo(org.apache.flink.api.java.typeutils.RowTypeInfo)

Example 2 with TimerHandler

use of org.apache.flink.streaming.api.operators.python.timer.TimerHandler in project flink by apache.

the class PythonKeyedCoProcessOperator method open.

@Override
public void open() throws Exception {
    internalTimerService = getInternalTimerService("user-timers", VoidNamespaceSerializer.INSTANCE, this);
    keyTypeInfo = new RowTypeInfo(((RowTypeInfo) getLeftInputType()).getTypeAt(0));
    keyTypeSerializer = PythonTypeUtils.TypeInfoToSerializerConverter.typeInfoSerializerConverter(keyTypeInfo);
    timerDataTypeInfo = createTimerDataTypeInfo(keyTypeInfo);
    timerDataSerializer = PythonTypeUtils.TypeInfoToSerializerConverter.typeInfoSerializerConverter(timerDataTypeInfo);
    timerHandler = new TimerHandler();
    super.open();
}
Also used : TimerHandler(org.apache.flink.streaming.api.operators.python.timer.TimerHandler) RowTypeInfo(org.apache.flink.api.java.typeutils.RowTypeInfo)

Aggregations

RowTypeInfo (org.apache.flink.api.java.typeutils.RowTypeInfo)2 TimerHandler (org.apache.flink.streaming.api.operators.python.timer.TimerHandler)2