spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scharissis <>
Subject graph.inDegrees including zero values
Date Sun, 25 Jan 2015 13:52:26 GMT

If a vertex has no in-degree then Spark's GraphOp 'inDegree' does not return
it at all. Instead, it would be very useful to me to be able to have that
vertex returned with an in-degree of zero.
What's the best way to achieve this using the GraphX API?

For example, given a graph with nodes A,B,C, where A is connected to B and B
is connected to C like so:
A --> B --> 

graph.inDegrees returns:
B: 1
C: 1

But I would like:
A: 0
B: 1
C: 1


View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message