public abstract class NeighborsFunction<K,VV,EV,T> extends Object implements NeighborsFunction<K,VV,EV,T>
Constructor and Description |
---|
NeighborsFunction() |
Modifier and Type | Method and Description |
---|---|
abstract void |
iterateNeighbors(scala.collection.Iterable<scala.Tuple3<K,Edge<K,EV>,Vertex<K,VV>>> neighbors,
Collector<T> out) |
void |
iterateNeighbors(Iterable<Tuple3<K,Edge<K,EV>,Vertex<K,VV>>> neighbors,
Collector<T> out)
This method is called per vertex and can iterate over all of its neighbors
with the specified direction.
|
public abstract void iterateNeighbors(scala.collection.Iterable<scala.Tuple3<K,Edge<K,EV>,Vertex<K,VV>>> neighbors, Collector<T> out)
public void iterateNeighbors(Iterable<Tuple3<K,Edge<K,EV>,Vertex<K,VV>>> neighbors, Collector<T> out)
NeighborsFunction
If called with EdgeDirection.OUT
the group will contain
the out-edges and neighboring vertices of the grouping vertex.
If called with EdgeDirection.IN
the group will contain
the in-edges and neighboring vertices of the grouping vertex.
If called with EdgeDirection.ALL
the group will contain
all edges and neighboring vertices of the grouping vertex.
The method can emit any number of output elements, including none.
iterateNeighbors
in interface NeighborsFunction<K,VV,EV,T>
neighbors
- the neighbors of the grouping vertex.
The first filed of each Tuple3 is the ID of the grouping vertex.
The second field is the neighboring edge, and the third field is the neighboring vertex.out
- the collector to emit results toCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.