• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
导航菜单
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx
您的位置:首页 > 服务器 >云计算 > 【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要,spark1.3

【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要,spark1.3

作者:网友 字体:[增加 减小] 来源:互联网

本文主要包含【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要,spark1.3等服务器相关知识,网友希望可以进行参考

【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要,spark1.3


引言 由于工作需要,即将拥抱Spark,曾经进行过相关知识的学习,现在计划详细读一遍最新版本Spark1.3的部分官方文档,一是复习,二是了解最新进展,三是为公司团队培训做储备。
欢迎转载,请注明出处: http://blog.csdn.net/u010967382/article/details/45062381

原文URL:http://spark.apache.org/docs/latest/submitting-applications.html 该文档重点介绍如何将编写好的Spark应用程序提交到Spark集群中运行。
首先需要将应用程序的所有依赖都打包到应用程序jar中。 注意,无需将Spark和Hadoop作为依赖包加入集合jar中,因为在运行时Cluster Manager会提供这些系统级的依赖。
一旦程序打包好了,就可以通过bin/spark-submit脚本将应用程序提交给Spark集群。

bin/spark-submit脚本格式如下:
./bin/spark-submit \   --class <main-class>   --master <master-url> \   --deploy-mode <deploy-mode> \   --conf <key>=<value> \   ... # other options   <application-jar> \   [application-arguments]
一些常用的选项包括:
  • --class: 应用程序的入口类,包含main方法;
  • --master: 集群中Master节点的URL(e.g. spark://23.195.26.187:7077) ,该参数一言难尽,后面有详细说明;
  • --deploy-mode: 决定你的driver程序的运行位置,cluster模式是运行在worker节点上,client模式是运行在集群外部。默认是client模式;
  • --conf: 任意Spark的基础属性配置,用key=value格式;
  • application-jar: 指向应用程序jar包的路径,路径必须全局可见,要么是一个hdfs路径,要么是一个所有node本地都有的文件路径;
  • application-arguments: 应用程序接收的参数。

关于--deploy-mode参数:
  • client模式:一个常见的部署策略是从一台网关机器提交你的应用程序,这台机器和你的worker机器物理上很接近(例如集群中的Master节点)。在这样的场景下,client模式就非常适合。在client模式中,driver程序直接在spark-submit进程中启动,spark-submit进程对于集群来说就是一个客户端程序。应用程序的输入和输出都会通过控制台。这样的话,client模式就尤其适合包含REPL(“读取-求值-输出”循环,英语:Read-Eval-Print Loop,简称REPL)的应用程序,比如Spark shell。
  • cluster模式:另一个经典场景,cluster模式,如果你的应用程序从一台离workder机器较远的机器提交(例如从你的笔记本电脑上提交),通常会通过cluster模式来最小化driver和executors之间的网络延迟。注意,cluster模式现在尚未支持Mesos集群或者Python应用程序。

关于--master参数:
Master URL Meaning
local Run Spark locally with one worker thread (i.e. no parallelism at all).
local[K] Run Spark locally with K worker threads (ideally, set this to the number of cores on your machine).
local[*] Run Spark locally with as many worker threads as logical cores on your machine.
spark://HOST:PORT Connect to the given Spark standalone cluster master. The port must be whichever one your master is configured to use, which is 7077 by default.
mesos://HOST:PORT Connect to the given Mesos cluster. The port must be whichever one your is configured to use, which is 5050 by default. Or, for a Mesos cluster using ZooKeeper, use mesos://zk://....
yarn-client Connect to a YARN cluster in client mode. 
The cluster location will be found based on the HADOOP_CONF_DIR variable.
yarn-cluster Connect to a YARN cluster in cluster mode. 
The cluster location will be found based on HADOOP_CONF_DIR.

spark-submit脚本将默认读取conf/spark-defaults.conf中的配置属性,我们可以在conf/spark-defaults.conf文件中做好基础属性的配置,就无需在spark-submit脚本中重复指定了,例如,如果spark.master属性已经设置了,你就可以不用在调用spark-submit脚本时再次传入spark.master参数。

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 【甘道夫】Spark1.3.0 Submitting Applications 官方文档精华摘要,spark1.3

相关文章

  • The server has either erred or is incapable of performing the requested operation. (HTTP 500),erredincapable
  • Hadoop之——Linux基本命令回顾,hadooplinux回顾
  • 【Spark1.3官方翻译】 Spark Submit提交应用程序,spark1.3spark
  • openstack--计算节点安装(Node),openstack--node
  • python RESTful API框架:Eve 快速入门,pythonrestful
  • HDFS数据完整性,hdfs完整性
  • 吐槽Oozie: 挖好坑,等你跳!,oozie
  • 与Greenplum度过的三个星期,greenplum三个星期
  • Heron(一)—-storm的一些短板,heron-storm
  • AMQP server on c ontroller:5672 is unreachable: [Errno 113] EHOSTUNREACH. Trying again in 2 seconds.,ehostunreach

文章分类

  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx

最近更新的内容

    • redis主从同步,redis主从
    • mahout简介及安装配置
    • Centos 安装R 集成 Hadoop、RHive 配置安装手册,centoshadoop
    • Scala类型详解,scala详解
    • Hadoop,HBase集群环境搭建的问题集锦(一),hadoophbase
    • openstack中Nova组件servers的所有python API 汇总,openstacknova
    • Ceph集群磁盘没有剩余空间的解决方法,ceph集群
    • 学习札记:CISCO云计算,札记cisco云计算
    • Spark开发指南,spark指南
    • Bulk Load-HBase数据导入最佳实践,load-hbase最佳实践

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有