Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/14137#discussion_r70635683
--- Diff:
graphx/src/main/scala/org/apache/spark/graphx/lib/StronglyConnectedComponents.scala
---
@@ -64,11 +69,20 @@ object StronglyConnectedComponents {
// write values to sccGraph
sccGraph = sccGraph.outerJoinVertices(finalVertices) {
(vid, scc, opt) => opt.getOrElse(scc)
- }
+ }.cache()
+ // take triplet to materialize vertices and edges (faster then
count on both)
+ sccGraph.triplets.take(1)
--- End diff --
It's faster because it only materializes a single partition. I think you
have to call something like count.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]