Spark-submit How to submit a task __spark

Source: Internet
Author: User

Spark-submit command

(cluster mode) restricts resources, and when resources are insufficient, they are stuck in allocating resources (--total-executor-cores and--executor-cores as totals and cores quantities per point)
Spark-submit--class test. Streamings--master spark://10.102.34.248:7077--deploy-mode cluster--executor-memory 500M--total-executor-cores 5 Sparkdemo-0.0.1-snapshot.jar

(cluster mode) console output (without limiting resources), available for debugging
Spark-submit--class test. Streamings--master spark://10.102.34.248:7077 Sparkdemo-0.0.1-snapshot.jar

(cluster mode) console no output (no Limit resources), submit task, maximum resource allocation
Spark-submit--class test. Streamings--master spark://10.102.34.248:7077--deploy-mode cluster Sparkdemo-0.0.1-snapshot.jar

(Single point mode) console output
Spark-submit--class test. Streamings Sparkdemo-0.0.1-snapshot.jar


Official explanation:

Spark-submit--help

Options:
--master Master_url spark://host:port, mesos://host:port, yarn, or Local.
--deploy-mode Deploy_mode Whether to launch the driver program locally ("Client") or
On one of the worker machines inside the cluster ("cluster")
(default:client).
--class class_name Your application ' s main class (for Java/scala apps).
--name name A name of your application.
--jars jars comma-separated List of local jars to include on the driver
and executor classpaths.
--packages comma-separated List of maven coordinates of jars to include
On the driver and executor classpaths. Would search the local
Maven repo, then maven and any additional remote
Repositories given by--repositories. The format for the
coordinates should be groupId:artifactId:version.
--exclude-packages comma-separated List of Groupid:artifactid, to exclude while
Resolving the dependencies provided in--packages to avoid
Dependency conflicts.
--repositories comma-separated List of additional remote repositories to
Search for the MAVEN coordinates given with--packages.
--py-files py_files comma-separated List of. zip,. Egg, or. py files to place
On the Pythonpath for Python apps.
--files files comma-separated List of files to is placed in the working
Directory of each executor.

--conf prop=value arbitrary Spark configuration property.
--properties-file file Path to a file from which to load extra properties. If not
Specified, this'll look for conf/spark-defaults.conf.

--driver-memory MEM Memory for driver (e.g. 1000M, 2G) (default:1024m).
--driver-java-options Extra Java options to the driver.
--driver-library-path Extra Library Path entries to the driver.
--driver-class-path Extra class path entries to the driver. Note that
Jars added with--jars are automatically included in the
Classpath.

--executor-memory MEM memory per executor (e.g. 1000M, 2G) (default:1g).

--proxy-user NAME user to impersonate when submitting the application.
This argument does is not work with--principal/--keytab.

--help,-H show the This Help and exit.
--verbose,-v Print additional debug output.
--version, Print the version of current Spark.

Spark standalone with cluster deploy mode only:
--driver-cores NUM cores for driver (default:1).

Spark Standalone or Mesos with cluster deploy mode only:
--supervise If Given, restarts the driver on failure.
--kill submission_id If Given, kills the driver specified.
--status submission_id If Given, requests the status of the driver specified.

Spark Standalone and Mesos only:
--total-executor-cores NUM total cores to all executors.

Spark Standalone and YARN only:
--executor-cores NUM number of cores per executor. (Default:1 in YARN mode,
or all available cores on the worker in standalone mode)

Yarn-only:
--driver-cores NUM number of cores used by the driver, but in cluster mode
(default:1).
--queue queue_name the YARN queue to submit to (default: "Default").
--num-executors num number of executors to launch (Default:2).
If dynamic allocation is enabled, the initial number of
Executors'll is at least NUM.
--archives Archives Comma separated list of archives to is extracted into the
Working directory of each executor.
--principal principal principal to is used to login to KDC, while running on
Secure HDFS.
--keytab keytab the ' full path ' to the ' file that contains ' keytab for the
Principal specified above. This keytab is copied to
The node running the application Master via the Secure
Distributed Cache, for renewing the login tickets and the
Delegation tokens periodically.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.