Package org.apache.nemo.common.test
Class EmptyComponents.EmptySourceVertex<T>
- java.lang.Object
-
- org.apache.nemo.common.dag.Vertex
-
- org.apache.nemo.common.ir.vertex.IRVertex
-
- org.apache.nemo.common.ir.vertex.SourceVertex<T>
-
- org.apache.nemo.common.test.EmptyComponents.EmptySourceVertex<T>
-
- Type Parameters:
T
- type of the data.
- Enclosing class:
- EmptyComponents
public static final class EmptyComponents.EmptySourceVertex<T> extends SourceVertex<T>
An empty Source Vertex.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmptySourceVertex(java.lang.String name)
Constructor.EmptySourceVertex(java.lang.String name, int minNumReadables)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearInternalStates()
Clears internal states, must be called after getReadables().EmptyComponents.EmptySourceVertex<T>
getClone()
Creates and returns a copy of this object.long
getEstimatedSizeBytes()
Gets the estimated size of bytes.com.fasterxml.jackson.databind.node.ObjectNode
getPropertiesAsJsonNode()
java.util.List<Readable<T>>
getReadables(int desirednumOfSplits)
Gets parallel readables.boolean
isBounded()
java.lang.String
toString()
-
Methods inherited from class org.apache.nemo.common.ir.vertex.IRVertex
copyExecutionPropertiesTo, getExecutionProperties, getIRVertexPropertiesAsJsonNode, getPropertyValue, isUtilityVertex, setProperty, setPropertyPermanently
-
Methods inherited from class org.apache.nemo.common.dag.Vertex
getId, getNumericId
-
-
-
-
Constructor Detail
-
EmptySourceVertex
public EmptySourceVertex(java.lang.String name)
Constructor.- Parameters:
name
- name for the vertex.
-
EmptySourceVertex
public EmptySourceVertex(java.lang.String name, int minNumReadables)
Constructor.- Parameters:
name
- name for the vertex.minNumReadables
- for the vertex.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPropertiesAsJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode getPropertiesAsJsonNode()
- Overrides:
getPropertiesAsJsonNode
in classVertex
- Returns:
- JSON representation of additional properties
-
isBounded
public boolean isBounded()
- Specified by:
isBounded
in classSourceVertex<T>
- Returns:
- true if it is bounded source
-
getReadables
public java.util.List<Readable<T>> getReadables(int desirednumOfSplits)
Description copied from class:SourceVertex
Gets parallel readables.- Specified by:
getReadables
in classSourceVertex<T>
- Parameters:
desirednumOfSplits
- number of splits desired.- Returns:
- the list of readables.
-
getEstimatedSizeBytes
public long getEstimatedSizeBytes()
Description copied from class:SourceVertex
Gets the estimated size of bytes. Returns 0L if not applicable.- Specified by:
getEstimatedSizeBytes
in classSourceVertex<T>
- Returns:
- size of input bytes.
-
clearInternalStates
public void clearInternalStates()
Description copied from class:SourceVertex
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.- Specified by:
clearInternalStates
in classSourceVertex<T>
-
getClone
public EmptyComponents.EmptySourceVertex<T> 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.
- Returns:
- a clone of this object.
-
-