yuyang08 commented on issue #8067: [FLINK-11746][formats] Add thrift format 
support to Flink
URL: https://github.com/apache/flink/pull/8067#issuecomment-491611680
 
 
   @Myasuka  With this change, we can use the following code to have 
`ThriftSerializer` work with Flink SQL.  Any reason that we need to make 
changes in `TypeExtractor`?   If it is really needed, we can have another PR 
for that. 
   
   {code}
       ThriftDeserializationSchema deserializationSchema =
           new ThriftDeserializationSchema(RealtimeEvent.class, 
ThriftCodeGenerator.SCROOGE);
       FlinkKafkaConsumer flinkKafkaConsumer =
           new FlinkKafkaConsumer("realtime_event", deserializationSchema, 
consumerProperties);
          flinkKafkaConsumer.setStartFromLatest();
   
       DataStream<RealtimeEvent> tupleStream = 
env.addSource(flinkKafkaConsumer);
   
   {code}

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to