- Notifications
You must be signed in to change notification settings - Fork0
Mirror of Apache Spark
License
Apache-2.0, Apache-2.0 licenses found
Licenses found
rdblue/spark
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Spark is a unified analytics engine for large-scale data processing. It provideshigh-level APIs in Scala, Java, Python, and R, and an optimized engine thatsupports general computation graphs for data analysis. It also supports arich set of higher-level tools including Spark SQL for SQL and DataFrames,MLlib for machine learning, GraphX for graph processing,and Structured Streaming for stream processing.
You can find the latest Spark documentation, including a programmingguide, on theproject web page.This README file only contains basic setup instructions.
Spark is built usingApache 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".
The easiest way to start using Spark is through the Scala shell:
./bin/spark-shell
Try the following command, which should return 1,000,000,000:
scala> spark.range(1000 * 1000 * 1000).count()
Alternatively, if you prefer Python, you can use the Python shell:
./bin/pyspark
And run the following command, which should also return 1,000,000,000:
>>> spark.range(1000 * 1000 * 1000).count()
Spark also comes with several sample programs in theexamples
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 submitexamples to a cluster. This can be a mesos:// or spark:// URL,"yarn" to run on YARN, and "local" to runlocally with one thread, or "local[N]" to run locally with N threads. Youcan also use an abbreviated class name if the class is in theexamples
package. For instance:
MASTER=spark://host:7077 ./bin/run-example SparkPi
Many of the example programs print usage help if no params are given.
Testing first requiresbuilding Spark. Once Spark is built, testscan be run using:
./dev/run-tests
Please see the guidance on how torun tests for a module, or individual tests.
There is also a Kubernetes integration test, see resource-managers/kubernetes/integration-tests/README.md
Spark uses the Hadoop core library to talk to HDFS and other Hadoop-supportedstorage systems. Because the protocols have changed in different versions ofHadoop, 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, includingbuilding for particular Hive and Hive Thriftserver distributions.
Please refer to theConfiguration Guidein the online documentation for an overview on how to configure Spark.
Please review theContribution to Spark guidefor information on how to get started contributing to the project.
About
Mirror of Apache Spark
Resources
License
Apache-2.0, Apache-2.0 licenses found
Licenses found
Security policy
Stars
Watchers
Forks
Packages0
Languages
- Scala72.6%
- Java10.0%
- Python7.2%
- HiveQL4.6%
- R3.0%
- Shell0.5%
- Other2.1%