flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 刘彪 <mmyy1...@gmail.com>
Subject Re: Writing Tuple2 to a sink
Date Wed, 22 Feb 2017 03:13:37 GMT
Hi
I think there is a good way in FlinkKafkaProducerBase.java to deal with
this situation. There is a KeyedSerializationSchema user have to implement.
  KeyedSerializationSchema will be used to serialize data, so that
SinkFunction just need to understand the type after serialization.
In your case, I think you can add a SerializationSchema interface in
SinkFunction. And user have to implement the SerializationSchema, maybe
named Tuple2SerializationSchema.

2017-02-22 7:17 GMT+08:00 Mohit Anchlia <mohitanchlia@gmail.com>:

> What's the best way to retrieve both the values in Tuple2 inside a custom
> sink given that the type is not known inside the sink function?
>

Mime
View raw message