• Stars
    star
    353
  • Rank 120,322 (Top 3 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created about 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Former GraphX development repository. GraphX has been merged into Apache Spark; please submit pull requests there.

Apache Spark

Lightning-Fast Cluster Computing - http://spark.apache.org/

Online Documentation

You can find the latest Spark documentation, including a programming guide, on the project webpage at http://spark.apache.org/documentation.html. This README file only contains basic setup instructions.

Building

Spark requires Scala 2.10. The project is built using Simple Build Tool (SBT), which can be obtained here. If SBT is installed we will use the system version of sbt otherwise we will attempt to download it automatically. To build Spark and its example programs, run:

./sbt/sbt assembly

Once you've built Spark, the easiest way to start using it is the shell:

./bin/spark-shell

Or, for the Python API, the Python shell (./bin/pyspark).

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 org.apache.spark.examples.SparkLR local[2]

will run the Logistic Regression example locally on 2 CPUs.

Each of the example programs prints usage help if no params are given.

All of the Spark samples take a <master> parameter that is the cluster URL to connect to. This can be a mesos:// or spark:// URL, or "local" to run locally with one thread, or "local[N]" to run locally with N threads.

Running tests

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

./sbt/sbt test

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. You can change the version by setting the SPARK_HADOOP_VERSION environment when building Spark.

For Apache Hadoop versions 1.x, Cloudera CDH MRv1, and other Hadoop versions without YARN, use:

# Apache Hadoop 1.2.1
$ SPARK_HADOOP_VERSION=1.2.1 sbt/sbt assembly

# Cloudera CDH 4.2.0 with MapReduce v1
$ SPARK_HADOOP_VERSION=2.0.0-mr1-cdh4.2.0 sbt/sbt assembly

For Apache Hadoop 2.2.X, 2.1.X, 2.0.X, 0.23.x, Cloudera CDH MRv2, and other Hadoop versions with YARN, also set SPARK_YARN=true:

# Apache Hadoop 2.0.5-alpha
$ SPARK_HADOOP_VERSION=2.0.5-alpha SPARK_YARN=true sbt/sbt assembly

# Cloudera CDH 4.2.0 with MapReduce v2
$ SPARK_HADOOP_VERSION=2.0.0-cdh4.2.0 SPARK_YARN=true sbt/sbt assembly

# Apache Hadoop 2.2.X and newer
$ SPARK_HADOOP_VERSION=2.2.0 SPARK_YARN=true sbt/sbt assembly

When developing a Spark application, specify the Hadoop version by adding the "hadoop-client" artifact to your project's dependencies. For example, if you're using Hadoop 1.2.1 and build your application using SBT, add this entry to libraryDependencies:

"org.apache.hadoop" % "hadoop-client" % "1.2.1"

If your project is built with Maven, add this to your POM file's <dependencies> section:

<dependency>
  <groupId>org.apache.hadoop</groupId>
  <artifactId>hadoop-client</artifactId>
  <version>1.2.1</version>
</dependency>

Configuration

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

Contributing to Spark

Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.

More Repositories

1

shark

Development in Shark has been ended.
Scala
994
star
2

SparkNet

Distributed Neural Networks for Spark
Scala
605
star
3

keystone

Simplifying robust end-to-end machine learning on Apache Spark.
Scala
468
star
4

spark-ec2

Scripts used to setup a Spark cluster on EC2
Python
390
star
5

snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
C++
287
star
6

succinct

Enabling queries on compressed data.
Java
277
star
7

docker-scripts

Dockerfiles and scripts for Spark and Shark Docker images
Shell
259
star
8

spark-indexedrdd

An efficient updatable key-value store for Apache Spark
Scala
249
star
9

datascience-sp14

Repository for data science course Spring 14
Shell
182
star
10

MLI

An API for Distributed Machine Learning
Scala
154
star
11

training

Training materials for Strata, AMP Camp, etc
Scala
150
star
12

drizzle-spark

Drizzle integration with Apache Spark
Scala
120
star
13

carat

Carat: Collaborative Energy Debugging
Java
114
star
14

velox-modelserver

Scala
110
star
15

benchmark

Large scale query engine benchmark
Python
99
star
16

ml-matrix

Distributed Matrix Library
Scala
70
star
17

ampcrowd

A RESTful web service that runs microtasks across multiple crowds, provides quality control techniques, and is easily extensible.
Python
51
star
18

smash

Benchmarking toolkit for variant calling
Python
46
star
19

training-scripts

Scripts to launch cluster used for Strata
Python
33
star
20

ernest

Code for Ernest
Python
32
star
21

cyclades

Cyclades
C++
28
star
22

succinct-cpp

Succinct C++
C++
25
star
23

ampcamp

scripts used for ampcamp
Python
16
star
24

zipg

A Memory-efficient Graph Store for Interactive Queries
Java
12
star
25

orchestra

Fine-Grained Distributed Computing
Python
11
star
26

iolap

Scala
11
star
27

cs262a-fall2016

HTML
9
star
28

sprint

Sprint Transformations for RegEx queries
C++
8
star
29

keystone-example

A example skeleton for an application built on top of KeystoneML
Shell
8
star
30

mlsys

An open source survey of the emerging systems for large-scale machine learning.
CSS
4
star
31

clipper-v0

Rust
3
star
32

ray-core

Experiments for the Ray backend
C++
3
star
33

Buggypedia

Objective-C
3
star
34

sparse-covariance-inverse

1
star
35

siren-release

Public version of the SiRen project
Scala
1
star
36

keystone-integration-tests

Integration Tests for KeystoneML
Shell
1
star
37

ampcrowd-client-py

A python client for using the AMPCrowd service
Python
1
star