An example use the [aggregateMessages
][Graph.aggregateMessages] operator to
compute the average age of the more senior followers of each user
Run with
Driver program for running graph algorithms.
Suppose I want to build a graph from some text files, restrict the graph to important relationships and users, run page-rank on the sub-graph, and then finally return attributes associated with the top users.
Suppose I want to build a graph from some text files, restrict the graph to important relationships and users, run page-rank on the sub-graph, and then finally return attributes associated with the top users. This example do all of this in just a few lines with GraphX.
Run with
bin/run-example graphx.ComprehensiveExample
A connected components algorithm example.
A connected components algorithm example.
The connected components algorithm labels each connected component of the graph
with the ID of its lowest-numbered vertex.
For example, in a social network, connected components can approximate clusters.
GraphX contains an implementation of the algorithm in the
[ConnectedComponents
object][ConnectedComponents],
and we compute the connected components of the example social network dataset.
Run with
bin/run-example graphx.ConnectedComponentsExample
Uses GraphX to run PageRank on a LiveJournal social network graph.
Uses GraphX to run PageRank on a LiveJournal social network graph. Download the dataset from http://snap.stanford.edu/data/soc-LiveJournal1.html.
A PageRank example on social network dataset Run with
A PageRank example on social network dataset Run with
bin/run-example graphx.PageRankExample
An example use the Pregel operator to express computation such as single source shortest path Run with
An example use the Pregel operator to express computation such as single source shortest path Run with
bin/run-example graphx.SSSPExample
The SynthBenchmark application can be used to run various GraphX algorithms on synthetic log-normal graphs.
The SynthBenchmark application can be used to run various GraphX algorithms on synthetic log-normal graphs. The intent of this code is to enable users to profile the GraphX system without access to large graph datasets.
A vertex is part of a triangle when it has two adjacent vertices with an edge between them.
A vertex is part of a triangle when it has two adjacent vertices with an edge between them.
GraphX implements a triangle counting algorithm in the [TriangleCount
object][TriangleCount]
that determines the number of triangles passing through each vertex,
providing a measure of clustering.
We compute the triangle count of the social network dataset.
Note that TriangleCount
requires the edges to be in canonical orientation (srcId < dstId
)
and the graph to be partitioned using [Graph.partitionBy
][Graph.partitionBy].
Run with
bin/run-example graphx.TriangleCountingExample
An example use the [
aggregateMessages
][Graph.aggregateMessages] operator to compute the average age of the more senior followers of each user Run with