Hi folks,

I have two questions about types in Flink when using Scala:

1. scala case class:

This my case class define:
case class SensorReading(var id: String , var timestamp: Long, var temperature: 
Double)

In documentation, Scala case class is supported:
`Scala case classes (including Scala tuples): null fields not supported`

But the log info shows:
10:26:08,489 INFO org.apache.flink.api.java.typeutils.TypeExtractor - class 
io.github.streamingwithflink.util.SensorReading is missing a default 
constructor so it cannot be used as a POJO type and must be processed as 
GenericType. Please read the Flink documentation on "Data Types & 
Serialization" for details of the effect on performance.


2. scala list

This my case class define:
case class SensorReading(var id: String , var timestamp: Long, var temperature: 
Double, var list: List[String] = List[String]())
log shows:
No fields were detected for class scala.collection.immutable.List so it cannot 
be used as a POJO type and must be processed as GenericType. Please read the 
Flink documentation on "Data Types & Serialization" for details of the effect 
on performance.

Does it means that scala list can be serialize that I can ignore this info if I 
don’t care the performance.
Should I use Java array list instead of scala list or create a custom 
serializer for SensorReading case class?

Thanks!


Best  regards
Utopia

Reply via email to