public class RowtimeProcessFunction extends ProcessFunction<BaseRow,BaseRow> implements ResultTypeQueryable<BaseRow>
BaseRow
field into the
StreamRecord
.ProcessFunction.Context, ProcessFunction.OnTimerContext
Constructor and Description |
---|
RowtimeProcessFunction(int rowtimeIdx,
TypeInformation<BaseRow> returnType,
int precision) |
Modifier and Type | Method and Description |
---|---|
TypeInformation<BaseRow> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
processElement(BaseRow value,
ProcessFunction.Context ctx,
Collector<BaseRow> out)
Process one element from the input stream.
|
onTimer
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public RowtimeProcessFunction(int rowtimeIdx, TypeInformation<BaseRow> returnType, int precision)
public void processElement(BaseRow value, ProcessFunction.Context ctx, Collector<BaseRow> 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<BaseRow,BaseRow>
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<BaseRow> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<BaseRow>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.