Re: Question about serialization of java.util classes

2023-08-15 Thread Alexis Sarda-Espinosa
Check this answer: https://stackoverflow.com/a/64721838/5793905 You could then use, for example, something like: new SetTypeInfo(Types.STRING) instead of Types.LIST(Types.STRING) Am Di., 15. Aug. 2023 um 10:40 Uhr schrieb : > Hello Alexis, > > Thank you for sharing the helper classes this but

Re: Question about serialization of java.util classes

2023-08-15 Thread s
Hello Alexis, Thank you for sharing the helper classes this but unfortunately I have no idea how to use these classes or how they might be able to help me. This is all very new to me and I honestly can't wrap my head around Flink's type information system. Best regards, Saleh. > On 14 Aug

Re: Question about serialization of java.util classes

2023-08-14 Thread Alexis Sarda-Espinosa
Hello, AFAIK you cannot avoid TypeInformationFactory due to type erasure, nothing Flink can do about that. Here's an example of helper classes I've been using to support set serde in Flink POJOs, but note that it's hardcoded for LinkedHashSet, so you would have to create different implementations

Re: Question about serialization of java.util classes

2023-08-14 Thread s
Hi, Here's a minimal example using an ArrayList, a HashSet, and a TreeSet: ``` package com.example; import java.util.ArrayList; import java.util.HashSet; import java.util.TreeSet; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; public class App { public static

Re: Question about serialization of java.util classes

2023-08-14 Thread Alexey Novakov via user
Hi Saleh, If you could show us the minimal code example of the issue (event classes), I think someone could help you to solve it. Best regards, Alexey On Mon, Aug 14, 2023 at 9:23 AM wrote: > Hi, > > According to this blog post >

Re: Question about serialization of java.util classes

2023-08-14 Thread s
Hi, According to this blog post https://flink.apache.org/2020/04/15/flink-serialization-tuning-vol.-1-choosing-your-serializer-if-you-can/#pojoserializer The "Must be

Re: Question about serialization of java.util classes

2023-08-13 Thread liu ron
Hi, According to the test in [1], I think Flink can recognize Pojo class which contains java List, so I think you can refer to the related Pojo class implementation. [1]

Question about serialization of java.util classes

2023-08-13 Thread s
Greetings, I am working on a project that needs to process around 100k events per second and I'm trying to improve performance. Most of the classes being used are POJOs but have a couple of fields using a `java.util` class, either `ArrayList`, `HashSet` or `SortedSet` etc. This forces Flink