CN113079065A - Heartbeat detection method, device, equipment and medium based on Ambari - Google Patents
Heartbeat detection method, device, equipment and medium based on Ambari Download PDFInfo
- Publication number
- CN113079065A CN113079065A CN202110327530.7A CN202110327530A CN113079065A CN 113079065 A CN113079065 A CN 113079065A CN 202110327530 A CN202110327530 A CN 202110327530A CN 113079065 A CN113079065 A CN 113079065A
- Authority
- CN
- China
- Prior art keywords
- ambari
- heartbeat
- heartbeat data
- agent
- server
- 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.)
- Pending
Links
- 240000000797 Hibiscus cannabinus Species 0.000 title claims abstract description 78
- 235000002905 Rumex vesicarius Nutrition 0.000 title claims abstract description 78
- 238000001514 detection method Methods 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 8
- 230000006835 compression Effects 0.000 claims description 7
- 238000007906 compression Methods 0.000 claims description 7
- 230000009286 beneficial effect Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a heartbeat detection method based on Ambari, which comprises the following steps: grouping a plurality of Ambari-agents in the target Ambari, wherein each group comprises a plurality of Ambari-agents; merging heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data; and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads so that the Ambari-Server can determine the running state of each Ambari-Agent according to the grouped heartbeat data. The method can improve the accuracy of heartbeat detection under the condition that the number of Ambari-agents in Ambari is large. The application also discloses a heartbeat detection device, equipment and a computer readable storage medium based on Ambari, which have the beneficial effects.
Description
Technical Field
The invention relates to the field of heartbeat detection, in particular to a heartbeat detection method, a heartbeat detection device, heartbeat detection equipment and a computer readable storage medium based on Ambari.
Background
Ambari is used as a Web-based big data management platform and comprehensively supports the functions of supply, management, monitoring, alarming and the like of an Apache Hadoop cluster. The modules of Ambari are distributed on different nodes to operate, and two core modules in Ambari are Ambari-Server and Ambari-Agent, wherein the Ambari-Server is mainly responsible for sending commands of various operation cluster services, and the Ambari-Agent is mainly responsible for executing the commands to complete operations; the stability of the communication before Ambari-Server and Ambari-Agent is therefore of particular importance.
FIG. 1 is a schematic diagram showing a process of a heartbeat detection method between Ambari-Server and Ambari-Agent in the prior art; the Ambari-Agent sends heartbeat data to the Ambari-Server at regular time, the heartbeat data comprise a node where the Ambari-Agent is located and an operation state, the Ambari-Server stores the latest state of the Ambari-Agent in a heartbeat state information table after receiving the heartbeat data, and if the Ambari-Server does not receive the heartbeat data of the Ambari-Agent after preset duration, the Ambari-Agent is judged to be abnormal in operation, namely heartbeat loss. Generally, the Ambari-Server can accurately determine the running state of the Ambari-Agent by using the method; however, when the number of nodes in the Ambari is large in scale, that is, the number of Ambari-agents in the Ambari is large (usually more than 5000), the Ambari-agents normally operate and send heartbeat data, but because a large number of requests occupy network bandwidth at the same time, network congestion is caused, so that the Ambari-Server cannot normally receive the heartbeat data and judges that the Ambari-agents operate abnormally, and the heartbeat detection misjudgment of the Ambari-agents is caused.
Therefore, how to improve the accuracy of heartbeat detection under the condition of a large number of Ambari-agents in Ambari is a technical problem which needs to be solved by the technical personnel in the field at present.
Disclosure of Invention
In view of this, the present invention aims to provide a heartbeat detection method based on Ambari, which can improve the accuracy of heartbeat detection under the condition that Ambari-agents in Ambari are more in number; another object of the present invention is to provide an Ambari-based heartbeat detecting device, an Ambari-based heartbeat detecting apparatus, and a computer-readable storage medium, all of which have the above beneficial effects.
In order to solve the technical problem, the invention provides a heartbeat detection method based on Ambari, which comprises the following steps:
grouping a plurality of Ambari-agents in a target Ambari, wherein each group comprises the plurality of Ambari-agents;
merging heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data;
and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads, so that the Ambari-Server determines the running state of each Ambari-Agent according to each grouped heartbeat data.
Preferably, the process of combining heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data specifically includes:
and merging the heartbeat data sent by each Ambari-Agent in the same group, deleting the repeated information of each heartbeat data, and performing space compression to obtain the grouped heartbeat data.
Preferably, after the sending, by using different sending threads, the packet heartbeat data of each different packet to Ambari-Server, so that Ambari-Server determines the operating state of each Ambari-Agent according to each packet heartbeat data, the method further includes:
if the target heartbeat data of the target Ambari-Agent waiting to be received by the Ambari-Server exceeds the preset duration, sending a heartbeat detection packet to the target Ambari-Agent;
and the Ambari-Server determines the running state of the target Ambari-Agent according to whether the feedback information sent by the target Ambari-Agent according to the heartbeat detection packet is received or not.
Preferably, the Ambari-Server determines a process of the operating state of each Ambari-Agent according to each packet heartbeat data, specifically including:
the Ambari-Server receives the grouped heartbeat data corresponding to different groups by using a plurality of processing threads respectively, and determines the running state of each Ambari-Agent according to the grouped heartbeat data.
Preferably, the Ambari-Server determines a process of the operating state of each Ambari-Agent according to each packet heartbeat data, specifically including:
the Ambari-Server sets a corresponding heartbeat state information table for each group in advance;
and the Ambari-Server updates the corresponding heartbeat state information table by using the received grouped heartbeat data, and determines the running state of each Ambari-Agent according to each heartbeat state information table.
Preferably, after the Ambari-Server determines that the target Ambari-Agent is abnormal in operation, the method further comprises the following steps:
and sending out corresponding prompt information.
Preferably, the grouping of a plurality of Ambari-agents in the target Ambari includes a process of the plurality of Ambari-agents, respectively, and specifically includes:
and grouping the plurality of Ambari-agents according to the preset grouping number of the plurality of Ambari-agents in the target Ambari, the logic function of each Ambari-Agent or the network area of each Ambari-Agent, wherein each grouping comprises the plurality of Ambari-agents.
In order to solve the above technical problem, the present invention further provides an Ambari-based heartbeat detection apparatus, including:
the device comprises a grouping module, a judging module and a judging module, wherein the grouping module is used for grouping a plurality of Ambari-agents in a target Ambari, and each group comprises the plurality of Ambari-agents;
the merging module is used for merging the heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data;
and the sending module is used for sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads respectively so that the Ambari-Server can determine the running state of each Ambari-Agent according to each grouped heartbeat data.
In order to solve the technical problem, the invention also provides Ambari-based heartbeat detection equipment, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of any of the above Ambari-based heartbeat detection methods when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any Ambari-based heartbeat detection method.
The invention provides a heartbeat detection method based on Ambari, which comprises the steps of grouping a plurality of Ambari-agents in a target Ambari, wherein each group comprises a plurality of Ambari-agents; merging heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data; and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads so that the Ambari-Server can determine the running state of each Ambari-Agent according to the grouped heartbeat data. That is to say, in the method, the heartbeat data of a plurality of Ambari-agents in the packet are merged into a packet heartbeat data to be sent to the Ambari-Server, namely the packet heartbeat data sent to the Ambari-Server each time comprises the heartbeat data of a plurality of Ambari-agents in the corresponding packet, so that the method can reduce the frequency of sending data information to the Ambari-Server, avoid network congestion caused by a large amount of requests occupying network bandwidth at the same time, and relatively improve the probability of successful sending of the heartbeat data under the condition that the number of the Ambari-agents in the Ambari is large, thereby improving the accuracy of the heartbeat detection based on the Ambari.
In order to solve the technical problem, the invention also provides a heartbeat detection device, equipment and a computer readable storage medium based on Ambari, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic process diagram of a method for detecting the heartbeat between Ambari-Server and Ambari-Agent in the prior art;
fig. 2 is a flowchart of an Ambari-based heartbeat detection method according to an embodiment of the present invention;
fig. 3 is a schematic process diagram of a heartbeat detection method based on Ambari according to an embodiment of the present invention;
fig. 4 is a structural diagram of an Ambari-based heartbeat detection apparatus according to an embodiment of the present invention;
fig. 5 is a structural diagram of an Ambari-based heartbeat detection device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The heart of the embodiment of the invention is to provide a heartbeat detection method based on Ambari, which can improve the accuracy of heartbeat detection under the condition that the quantity of Ambari-agents in Ambari is large; another core of the present invention is to provide an Ambari-based heartbeat detecting apparatus, a device and a computer-readable storage medium, all having the above beneficial effects.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 2 is a flowchart of an Ambari-based heartbeat detection method according to an embodiment of the present invention; as shown in fig. 2, a heartbeat detection method based on Ambari includes:
s10: and grouping a plurality of Ambari-agents in the target Ambari, wherein each group comprises a plurality of Ambari-agents.
Specifically, this embodiment is mainly applied to the case where the number of Ambari-agents in Ambari is large, and therefore, it is first necessary to obtain a plurality of Ambari-agents in the target Ambari, and then group the plurality of Ambari-agents by using a preset grouping rule, where each group includes a plurality of Ambari-agents, and the number of Ambari-agents in each group may be the same or different, and is specifically determined depending on the grouping rule, which is not limited in this embodiment.
S20: and merging the heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data.
After a plurality of Ambari-agents are grouped, each Ambari-Agent still sends heartbeat data according to respective period, and then the heartbeat data sent by each Ambari-Agent in the same group are combined to obtain grouped heartbeat data; namely, the group heartbeat data comprises heartbeat data sent by each Ambari-Agent in the same group.
S30: and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads so that the Ambari-Server can determine the running state of each Ambari-Agent according to the grouped heartbeat data.
Specifically, after corresponding group heartbeat data are respectively obtained according to different groups, different sending threads are respectively used for sending the group heartbeat data of the different groups to the Ambari-Server, and after the Ambari-Server receives the group heartbeat data, the running state of each corresponding Ambari-Agent is determined according to each group data in the group heartbeat data.
The embodiment of the invention provides a heartbeat detection method based on Ambari, which is characterized in that a plurality of Ambari-agents in a target Ambari are grouped, and each group comprises a plurality of Ambari-agents; merging heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data; and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads so that the Ambari-Server can determine the running state of each Ambari-Agent according to the grouped heartbeat data. That is to say, in the method, the heartbeat data of a plurality of Ambari-agents in the packet are merged into a packet heartbeat data to be sent to the Ambari-Server, namely the packet heartbeat data sent to the Ambari-Server each time comprises the heartbeat data of a plurality of Ambari-agents in the corresponding packet, so that the method can reduce the frequency of sending data information to the Ambari-Server, avoid network congestion caused by a large amount of requests occupying network bandwidth at the same time, and relatively improve the probability of successful sending of the heartbeat data under the condition that the number of the Ambari-agents in the Ambari is large, thereby improving the accuracy of the heartbeat detection based on the Ambari.
On the basis of the above embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, the process of merging heartbeat data sent by Ambari-agents in the same group to obtain grouped heartbeat data specifically includes:
and merging the heartbeat data sent by each Ambari-Agent in the same group, deleting the repeated information of each heartbeat data, and performing space compression to obtain the grouped heartbeat data.
Specifically, in this embodiment, after the heartbeat data sent by each Ambari-Agent in the same packet are merged, the repeated information of each heartbeat data, including the repeated destination information, header information, and the like of each heartbeat data, is further deleted; then, performing space compression on the heartbeat data with the repeated information deleted to obtain grouped heartbeat data; and sending the obtained grouped heartbeat data to the Ambari-Server. The space compression is a method for reducing the data size of the heartbeat data after the repeated information is deleted to reduce the storage space or reorganizing the heartbeat data after the repeated information is deleted according to a certain algorithm to reduce the storage space on the premise of not losing useful information.
It can be understood that, in the packet heartbeat data obtained in this embodiment, the repeated information is deleted and the spatial compression is performed, so that the spatial size of the packet heartbeat data is reduced, and the transmission resource required by the packet heartbeat data can be further reduced.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, after the present embodiment respectively uses different sending threads to send the packet heartbeat data of each different packet to Ambari-Server, so that Ambari-Server determines the operating state of each Ambari-Agent according to each packet heartbeat data, the present embodiment further includes:
if the Ambari-Server waits for receiving the target heartbeat data of the target Ambari-Agent to exceed the preset duration, sending a heartbeat detection packet to the target Ambari-Agent;
and the Ambari-Server determines the running state of the target Ambari-Agent according to whether the feedback information sent by the target Ambari-Agent according to the heartbeat detection packet is received or not.
It should be noted that, in this embodiment, under the condition that Ambari-Server does not receive the target heartbeat data of the target Ambari-Agent within the preset duration, that is, when Ambari-Server determines that the target Ambari-Agent heartbeat is lost according to the grouped heartbeat data, it does not immediately determine that the target Ambari-Agent is abnormal in operation, but the Ambari-Server sends a heartbeat detection packet to the target Ambari-Agent, and if the target Ambari-Agent is normal in operation, corresponding feedback information is sent to the Ambari-Server according to the heartbeat detection packet; if the target Ambari-Agent runs abnormally, the heartbeat detection packet cannot be received or corresponding feedback information cannot be sent; therefore, the Ambari-Server determines the running state of the target Ambari-Agent according to whether the feedback information sent by the target Ambari-Agent according to the heartbeat detection packet is received or not, and the Ambari-Server actively sends the heartbeat detection packet to the target Ambari-Agent to further confirm whether the target Ambari-Agent is in heartbeat loss or not, so that the accuracy of confirming the heartbeat loss of the target Ambari-Agent can be improved; and further, the Ambari-Server can determine the running state of the target Ambari-Agent according to the feedback information sent by the heartbeat detection packet according to whether the target Ambari-Agent is received within the preset time threshold value, so that the accuracy of confirming the heartbeat loss of the target Ambari-Agent can be further improved.
Fig. 3 is a schematic process diagram of a heartbeat detection method based on Ambari according to an embodiment of the present invention; as shown in fig. 3, on the basis of the above embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, the process of determining the operating state of each Ambari-Agent by Ambari-Server according to each group of heartbeat data specifically includes:
the Ambari-Server receives the grouped heartbeat data corresponding to different groups by using a plurality of processing threads respectively, and determines the running state of each Ambari-Agent according to the grouped heartbeat data.
It should be noted that, in actual operation, the instantaneous processing capability of Ambari-Server is limited and exceeds the processing capability range thereof, so that the received packet heartbeat data cannot be processed, the running state of Ambari-Agent cannot be updated, and the condition of Ambari-Agent running abnormally cannot be determined in time.
In this embodiment, a plurality of processing threads are further set in Ambari-Server, and each processing thread receives the packet heartbeat data of each different packet; thus, the Ambari-Server can process a plurality of grouped heartbeat data in parallel, and the efficiency of determining the operating state of each Ambari-Agent by processing the grouped heartbeat data by the Ambari-Server can be further improved.
In a preferred embodiment, the number of processing threads is the same as the number of packets, each processing thread corresponds to each packet and to each transmission thread, and each processing thread receives the packet heartbeat data transmitted by each transmission thread, so that the processing process is more orderly.
Therefore, the parallel processing capacity of the Ambari-Server can be further increased, and the possibility of misjudgment on the running state of the Ambari-Agent can be reduced to a greater extent.
As a preferred embodiment, the Ambari-Server determines the running state of each Ambari-Agent according to each group of heartbeat data, specifically including:
Ambari-Server sets a corresponding heartbeat state information table for each packet in advance;
and the Ambari-Server updates the corresponding heartbeat state information table by using the received grouped heartbeat data, and determines the running state of each Ambari-Agent according to each heartbeat state information table.
In this embodiment, Ambari-Server sets a corresponding heartbeat state information table for each packet in advance, that is, sets a heartbeat state information table according to a packet, heartbeat data of one packet is processed by one processing thread, and heartbeat data of one packet is stored in the same heartbeat state information table; after a certain processing process in the Ambari-Server receives the grouped heartbeat data of the corresponding group, the received grouped heartbeat data is used for updating the heartbeat state information table corresponding to the group, and the running state of each Ambari-Agent is determined according to each heartbeat state information table.
Therefore, according to the embodiment, the heartbeat state information table is set for each group, so that convenience in updating the heartbeat state information table can be further improved, and convenience in determining the operating state of the Ambari-Agent is improved.
On the basis of the above embodiment, this embodiment further explains and optimizes the technical solution, and specifically, after Ambari-Server determines that the target Ambari-Agent is abnormal in operation, the embodiment further includes:
and sending out corresponding prompt information.
Specifically, in this embodiment, after Ambari-Server determines that the target Ambari-Agent is abnormal in operation, the prompting device is further triggered to send out corresponding prompting information. It should be noted that the prompting device may specifically be a buzzer and/or an indicator light and/or a display, and the prompting device triggers the buzzer/the indicator light/the display to send out corresponding prompting information, such as a buzzer sound/a flashing light/display characters or images, so as to intuitively prompt the user that the target Ambari-Agent in the current target Ambari is abnormal in operation, and further prompt identification information corresponding to the target Ambari-Agent, so that the user can conveniently perform maintenance management on the target Ambari-Agent, and thus the use experience of the user can be further improved.
On the basis of the above embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, a plurality of Ambari-agents in the target Ambari are grouped, and each group includes a process of the plurality of Ambari-agents, specifically including:
and grouping the plurality of Ambari-agents according to the preset grouping number of the plurality of Ambari-agents in the target Ambari, the logic function of each Ambari-Agent or the network area of each Ambari-Agent, wherein each grouping comprises the plurality of Ambari-agents.
In this embodiment, the plurality of Ambari-agents may be grouped according to a preset grouping number of the plurality of Ambari-agents in the target Ambari, that is, the number of Ambari-agents in the target Ambari is divided by the preset grouping number to obtain the number of Ambari-agents in each group, thereby realizing grouping.
In addition, a plurality of Ambari-agents can be grouped according to the logic functions of the Ambari-agents, the logic functions comprise storage, calculation, retrieval and the like, each Ambari-Agent can be divided into different groups according to the logic function corresponding to each Ambari-Agent, and the logic functions of the Ambari-agents in the same group are the same.
In addition, a plurality of Ambari-agents can be grouped according to the network area of the Ambari-agents, and the Ambari-agents in the same network segment can be divided into the same group.
The embodiment provides a plurality of methods for grouping a plurality of Ambari-agents in a target Ambari, which is convenient for a user to select according to different actual requirements.
The above detailed description is made on the embodiment of the Ambari-based heartbeat detection method provided by the present invention, and the present invention also provides an Ambari-based heartbeat detection apparatus, a device, and a computer-readable storage medium corresponding to the method.
Fig. 4 is a structural diagram of an Ambari-based heartbeat detection apparatus according to an embodiment of the present invention, and as shown in fig. 4, the Ambari-based heartbeat detection apparatus includes:
a grouping module 41, configured to group a plurality of Ambari-agents in a target Ambari, where each group includes a plurality of Ambari-agents;
the merging module 42 is used for merging the heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data;
and the sending module 43 is configured to send the grouped heartbeat data of each different group to the Ambari-Server by using different sending threads, so that the Ambari-Server determines the operating state of each Ambari-Agent according to each grouped heartbeat data.
The Ambari-based heartbeat detection device provided by the embodiment of the invention has the beneficial effect of the Ambari-based heartbeat detection method.
As a preferred embodiment, the merging module specifically includes:
and the merging submodule is used for merging the heartbeat data sent by each Ambari-Agent in the same group, deleting the repeated information of each heartbeat data and carrying out space compression to obtain the grouped heartbeat data.
As a preferred embodiment, further comprising:
the reverse sending module is used for sending a heartbeat detection packet to the target Ambari-Agent if the Ambari-Server waits for receiving the target heartbeat data of the target Ambari-Agent to exceed the preset duration;
and the determining module is used for determining the running state of the target Ambari-Agent by the Ambari-Server according to whether the feedback information sent by the target Ambari-Agent according to the heartbeat detection packet is received or not.
Fig. 5 is a structural diagram of Ambari-based heartbeat detecting apparatus according to an embodiment of the present invention, and as shown in fig. 5, Ambari-based heartbeat detecting apparatus includes:
a memory 51 for storing a computer program;
a processor 52 for implementing the steps of the Ambari based heartbeat detection method as described above when executing the computer program.
The Ambari-based heartbeat detection device provided by the embodiment of the invention has the beneficial effect of the Ambari-based heartbeat detection method.
In order to solve the above technical problem, the present invention further provides a computer readable storage medium, on which a computer program is stored, and the computer program, when being executed by a processor, implements the steps of the above Ambari-based heartbeat detection method.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effect of the Ambari-based heartbeat detection method.
The method, the device, the equipment and the computer readable storage medium for detecting the heartbeat based on Ambari provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are set forth only to help understand the method and its core ideas of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Claims (10)
1. A heartbeat detection method based on Ambari is characterized by comprising the following steps:
grouping a plurality of Ambari-agents in a target Ambari, wherein each group comprises the plurality of Ambari-agents;
merging heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data;
and respectively sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads, so that the Ambari-Server determines the running state of each Ambari-Agent according to each grouped heartbeat data.
2. The method according to claim 1, wherein the process of combining heartbeat data sent by Ambari-agents in the same group to obtain group heartbeat data specifically includes:
and merging the heartbeat data sent by each Ambari-Agent in the same group, deleting the repeated information of each heartbeat data, and performing space compression to obtain the grouped heartbeat data.
3. The method of claim 1, wherein after the sending, by the respective different sending threads, packet heartbeat data of each different packet to Ambari-Server, such that Ambari-Server determines an operating state of each Ambari-Agent according to each packet heartbeat data, further comprising:
if the target heartbeat data of the target Ambari-Agent waiting to be received by the Ambari-Server exceeds the preset duration, sending a heartbeat detection packet to the target Ambari-Agent;
and the Ambari-Server determines the running state of the target Ambari-Agent according to whether the feedback information sent by the target Ambari-Agent according to the heartbeat detection packet is received or not.
4. The method according to claim 1, wherein the Ambari-Server determines a process of the operating state of each Ambari-Agent according to each of the grouped heartbeat data, specifically comprising:
the Ambari-Server receives the grouped heartbeat data corresponding to different groups by using a plurality of processing threads respectively, and determines the running state of each Ambari-Agent according to the grouped heartbeat data.
5. The method according to claim 4, wherein the Ambari-Server determines a process of the operating state of each Ambari-Agent according to each of the grouped heartbeat data, specifically comprising:
the Ambari-Server sets a corresponding heartbeat state information table for each group in advance;
and the Ambari-Server updates the corresponding heartbeat state information table by using the received grouped heartbeat data, and determines the running state of each Ambari-Agent according to each heartbeat state information table.
6. The method of claim 3, wherein after the Ambari-Server determines that the target Ambari-Agent is running abnormally, further comprising:
and sending out corresponding prompt information.
7. A method according to any one of claims 1 to 6, characterised in that said grouping of a plurality of Ambari-agents in a target Ambari, each group comprising a process of a plurality of said Ambari-agents, respectively, comprises:
and grouping the plurality of Ambari-agents according to the preset grouping number of the plurality of Ambari-agents in the target Ambari, the logic function of each Ambari-Agent or the network area of each Ambari-Agent, wherein each grouping comprises the plurality of Ambari-agents.
8. An Ambari-based heartbeat detection device, comprising:
the device comprises a grouping module, a judging module and a judging module, wherein the grouping module is used for grouping a plurality of Ambari-agents in a target Ambari, and each group comprises the plurality of Ambari-agents;
the merging module is used for merging the heartbeat data sent by each Ambari-Agent in the same group to obtain grouped heartbeat data;
and the sending module is used for sending the grouped heartbeat data of different groups to the Ambari-Server by using different sending threads respectively so that the Ambari-Server can determine the running state of each Ambari-Agent according to each grouped heartbeat data.
9. An Ambari-based heartbeat detection device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the Ambari-based heartbeat detection method according to any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when being executed by a processor, carries out the steps of the Ambari-based heartbeat detection method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110327530.7A CN113079065A (en) | 2021-03-26 | 2021-03-26 | Heartbeat detection method, device, equipment and medium based on Ambari |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110327530.7A CN113079065A (en) | 2021-03-26 | 2021-03-26 | Heartbeat detection method, device, equipment and medium based on Ambari |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113079065A true CN113079065A (en) | 2021-07-06 |
Family
ID=76610763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110327530.7A Pending CN113079065A (en) | 2021-03-26 | 2021-03-26 | Heartbeat detection method, device, equipment and medium based on Ambari |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113079065A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114070736A (en) * | 2021-11-09 | 2022-02-18 | 中交智运有限公司 | nginx-based multi-cluster service routing management control method and device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012167464A1 (en) * | 2011-07-01 | 2012-12-13 | 华为技术有限公司 | Heartbeat message transmission method and heartbeat proxy server |
CN103945455A (en) * | 2014-04-25 | 2014-07-23 | 中国联合网络通信集团有限公司 | Method and device for sending self-adaptive heartbeat data packets |
CN104166589A (en) * | 2013-05-17 | 2014-11-26 | 阿里巴巴集团控股有限公司 | Heartbeat package processing method and device |
CN106961359A (en) * | 2017-05-22 | 2017-07-18 | 郑州云海信息技术有限公司 | A kind of automatic deployment and monitoring method and device of Solr services |
CN107678918A (en) * | 2017-09-26 | 2018-02-09 | 郑州云海信息技术有限公司 | The OSD heartbeat mechanisms method to set up and device of a kind of distributed file system |
CN108111630A (en) * | 2018-01-22 | 2018-06-01 | 北京奇艺世纪科技有限公司 | A kind of Zookeeper group systems and attaching method thereof and system |
CN110768873A (en) * | 2019-10-31 | 2020-02-07 | 广州酷旅旅行社有限公司 | Distributed heartbeat detection method, system and device and computer equipment |
CN112073473A (en) * | 2020-08-18 | 2020-12-11 | 浙江鸿城科技有限责任公司 | Internet of things equipment heartbeat packet data acquisition method |
CN112468589A (en) * | 2020-11-27 | 2021-03-09 | 腾讯科技(深圳)有限公司 | Data distribution method and device, computer equipment and storage medium |
-
2021
- 2021-03-26 CN CN202110327530.7A patent/CN113079065A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012167464A1 (en) * | 2011-07-01 | 2012-12-13 | 华为技术有限公司 | Heartbeat message transmission method and heartbeat proxy server |
CN104166589A (en) * | 2013-05-17 | 2014-11-26 | 阿里巴巴集团控股有限公司 | Heartbeat package processing method and device |
CN103945455A (en) * | 2014-04-25 | 2014-07-23 | 中国联合网络通信集团有限公司 | Method and device for sending self-adaptive heartbeat data packets |
CN106961359A (en) * | 2017-05-22 | 2017-07-18 | 郑州云海信息技术有限公司 | A kind of automatic deployment and monitoring method and device of Solr services |
CN107678918A (en) * | 2017-09-26 | 2018-02-09 | 郑州云海信息技术有限公司 | The OSD heartbeat mechanisms method to set up and device of a kind of distributed file system |
CN108111630A (en) * | 2018-01-22 | 2018-06-01 | 北京奇艺世纪科技有限公司 | A kind of Zookeeper group systems and attaching method thereof and system |
CN110768873A (en) * | 2019-10-31 | 2020-02-07 | 广州酷旅旅行社有限公司 | Distributed heartbeat detection method, system and device and computer equipment |
CN112073473A (en) * | 2020-08-18 | 2020-12-11 | 浙江鸿城科技有限责任公司 | Internet of things equipment heartbeat packet data acquisition method |
CN112468589A (en) * | 2020-11-27 | 2021-03-09 | 腾讯科技(深圳)有限公司 | Data distribution method and device, computer equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114070736A (en) * | 2021-11-09 | 2022-02-18 | 中交智运有限公司 | nginx-based multi-cluster service routing management control method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10389801B2 (en) | Service request processing method, related apparatus, and system | |
CN108696374B (en) | Method and device for updating client configuration | |
CN110808874B (en) | Cross-machine-room service monitoring method and device, storage medium and server | |
CN107204875B (en) | Data reporting link monitoring method and device, electronic equipment and storage medium | |
CN111966289A (en) | Partition optimization method and system based on Kafka cluster | |
EP3832452A1 (en) | Log printing method and system, server | |
CN109561403A (en) | A kind of short message dispatching method, equipment and storage medium | |
CN107294799A (en) | A kind for the treatment of method and apparatus of distributed system interior joint | |
EP4564766A1 (en) | Network link generation method, server and storage medium | |
CN109657005A (en) | A kind of data cache method of distributed cluster system, device and equipment | |
CN104683155A (en) | Alarm shielding mechanism in network management system | |
US12052607B2 (en) | Communication apparatus, communication method, and program | |
US20160164719A1 (en) | Fault tolerance method for distributed stream processing system | |
CN113079065A (en) | Heartbeat detection method, device, equipment and medium based on Ambari | |
CN111935310A (en) | Data reporting system and data reporting method applied to terminal of Internet of things | |
CN107707395A (en) | A kind of data transmission method, device and system | |
CN119449806A (en) | Network request method, device, equipment, storage medium and product | |
CN110224872B (en) | Communication method, device and storage medium | |
CN117640729A (en) | Flow control method, configuration information sending method, device and electronic equipment | |
CN114090293B (en) | Service providing method and electronic equipment | |
CN114885373B (en) | A node data uploading method, device, equipment and storage medium | |
CN114567536B (en) | Abnormal data processing method, device, electronic equipment and storage medium | |
CN112866359B (en) | Data chaining method and device, electronic equipment and storage medium | |
CN111159139B (en) | A data processing method, device, storage medium and monitoring device | |
CN116827748A (en) | Configuration information management, update methods, devices, electronic equipment and storage media |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210706 |