com.intel.hadoop.graphbuilder.preprocess.mapreduce.keyvalue
Class VertexEdgeUnionType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>
java.lang.Object
com.intel.hadoop.graphbuilder.preprocess.mapreduce.keyvalue.VertexEdgeUnionType<VidType,VertexData,EdgeData>
- Type Parameters:
VidType
- VertexData
- EdgeData
-
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public abstract class VertexEdgeUnionType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>
- extends java.lang.Object
- implements org.apache.hadoop.io.Writable
Abstract union type of Vertex
and Edge
. Used as intermediate
map output value to hold either a vertex or an edge.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VERTEXVAL
public static final boolean VERTEXVAL
- See Also:
- Constant Field Values
EDGEVAL
public static final boolean EDGEVAL
- See Also:
- Constant Field Values
VertexEdgeUnionType
public VertexEdgeUnionType()
- Creates an empty value.
createVid
public abstract VidType createVid()
createVdata
public abstract VertexData createVdata()
createEdata
public abstract EdgeData createEdata()
init
public void init(boolean flag,
java.lang.Object value)
- Initialize the value.
- Parameters:
flag
- value
-
flag
public boolean flag()
- Returns:
- the type flag of the value.
vertex
public Vertex<VidType,VertexData> vertex()
- Returns:
- the vertex value, used only when flag == VERTEXVAL.
edge
public Edge<VidType,EdgeData> edge()
- Returns:
- the vertex value, used only when flag == EDGEXVAL.
readFields
public void readFields(java.io.DataInput arg0)
throws java.io.IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
write
public void write(java.io.DataOutput arg0)
throws java.io.IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object