Class SourceVertex<O>

    • Constructor Detail

      • SourceVertex

        public SourceVertex()
        Constructor for SourceVertex.
      • SourceVertex

        public SourceVertex​(SourceVertex that)
        Copy Constructor for SourceVertex.
        Parameters:
        that - the source object for copying
    • Method Detail

      • isBounded

        public abstract boolean isBounded()
        Returns:
        true if it is bounded source
      • getReadables

        public abstract List<Readable<O>> getReadables​(int desiredNumOfSplits)
                                                throws Exception
        Gets parallel readables.
        Parameters:
        desiredNumOfSplits - number of splits desired.
        Returns:
        the list of readables.
        Throws:
        Exception - if fail to get.
      • getEstimatedSizeBytes

        public abstract long getEstimatedSizeBytes()
        Gets the estimated size of bytes. Returns 0L if not applicable.
        Returns:
        size of input bytes.
      • clearInternalStates

        public abstract void clearInternalStates()
        Clears internal states, must be called after getReadables(). Concretely, this clears the huge list of input splits held by objects like BeamBoundedSourceVertex before sending the vertex to remote executors. Between clearing states of an existing vertex, and creating a new vertex, we've chosen the former approach to ensure consistent use of the same IRVertex object across the compiler, the master, and the executors.