I run a code using Flink Java API that gets some bytes from Kafka and parses it following by inserting into Cassandra database using another library static method (both parsing and inserting results is done by the library). Running code on local in IDE, I get the desired answer, but running on YARN cluster the parse method didn't work as expected!
There is a static HashMap field in the class So I redefine that HashMap as a parameter for the method How can I fix the problem? |
The problem maybe that it is still static. How will the parser use this HashMap?
|
In reply to this post by Soheil Pourbafrani
Only the anonymous FlatMapFunction instance is sent to the TaskManager. Move the static field to that class.
Michael
|
Not knowing the library or the config needs I do not have a suggestion. If the config is accumulated from inputs and needs to see all inputs I would suggest setting parallelism to 1 as an experiment, but it would need a redesign to run in parallel.
Michael
|
Free forum by Nabble | Edit this page |