public static class IterateExample.Step extends ProcessFunction<Tuple5<Integer,Integer,Integer,Integer,Integer>,Tuple5<Integer,Integer,Integer,Integer,Integer>>
ProcessFunction.Context, ProcessFunction.OnTimerContext
Constructor and Description |
---|
Step() |
Modifier and Type | Method and Description |
---|---|
void |
processElement(Tuple5<Integer,Integer,Integer,Integer,Integer> value,
ProcessFunction.Context ctx,
Collector<Tuple5<Integer,Integer,Integer,Integer,Integer>> out)
Process one element from the input stream.
|
onTimer
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open
public void processElement(Tuple5<Integer,Integer,Integer,Integer,Integer> value, ProcessFunction.Context ctx, Collector<Tuple5<Integer,Integer,Integer,Integer,Integer>> 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<Tuple5<Integer,Integer,Integer,Integer,Integer>,Tuple5<Integer,Integer,Integer,Integer,Integer>>
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.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.