Search in sources :

Example 1 with LocalDateTimeSerializer

use of org.apache.flink.api.common.typeutils.base.LocalDateTimeSerializer in project flink by apache.

the class RawFormatSerDeSchemaTest method serializeLocalDateTime.

private static byte[] serializeLocalDateTime(LocalDateTime localDateTime) {
    DataOutputSerializer dos = new DataOutputSerializer(16);
    LocalDateTimeSerializer serializer = new LocalDateTimeSerializer();
    try {
        serializer.serialize(localDateTime, dos);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    return dos.getCopyOfBuffer();
}
Also used : DataOutputSerializer(org.apache.flink.core.memory.DataOutputSerializer) IOException(java.io.IOException) LocalDateTimeSerializer(org.apache.flink.api.common.typeutils.base.LocalDateTimeSerializer)

Aggregations

IOException (java.io.IOException)1 LocalDateTimeSerializer (org.apache.flink.api.common.typeutils.base.LocalDateTimeSerializer)1 DataOutputSerializer (org.apache.flink.core.memory.DataOutputSerializer)1