Hello everyone, I am working on apache flink. I ha...
# troubleshooting
a
Hello everyone, I am working on apache flink. I have made a flink job which does some event processing and then pushing into database and kafka(sink). The job is working fine. So the problem is with parallelism 1 it is producing 1599 events to kafka which is perfect, but when I increase parallelism to 8 my flink job is producing 1599*8= 12792 events to kafka. It should produce same 1599 events only. I am not sure what is the problem. Someone please assist me with some solution or any idea. My job overview is : 1 - Building schema for creating Table 2 - DataStreamString fileStream = reading csv file from url 3 - DataStream<Tuple3String, Row, String> mappedDataStreamWithEntityId = from fileStream 4 - DataStream<Tuple4String, Row, String, String> resultStream2 = combined stream from mappedDataStreamWithEntityId 5 - DataStreamRow finalMappedStream = converted mappedDataStreamWithEntityId to DataStreamRow for creating
Table
6 - Table inputTable = tableEnv.fromDataStream(finalMappedStream, schema) 7 - tableEnv.createTemporaryView("inMemoryTable", inputTable); 8 - looping and executing sql queries on temporary view.
Copy code
Table queryResult = tableEnv.sqlQuery(groupQuery);
9 - creating DataStreamRow from queryResult : DataStreamRow resultStream = tableEnv.toDataStream(queryResult); 10 - DataStreamEvent dataStreamResult = resultStream 11 -
Copy code
if (allQueryResultStream == null) allQueryResultStream = dataStreamResult;
else {
    allQueryResultStream = allQueryResultStream.union(dataStreamResult);
}