Scala case class TypeInformation and Serializer

2019-12-11 Thread 杨光
Hi, I'm working on write a flink stream job with scala api , how should I find out which class is serialied by flink type serializer and which is falled back to generic Kryo serializer. And if one class falls back to Kryo serializer, how can I make some extend the TypeInfo classes of Flink or some

Re: Scala case class TypeInformation and Serializer

2019-12-11 Thread Yun Tang
Hi Would you please give related code? I think it might due to insufficient hint to type information. Best Yun Tang From: 杨光 Date: Wednesday, December 11, 2019 at 7:20 PM To: user Subject: Scala case class TypeInformation and Serializer Hi, I'm working on write a flink stream job

Re: Scala case class TypeInformation and Serializer

2019-12-12 Thread 杨光
12日周四 上午12:45写道: > Hi > > > > Would you please give related code? I think it might due to insufficient > hint to type information. > > > > Best > > Yun Tang > > > > > > > > *From: *杨光 > *Date: *Wednesday, December 11, 2019 at 7:20 PM

Re: Scala case class TypeInformation and Serializer

2019-12-12 Thread Timo Walther
Hi, the serializers are created from TypeInformation. So you can simply inspect the type information. E.g. by using this in the Scala API: val typeInfo = createTypeInformation[MyClassToAnalyze] And going through the object using a debugger. Actually, I don't understand why scala.Tuple2 is tr

Re: Scala case class TypeInformation and Serializer

2019-12-12 Thread 杨光
I did some test by using createTypeInformation[MyClassToAnalyze] , it works fine with some simple case class but will throw some "could not find implicit value" or "constructor _UrlType in class _UrlType cannot be accessed in <$anon: org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer" ex