Class LocalSlicingWindowAggOperator

    • Method Detail

      • prepareSnapshotPreBarrier

        public void prepareSnapshotPreBarrier​(long checkpointId)
                                       throws Exception
        Description copied from interface: StreamOperator
        This method is called when the operator should do a snapshot, before it emits its own checkpoint barrier.

        This method is intended not for any actual state persistence, but only for emitting some data before emitting the checkpoint barrier. Operators that maintain some small transient state that is inefficient to checkpoint (especially when it would need to be checkpointed in a re-scalable way) but can simply be sent downstream before the checkpoint. An example are opportunistic pre-aggregation operators, which have small the pre-aggregation state that is frequently flushed downstream.

        Important: This method should not be used for any actual state snapshot logic, because it will inherently be within the synchronous part of the operator's checkpoint. If heavy work is done within this method, it will affect latency and downstream checkpoint alignments.

        Specified by:
        prepareSnapshotPreBarrier in interface StreamOperator<RowData>
        Overrides:
        prepareSnapshotPreBarrier in class AbstractStreamOperator<RowData>
        Parameters:
        checkpointId - The ID of the checkpoint.
        Throws:
        Exception - Throwing an exception here causes the operator to fail and go into recovery.
      • close

        public void close()
                   throws Exception
        Description copied from interface: StreamOperator
        This method is called at the very end of the operator's life, both in the case of a successful completion of the operation, and in the case of a failure and canceling.

        This method is expected to make a thorough effort to release all resources that the operator has acquired.

        NOTE:It can not emit any records! If you need to emit records at the end of processing, do so in the StreamOperator.finish() method.

        Specified by:
        close in interface StreamOperator<RowData>
        Overrides:
        close in class AbstractStreamOperator<RowData>
        Throws:
        Exception