Class SortPartitionOperator<INPUT>

    • Field Detail

      • inputType

        protected final org.apache.flink.api.common.typeinfo.TypeInformation<INPUT> inputType
        The type information of input records.
      • sortFieldSelector

        protected final org.apache.flink.api.java.functions.KeySelector<INPUT,​?> sortFieldSelector
        The selector to create the sort key for records, which will be null if it's not used.
    • Constructor Detail

      • SortPartitionOperator

        public SortPartitionOperator​(org.apache.flink.api.common.typeinfo.TypeInformation<INPUT> inputType,
                                     int positionSortField,
                                     org.apache.flink.api.common.operators.Order sortOrder)
      • SortPartitionOperator

        public SortPartitionOperator​(org.apache.flink.api.common.typeinfo.TypeInformation<INPUT> inputType,
                                     String stringSortField,
                                     org.apache.flink.api.common.operators.Order sortOrder)
      • SortPartitionOperator

        public SortPartitionOperator​(org.apache.flink.api.common.typeinfo.TypeInformation<INPUT> inputType,
                                     org.apache.flink.api.java.functions.KeySelector<INPUT,​K> sortFieldSelector,
                                     org.apache.flink.api.common.operators.Order sortOrder)
    • Method Detail

      • endInput

        public void endInput()
                      throws Exception
        Description copied from interface: BoundedOneInput
        It is notified that no more data will arrive from the input.

        Stateful operators need to be aware that a restart with rescaling may occur after receiving this notification. A changed source split assignment may imply that the same subtask of this operator that received endInput, has its state after endInput snapshotted, and will receive new data after restart. Hence, the state should not contain any finalization that would make it impossible to process new data.

        WARNING: It is not safe to use this method to commit any transactions or other side effects! You can use this method to flush any buffered data that can later on be committed e.g. in a CheckpointListener.notifyCheckpointComplete(long).

        NOTE: Given it is semantically very similar to the StreamOperator.finish() method. It might be dropped in favour of the other method at some point in time.

        Specified by:
        endInput in interface BoundedOneInput
        Throws:
        Exception
      • getOperatorAttributes

        public OperatorAttributes getOperatorAttributes()
        Description copied from interface: StreamOperator
        Called to get the OperatorAttributes of the operator. If there is no defined attribute, a default OperatorAttributes is built.
        Specified by:
        getOperatorAttributes in interface StreamOperator<INPUT>
        Returns:
        OperatorAttributes of the operator.