public class RowtimeProcessFunction extends ProcessFunction<RowData,RowData> implements ResultTypeQueryable<RowData>
RowData
field into the StreamRecord
.ProcessFunction.Context, ProcessFunction.OnTimerContext
Constructor and Description |
---|
RowtimeProcessFunction(int rowtimeIdx,
TypeInformation<RowData> returnType,
int precision) |
Modifier and Type | Method and Description |
---|---|
TypeInformation<RowData> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
processElement(RowData value,
ProcessFunction.Context ctx,
Collector<RowData> out)
Process one element from the input stream.
|
onTimer
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public RowtimeProcessFunction(int rowtimeIdx, TypeInformation<RowData> returnType, int precision)
public void processElement(RowData value, ProcessFunction.Context ctx, Collector<RowData> out) throws Exception
ProcessFunction
This function can output zero or more elements using the Collector
parameter and
also update internal state or set timers using the ProcessFunction.Context
parameter.
processElement
in class ProcessFunction<RowData,RowData>
value
- The input value.ctx
- A ProcessFunction.Context
that allows querying the timestamp of the element and getting a
TimerService
for registering timers and querying the time. The context is only
valid during the invocation of this method, do not store it.out
- The collector for returning result values.Exception
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.public TypeInformation<RowData> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<RowData>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.