CN107797874A - A kind of resource management-control method based on embedded jetty and spark on yarn frameworks - Google Patents
A kind of resource management-control method based on embedded jetty and spark on yarn frameworks Download PDFInfo
- Publication number
- CN107797874A CN107797874A CN201710947052.3A CN201710947052A CN107797874A CN 107797874 A CN107797874 A CN 107797874A CN 201710947052 A CN201710947052 A CN 201710947052A CN 107797874 A CN107797874 A CN 107797874A
- Authority
- CN
- China
- Prior art keywords
- spark
- jetty
- tomcat
- yarn
- application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a kind of resource management-control method based on embedded jetty and spark on yarn frameworks, comprise the following steps:(1) hadoop cluster and spark clusters are built, disposes front and back tomcat servers;(2) user initiates spark application application resource requests to system;(3) backstage tomcat receives request, starts Jetty services by submit methods, loads servlet, generate Resident Process;Initiation message queue, initialization spark context generation spark applications, and most application is submitted in yarn clusters at last;(4) backstage tomcat will start returns to foreground tomcat using result;(5) foreground tomcat sends the Jetty Resident Process that follow-up spark tasks are submitted to background application;(6) background task Resident Process receives and performs task, returns to user's final result.Beneficial effects of the present invention are:User can apply for multiple spark application resources from a yarn resource queue, ensure that maximum resource utilization;Follow-up work under multiple different applications can perform simultaneously.
Description
Technical field
It is especially a kind of to be based on embedded jetty and spark the present invention relates to spark application resource application control fields
The resource management-control method of on yarn frameworks.
Background technology
With the development of big data technology, the value of data is highlighted increasingly, and increasing enterprise is absorbed in from magnanimity number
Business opportunity is found according to central analysis and excavation, and spark excavates most popular framework as current data, by more and more enterprises
Favor.Spark provides a kind of resource management and control based on yarn, i.e., spark tasks is submitted into yarn clusters, yarn frameworks
The concept of the resource queue of offer realizes that yarn cluster resources are relatively isolated.
As complete data mining platform, the foreground of user's operation and the backstage of processing request will possess.And user
Whole process is asked to pay close attention to following problem to backstage application spark application resources by operating foreground:First, backstage
Need uniformly to receive and return the framework of foreground message;Secondly, while there are multiple application resource applications to ask, while perform multiple
Spark tasks, and resource isolation is realized in each spark applications;Again, it must have from the background and resided corresponding to spark applications
Process, ensure that task dynamic is submitted;Finally, multiple spark applications can be submitted in same yarn resource queues, realize team
Row resource makes full use of.
The content of the invention
The technical problems to be solved by the invention are, there is provided one kind is based on embedded jetty and spark on yarn frames
It the resource management-control method of frame, can realize that backstage performs the spark application resources application request initiated on foreground, and realize resource pipe
Control.
In order to solve the above technical problems, the present invention provide it is a kind of based on embedded jetty and spark on yarn frameworks
Resource management-control method, comprises the following steps:
(1) hadoop cluster and spark clusters are built, disposes front and back tomcat servers;
(2) user initiates spark application application resource requests to system;
(3) backstage tomcat receives request, starts Jetty services by submit methods, loads servlet, generation is normal
In process;Initiation message queue, initialization spark context generation spark applications, and most application is submitted to yarn clusters at last
In;
(4) backstage tomcat will start returns to foreground tomcat using result;
(5) foreground tomcat sends the Jetty Resident Process that follow-up spark tasks are submitted to background application;
(6) background task Resident Process receives and performs task, returns to user's final result.
Preferably, in step (3), backstage tomcat starts jetty services, ensures each jetty Resident Process corresponding one
Individual spark applications, the task requests that spark applications are persistently sent for subsequent user are prepared.
Preferably, in step (3), in Jetty service activation process, comprising loading servlet, front and back interaction is started
Message queue, spark contexts are initialized, to yarn cluster application resources, controlled, protected by the realization of spring case mechanisms
The succession of card event and the uniformity of environmental variance.
Preferably, in step (3), Jetty services are started by submit patterns, ensure that multiple spark application can be with
It is submitted in a yarn resource queue.
Preferably, in step (5), foreground tomcat is follow-up spark tasks by different to row name and task mark
Knowledge is sent in different message queues, and the backstage permanent processes of different Jetty receive the message in message queue, and then perform
Different spark tasks.
Beneficial effects of the present invention are:User can by multiple spark application resources from a yarn resource queue Shen
Please, it ensure that maximum resource utilization;Follow-up work under multiple different applications can perform simultaneously.
Brief description of the drawings
Fig. 1 is the structural framing schematic diagram of the present invention.
Fig. 2 is the method flow schematic diagram of the present invention.
Embodiment
Fig. 1 is the knot for the resource management and control based on embedded jetty and spark on yarn frameworks implemented according to the present invention
Structure schematic diagram.Wherein include backstage tomcat modules, jetty engine modules, message queue module etc..
Backstage tomcat modules are mainly responsible for the http request for the spark application resource applications that receiving front-end comes, and start
Jetty is serviced, record Jetty attribute informations to mysql databases, mistake rollback and return request results.
Jetty engine modules are mainly responsible for starting jetty Resident Process, load servlet, front and back interaction message team
Row, spark contexts are initialized, submit task to yarn resource queues, and wrong rollback mechanism.
Message queue module is mainly responsible for follow-up front and back message communicating.User has applied for that the spark of resource should to some
With new task requests are submitted, corresponding jetty resident service processes, corresponding jetty are transmitted directly to by message queue
Spark tasks corresponding to response and processing.
Fig. 2 is the stream for the resource management and control based on embedded Jetty and spark on yarn frameworks implemented according to the present invention
Journey schematic diagram.Specific step is described below:
(1) user initiates application resource request to backstage tomcat;
(2) backstage tomcat receives request, starts jetty services by submit methods,
(3) jetty calls start methods, loads servlet, generates Resident Process;
(4) spring frameworks built in jetty drive case mechanism initiation message queue successively, initialize spark contexts
Spark applications are generated, and most application is submitted in yarn clusters at last.
(5) backstage tomcat will start returns to foreground using result, and errors excepted rollback simultaneously returns to error result;
By above-mentioned basic procedure, user can by multiple spark application resources from a yarn resource queue Shen
Please, maximum resource utilization is ensure that, and the follow-up work under multiple different applications can simultaneously be performed and is independent of each other.
The present invention is based on spark on yarn Frame Designs, is realized by adding embedded Jetty services by foreground
The request of spark application resources is converted to the resource allocation of yarn frameworks identification.
By using such scheme, user can easily carry out spark application resources point according to different business complexity
Match somebody with somebody, and do not interfere with each other more using the operation of multitask notice, suitable for actual production requirement.
Although the present invention is illustrated and described with regard to preferred embodiment, it is understood by those skilled in the art that
Without departing from scope defined by the claims of the present invention, variations and modifications can be carried out to the present invention.
Claims (5)
1. a kind of resource management-control method based on embedded jetty and spark on yarn frameworks, it is characterised in that including such as
Lower step:
(1) hadoop cluster and spark clusters are built, disposes front and back tomcat servers;
(2) user initiates spark application application resource requests to system;
(3) backstage tomcat receive request, by submit methods start Jetty service, load servlet, generation reside into
Journey;Initiation message queue, initialization spark context generation spark applications, and most application is submitted in yarn clusters at last;
(4) backstage tomcat will start returns to foreground tomcat using result;
(5) foreground tomcat sends the Jetty Resident Process that follow-up spark tasks are submitted to background application;
(6) background task Resident Process receives and performs task, returns to user's final result.
2. the resource management-control method as claimed in claim 1 based on embedded jetty and spark on yarn frameworks, it is special
Sign is, in step (3), backstage tomcat starts jetty services, ensures that the corresponding spark of each jetty Resident Process should
With the task requests that spark applications are persistently sent for subsequent user are prepared.
3. the resource management-control method as claimed in claim 1 based on embedded jetty and spark on yarn frameworks, it is special
Sign is, in step (3), in Jetty service activation process, comprising loading servlet, starts the message team that front and back interacts
Row, spark contexts are initialized, to yarn cluster application resources, controlled by the realization of spring case mechanisms, ensure event
Succession and environmental variance uniformity.
4. the resource management-control method as claimed in claim 1 based on embedded jetty and spark on yarn frameworks, it is special
Sign is, in step (3), starts Jetty services by submit patterns, ensure that multiple spark applications can be submitted to one
In individual yarn resource queues.
5. the resource management-control method as claimed in claim 1 based on embedded jetty and spark on yarn frameworks, it is special
Sign is, in step (5), foreground tomcat is sent to follow-up spark tasks to row name and task identification by different
In different message queues, the backstage permanent processes of different Jetty receive the message in message queue, and then perform different
Spark tasks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710947052.3A CN107797874B (en) | 2017-10-12 | 2017-10-12 | Resource management and control method based on embedded jetty and spark on grow framework |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710947052.3A CN107797874B (en) | 2017-10-12 | 2017-10-12 | Resource management and control method based on embedded jetty and spark on grow framework |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107797874A true CN107797874A (en) | 2018-03-13 |
CN107797874B CN107797874B (en) | 2021-04-27 |
Family
ID=61532986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710947052.3A Active CN107797874B (en) | 2017-10-12 | 2017-10-12 | Resource management and control method based on embedded jetty and spark on grow framework |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107797874B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108563508A (en) * | 2018-04-27 | 2018-09-21 | 新华三大数据技术有限公司 | YARN resource allocation methods and device |
CN109408537A (en) * | 2018-10-18 | 2019-03-01 | 网易(杭州)网络有限公司 | Data processing method and device, storage medium and calculating equipment based on Spark SQL |
CN110324188A (en) * | 2019-07-05 | 2019-10-11 | 上海中通吉网络技术有限公司 | Monitoring warning system and method |
CN110471777A (en) * | 2019-06-27 | 2019-11-19 | 中国科学院计算机网络信息中心 | Multiple users share uses the method and system of Spark cluster in a kind of Python-Web environment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5797005A (en) * | 1994-12-30 | 1998-08-18 | International Business Machines Corporation | Shared queue structure for data integrity |
CN102880475A (en) * | 2012-10-23 | 2013-01-16 | 上海普元信息技术股份有限公司 | Real-time event handling system and method based on cloud computing in computer software system |
CN103501341A (en) * | 2013-09-30 | 2014-01-08 | 乐视致新电子科技(天津)有限公司 | Method and device for establishing Web service |
CN105205169A (en) * | 2015-10-12 | 2015-12-30 | 中国电子科技集团公司第二十八研究所 | Distributed image index and retrieval method |
CN105677382A (en) * | 2015-12-28 | 2016-06-15 | 深圳市华讯方舟软件技术有限公司 | Installation tool of big database system |
CN106445705A (en) * | 2016-10-08 | 2017-02-22 | 武汉烽火众智数字技术有限责任公司 | Platform cascading method and system based on Rabbit MQ and Socket.io |
-
2017
- 2017-10-12 CN CN201710947052.3A patent/CN107797874B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5797005A (en) * | 1994-12-30 | 1998-08-18 | International Business Machines Corporation | Shared queue structure for data integrity |
CN102880475A (en) * | 2012-10-23 | 2013-01-16 | 上海普元信息技术股份有限公司 | Real-time event handling system and method based on cloud computing in computer software system |
CN103501341A (en) * | 2013-09-30 | 2014-01-08 | 乐视致新电子科技(天津)有限公司 | Method and device for establishing Web service |
CN105205169A (en) * | 2015-10-12 | 2015-12-30 | 中国电子科技集团公司第二十八研究所 | Distributed image index and retrieval method |
CN105677382A (en) * | 2015-12-28 | 2016-06-15 | 深圳市华讯方舟软件技术有限公司 | Installation tool of big database system |
CN106445705A (en) * | 2016-10-08 | 2017-02-22 | 武汉烽火众智数字技术有限责任公司 | Platform cascading method and system based on Rabbit MQ and Socket.io |
Non-Patent Citations (1)
Title |
---|
TROY BAER,PAUL PELTZ,JUNQI YIN: "Integrating Apache Spark Into PBS-Based HPC Environments", 《XSEDE "15: PROCEEDINGS OF THE 2015 XSEDE CONFERENCE》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108563508A (en) * | 2018-04-27 | 2018-09-21 | 新华三大数据技术有限公司 | YARN resource allocation methods and device |
CN109408537A (en) * | 2018-10-18 | 2019-03-01 | 网易(杭州)网络有限公司 | Data processing method and device, storage medium and calculating equipment based on Spark SQL |
CN110471777A (en) * | 2019-06-27 | 2019-11-19 | 中国科学院计算机网络信息中心 | Multiple users share uses the method and system of Spark cluster in a kind of Python-Web environment |
CN110471777B (en) * | 2019-06-27 | 2022-04-15 | 中国科学院计算机网络信息中心 | Method and system for realizing multi-user sharing and using Spark cluster in Python-Web environment |
CN110324188A (en) * | 2019-07-05 | 2019-10-11 | 上海中通吉网络技术有限公司 | Monitoring warning system and method |
Also Published As
Publication number | Publication date |
---|---|
CN107797874B (en) | 2021-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107493310B (en) | Cloud resource processing method and cloud management platform | |
CN107797874A (en) | A kind of resource management-control method based on embedded jetty and spark on yarn frameworks | |
WO2021073414A1 (en) | Task scheduling method and related apparatus | |
US11716264B2 (en) | In situ triggered function as a service within a service mesh | |
CN101262498B (en) | A distributed message call method and device | |
CN101179622B (en) | Multi-order processing arrangement in communication system and processing method thereof | |
CN103593236A (en) | Computer equipment, method and device for scheduling service process | |
CN112395736B (en) | Parallel simulation job scheduling method of distributed interactive simulation system | |
CN107919987B (en) | Method for realizing micro-service cloud deployment | |
CN106027617A (en) | Method for implementing dynamic scheduling of tasks and resources in private cloud environment | |
CN108519918A (en) | Distributed transaction processing method based on transaction chain | |
CN114816730A (en) | Robot process automation cloud service system and implementation method | |
CN105893320A (en) | Remote task function calling method oriented at multi-core processor | |
CN111679911A (en) | Management method, device, equipment and medium for GPU (graphics processing Unit) card in cloud environment | |
CN105740085A (en) | Fault tolerance processing method and device | |
CN109858772A (en) | A kind of processing method of work order, device and system | |
CN113032125A (en) | Job scheduling method, device, computer system and computer-readable storage medium | |
CN112688915A (en) | Cross-protocol communication method, device and server | |
CN114816694A (en) | Multi-process cooperative RPA task scheduling method and device | |
CN107451211B (en) | A kind of download system based on RabbitMQ and MongoDB | |
CN109634752A (en) | A kind of client request processing method and system based on page gateway | |
CN106131020B (en) | Firewall virtualization module and management method | |
CN102591714B (en) | Process calling method, system and application server | |
CN109558254B (en) | Asynchronous callback method, system, device and computer readable storage medium | |
CN116204307A (en) | Federal learning method and federal learning system compatible with different computing frameworks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |