问题描述:
Flink解析kafka Protobuf格式数据 map函数处理时报错
报错信息
SingleOutputStreamOperator<MessageDB.Record> map1
= kafka_source.map(t -> MessageDB.Record.parseFrom((byte[]) t.value()));
SingleOutputStreamOperator<Object> objectSingleOutputStreamOperator = map1.flatMap(new FlatMapFunction<MessageDB.Record, Object>() {
@Override
public void flatMap(MessageDB.Record record, Collector<Object> collector) throws Exception {
collector.collect(record.getTableName());
}
});