I - Vertex id typepublic class IdAndNullArrayEdges<I extends org.apache.hadoop.io.WritableComparable> extends Object implements ReuseObjectsOutEdges<I,org.apache.hadoop.io.NullWritable>, MutableOutEdges<I,org.apache.hadoop.io.NullWritable>, ImmutableClassesGiraphConfigurable<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable>
OutEdges with IDs and null edge values having
their TypeOps.
Backed by a dynamic primitive array. Parallel edges are allowed.
Note: this implementation is optimized for space
usage, but random access and edge removals are expensive.| Constructor and Description |
|---|
IdAndNullArrayEdges() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Edge<I,org.apache.hadoop.io.NullWritable> edge)
Add an edge.
|
ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable> |
getConf()
Return the configuration used by this object.
|
void |
initialize()
Initialize the data structure with the default initial capacity.
|
void |
initialize(int capacity)
Initialize the data structure with the specified initial capacity.
|
void |
initialize(Iterable<Edge<I,org.apache.hadoop.io.NullWritable>> edges)
Initialize the data structure and set the edges from an iterable.
|
Iterator<Edge<I,org.apache.hadoop.io.NullWritable>> |
iterator() |
Iterator<MutableEdge<I,org.apache.hadoop.io.NullWritable>> |
mutableIterator()
Returns an iterator over edges that can be modified in-place,
either by changing the current edge value or by removing the current edge.
|
void |
readFields(DataInput in) |
void |
remove(I targetVertexId)
Remove all edges to the given target vertex.
|
void |
setConf(ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable> conf)
Set the configuration to be used by this object.
|
int |
size()
Return the number of edges.
|
void |
write(DataOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable> getConf()
ImmutableClassesGiraphConfigurablegetConf in interface ImmutableClassesGiraphConfigurable<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable>public void setConf(ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable> conf)
GiraphConfigurationSettablesetConf in interface GiraphConfigurationSettable<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.NullWritable>conf - Set configurationpublic void initialize(Iterable<Edge<I,org.apache.hadoop.io.NullWritable>> edges)
OutEdgesinitialize in interface OutEdges<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.NullWritable>edges - Iterable of edgespublic void initialize(int capacity)
OutEdgesinitialize in interface OutEdges<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.NullWritable>capacity - Initial capacitypublic void initialize()
OutEdgesinitialize in interface OutEdges<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.NullWritable>public void add(Edge<I,org.apache.hadoop.io.NullWritable> edge)
OutEdgespublic void remove(I targetVertexId)
OutEdgespublic int size()
OutEdgespublic Iterator<MutableEdge<I,org.apache.hadoop.io.NullWritable>> mutableIterator()
MutableOutEdgesmutableIterator in interface MutableOutEdges<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.NullWritable>public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.