Interface Source<T,​SplitT extends SourceSplit,​EnumChkT>

    • Method Detail

      • getBoundedness

        Boundedness getBoundedness()
        Get the boundedness of this source.
        Returns:
        the boundedness of this source.
      • createEnumerator

        SplitEnumerator<SplitT,​EnumChkT> createEnumerator​(SplitEnumeratorContext<SplitT> enumContext)
                                                         throws Exception
        Creates a new SplitEnumerator for this source, starting a new input.
        Parameters:
        enumContext - The context for the split enumerator.
        Returns:
        A new SplitEnumerator.
        Throws:
        Exception - The implementor is free to forward all exceptions directly. Exceptions thrown from this method cause JobManager failure/recovery.
      • restoreEnumerator

        SplitEnumerator<SplitT,​EnumChkT> restoreEnumerator​(SplitEnumeratorContext<SplitT> enumContext,
                                                                 EnumChkT checkpoint)
                                                          throws Exception
        Restores an enumerator from a checkpoint.
        Parameters:
        enumContext - The context for the restored split enumerator.
        checkpoint - The checkpoint to restore the SplitEnumerator from.
        Returns:
        A SplitEnumerator restored from the given checkpoint.
        Throws:
        Exception - The implementor is free to forward all exceptions directly. Exceptions thrown from this method cause JobManager failure/recovery.
      • getSplitSerializer

        SimpleVersionedSerializer<SplitT> getSplitSerializer()
        Creates a serializer for the source splits. Splits are serialized when sending them from enumerator to reader, and when checkpointing the reader's current state.
        Returns:
        The serializer for the split type.