K- the vertex key type
VV- the vertex value type
EV- the edge value type
O- the type of the return value
public interface NeighborsFunctionWithVertexValue<K,VV,EV,O> extends Function, Serializable
|Modifier and Type||Method and Description|
This method is called per vertex and can iterate over all of its neighbors with the specified direction.
void iterateNeighbors(Vertex<K,VV> vertex, Iterable<Tuple2<Edge<K,EV>,Vertex<K,VV>>> neighbors, Collector<O> out) throws Exception
If called with
EdgeDirection.OUT the group will contain the out-edges and
neighboring vertices of the grouping vertex. If called with
group will contain the in-edges and neighboring vertices of the grouping vertex. If called
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.
vertex- the grouping Vertex
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 to
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.