Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked fromapache/spark

Mirror of Apache Spark

License

NotificationsYou must be signed in to change notification settings

zhagnlu/spark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spark is a fast and general cluster computing system for Big Data. 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 Spark Streaming for stream processing.

http://spark.apache.org/

Online Documentation

You can find the latest Spark documentation, including a programmingguide, on theproject web pageandproject wiki.This README file only contains basic setup instructions.

Building Spark

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.)More detailed documentation is available from the project site, at"Building Spark".For developing Spark using an IDE, seeEclipseandIntelliJ.

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

A Note About Hadoop Versions

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"for detailed guidance on building for a particular distribution of Hadoop, includingbuilding for particular Hive and Hive Thriftserver distributions.

Configuration

Please refer to theConfiguration Guidein the online documentation for an overview on how to configure Spark.

About

Mirror of Apache Spark

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala77.6%
  • Java9.7%
  • Python8.0%
  • R2.7%
  • Shell0.7%
  • GAP0.6%
  • Other0.7%

[8]ページ先頭

©2009-2025 Movatter.jp