Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18464

ClassCastException during namespace serialization for checkpoint (Heap and RocksDB)

    XMLWordPrintableJSON

Details

    Description

      (see FLINK-23036 for error details with RocksDB)

       

      From thread

      I'm using flink 1.9 on Mesos and I try to use my own trigger and evictor. The state is stored to memory.

       
       

      input.setParallelism(processParallelism)
              .assignTimestampsAndWatermarks(new UETimeAssigner)
              .keyBy(_.key)
              .window(TumblingEventTimeWindows.of(Time.minutes(20)))
              .trigger(new MyTrigger)
              .evictor(new MyEvictor)
              .process(new MyFunction).setParallelism(aggregateParallelism)
              .addSink(kafkaSink).setParallelism(sinkParallelism)
              .name("kafka-record-sink")

       

       

      java.lang.Exception: Could not materialize checkpoint 1 for operator Window(TumblingEventTimeWindows(1200000), JoinTrigger, JoinEvictor, ScalaProcessWindowFunctionWrapper) -> Sink: kafka-record-sink (2/5).
           at org.apache.flink.streaming.runtime.tasks.StreamTask$AsyncCheckpointRunnable.handleExecutionException(StreamTask.java:1100)
           at org.apache.flink.streaming.runtime.tasks.StreamTask$AsyncCheckpointRunnable.run(StreamTask.java:1042)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.apache.flink.streaming.api.windowing.windows.TimeWindow cannot be cast to org.apache.flink.runtime.state.VoidNamespace
           at java.util.concurrent.FutureTask.report(FutureTask.java:122)
           at java.util.concurrent.FutureTask.get(FutureTask.java:192)
           at org.apache.flink.runtime.concurrent.FutureUtils.runIfNotDoneAndGet(FutureUtils.java:450)
           at org.apache.flink.streaming.api.operators.OperatorSnapshotFinalizer.<init>(OperatorSnapshotFinalizer.java:47)
           at org.apache.flink.streaming.runtime.tasks.StreamTask$AsyncCheckpointRunnable.run(StreamTask.java:1011)     
       ... 3 more 
      Caused by: java.lang.ClassCastException: org.apache.flink.streaming.api.windowing.windows.TimeWindow cannot be cast to org.apache.flink.runtime.state.VoidNamespace
           at org.apache.flink.runtime.state.VoidNamespaceSerializer.serialize(VoidNamespaceSerializer.java:32)
           at org.apache.flink.runtime.state.heap.CopyOnWriteStateMapSnapshot.writeState(CopyOnWriteStateMapSnapshot.java:114)
           at org.apache.flink.runtime.state.heap.AbstractStateTableSnapshot.writeStateInKeyGroup(AbstractStateTableSnapshot.java:121)
           at org.apache.flink.runtime.state.heap.CopyOnWriteStateTableSnapshot.writeStateInKeyGroup(CopyOnWriteStateTableSnapshot.java:37)
           at org.apache.flink.runtime.state.heap.HeapSnapshotStrategy$1.callInternal(HeapSnapshotStrategy.java:191)
           at org.apache.flink.runtime.state.heap.HeapSnapshotStrategy$1.callInternal(HeapSnapshotStrategy.java:158)
           at org.apache.flink.runtime.state.AsyncSnapshotCallable.call(AsyncSnapshotCallable.java:75)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at org.apache.flink.runtime.concurrent.FutureUtils.runIfNotDoneAndGet(FutureUtils.java:447)    
           ... 5 more
      

       

       

      Attachments

        1. image-2021-06-21-20-06-51-323.png
          106 kB
          guxiang
        2. image-2021-06-21-20-07-30-281.png
          106 kB
          guxiang
        3. image-2021-06-21-20-07-43-246.png
          106 kB
          guxiang
        4. image-2021-06-21-20-33-39-295.png
          106 kB
          guxiang
        5. image-2021-06-23-14-34-37-703.png
          138 kB
          guxiang
        6. image-2021-06-24-16-41-54-425.png
          489 kB
          guxiang
        7. image-2021-06-24-17-51-53-734.png
          347 kB
          guxiang
        8. image-2021-07-08-14-50-12-559.png
          77 kB
          guxiang
        9. image-2021-07-08-18-33-17-417.png
          86 kB
          guxiang
        10. image-2021-07-08-18-34-51-910.png
          229 kB
          guxiang
        11. image-2021-07-19-14-40-17-398.png
          294 kB
          guxiang
        12. image-2021-07-19-14-44-59-511.png
          241 kB
          guxiang
        13. image-2021-07-19-14-46-21-682.png
          128 kB
          guxiang
        14. image-2021-07-19-14-47-34-111.png
          213 kB
          guxiang
        15. image-2021-07-19-15-20-36-431.png
          126 kB
          guxiang
        16. image-2021-07-19-15-21-04-214.png
          43 kB
          guxiang
        17. image-2021-07-19-15-45-53-014.png
          409 kB
          guxiang
        18. image-2021-07-19-15-48-23-853.png
          162 kB
          guxiang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              roman Roman Khachatryan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: