com.intel.hadoop.graphbuilder.partition.mapreduce.keyvalue
Class CombinedEdgeValueType<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
  extended by com.intel.hadoop.graphbuilder.partition.mapreduce.keyvalue.CombinedEdgeValueType<VidType,VertexData,EdgeData>
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class CombinedEdgeValueType<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

Intermediate value type of edge records and supports commutative and associative add operation to merge with instances of the same type.


Constructor Summary
CombinedEdgeValueType(GraphTypeFactory factory)
           
CombinedEdgeValueType(VidType source, VidType target, EdgeData data, GraphTypeFactory factory)
          Create an instance with one edge.
 
Method Summary
 void add(CombinedEdgeValueType other)
          Combines with other instance.
 void clear()
          Clear the edges in the value.
 java.util.List<EdgeData> edata()
           
 void readFields(java.io.DataInput in)
           
 int size()
           
 java.util.List<VidType> sources()
           
 java.util.List<VidType> targets()
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombinedEdgeValueType

public CombinedEdgeValueType(GraphTypeFactory factory)

CombinedEdgeValueType

public CombinedEdgeValueType(VidType source,
                             VidType target,
                             EdgeData data,
                             GraphTypeFactory factory)
Create an instance with one edge.

Parameters:
source -
target -
data -
Method Detail

add

public void add(CombinedEdgeValueType other)
Combines with other instance.

Parameters:
other -

size

public int size()
Returns:
number of edges in this value.

clear

public void clear()
Clear the edges in the value.


sources

public java.util.List<VidType> sources()
Returns:
the source ids of the edges.

targets

public java.util.List<VidType> targets()
Returns:
the target ids of the edges.

edata

public java.util.List<EdgeData> edata()
Returns:
edge data of the edges.

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