Apache Spark - A unified analytics engine for large-scale data processing
Go to file
Xiangrui Meng db34690466 [SPARK-5599] Check MLlib public APIs for 1.3
There are no break changes (against 1.2) in this PR. I hide the PythonMLLibAPI, which is only called by Py4J, and renamed `SparseMatrix.diag` to `SparseMatrix.spdiag`. All other changes are documentation and annotations. The `Experimental` tag is removed from `ALS.setAlpha` and `Rating`. One issue not addressed in this PR is the `setCheckpointDir` in `LDA` (https://issues.apache.org/jira/browse/SPARK-5604).

CC: srowen jkbradley

Author: Xiangrui Meng <meng@databricks.com>

Closes #4377 from mengxr/SPARK-5599 and squashes the following commits:

17975dc [Xiangrui Meng] fix tests
4487f20 [Xiangrui Meng] remove experimental tag from each stat method because Statistics is experimental already
3cd969a [Xiangrui Meng] remove freeman (sorry~) from StreamLA public doc
55900f5 [Xiangrui Meng] make IR experimental and update its doc
9b8eed3 [Xiangrui Meng] graduate Rating and setAlpha in ALS
b854d28 [Xiangrui Meng] correct iid doc in RandomRDDs
27f5bdd [Xiangrui Meng] update linalg docs and some new method signatures
371721b [Xiangrui Meng] mark fpg as experimental and update its doc
8aca7ee [Xiangrui Meng] change SLR to experimental and update the doc
ebbb2e9 [Xiangrui Meng] mark PIC experimental and update the doc
7830d3b [Xiangrui Meng] mark GMM experimental
a378496 [Xiangrui Meng] use the correct subscript syntax in PIC
c65c424 [Xiangrui Meng] update LDAModel doc
a213b0c [Xiangrui Meng] update GMM constructor
3993054 [Xiangrui Meng] hide algorithm in SLR
ad6b9ce [Xiangrui Meng] Revert "make ClassificatinModel.predict(JavaRDD) return JavaDoubleRDD"
0054684 [Xiangrui Meng] add doc to LRModel's constructor
a89763b [Xiangrui Meng] make ClassificatinModel.predict(JavaRDD) return JavaDoubleRDD
7c0946c [Xiangrui Meng] hide PythonMLLibAPI
2015-02-04 23:03:47 -08:00
assembly [SPARK-4809] Rework Guava library shading. 2015-01-28 00:29:29 -08:00
bagel [SPARK-4048] Enhance and extend hadoop-provided profile. 2015-01-08 17:15:13 -08:00
bin [SPARK-5341] Use maven coordinates as dependencies in spark-shell and spark-submit 2015-02-03 22:39:17 -08:00
build [SPARK-5188][BUILD] make-distribution.sh should support curl, not only wget to get Tachyon 2015-01-28 12:43:22 -08:00
conf [SPARK-5422] Add support for sending Graphite metrics via UDP 2015-01-31 23:41:05 -08:00
core [SPARK-5411] Allow SparkListeners to be specified in SparkConf and loaded when creating SparkContext 2015-02-04 17:18:03 -08:00
data/mllib SPARK-2363. Clean MLlib's sample data files 2014-07-13 19:27:43 -07:00
dev SPARK-5542: Decouple publishing, packaging, and tagging in release script 2015-02-02 21:00:30 -08:00
docker [SPARK-1342] Scala 2.10.4 2014-04-01 18:35:50 -07:00
docs [SPARK-5411] Allow SparkListeners to be specified in SparkConf and loaded when creating SparkContext 2015-02-04 17:18:03 -08:00
ec2 [SPARK-5434] [EC2] Preserve spaces in EC2 path 2015-01-28 12:56:03 -08:00
examples [SPARK-1405] [mllib] Latent Dirichlet Allocation (LDA) using EM 2015-02-02 23:57:37 -08:00
external [SPARK-4707][STREAMING] Reliable Kafka Receiver can lose data if the blo... 2015-02-04 14:20:44 -08:00
extras [SPARK-5155] Build fails with spark-ganglia-lgpl profile 2015-02-01 17:53:56 -08:00
graphx [SPARK-4795][Core] Redesign the "primitive type => Writable" implicit APIs to make them be activated automatically 2015-02-03 20:17:12 -08:00
mllib [SPARK-5599] Check MLlib public APIs for 1.3 2015-02-04 23:03:47 -08:00
network [SPARK-3996]: Shade Jetty in Spark deliverables 2015-02-01 21:13:57 -08:00
project [SQL][Hiveconsole] Bring hive console code up to date and update README.md 2015-02-04 15:13:54 -08:00
python [SQL][DataFrame] Minor cleanup. 2015-02-04 19:51:48 -08:00
repl Spark 3883: SSL support for HttpServer and Akka 2015-02-02 17:27:26 -08:00
sbin [SPARK-5176] The thrift server does not support cluster mode 2015-02-01 17:57:31 -08:00
sbt Adde LICENSE Header to build/mvn, build/sbt and sbt/sbt 2014-12-29 10:48:53 -08:00
sql [SPARK-5602][SQL] Better support for creating DataFrame from local data collection 2015-02-04 19:53:57 -08:00
streaming [Minor] Fix incorrect warning log 2015-02-04 00:52:41 -08:00
tools SPARK-4159 [CORE] Maven build doesn't run JUnit test suites 2015-01-06 12:02:08 -08:00
yarn SPARK-3996: Add jetty servlet and continuations. 2015-02-02 21:01:36 -08:00
.gitattributes [SPARK-3870] EOL character enforcement 2014-10-31 12:39:52 -07:00
.gitignore [SPARK-4501][Core] - Create build/mvn to automatically download maven/zinc/scalac 2014-12-27 13:26:38 -08:00
.rat-excludes [HOTFIX] Fix RAT exclusion for known_translations file 2014-12-16 23:00:25 -08:00
CONTRIBUTING.md [Docs] minor grammar fix 2014-09-17 12:33:09 -07:00
LICENSE SPARK-3926 [CORE] Reopened: result of JavaRDD collectAsMap() is not serializable 2014-12-08 16:13:03 -08:00
make-distribution.sh [SPARK-5188][BUILD] make-distribution.sh should support curl, not only wget to get Tachyon 2015-01-28 12:43:22 -08:00
NOTICE SPARK-1827. LICENSE and NOTICE files need a refresh to contain transitive dependency info 2014-05-14 09:38:33 -07:00
pom.xml SPARK-5607: Update to Kryo 2.24.0 to avoid including objenesis 1.2. 2015-02-04 22:39:44 -08:00
README.md [Docs] Fix Building Spark link text 2015-02-02 12:33:49 -08:00
scalastyle-config.xml [Core] Upgrading ScalaStyle version to 0.5 and removing SparkSpaceAfterCommentStartChecker. 2014-10-16 02:05:44 -04:00
tox.ini [SPARK-3073] [PySpark] use external sort in sortBy() and sortByKey() 2014-08-26 16:57:40 -07:00

Apache Spark

Spark is a fast and general cluster computing system for Big Data. It provides high-level APIs in Scala, Java, and Python, 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 structured data processing, 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 and project wiki. This README file only contains basic setup instructions.

Building Spark

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

mvn -DskipTests clean package

(You do not need to do this if you downloaded a pre-built package.) More detailed documentation is available from the project site, at "Building Spark".

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-cluster" or "yarn-client" 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 all automated 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. See also "Third Party Hadoop Distributions" for guidance on building a Spark application that works with a particular distribution.

Configuration

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