GraphX
| Developer | Apache Software Foundation (Apache Spark project) |
|---|---|
| Initial release | Spark 0.9.0 (alpha); stable API since Spark 1.2.0 |
| Latest release | Spark 4.3.0 (2026-10-30) |
| Written in | Scala |
| Type | Graph processing library (RDD-based) |
| License | Apache License 2.0 |
| Website | GraphX Programming Guide |
| Repository | github.com/apache/spark (graphx/) |
| Related | GraphFrames, Apache Spark |
GraphX is the graph processing library of Apache Spark: it extends Spark's resilient distributed dataset (RDD) with a property graph, a directed multigraph with user-defined properties on each vertex and edge, and provides graph operators, a Pregel API and a library of graph algorithms.[2] GraphX still ships with Spark 4.3.0, but a 2024 proposal on the Spark dev mailing list noted no meaningful active development in the preceding three years.[3] The Spark community then voted to deprecate it, and as of Spark 4.3.0 that decision has not been applied to the code or documentation.[4][1]
Status
Whether GraphX is deprecated depends on which source is read, and the sources do not agree.
- Spark code and documentation (4.3.0): The
graphxmodule at the v4.3.0 tag has no@deprecatedannotations on its public API, and the GraphX programming guide has no deprecation notice.[2] The Spark 4.0.0 to 4.3.0 release notes list no GraphX deprecation; the 4.0.0 notes deprecate SparkR and other APIs, but not GraphX.[5] - Spark dev mailing list: In September 2024 a thread on the Spark dev mailing list proposed deprecating GraphX before the 4.0 branch was cut, noting no meaningful active development for over three years.[3] The vote that followed closed on 7 October 2024 and was declared passed, with two -1 votes. The result email proposed a documentation note saying that GraphX "is not currently maintained and if maintainers are not found may be removed in future minor versions", and recommended GraphFrames or openCypher on Spark as migration targets.[4]
- JIRA: SPARK-50857, "Mark GraphX as deprecated", was opened in January 2025 with a link to the vote. It is unresolved and has no fix version.[1]
- GraphFrames documentation: The GraphFrames project states that GraphX "is deprecated in the upstream Apache Spark and is not maintained anymore", and its quick start says GraphX was deprecated in Spark 4.0.x.[6][7] The GraphFrames blog links its statement that GraphX was deprecated to the dev-list discussion thread.[8] No Spark 4.x release includes a GraphX deprecation.
In short: the Spark community voted to deprecate GraphX and the vote result described it as unmaintained, but no Spark release up to 4.3.0 marks it deprecated. The GraphX module and its API are still part of Spark 4.3.0. Both the vote result and the GraphFrames project point new graph work to GraphFrames.
History
GraphX first shipped as an alpha component in Spark 0.9.0, where the release notes recommended it over the older Bagel API.[9] In Spark 1.2.0 GraphX graduated from alpha and gained a stable API, with a guarantee that applications written against it would keep working in future Spark versions without code changes. The same release introduced the aggregateMessages API and deprecated mapReduceTriplets.[10]
Programming model
A GraphX graph is a pair of distributed collections: a VertexRDD of vertex IDs and properties and an EdgeRDD of edges with properties. Like RDDs, graphs are immutable, distributed and fault tolerant; operators return new graphs.[2]
The guide groups the API into:[2]
- Property and structural operators, such as
mapVertices,reverse,subgraphandmask. - Join operators, such as
joinVerticesandouterJoinVertices, that bring RDD data into a graph. - Neighborhood aggregation through
aggregateMessages, which sends messages along edges and merges them at each vertex. - Pregel, a bulk-synchronous, vertex-centric API for iterative algorithms. The guide recommends it for iterative computation because it unpersists intermediate results correctly.
- Graph builders, such as
GraphLoader.edgeListFile,Graph.applyandGraph.fromEdges.
The algorithm library at the v4.3.0 tag contains PageRank, connected components, strongly connected components, label propagation, shortest paths, triangle count and SVD++.[11]
The following Scala example runs in the Spark 4.3 shell in classic mode, where sc is the SparkContext. It builds a three-vertex graph and runs dynamic PageRank until the ranks change by less than the tolerance.
import org.apache.spark.graphx.{Edge, Graph}
val users = sc.parallelize(Seq((1L, "alice"), (2L, "bob"), (3L, "carol")))
val follows = sc.parallelize(Seq(
Edge(1L, 2L, "follows"), Edge(2L, 3L, "follows"), Edge(3L, 1L, "follows")))
val graph = Graph(users, follows)
val ranks = graph.pageRank(0.0001).vertices
ranks.join(users).collect().foreach { case (_, (rank, name)) =>
println(f"$name%s: $rank%.3f")
}
Limitations
GraphX is built on RDDs and the SparkContext.[2] The Spark Connect documentation lists SparkContext and RDD as unsupported in Spark Connect for both Python and Scala, so GraphX programs need a classic Spark application rather than a Spark Connect client.[12] Because GraphX works on RDDs, it does not use the Catalyst optimizer that plans DataFrame queries; the GraphFrames project cites this, and the memory cost of serializing JVM objects in RDDs, as reasons for its DataFrame-based design.[6]
Alternatives
GraphFrames is a separate open source package that represents a graph as two Spark DataFrames (vertices and edges). It adds motif finding and runs through the DataFrame engine. It provides conversion to and from GraphX, and from version 0.10.0 it ships its own internal fork of GraphX for the algorithms that it does not yet implement natively.[7] The October 2024 vote result also named openCypher on Spark as a possible target.[4]
See also
References
- ↑ 1.0 1.1 1.2 SPARK-50857: Mark GraphX as deprecated. Apache Software Foundation JIRA.Retrieved 2026-11-22.
- ↑ 2.0 2.1 2.2 2.3 2.4 GraphX Programming Guide (docs/graphx-programming-guide.md at v4.3.0). Apache Software Foundation.Retrieved 2026-11-22.
- ↑ 3.0 3.1 [DISCUSS Deprecate GraphX OR Find new maintainers interested in GraphX OR leave it as is?]. [email protected], 2024-09-29.Retrieved 2026-11-22.
- ↑ 4.0 4.1 4.2 Re: [VOTE Officialy Deprecate GraphX in Spark 4]. [email protected], 2024-10-07.Retrieved 2026-11-22.
- ↑ Spark Release 4.0.0. Apache Software Foundation.Retrieved 2026-11-22.
- ↑ 6.0 6.1 About GraphFrames. GraphFrames.Retrieved 2026-11-22.
- ↑ 7.0 7.1 Quick-Start. GraphFrames.Retrieved 2026-11-22.
- ↑ GraphFrames is back!. GraphFrames, 2025-08-01.Retrieved 2026-11-22.
- ↑ Spark Release 0.9.0. Apache Software Foundation.Retrieved 2026-11-22.
- ↑ Spark Release 1.2.0. Apache Software Foundation.Retrieved 2026-11-22.
- ↑ graphx/src/main/scala/org/apache/spark/graphx/lib at v4.3.0. GitHub.Retrieved 2026-11-22.
- ↑ Spark Connect Overview (Spark 4.3.0). Apache Software Foundation.Retrieved 2026-11-22.