You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/12 16:57:39 UTC

[GitHub] [flink] yuyang08 commented on issue #8067: [FLINK-11746][formats] Add thrift format support to Flink

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:
users@infra.apache.org


With regards,
Apache Git Services