Class SamplingVertex

  • All Implemented Interfaces:, Cloneable<IRVertex>

    public final class SamplingVertex
    extends IRVertex
    Executes the original IRVertex using a subset of input data partitions.
    See Also:
    Serialized Form
    • Constructor Detail

      • SamplingVertex

        public SamplingVertex​(IRVertex originalVertex,
                              float desiredSampleRate)
        originalVertex - to clone.
        desiredSampleRate - percentage of tasks to execute. The actual sample rate may vary depending on neighboring sampling vertices.
    • Method Detail

      • getOriginalVertexId

        public java.lang.String getOriginalVertexId()
        the id of the original vertex for reference.
      • getCloneOfOriginalVertex

        public IRVertex getCloneOfOriginalVertex()
        the clone of the original vertex. This clone is intended to be used during the actual execution, as the sampling vertex itself is not executable and the original vertex should not be executed again.
      • getDesiredSampleRate

        public float getDesiredSampleRate()
        the desired sample rate.
      • getCloneOfOriginalEdge

        public IREdge getCloneOfOriginalEdge​(IREdge originalEdge)
        Obtains a clone of an original edge that is attached to this sampling vertex.

        Original edge: src - to - dst When src == originalVertex, return thisSamplingVertex - to - dst When dst == originalVertex, return src - to - thisSamplingVertex

        originalEdge - to clone.
        a clone of the edge.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getClone

        public IRVertex getClone()
        Description copied from interface: Cloneable
        Creates and returns a copy of this object.

        The precise meaning of "copy" may depend on the class of the object. The general intent is that, all fields of the object are copied.

        a clone of this object.
      • getPropertiesAsJsonNode

        public com.fasterxml.jackson.databind.node.ObjectNode getPropertiesAsJsonNode()
        getPropertiesAsJsonNode in class Vertex
        JSON representation of additional properties