com.intel.hadoop.graphbuilder.partition.mapreduce.keyvalue
Class IngressKeyType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>>
java.lang.Object
com.intel.hadoop.graphbuilder.partition.mapreduce.keyvalue.IngressKeyType<VidType>
- Type Parameters:
VidType
-
- All Implemented Interfaces:
- java.lang.Comparable<IngressKeyType<VidType>>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<IngressKeyType<VidType>>
public abstract class IngressKeyType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>>
- extends java.lang.Object
- implements org.apache.hadoop.io.WritableComparable<IngressKeyType<VidType>>
Abstract MapKey for edge ingress templated with VidType. This key is a
"union" type of two types: EdgeKey and VertexKey. The reducer calls different
reduce methods based on the key type.
Field Summary |
static short |
EDGEKEY
Enums of the map key types. |
static short |
VERTEXKEY
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
EDGEKEY
public static final short EDGEKEY
- Enums of the map key types. EDGEKEY represents an intermediate edge record:
(pid, (source, target, data)). VERTEXKEY is for a
VertexRecord
(vid, mirrors, inEdges, outEdges, vdata=empty). The reducer calls different
reduce methods based on the key type.
- See Also:
- Constant Field Values
VERTEXKEY
public static final short VERTEXKEY
- See Also:
- Constant Field Values
IngressKeyType
public IngressKeyType()
createVid
public abstract VidType createVid()
set
public void set(short pid,
VidType vid,
short flag)
- Parameters:
pid
- vid
- flag
-
flag
public short flag()
- Returns:
- the type flag
setFlag
public void setFlag(short flag)
- Parameters:
flag
- the new type flag
vid
public VidType vid()
- Returns:
- the vertex id, for VertexKey only.
pid
public short pid()
- Returns:
- the partition id, for EdgeKey only.
readFields
public void readFields(java.io.DataInput in)
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 out)
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
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
compareTo
public int compareTo(IngressKeyType<VidType> other)
- Specified by:
compareTo
in interface java.lang.Comparable<IngressKeyType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>>>