From ded45e227edb02396fa17180222d6118babd4bb2 Mon Sep 17 00:00:00 2001 From: itayo155 Date: Tue, 9 Jan 2018 13:47:54 +0200 Subject: [PATCH] Bugfix - make function more general in ccf_group_by_root, if vertex_to_root is a general rdd, it does not have a new_edges property; byt a map function can still be called on it. --- connected_components_spark/ccf_spark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connected_components_spark/ccf_spark.py b/connected_components_spark/ccf_spark.py index bb129f0..dc93ee8 100644 --- a/connected_components_spark/ccf_spark.py +++ b/connected_components_spark/ccf_spark.py @@ -110,6 +110,6 @@ def ccf_group_by_root(vertex_to_root): (root_vertex_id, [child_vertex_id1 ... child_vertex_idN]) """ - return vertex_to_root.new_edges.map(lambda x: (x[1], x[0]))\ + return vertex_to_root.map(lambda x: (x[1], x[0]))\ .groupByKey()\ .mapValues(list)