Skip to content

metamx/spark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This branch applies the following additional commits:

  • Add hadoop-cloud module - f273b219ba9836508c02f6984f1e0d0ba5c15724

  • Jets3t updated to fix aws v4 signatures - 475b30508c0ea5e9efad4fc0d0a266233fb76226

  • Fix a bug in Netty - c7bd2bb13840f95bce016579b223a440d9354fda

  • CodeStyle Edits - ee8621ee423e6ed28913d9f7abb825e957a556d5

  • Support for handling unavailability - 60a464d39b4691f4ce13b34a8da353c1adf7e76f

  • Fix for an error that crept in while Backporting - b1710c1bd856e6e9175f323623eea2b91d06654c

  • Support For Mesos Checkpointing - c741fb995c79fd6c740c439f0cf3cfd504a0358e

  • To ignore one test in ExecutorAllocationManagerSuite: 5b47b371a1e9fe25aa9772846fe049fd1feb2957

  • To reduce the size of event logs: 87beed407f170873e05eae63b99d28558448ae49, 757258aaeaffb425d2398235284462e8c30c82f3, f94c93193bbec9a63f9636ce32333cc16f00b0c5

Apache Spark

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 [http://spark.apache.org/developer-tools.html](the Useful Developer Tools page).

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.

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" 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.

Packages

No packages published

Languages

  • Scala 77.3%
  • Java 10.1%
  • Python 7.7%
  • R 3.3%
  • Shell 0.6%
  • JavaScript 0.5%
  • Other 0.5%