当前位置:网站首页>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核心,一定量的内存。
根据主机实际情况进行配置,比如我这里:
这不是问题,只是个概念。
.
边栏推荐
- 605. Planting flowers
- 力扣:第81场双周赛
- Bisphenol based CE Resin Industry Research Report - market status analysis and development prospect forecast
- Local visualization tools are connected to redis of Alibaba cloud CentOS server
- Investigation report of bench type Brinell hardness tester industry - market status analysis and development prospect prediction
- 业务系统兼容数据库Oracle/PostgreSQL(openGauss)/MySQL的琐事
- 树莓派4B64位系统安装miniconda(折腾了几天终于解决)
- Bidirectional linked list - all operations
- 1529. Minimum number of suffix flips
- OneForAll安装使用
猜你喜欢

Local visualization tools are connected to redis of Alibaba cloud CentOS server

Oneforall installation and use

VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题

Discussion on QWidget code setting style sheet

浏览器打印边距,默认/无边距,占满1页A4

Codeforces Round #801 (Div. 2)A~C

拉取分支失败,fatal: ‘origin/xxx‘ is not a commit and a branch ‘xxx‘ cannot be created from it

Installation and configuration of MariaDB

新手必会的静态站点生成器——Gridsome

1013. Divide the array into three parts equal to and
随机推荐
OneForAll安装使用
“鬼鬼祟祟的”新小行星将在本周安全掠过地球:如何观看
1005. Maximized array sum after K negations
Problem - 922D、Robot Vacuum Cleaner - Codeforces
(POJ - 3186) treatments for the cows (interval DP)
(lightoj - 1369) answering queries (thinking)
Opencv learning log 26 -- detect circular holes and mark them
Codeforces Round #803 (Div. 2)A~C
<li>圆点样式 list-style-type
Local visualization tools are connected to redis of Alibaba cloud CentOS server
Browser print margin, default / borderless, full 1 page A4
Base dice (dynamic programming + matrix fast power)
Read and save zarr files
Is the sanic asynchronous framework really so strong? Find truth in practice
Codeforces Round #799 (Div. 4)A~H
Acwing - game 55 of the week
Codeforces round 797 (Div. 3) no f
Educational Codeforces Round 130 (Rated for Div. 2)A~C
Click QT button to switch qlineedit focus (including code)
Tert butyl hydroquinone (TBHQ) Industry Research Report - market status analysis and development prospect forecast