flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dalek <p00tem...@gmail.com>
Subject Gelly and degree filtering
Date Sun, 28 May 2017 10:02:52 GMT
Hi all,

I have a question related to Gelly and graph filtering and hoping to get
some pointers/input.

Basically I have a bipartite graph prepared for a signal/collect iteration,
but want to prune it first to only include target nodes with x or more
edges (indegree >= x). To filter on vertex value (or id) it seems
straightforward to use subgraph and FilterFunction:

prunedG = graph.subgraph(
new FilterFunction<Vertex<String, String>>() {
public boolean filter(Vertex<String, String> vertex) {
return (vertex.getValue() > 0);
}
}, ...


Modifying this to call something like "return (vertex.getInDegree() >=x)"
seemed appropriate but the degree information is in the graph (or available
as separate methods when running GatherFunction etc), and not accessible
directly from the vertex object inside the filter function.

Any suggestions on how to accomplish this?

Mime
View raw message