SparkCore的组件

一.组件Components

1.官网位置体现

2.术语位置

3.数据解释与注意事项


Application:SparkContext
a driver program +  executors 
Spark-shell  是一个 Application
一个程序里面只能有一个SparkContext
Driver program 主要理解为main方法
The process running the main() function of the application and creating the SparkContext
Cluster manager
--master 设置上去的
Deploy mode
区分Driver 运行在哪里
区分client 还是集群
 Worker node     相当于nodemanager
 Executor(进程)无代码,通过driver发过去的
 相当于contain容器
 大部分executors自己管自己独立,也有共享的
 A process launched for an application on a worker node, that runs tasks and keeps data in memory or disk storage across them. Each application has its own executors.
 Task
 一个工作单元,可以发送到executor 上去
 A unit of work that will be sent to one executor
Job 触发action产生
task并行执行,遇到action产生job
main program 也叫 driver program
cluster managers  集群管理器

4.组件图的总结


解释:下图
刚开始需要申请资源,后来是传代码运行,发送到executor
spark 应用程序独立的运行在集群上,在program 运行sparkcontext
在集群上运行,sc连接到集群管理器,sc 去获取应用程序要的资源
一旦连接,spark请求集群上的executors资源,
在executors 资源中计算和存储数据对于你的应用程序
接下里会发送代码通过sc,发送到executors,最终task会在
executors 中运行

5.application组成


右 n jobs
  包含
n stages
  包含
n tasks
stage默认就一个除非遇到shuffer
最终:
application = n jobs + n stages + n tasks

二.组件的官网笔记注意事项

1.官网位置体现

2.解释


agnostic  不知道
executor 与driver间有通信,防止挂了
资源管理器申请资源
action产生job
每个应用程序有它自己的应用进程,executor一直保持整个应用程序,并且
task在里面一直运行,对于互相有好处,一方面是调度反面(每个应用调度有它自己
的task),另一个方面是executor里面运行的task运行在自己的JVM中不影响互相
但是,它也意味着数据不可以共享对于不同的应用程序,但是你要写到
外部系统可以共享
spark是不用关心你运行在什么模式上
这个应用程序必须监听和接受executo的通知,保持活性,防止挂掉
任务放在集群上,最好放在离worker 近的位置,特别同一个网络

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69941978/viewspace-2651820/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/69941978/viewspace-2651820/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值