Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Why do we choose Spark On Yarn mode in production?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Why do we choose Spark On Yarn in production?

In development, we choose local [2] mode.

Production running task Job, we choose Spark On Yarn mode

Deploying Spark Application into yarn has the following advantages:

1. It is easier to deploy Application and services

Only yarn services are needed, and many applications, including Spark,Storm, do not bring their own services. After they are submitted by the client, they are distributed to each computing node by the distributed caching mechanism provided by yarn.

two。 Resource isolation mechanism

Yarn is only responsible for resource management and scheduling, and it is entirely up to users and themselves to decide which service and Applicatioin to run on the yarn cluster, so it is possible to run multiple similar services and Application on yarn at the same time. Yarn uses Cgroups to achieve resource isolation. Users do not have to worry about resource isolation when developing new services or Application.

3. Flexible management of resources

Yarn can manage multiple services running in the yarn cluster simultaneously through queues, and adjust the corresponding resource usage according to the pressure of different types of applications to achieve flexible resource management.

There are two modes of Spark On Yarn, one is cluster mode, the other is client mode.

Run client mode:

". / spark-shell-master yarn". / spark-shell-master yarn-client ". / spark-shell-master yarn- deploy-mode client"

Running in cluster mode

". / spark-shell-master yarn-cluster". / spark-shell-master yarn- deploy-mode cluster "

The main difference between client and cluster mode: a. Client's driver runs in client processes. B. cluster's driver runs in Application Master

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report