Package io.github.kaststream.api
Interface CoProcessor
-
- All Superinterfaces:
Serializable
public interface CoProcessor extends Serializable
Deprecated.This class will be remove in next versionUse
CoProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidclose()Deprecated.Tear-down method for the user code.org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>getProducedType(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2)Deprecated.Gets the data type (as aTypeInformation) produced by this function or input format.default Map<String,org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>>getSidesOutProducedType(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2)Deprecated.Declare the data type information of the sides out data produced by your function.voidopen(org.apache.flink.configuration.Configuration configuration, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2, Map<String,org.apache.flink.util.OutputTag<org.apache.flink.types.Row>> sidesOutputTag, org.apache.flink.api.common.functions.RuntimeContext rtCtx)Deprecated.Initialization method for the function.voidprocessElement1(org.apache.flink.types.Row value, org.apache.flink.streaming.api.functions.co.CoProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.types.Row> out)Deprecated.This method is called for each element in the first of the connected streams.voidprocessElement2(org.apache.flink.types.Row value, org.apache.flink.streaming.api.functions.co.CoProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.types.Row> out)Deprecated.This method is called for each element in the second of the connected streams.
-
-
-
Method Detail
-
getProducedType
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getProducedType(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2)Deprecated.Gets the data type (as aTypeInformation) produced by this function or input format.- Parameters:
typeInfo1- the input row type information from stream 1typeInfo2- the input row type information from stream 2- Returns:
- The data type produced by this function or input format.
-
getSidesOutProducedType
default Map<String,org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>> getSidesOutProducedType(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2)
Deprecated.Declare the data type information of the sides out data produced by your function.- Returns:
- the sides output type information
-
processElement1
void processElement1(org.apache.flink.types.Row value, org.apache.flink.streaming.api.functions.co.CoProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.types.Row> out) throws ExceptionDeprecated.This method is called for each element in the first of the connected streams.This function can output zero or more elements using the
Collectorparameter and also update internal state or set timers using theCoProcessFunction.Contextparameter.- Parameters:
value- The stream elementctx- ACoProcessFunction.Contextthat allows querying the timestamp of the element, querying theTimeDomainof the firing timer and getting aTimerServicefor registering timers and querying the time. The context is only valid during the invocation of this method, do not store it.out- The collector to emit resulting elements to- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
processElement2
void processElement2(org.apache.flink.types.Row value, org.apache.flink.streaming.api.functions.co.CoProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.types.Row> out) throws ExceptionDeprecated.This method is called for each element in the second of the connected streams.This function can output zero or more elements using the
Collectorparameter and also update internal state or set timers using theCoProcessFunction.Contextparameter.- Parameters:
value- The stream elementctx- ACoProcessFunction.Contextthat allows querying the timestamp of the element, querying theTimeDomainof the firing timer and getting aTimerServicefor registering timers and querying the time. The context is only valid during the invocation of this method, do not store it.out- The collector to emit resulting elements to- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
open
void open(org.apache.flink.configuration.Configuration configuration, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo2, Map<String,org.apache.flink.util.OutputTag<org.apache.flink.types.Row>> sidesOutputTag, org.apache.flink.api.common.functions.RuntimeContext rtCtx) throws ExceptionDeprecated.Initialization method for the function.- Parameters:
configuration- The configuration containing the parameters attached to the contracttypeInfo1- the input row type information from stream 1typeInfo2- the input row type information from stream 2sidesOutputTag- Side output typeinfo and tag dict if anyrtCtx- a runtime context that allow you for example to manage state- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
close
default void close() throws ExceptionDeprecated.Tear-down method for the user code. It is called after the last call to the main working methods. For functions that are part of an iteration, this method will be invoked after each iteration superstep.This method can be used for clean up work.
- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
-