TimestampedFileInputSplit cannot be used as a POJO type because not all fields are valid POJO fields

  • Post author:
  • Post category:其他


TimestampedFileInputSplit cannot be used as a POJO type because not all fields are valid POJO fields, and must be processed as GenericType.



项目场景:flink-1.12.0版本


提示:这里简述项目相关背景:转换算子测试




问题描述:


错误提示:TimestampedFileInputSplit cannot be used as a POJO type because not all fields are valid POJO fields, and must be processed as GenericType.

Please read the Flink documentation on “Data Types & Serialization” for details of the effect on performance.

TimestampedFileInputSplit does not contain a setter for field modificationTime

 public static void main(String[] args) throws Exception {
   

        final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);
        DataStreamSource<String> stringDataStreamSource = env.readTextFile("sensor.txt");
        DataStream<SensorReading> mapDataStream = stringDataStreamSource.map(line -> {
   
            String[] fields = line.split(",")</



版权声明:本文为qq_44874902原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。