Hi all, what's the proper Java datatype to use for...
# troubleshooting
k
Hi all, what's the proper Java datatype to use for a date? A class like this:
Copy code
public class NotPojoSerializable {
    public LocalDate dateValue;
}
Keeps generating this warning:
Copy code
Field NotPojoSerializable#dateValue will be processed as GenericType. Please read the Flink documentation on "Data Types & Serialization" for details of the effect on performance and schema evolution.
d
Well one way to handle this is to use Flinks Type info to handle this:
Copy code
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.typeutils.TupleTypeInfoBase;

public class PojoSerializable {
    public static final TypeInformation<PojoSerializable> TYPE_INFO = new TupleTypeInfoBase<>(PojoSerializable.class, 
        Types.LOCAL_DATE); // this line defines the type for LocalDate

    public LocalDate dateValue;

    public PojoSerializable(LocalDate dateValue) {
        this.dateValue = dateValue;
    }

  
}
k
Will I need to register a custom serializer under
pipeline.serialization-config
or does just having a static final
TypeInformation
field on a class give Flink enough info?