当前位置:网站首页>Principle analysis of spark
Principle analysis of spark
2022-07-02 07:07:00 【Boring n day】
Spark Principle analysis of
List of articles
Preface
Today's main learning is a Spark Analysis of the principle of the framework ,spark Operation flow ,RDD An execution process of , An introduction to dependencies
One . Spark brief introduction
Spark By scala Developed ,scala To run on JAVA platform (JVM), And compatible with existing JAVA Program , So use scala The program is written by Java jdk You can run , It doesn't need to scala jdk
Spark And MapReduce contrast

As can be seen from the figure above , Use Hadoop MR Iterative computation is very resource intensive
Spark After loading the data into memory , The subsequent iterative calculation can directly use the intermediate results in memory for operation , Avoid frequently reading data from disk
Two . Basic concept and architecture design

Spark The basic process of operation ( Here we use YARN For example )

- When the client submits the application , First, build a basic running environment for applications SparkContext And to RM Register and apply for resources , by Driver Create a SC Apply for resources , Assignment and monitoring of tasks
there Driver Understand applications written for users ,SparkContex(SC)t Is similar to RM Medium AM function - RM After receiving the request, it will start Executor And allocate resources , And to SC Register and apply for Task, And always with SC Maintain communication to prevent disconnection .
- After the job runs SC towards RM Apply for cancellation and close yourself
RDD A basic operational overview of
RDD The typical execution process of is as follows

1.RDD Read in the external data source and create , If the data source is large, multiple partitions will be created , Different partitions will go to different data nodes , Because of this characteristic , Talent RDD: Distributed elastic datasets
2.RDD After a series of conversion operations : Each conversion operation will form a new RDD For the next conversion operation , In this way, it forms DAG chart
3. the last one RDD Output to external data source through action operation
In the process ,RDD Will convert , But it will not generate specific results , Only encounter action operation (action) Will calculate the corresponding results

RDD Dependency of
As shown in the figure above ,RDD There are wide dependence and narrow dependence , What has narrow dependence , Now let me talk about Kuan dependence , It shows that there is a father RDD One partition of the corresponding sub RDD Multiple sections of
summary
Today's writing is more water , In general, it is written to consolidate what we have learned today . I'll be more specific when I have time later
边栏推荐
- SQL injection closure judgment
- PM2 simple use and daemon
- Sqli-labs customs clearance (less2-less5)
- Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence
- Log - 7 - record a major error in missing documents (A4 paper)
- Code execution sequence with and without resolve in promise
- Underlying mechanism mvcc
- 2021-07-17C#/CAD二次开发创建圆(5)
- Wechat applet Foundation
- ORACLE APEX 21.2安裝及一鍵部署
猜你喜欢

SQLI-LABS通关(less15-less17)

Yolov5 practice: teach object detection by hand

The use of regular expressions in JS

JSP智能小区物业管理系统

Sqli labs customs clearance summary-page1

CAD secondary development object

Uniapp introduces local fonts

Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence

微信小程序基础

Sqli-labs customs clearance (less1)
随机推荐
[leetcode question brushing day 35] 1060 Missing element in ordered array, 1901 Find the peak element, 1380 Lucky number in matrix
IDEA2020中PySpark的两表关联(字段名相同)
Review of reflection topics
Anti shake and throttling of JS
SQL注入闭合判断
Queue (linear structure)
Basic knowledge of software testing
Oracle apex Ajax process + dy verification
搭建frp进行内网穿透
Huawei mindspire open source internship machine test questions
sqli-labs通关汇总-page3
The default Google browser cannot open the link (clicking the hyperlink does not respond)
The use of regular expressions in JS
ORACLE EBS 和 APEX 集成登录及原理分析
php中树形结构转数组(拉平树结构,保留上下级排序)
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
2021-07-17c /cad secondary development creation circle (5)
ORACLE APEX 21.2安裝及一鍵部署
Brief analysis of PHP session principle
PgSQL learning notes