i want to know if it is possible to Make a DataStream of type
DataStream<Tuple4<String, Charge, List<Charge>, Table>>
with the Table type inside the tuple the table is from Table Api of Flink, i'm trying to pass the variable accumulatorTable which is the flink table inside a process function to return the tuple like this:
DataStream<Tuple4<String, Charge, List<Charge>, Table>> joinStream =
currentStreamByKeys
.connect(historicStreamByKeys)
.flatMap(new LeftJoin())
.process(new ProcessFunction<Tuple2<Charge, List<Charge>>, Tuple4<String, Charge, List<Charge>, Table>>() {
@Override
public void processElement(Tuple2<Charge, List<Charge>> value, Context ctx, Collector<Tuple4<String, Charge, List<Charge>, Table>> out) throws Exception {
out.collect(
new Tuple4<>(
KeysExtractor.getKey(keys,value.f0),
value.f0,
value.f1,
accumulatorTable
)
);
}
})
.keyBy(0);
But i'm getting this error:
Exception in thread "main" org.apache.flink.api.common.InvalidProgramException: The implementation of the StreamExecutionEnvironment is not serializable. The object probably contains or references non serializable fields.
Is it possible to achieve this using Flink maybe using TypeHints?, Thanks in advance!