当前位置:网站首页>Spark独立集群Worker和Executor的概念
Spark独立集群Worker和Executor的概念
2022-07-06 09:29:00 【若苗瞬】
.
(一)Spark独立集群Worker和Executor的概念
1.1 Worker(容器)
工作节点,相当于工作站,一台虚拟的计算机,有自己的CPU核心数,内存数。
我们把Worker假设成一台计算机,那么CPU核心数(假设2核),内存数(假设32GB)就是它的硬件条件。
实际上在Spark里面是这些配置决定的:
export SPARK_WORKER_CORES=2
export SPARK_WORKER_MEMORY=32g
1.2 Executor(程序)
工作程序,相当于计算机上运行的一个程序,有它要求CPU核心数,要求的内存数。
我们把Executor假设成一个程序,那么它需要运行在计算机上,它它对CPU核心数(假设1核),内存数(假设4GB),就是它运行的基本要求。
PS:同理driver也是个程序。
我们提交时可以指定这些参数:
SparkLauncher aL = new org.apache.spark.launcher.SparkLauncher()
.setXXX(...)
.setConf(SparkLauncher.DRIVER_MEMORY, "4g")
.setConf(SparkLauncher.EXECUTOR_MEMORY,"4g")
.setConf(SparkLauncher.EXECUTOR_CORES,"1")
1.3 无法满足条件的Worker不工作
如果EXECUTOR_MEMORY,EXECUTOR_CORES参数指定超过了某些Worker的配置,
则这些Work不会参加到这个任务的计算中。
如果EXECUTOR_MEMORY,EXECUTOR_CORES参数指定超过了全部Worker的配置,
那么集群中就没有资源可以供这个任务使用了,任务会无限等待下去,等待可用资源。
每个worker可以配置多个CPU核心,一定量的内存。
根据主机实际情况进行配置,比如我这里:
这不是问题,只是个概念。
.
边栏推荐
- 原生js实现全选和反选的功能 --冯浩的博客
- Browser print margin, default / borderless, full 1 page A4
- (lightoj - 1369) answering queries (thinking)
- Hbuilder X格式化快捷键设置
- Maximum product (greedy)
- (lightoj - 1349) Aladdin and the optimal invitation (greed)
- 2027. Minimum number of operations to convert strings
- Li Kou: the 81st biweekly match
- It is forbidden to trigger onchange in antd upload beforeupload
- QT实现圆角窗口
猜你喜欢

QT有关QCobobox控件的样式设置(圆角、下拉框,向上展开、可编辑、内部布局等)

SF smart logistics Campus Technology Challenge (no T4)

QT implementation fillet window

Installation and configuration of MariaDB

Sword finger offer II 019 Delete at most one character to get a palindrome

Flask框架配置loguru日志库

Anaconda下安装Jupyter notebook

<li>圆点样式 list-style-type

Li Kou - 298th weekly match

Codeforces Round #802(Div. 2)A~D
随机推荐
1903. Maximum odd number in string
Problem - 1646C. Factorials and Powers of Two - Codeforces
860. Lemonade change
(POJ - 3186) treatments for the cows (interval DP)
605. Planting flowers
Oneforall installation and use
VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题
Codeforces Round #800 (Div. 2)AC
China double brightening film (dbef) market trend report, technical dynamic innovation and market forecast
<li>圆点样式 list-style-type
Opencv learning log 29 -- gamma correction
QT implementation window gradually disappears qpropertyanimation+ progress bar
软通乐学-js求字符串中字符串当中那个字符出现的次数多 -冯浩的博客
Some problems encountered in installing pytorch in windows11 CONDA
Local visualization tools are connected to redis of Alibaba cloud CentOS server
Research Report of desktop clinical chemical analyzer industry - market status analysis and development prospect prediction
Codeforces Round #801 (Div. 2)A~C
Useeffect, triggered when function components are mounted and unloaded
useEffect,函数组件挂载和卸载时触发
Discussion on QWidget code setting style sheet