reverse

reverse() transformation is used to reverse the direction of edges in the graph. This operation just reverses the source and destination indices of the edges without updating any vertex and edge properties. It can be executed as follows:

Graph<string, string> reversedGraph = graph.reverse();

To verify, print the edgetriplet:

reversedGraph.triplets().toJavaRDD().collect().forEach(System.out::println);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.123.126