diff --git a/src/spark/main_graphs.py b/src/spark/main_graphs.py index f715824..a4046c1 100644 --- a/src/spark/main_graphs.py +++ b/src/spark/main_graphs.py @@ -49,7 +49,7 @@ master.spark.sparkContext.setCheckpointDir('./checkpoints') # spark is really a tx_df = master.get_tx_dataframe() -transaction_as_vertices = tx_df \ +addresses_as_vertices = tx_df \ .select('address') \ .withColumnRenamed('address', 'id') \ .distinct() @@ -65,7 +65,7 @@ transactions_as_edges = tx_df \ .flatMap(explode_row) \ .toDF(['src', 'dst']) -g = GraphFrame(transaction_as_vertices, transactions_as_edges) +g = GraphFrame(addresses_as_vertices, transactions_as_edges) components = g.connectedComponents(algorithm='graphframes') master.write_connected_components_as_clusters(components)