当前位置:网站首页>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核心,一定量的内存。
根据主机实际情况进行配置,比如我这里:
这不是问题,只是个概念。
.
边栏推荐
- Radar equipment (greedy)
- Openwrt build Hello ipk
- Li Kou: the 81st biweekly match
- Market trend report, technological innovation and market forecast of China's double sided flexible printed circuit board (FPC)
- 1903. Maximum odd number in string
- Openwrt source code generation image
- 628. Maximum product of three numbers
- (lightoj - 1354) IP checking (Analog)
- Investigation report of bench type Brinell hardness tester industry - market status analysis and development prospect prediction
- Codeforces Round #798 (Div. 2)A~D
猜你喜欢
Radar equipment (greedy)
Problem - 922D、Robot Vacuum Cleaner - Codeforces
Flag framework configures loguru logstore
It is forbidden to trigger onchange in antd upload beforeupload
pytorch提取骨架(可微)
Raspberry pie 4b64 bit system installation miniconda (it took a few days to finally solve it)
409. Longest palindrome
1605. Sum the feasible matrix for a given row and column
Pytorch extract skeleton (differentiable)
Flask框架配置loguru日志库
随机推荐
Market trend report, technical innovation and market forecast of China's desktop capacitance meter
Codeforces Round #797 (Div. 3)无F
It is forbidden to trigger onchange in antd upload beforeupload
QT实现圆角窗口
Raspberry pie 4B installation opencv3.4.0
指定格式时间,月份天数前补零
Tree of life (tree DP)
Opencv learning log 28 -- detect the red cup cover
AcWing:第56场周赛
Research Report of desktop clinical chemical analyzer industry - market status analysis and development prospect prediction
Problem - 922D、Robot Vacuum Cleaner - Codeforces
Date plus 1 day
使用jq实现全选 反选 和全不选-冯浩的博客
Install Jupiter notebook under Anaconda
875. Leetcode, a banana lover
875. 爱吃香蕉的珂珂 - 力扣(LeetCode)
(lightoj - 1354) IP checking (Analog)
树莓派4B64位系统安装miniconda(折腾了几天终于解决)
QT realizes window topping, topping state switching, and multi window topping priority relationship
Codeforces Round #801 (Div. 2)A~C