Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

GraphX Shortest Path, how to list the path and not just the number of edges?

GraphX Shortest Path, how to list the path and not just the number of edges?

New Contributor

I have a graph loaded as an edgelist (el) and a sequence of vertices (verts) loaded. I can get the ShortestPathss to run using "val sp = ShortestPaths.run(el,verts)" and I can get the length of the shortest path out of there (say 6, meaning 6 edges between the verts). I'd like to know what those edges are.

 

My question is there any way to list the edges along the shortest path? and not just the length of the path?

 

Thanks

1 REPLY 1

Re: GraphX Shortest Path, how to list the path and not just the number of edges?

New Contributor

Hello,

 

Were you able to list the edges along the shortest path?