apache/spark


Apache Spark

License: Apache-2.0

Language: Scala

Keywords: big-data, java, jdbc, python, r, scala, spark, sql


Apache Spark

Jenkins Build AppVeyor Build PySpark Coverage

Spark is a fast and general cluster computing system for Big Data. It provides high-level APIs in Scala, Java, Python, and R, and an optimized engine that supports general computation graphs for data analysis. It also supports a rich set of higher-level tools including Spark SQL for SQL and DataFrames, MLlib for machine learning, GraphX for graph processing, and Spark Streaming for stream processing.

http://spark.apache.org/

Online Documentation

You can find the latest Spark documentation, including a programming guide, on the project web page. This README file only contains basic setup instructions.

Building Spark

Spark is built using Apache Maven. To build Spark and its example programs, run:

build/mvn -DskipTests clean package

(You do not need to do this if you downloaded a pre-built package.)

You can build Spark using more than one thread by using the -T option with Maven, see "Parallel builds in Maven 3". More detailed documentation is available from the project site, at "Building Spark".

For general development tips, including info on developing Spark using an IDE, see "Useful Developer Tools".

Interactive Scala Shell

The easiest way to start using Spark is through the Scala shell:

./bin/spark-shell

Try the following command, which should return 1000:

scala> sc.parallelize(1 to 1000).count()

Interactive Python Shell

Alternatively, if you prefer Python, you can use the Python shell:

./bin/pyspark

And run the following command, which should also return 1000:

>>> sc.parallelize(range(1000)).count()

Example Programs

Spark also comes with several sample programs in the examples directory. To run one of them, use ./bin/run-example <class> [params]. For example:

./bin/run-example SparkPi

will run the Pi example locally.

You can set the MASTER environment variable when running examples to submit examples to a cluster. This can be a mesos:// or spark:// URL, "yarn" to run on YARN, and "local" to run locally with one thread, or "local[N]" to run locally with N threads. You can also use an abbreviated class name if the class is in the examples package. For instance:

MASTER=spark://host:7077 ./bin/run-example SparkPi

Many of the example programs print usage help if no params are given.

Running Tests

Testing first requires building Spark. Once Spark is built, tests can be run using:

./dev/run-tests

Please see the guidance on how to run tests for a module, or individual tests.

There is also a Kubernetes integration test, see resource-managers/kubernetes/integration-tests/README.md

A Note About Hadoop Versions

Spark uses the Hadoop core library to talk to HDFS and other Hadoop-supported storage systems. Because the protocols have changed in different versions of Hadoop, you must build Spark against the same version that your cluster runs.

Please refer to the build documentation at "Specifying the Hadoop Version and Enabling YARN" for detailed guidance on building for a particular distribution of Hadoop, including building for particular Hive and Hive Thriftserver distributions.

Configuration

Please refer to the Configuration Guide in the online documentation for an overview on how to configure Spark.

Contributing

Please review the Contribution to Spark guide for information on how to get started contributing to the project.

Project Statistics

Sourcerank 19
Repository Size 305 MB
Stars 24,383
Forks 20,625
Watchers 2,136
Open issues disabled
Dependencies 481
Contributors 709
Tags 168
Created
Last updated
Last pushed

Top Contributors See all

Matei Zaharia Reynold Xin Patrick Wendell Wenchen Fan Tathagata Das Josh Rosen Shixiong Zhu Sean Owen Hyukjin Kwon Xiao Li Liang-Chi Hsieh Dongjoon Hyun Marcelo Vanzin Cheng Lian Xiangrui Meng Yanbo Liang Michael Armbrust Ankur Dave Yin Huai Shivaram Venkataraman

Packages Referencing this Repo

org.apache.spark:spark-mllib_2.11
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-hive_2.11
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-network-yarn_2.11
Apache Spark
Latest release 2.3.1 - Updated - 24.4K stars
org.apache.spark:spark-graphx_2.10
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-streaming-kinesis-asl_2.10
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-assembly_2.10
Apache Spark
Latest release 1.6.0-cdh5.12.0 - Updated - 24.4K stars
org.apache.spark:spark-core_2.11
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-yarn-history_2.10
Apache Spark
Latest release 1.2.1.3.0.1.0-1 - Updated - 24.4K stars
org.apache.spark:spark-parent_2.10
Apache Spark
Latest release 2.2.1 - Updated - 24.4K stars
org.apache.spark:spark-graphx_2.11
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-streaming-mqtt_2.10
Apache Spark
Latest release 1.6.3 - Updated - 24.4K stars
org.apache.spark:spark-catalyst_2.10
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-streaming-flume_2.11
Apache Spark
Latest release 2.3.1 - Updated - 24.4K stars
org.apache.spark:spark-examples_2.10
Apache Spark
Latest release 1.1.1 - Updated - 24.4K stars
org.apache.spark:spark-ganglia-lgpl_2.10
Apache Spark
Latest release 2.2.0 - Updated - 24.4K stars
org.apache.spark:spark-bagel_2.11
Apache Spark
Latest release 1.6.3 - Updated - 24.4K stars
org.spark-project.spark:unused
Apache Spark
Latest release 1.0.0 - Published - 24.4K stars
pyspark
Apache Spark Python API
Latest release 2.4.3 - Updated - 24.4K stars
org.apache.spark:spark-streaming_2.10
Apache Spark
This package is no longer available on Maven
org.apache.spark:spark-network-common_2.10
Apache Spark
This package is no longer available on Maven

Recent Tags See all

v2.4.3-rc1 April 30, 2019
v2.4.3 April 30, 2019
v2.4.2-rc1 April 18, 2019
v2.4.2 April 18, 2019
v2.4.1-rc9 March 26, 2019
v2.4.1 March 26, 2019
v2.4.1-rc8 March 10, 2019
v2.4.1-rc7 March 08, 2019
v2.4.1-rc6 March 01, 2019
v2.4.1-rc5 February 22, 2019
v2.4.1-rc4 February 21, 2019
v2.4.1-rc3 February 21, 2019
v2.4.1-rc2 February 19, 2019
v2.4.1-rc1 February 12, 2019
v2.3.3-rc2 February 04, 2019

Interesting Forks See all

apache-spark-on-k8s/spark
Apache Spark enhanced with native Kubernetes scheduler back-end
Scala - Apache-2.0 - Last pushed - 448 stars - 90 forks
thunderain-project/StreamSQL
Mirror of Apache Spark
Scala - Other - Last pushed - 59 stars - 7 forks
palantir/spark
Palantir Distribution of Apache Spark
Scala - Apache-2.0 - Last pushed - 44 stars - 40 forks
Microsoft/spark
Mirror of Apache Spark
Scala - Other - Last pushed - 44 stars - 28 forks
IBMSparkGPU/SparkGPU
GPU* or SPARK* branches are used for generating GPU code in Tungsten/concact:@kiszk, MLlib branch...
Scala - Other - Last pushed - 36 stars - 10 forks

Something wrong with this page? Make a suggestion

Last synced: 2019-04-24 03:47:28 UTC

Login to resync this repository