|Developer(s)||Apache Software Foundation, UC Berkeley AMPLab, Databricks|
|Initial release||May 30, 2014|
|Stable release||v1.5.2 / November 9, 2015|
|Written in||Scala, Java, Python, R|
|Operating system||Linux, Mac OS, Windows|
|Type||data analytics, machine learning algorithms|
|License||Apache License 2.0|
Apache Spark is an open source cluster computing framework originally developed in the AMPLab at University of California, Berkeley but was later donated to the Apache Software Foundation where it remains today. In contrast to Hadoop's two-stage disk-based MapReduce paradigm, Spark's multi-stage in-memory primitives provides performance up to 100 times faster for certain applications. By allowing user programs to load data into a cluster's memory and query it repeatedly, Spark is well-suited to machine learning algorithms.
Spark requires a cluster manager and a distributed storage system. For cluster management, Spark supports standalone (native Spark cluster), Hadoop YARN, or Apache Mesos. For distributed storage, Spark can interface with a wide variety, including Hadoop Distributed File System (HDFS), Cassandra, OpenStack Swift, Amazon S3, Kudu, or a custom solution can be implemented. Spark also supports a pseudo-distributed local mode, usually used only for development or testing purposes, where distributed storage is not required and the local file system can be used instead; in such a scenario, Spark is run on a single machine with one executor per CPU core.
Spark had in excess of 465 contributors in 2014, making it not only the most active project in the Apache Software Foundation but one of the most active open source big data projects.
|Version||Original release date||Latest version||Release date||Status|
|Old version, no longer supported: 0.5||2012-06-12||0.5.1||2012-10-07||No longer supported|
|Old version, no longer supported: 0.6||2012-10-14||0.6.1||2012-11-16||No longer supported|
|Old version, no longer supported: 0.7||2013-02-27||0.7.3||2013-07-16||No longer supported|
|Old version, no longer supported: 0.8||2013-09-25||0.8.1||2013-12-19||No longer supported|
|Old version, no longer supported: 0.9||2014-02-02||0.9.2||2014-07-23||No longer supported|
|Old version, no longer supported: 1.0||2014-05-30||1.0.2||2014-08-05||No longer supported|
|Old version, no longer supported: 1.1||2014-09-11||1.1.1||2014-11-26||No longer supported|
|Old version, no longer supported: 1.2||2014-12-18||1.2.2||2015-04-17||No longer supported|
|Old version, no longer supported: 1.3||2015-03-13||1.3.1||2015-04-17||No longer supported|
|Old version, no longer supported: 1.4||2015-06-11||1.4.1||2015-07-15||No longer supported|
|Current stable version: 1.5||2015-09-09||1.5.2||2015-11-09||Latest|
The Spark project consists of multiple components.
Spark Core and Resilient Distributed Datasets
Spark Core is the foundation of the overall project. It provides distributed task dispatching, scheduling, and basic I/O functionalities. The fundamental programming abstraction is called Resilient Distributed Datasets (RDDs), a logical collection of data partitioned across machines. RDDs can be created by referencing datasets in external storage systems, or by applying coarse-grained transformations (e.g. map, filter, reduce, join) on existing RDDs.
An RDD is a collection of items distributed across many nodes that can be manipulated in parallel. Spark Core provides many APIs for building and manipulating these collections. An RDD in Spark is simply an immutable distributed collection of objects. Each RDD is split into multiple partitions, which may be computed on different nodes of the cluster. RDDs can contain any type of Python, Java, or Scala objects, including user-defined classes. Users can create RDDs in two ways: by loading an external dataset, or by distributing a collection of objects in their driver program. RDDs offer two types of operations after creation: transformations and actions. Transformations construct a new RDD. Actions, on the other hand, compute a result based on an RDD, and either return it to the driver program or save it to an external storage system.
The RDD abstraction is exposed through a language-integrated API in Java, Python, Scala, and R similar to local, in-process collections. This simplifies programming complexity because the way applications manipulate RDDs is similar to manipulating local collections of data.
A Spark cluster is composed of one Driver JVM and one or many Executor JVMs.
Spark SQL is a component on top of Spark Core that introduces a new data abstraction called DataFrames, which provides support for structured and semi-structured data. Spark SQL provides a domain-specific language to manipulate DataFrames in Scala, Java, or Python. It also provides SQL language support, with command-line interfaces and ODBC/JDBC server. Prior to version 1.3 of Spark, DataFrames were referred to as SchemaRDDs.
Spark Streaming leverages Spark Core's fast scheduling capability to perform streaming analytics. It ingests data in mini-batches and performs RDD transformations on those mini-batches of data. This design enables the same set of application code written for batch analytics to be used in streaming analytics, on a single engine.
MLlib Machine Learning Library
Spark MLlib is a distributed machine learning framework on top of Spark Core that, due in large part of the distributed memory-based Spark architecture, is as much as nine times as fast as the disk-based implementation used by Apache Mahout (according to benchmarks done by the MLlib developers against the Alternating Least Squares (ALS) implementations, and before Mahout itself gained a Spark interface), and scales better than Vowpal Wabbit. Many common machine learning and statistical algorithms have been implemented and are shipped with MLlib which simplifies large scale machine learning pipelines, including:
- summary statistics, correlations, stratified sampling, hypothesis testing, random data generation
- classification and regression: state vector machines, logistic regression, linear regression, decision trees, naive Bayes classification
- collaborative filtering techniques including alternating least squares (ALS)
- cluster analysis methods including k-means, and Latent Dirichlet Allocation (LDA)
- dimensionality reduction techniques such as singular value decomposition (SVD), and principal component analysis (PCA)
- feature extraction and transformation functions
- optimization primitives such as stochastic gradient descent, limited-memory BFGS (L-BFGS)
GraphX is a distributed graph processing framework on top of Spark. It provides an API for expressing graph computation that can model the Pregel abstraction. It also provides an optimized runtime for this abstraction.
Like Spark, GraphX initially started as a research project at UC Berkeley's AMPLab and Databricks, and was later donated to the Apache Software Foundation and the Spark project.
- APIs and libraries for Java, Scala, Python, R, and other languages.
- Scalability to over 8000 nodes in production.
- Ability to cache datasets in memory for interactive data analysis: extract a working set, cache it, query it repeatedly.
- Interactive command line interface (in Scala or Python) for low-latency, horizontally scalable, data exploration.
- Higher level library for stream processing, using Spark Streaming.
- Support for structured and relational query processing (SQL), through Spark SQL.
- Higher level libraries for machine learning and graph processing.
- Xin, Reynold; Rosen, Josh; Zaharia, Matei; Franklin, Michael; Shenker, Scott; Stoica, Ion (June 2013). "Shark: SQL and Rich Analytics at Scale" (PDF).
- Matei Zaharia. Spark: In-Memory Cluster Computing for Iterative and Interactive Applications. Invited Talk at NIPS 2011 Big Learning Workshop: Algorithms, Systems, and Tools for Learning at Scale.
- "Cluster Mode Overview - Spark 1.2.0 Documentation - Cluster Manager Types". apache.org. Apache Foundation. 2014-12-18. Retrieved 2015-01-18.
- Figure showing Spark in relation to other open-source Software projects including Hadoop
- Doan, DuyHai (2014-09-10). "Re: cassandra + spark / pyspark". Cassandra User (Mailing list). Retrieved 2014-11-21.
- Open HUB Spark development activity
- "The Apache Software Foundation Announces Apache™ Spark™ as a Top-Level Project". apache.org. Apache Software Foundation. 27 February 2014. Retrieved 4 March 2014.
- Spark officially sets a new record in large-scale sorting
- Sparks, Evan; Talwalkar, Ameet (2013-08-06). "Spark Meetup: MLbase, Distributed Machine Learning with Spark". slideshare.net. Spark User Meetup, San Francisco, California. Retrieved 10 February 2014.
- Gonzalez, Joseph; Xin, Reynold; Dave, Ankur; Crankshaw, Daniel; Franklin, Michael; Stoica, Ion (Oct 2014). "GraphX: Graph Processing in a Distributed Dataflow Framework" (PDF).
- "Apache Spark FAQ". apache.org. Apache Software Foundation. Retrieved 5 December 2014.
- Official website
- Spark SQL
- Spark Streaming
- MLlib machine learning library
- GraphX graph processing library