Big data cluster availability monitoring method, device, equipment, medium and product
By loading relevant configurations in the big data cluster, determining the verification policy and calling the timeout thread for verification, the problem of traditional monitoring systems not being able to fully cover the availability of big data clusters is solved, and more accurate monitoring and higher system stability are achieved.
Patent Information
- Application Number
- CN202411684725.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional monitoring systems mainly focus on host-level monitoring, and cannot fully cover the overall operation and availability of big data clusters, resulting in limitations in performance analysis and troubleshooting of big data clusters.
Provide a big data cluster availability monitoring method. By loading the relevant configuration of the data cluster from the configuration center according to the preset cycle, determining the target cluster and its verification strategy, calling the timeout thread for verification, and sending exception prompts through the alarm system to achieve the Comprehensive and accurate monitoring of big data clusters.
It realizes more comprehensive and accurate monitoring of big data clusters, ensures the availability of the cluster, and improves the stability and reliability of the entire system.
Smart Images

Figure CN119396660A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for monitoring the availability of a big data cluster. Background Art
[0002] In the era of big data, enterprises generally adopt clustering methods in production environments to ensure high availability of clusters, so as to achieve efficient management and operation. However, the management and maintenance of large-scale clusters requires the support of professional technical teams and efficient tools. Among them, the monitoring system can track the status and performance indicators of each node in the cluster in real time to detect potential problems in a timely manner.
[0003] In traditional technologies, the monitoring system implementation solution generally adopts a combination of Exporter (a program that provides monitoring data), Prometheus (an open source monitoring system), and Grafana (a data visualization platform). Exporter is responsible for collecting various indicator data including CPU (Central Processing Unit / Processor) utilization, memory usage, network traffic, etc., and sending them to the Prometheus server in the form of time series. Finally, Grafana obtains the indicator data from the Prometheus server and displays it to the administrator in the form of charts, dashboards, etc. This allows administrators to customize reports and dashboards according to needs, set alarm rules, and realize real-time monitoring of big data clusters.
[0004] However, traditional monitoring systems mainly focus on host-level monitoring, and cannot fully cover the overall operation and availability of big data clusters. They also have certain limitations in overall performance analysis and troubleshooting of big data clusters. Summary of the invention
[0005] Based on this, it is necessary to provide a big data cluster availability monitoring method, device, computer equipment, computer-readable storage medium and computer program product that can provide a more comprehensive and accurate monitoring solution to ensure cluster stability and high availability in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for monitoring the availability of a big data cluster, comprising:
[0007] Load the relevant configuration of the data cluster from the configuration center according to the preset period;
[0008] Determine the target cluster to be monitored according to the relevant configuration of the data cluster;
[0009] Determine a verification strategy corresponding to the target cluster;
[0010] According to the verification strategy, calling the timeout thread corresponding to the target cluster to perform verification and obtain the corresponding verification result;
[0011] If there is any abnormality in the verification result, an alarm prompt will be sent through the alarm system.
[0012] In one embodiment, the loading of the relevant configuration of the data cluster from the configuration center according to a preset period includes:
[0013] Sending a request to read cluster configuration to the configuration center according to a preset period;
[0014] Obtain relevant configuration of each data cluster from the configuration center; wherein the relevant configuration includes: database information and login credentials.
[0015] In one embodiment, determining the verification strategy corresponding to the target cluster includes:
[0016] If the data cluster is an HDFS cluster, a first operation is performed at a preset time interval, and an execution result of the first operation is verified, wherein the first operation includes at least one of: creating a file, inserting data, reading data, and deleting a file;
[0017] If the data cluster is a YARN cluster, submit at least one task and verify the running status of the task;
[0018] If the data cluster is a Hive cluster or an HBase cluster, a second operation is performed and an execution result of the second operation is verified. The second operation includes at least one of adding data, deleting data, modifying data, and searching for data.
[0019] In one embodiment, calling the timeout thread corresponding to the target cluster for verification according to the verification strategy to obtain the corresponding verification result includes:
[0020] If the data cluster is an HDFS cluster, the HDFS detection thread starts a corresponding timeout thread to perform the first operation at a preset time interval, and stores the execution result of the first operation as a verification result in the database;
[0021] If the data cluster is a YARN cluster, the YARN detection thread starts the corresponding timeout thread to submit at least one task, and stores the running status of the task as a verification result in the database;
[0022] If the data cluster is a Hive cluster, the Hive detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database;
[0023] If the data cluster is an HBase cluster, the HBase detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database.
[0024] In one embodiment, the method further comprises:
[0025] A calling interface is provided to the data visualization platform Grafana, so that Grafana extracts the verification results of each data cluster from the database and displays them in Grafana.
[0026] In one embodiment, before loading the relevant configuration of the data cluster from the configuration center according to a preset period, the method further includes:
[0027] Get configuration information and Keytab information from the configuration center;
[0028] Verify the Keytab information;
[0029] If the verification is successful, data cluster detection is performed;
[0030] If the verification fails, data cluster detection is not performed.
[0031] In a second aspect, the present application also provides a big data cluster availability monitoring device, comprising:
[0032] The loading module is used to load the relevant configuration of the data cluster from the configuration center according to the preset period;
[0033] A first determination module, used to determine a target cluster to be monitored according to the relevant configuration of the data cluster;
[0034] A second determination module is used to determine the verification strategy corresponding to the target cluster;
[0035] A verification module, used to call the timeout thread corresponding to the target cluster to perform verification according to the verification strategy, and obtain a corresponding verification result;
[0036] The alarm module is used to send an alarm prompt through the alarm system when there is an abnormality in the verification result.
[0037] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0038] Load the relevant configuration of the data cluster from the configuration center according to the preset period;
[0039] Determine the target cluster to be monitored according to the relevant configuration of the data cluster;
[0040] Determine a verification strategy corresponding to the target cluster;
[0041] According to the verification strategy, calling the timeout thread corresponding to the target cluster to perform verification and obtain the corresponding verification result;
[0042] If there is any abnormality in the verification result, an alarm prompt will be sent through the alarm system.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0044] Load the relevant configuration of the data cluster from the configuration center according to the preset period;
[0045] Determine the target cluster to be monitored according to the relevant configuration of the data cluster;
[0046] Determine a verification strategy corresponding to the target cluster;
[0047] According to the verification strategy, calling the timeout thread corresponding to the target cluster to perform verification and obtain the corresponding verification result;
[0048] If there is any abnormality in the verification result, an alarm prompt will be sent through the alarm system.
[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0050] Load the relevant configuration of the data cluster from the configuration center according to the preset period;
[0051] Determine the target cluster to be monitored according to the relevant configuration of the data cluster;
[0052] Determine a verification strategy corresponding to the target cluster;
[0053] According to the verification strategy, calling the timeout thread corresponding to the target cluster to perform verification and obtain the corresponding verification result;
[0054] If there is any abnormality in the verification result, an alarm prompt will be sent through the alarm system.
[0055] The above-mentioned big data cluster availability monitoring method, device, computer equipment, computer-readable storage medium and computer program product load the relevant configuration of the data cluster from the configuration center according to a preset period; determine the target cluster to be monitored based on the relevant configuration of the data cluster; thereby periodically monitoring each data cluster. Determine the verification strategy corresponding to the target cluster; according to the verification strategy, call the timeout thread corresponding to the target cluster for verification to obtain the corresponding verification result; thereby, different types of data clusters can be targeted and verified in different ways, making the verification results more accurate. If there is an abnormality in the verification result, an alarm prompt is sent through the alarm system. Thereby, more comprehensive and accurate monitoring of the big data cluster can be achieved, the availability of the cluster can be ensured, and the stability and reliability of the entire system can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0057] FIG1 is an application environment diagram of a method for monitoring availability of a big data cluster in one embodiment;
[0058] FIG2 is a schematic diagram of a process flow of a method for monitoring availability of a big data cluster in one embodiment;
[0059] FIG3 is a schematic diagram of a flow chart of a method for monitoring availability of a big data cluster in another embodiment;
[0060] FIG4 is a schematic diagram of a flow chart of a method for monitoring availability of a big data cluster in yet another embodiment;
[0061] FIG5 is a schematic diagram of the architecture of a big data cluster availability monitoring system in one embodiment;
[0062] FIG6 is a structural block diagram of a device for monitoring the availability of a big data cluster in one embodiment;
[0063] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0065] Existing monitoring systems mainly focus on host-level monitoring, and may not fully cover the overall operation and availability of big data clusters. Especially when using distributed file systems such as HDFS as storage solutions, even if cluster processes are alive and have sufficient capacity, there may be availability issues such as read and write anomalies, and current monitoring solutions may not be able to effectively detect such issues. In addition, although the Prometheus solution with Exporter is flexible and scalable, it mainly focuses on host-level monitoring, which may have certain limitations for overall performance analysis and troubleshooting of big data clusters.
[0066] Exemplarily, the big data cluster availability monitoring method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, Exporter is responsible for collecting various data of the big data cluster, and then transmitting the data to Prometheus for storage and integration, and finally realizing the visualization of data and the triggering of the alarm system through Grafana. The data collected by Exporter includes the process survival status and disk usage of the big data cluster. The cluster detection system is responsible for monitoring whether the various functions of the cluster are running normally, including: loading the relevant configuration of the data cluster from the configuration center according to the preset cycle; determining the target cluster to be monitored according to the relevant configuration of the data cluster; determining the verification strategy corresponding to the target cluster; according to the verification strategy, calling the timeout thread corresponding to the target cluster for verification, and obtaining the corresponding verification result; if there is an abnormality in the verification result, an alarm prompt is sent through the alarm system.
[0067] Among them, Prometheus is an open source monitoring system that can accurately collect various monitoring indicator data. Grafana is an open source data visualization platform that can convert the complex data collected by Prometheus into intuitive and easy-to-understand charts, greatly improving users' ability to analyze and understand data. Exporter is a program that provides monitoring data. It is responsible for collecting various indicator data including CPU (Central Processing Unit / Processor) utilization, memory usage, network traffic, etc., and sending them to the Prometheus server in the form of time series. Finally, Grafana obtains the indicator data from the Prometheus server and displays it to the administrator in the form of charts, dashboards, etc. This allows administrators to customize reports and dashboards according to needs, set alarm rules, and realize real-time monitoring of big data clusters.
[0068] In an exemplary embodiment, as shown in FIG. 2 , a method for monitoring the availability of a big data cluster is provided, which is described by taking the method applied to the cluster detection system in FIG. 1 as an example, and includes the following steps 201 to 205 .
[0069] Step 201: Load relevant configurations of the data cluster from the configuration center according to a preset period.
[0070] In this embodiment, the preset detection cycle can be set to be performed every 5 minutes. Of course, this is only the distance, and in actual application, it can be flexibly set according to system requirements.
[0071] Exemplarily, the cluster detection system sends a request to read the cluster configuration to the configuration center according to a preset period; obtains the relevant configuration of each data cluster from the configuration center; wherein the relevant configuration includes: database information, login credentials.
[0072] Step 202: Determine the target cluster to be monitored according to the relevant configuration of the data cluster.
[0073] In this embodiment, whether to start the detection of the data cluster is determined based on information such as database information and login credentials, so that the availability detection of a part of the data clusters can be selected according to the demand.
[0074] Step 203: Determine the verification strategy corresponding to the target cluster.
[0075] In this embodiment, after the cluster detection system reads the relevant configuration of the data cluster, it adopts corresponding verification strategies for different types of data clusters according to pre-designed verification steps, so as to adapt to different types of data clusters and make the verification result more accurate.
[0076] Exemplarily, if the data cluster is an HDFS cluster, a first operation is performed at a preset time interval, and an execution result of the first operation is verified, the first operation including at least one of creating a file, inserting data, reading data, and deleting a file.
[0077] Exemplarily, if the data cluster is a YARN cluster, at least one small task is submitted, and the running status of the task is verified.
[0078] Exemplarily, if the data cluster is a Hive cluster or an HBase cluster, a second operation is performed and the execution result of the second operation is verified. The second operation includes at least one of adding data, deleting data, modifying data, and searching for data.
[0079] Step 204: According to the verification strategy, the timeout thread corresponding to the target cluster is called to perform verification to obtain a corresponding verification result.
[0080] In this embodiment, a timeout thread is set to execute the corresponding verification step, so as to avoid system crash and freeze caused by data processing timeout. For example, different time limits can be set for different types of data clusters, and the timeout thread only runs under the set time limit. If a timeout occurs, the system detects the cluster and directly terminates the operation of the corresponding thread.
[0081] Exemplarily, if the data cluster is an HDFS cluster, the HDFS detection thread starts a corresponding timeout thread to execute the first operation at a preset time interval, and stores the execution result of the first operation as a verification result in the database.
[0082] Exemplarily, if the data cluster is a YARN cluster, the YARN detection thread starts the corresponding timeout thread to submit at least one task, and stores the running status of the task as a verification result in the database.
[0083] Exemplarily, if the data cluster is a Hive cluster, the Hive detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database.
[0084] Exemplarily, if the data cluster is an HBase cluster, the HBase detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database.
[0085] Step 205: If there is an abnormality in the verification result, an alarm prompt is sent through the alarm system.
[0086] In this embodiment, if the HDFS cluster cannot complete the first operation, or an error occurs in the execution result of the first operation, it is considered that there is an abnormality in the HDFS cluster. At this time, an alarm prompt is sent through the alarm system so that the staff can take timely measures to troubleshoot the problem.
[0087] In this embodiment, if there is an abnormality in the task running status of the YARN cluster, an alarm prompt is sent through the alarm system so that the staff can take measures to troubleshoot the fault in time.
[0088] In this embodiment, if the Hive cluster or HBase cluster cannot complete the second operation, or an error occurs in the execution result of the second operation, it is considered that there is an abnormality in the Hive cluster or HBase cluster. At this time, an alarm prompt is sent through the alarm system so that the staff can take timely measures to troubleshoot the problem.
[0089] It should be noted that in addition to the above-mentioned alarm methods, the causes of various abnormalities and corresponding solutions can also be detailed, so that the staff can refer to them when troubleshooting.
[0090] The above-mentioned big data cluster availability monitoring method loads the relevant configuration of the data cluster from the configuration center according to a preset period; determines the target cluster to be monitored based on the relevant configuration of the data cluster; thereby, each data cluster can be monitored periodically. Determine the verification strategy corresponding to the target cluster; according to the verification strategy, call the timeout thread corresponding to the target cluster for verification to obtain the corresponding verification result; thereby, different types of data clusters can be verified in different ways in a targeted manner, so that the verification results are more accurate. If there is an abnormality in the verification result, an alarm prompt is sent through the alarm system. Thus, more comprehensive and accurate monitoring of the big data cluster can be achieved, the availability of the cluster can be ensured, and the stability and reliability of the entire system can be improved.
[0091] In another exemplary embodiment, as shown in FIG. 3 , a method for monitoring the availability of a big data cluster is provided, which is described by taking the method applied to the cluster detection system in FIG. 1 as an example, and includes the following steps 301 to 305 .
[0092] Step 301: Load relevant configurations of the data cluster from the configuration center according to a preset period.
[0093] Step 302: Determine the target cluster to be monitored according to the relevant configuration of the data cluster.
[0094] Step 303: Determine the verification strategy corresponding to the target cluster.
[0095] Step 304: According to the verification strategy, the timeout thread corresponding to the target cluster is called to perform verification to obtain a corresponding verification result.
[0096] Step 305: If there is an abnormality in the verification result, an alarm prompt is sent through the alarm system.
[0097] In this embodiment, for the specific implementation process and technical effects of steps 301 to 305, please refer to the relevant descriptions of steps 201 to 205 in the method embodiment shown in FIG. 2 , which will not be repeated here.
[0098] Step 306: Provide a calling interface to the data visualization platform Grafana, so that Grafana extracts the verification results of each data cluster from the database and displays them in Grafana.
[0099] In this embodiment, in addition to being able to track the status and performance indicators of each node in the cluster in real time, the monitoring system also has a visualization interface and reporting function. Administrators can view the overall status and performance indicators of the cluster, including node status, data flow, etc. through an intuitive visualization interface. At the same time, the monitoring system can generate detailed reports and statistical information, providing strong support for administrators to gain an in-depth understanding of the cluster's usage and performance bottlenecks, thereby optimizing management strategies.
[0100] In this embodiment, Grafana can convert the complex data collected by Prometheus into intuitive and easy-to-understand charts, which greatly improves the user's ability to analyze and understand the data. The rich templates and highly customized options provided by Grafana fully meet the user's personalized data display needs.
[0101] For example, indicator data can be obtained from the Prometheus server and displayed to the administrator in the form of charts, dashboards, etc. This allows the administrator to customize reports and dashboards according to needs, set alarm rules, and achieve real-time monitoring of the big data cluster.
[0102] In another exemplary embodiment, as shown in FIG. 4 , a method for monitoring the availability of a big data cluster is provided, which is described by taking the method applied to the cluster detection system in FIG. 1 as an example, and includes the following steps 401 to 405 .
[0103] Step 401, obtain configuration information and Keytab information from the configuration center.
[0104] Step 402, verify the Keytab information.
[0105] In this embodiment, Kerberos can be applied to verify the Keytab information. Kerberos is a computer network authorization protocol used to authenticate personal communications in a secure manner in an insecure network. Its design goal is to provide a strong authentication service for client / server applications through a key system. The implementation of this authentication process does not rely on the authentication of the host operating system, does not require trust based on the host address, does not require the physical security of all hosts on the network, and assumes that data packets transmitted on the network can be arbitrarily read, modified, and inserted. In the above case, Kerberos, as a trusted third-party authentication service, performs authentication services through traditional cryptographic technology (such as shared keys). Keytab is a key table file that obtains configuration information and Keytab information from the configuration center; performs Keytab information verification; if the verification is successful, data cluster detection is performed; if the verification fails, data cluster detection is not performed. .
[0106] It should be noted that Keytab verification does not need to be repeated. Generally, only one verification is required within a longer validity period.
[0107] Exemplarily, the cluster detection system first generates a keytab with minimal permissions for the detection module, and then performs keytab verification when reading the cluster configuration for the first time.
[0108] Step 403: Load relevant configurations of the data cluster from the configuration center according to a preset period.
[0109] Step 404: Determine the target cluster to be monitored according to the relevant configuration of the data cluster.
[0110] Step 405: Determine the verification strategy corresponding to the target cluster.
[0111] Step 406: According to the verification strategy, the timeout thread corresponding to the target cluster is called to perform verification to obtain a corresponding verification result.
[0112] Step 407: If there is an abnormality in the verification result, an alarm prompt is sent through the alarm system.
[0113] In this embodiment, for the specific implementation process and technical effects of steps 403 to 407, please refer to the relevant descriptions of steps 201 to 205 in the method embodiment shown in FIG. 2 , which will not be repeated here.
[0114] In this embodiment, by performing a keytab authentication before loading the relevant configuration of the data cluster, the security of the data can be improved to prevent the data from being tampered with and leaked.
[0115] Exemplarily, as shown in FIG5 , a big data cluster availability monitoring system is provided, and its implementation principle may include: after the cluster detection module is started, the relevant configuration of the big data cluster is first loaded from the configuration center, wherein the relevant configuration includes but is not limited to necessary data such as database information and login credentials. Then, the cluster detection module starts the corresponding timeout thread for each different cluster to perform cluster detection. The detection results will be recorded and stored in the database in real time so as to be visualized through the Grafana platform.
[0116] In this embodiment, in order to facilitate the acquisition and display of monitoring information, a special interface can also be provided in the service for Grafana to call and obtain the detection results (that is, the verification results in the above embodiment). Through this interface, Grafana can obtain key information such as tenant information, component information, detection results, operating status, and possible service failure reasons of the detection service in real time, providing comprehensive and accurate monitoring data support for operation and maintenance personnel.
[0117] The monitoring method in this embodiment makes up for the problem that the existing monitoring system is insufficient in monitoring the overall availability of the big data cluster, and can provide a more comprehensive and accurate monitoring solution to help enterprises better manage and maintain the big data cluster, and achieve more comprehensive and accurate monitoring of the big data cluster, thereby ensuring the availability of the cluster and improving the stability and reliability of the entire system. It is a good solution to the problem that the current monitoring system cannot monitor the overall availability of the big data cluster and cannot perceive whether the big data cluster function is available.
[0118] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0119] Based on the same inventive concept, the embodiment of the present application also provides a big data cluster availability monitoring device for implementing the big data cluster availability monitoring method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more big data cluster availability monitoring device embodiments provided below can refer to the limitations of the big data cluster availability monitoring method above, and will not be repeated here.
[0120] In an exemplary embodiment, as shown in FIG6 , a big data cluster availability monitoring device is provided, including: a loading module 601, a first determination module 602, a second determination module 603, a verification module 604 and an alarm module 605, wherein:
[0121] The loading module 601 is used to load the relevant configuration of the data cluster from the configuration center according to a preset period;
[0122] A first determination module 602 is used to determine a target cluster to be monitored according to the relevant configuration of the data cluster;
[0123] A second determination module 603 is used to determine a verification strategy corresponding to the target cluster;
[0124] The verification module 604 is used to call the timeout thread corresponding to the target cluster to perform verification according to the verification strategy and obtain a corresponding verification result;
[0125] The alarm module 605 is used to send an alarm prompt through the alarm system when there is an abnormality in the verification result.
[0126] Exemplarily, the loading module 601 is specifically used to: send a cluster configuration read request to the configuration center according to a preset period; obtain relevant configurations of each data cluster from the configuration center; wherein the relevant configurations include: database information, login credentials.
[0127] Exemplarily, the second determining module 603 is specifically configured to:
[0128] If the data cluster is an HDFS cluster, a first operation is performed at a preset time interval, and an execution result of the first operation is verified, wherein the first operation includes at least one of: creating a file, inserting data, reading data, and deleting a file;
[0129] If the data cluster is a YARN cluster, submit at least one task and verify the running status of the task;
[0130] If the data cluster is a Hive cluster or an HBase cluster, a second operation is performed and an execution result of the second operation is verified. The second operation includes at least one of adding data, deleting data, modifying data, and searching for data.
[0131] Exemplarily, the verification module 604 is specifically used for:
[0132] If the data cluster is an HDFS cluster, the HDFS detection thread starts a corresponding timeout thread to perform the first operation at a preset time interval, and stores the execution result of the first operation as a verification result in the database;
[0133] If the data cluster is a YARN cluster, the YARN detection thread starts the corresponding timeout thread to submit at least one task, and stores the running status of the task as a verification result in the database;
[0134] If the data cluster is a Hive cluster, the Hive detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database;
[0135] If the data cluster is an HBase cluster, the HBase detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database.
[0136] Exemplarily, the above-mentioned apparatus may further include: an interface module 606, which is used to provide a calling interface to the data visualization platform Grafana, so that Grafana extracts the verification results of each data cluster from the database and displays them in Grafana.
[0137] Exemplarily, the above-mentioned device may also include: an authentication module 607, which is used to obtain configuration information and Keytab information from the configuration center; perform Keytab information verification; if the verification is successful, perform data cluster detection; if the verification fails, do not perform data cluster detection.
[0138] Each module in the above-mentioned big data cluster availability monitoring device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0139] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for monitoring the availability of a big data cluster is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0140] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0141] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0142] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0143] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0145] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0146] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0147] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for monitoring the availability of a big data cluster, characterized in that: The method comprises: Load the relevant configuration of the data cluster from the configuration center according to the preset period; Determine the target cluster to be monitored according to the relevant configuration of the data cluster; Determine a verification strategy corresponding to the target cluster; According to the verification strategy, calling the timeout thread corresponding to the target cluster to perform verification and obtain the corresponding verification result; If there is any abnormality in the verification result, an alarm prompt will be sent through the alarm system.
2. The method according to claim 1, characterized in that The loading of the relevant configuration of the data cluster from the configuration center according to the preset period includes: Sending a request to read cluster configuration to the configuration center according to a preset period; Obtain relevant configuration of each data cluster from the configuration center; wherein the relevant configuration includes: database information and login credentials.
3. The method according to claim 1, characterized in that The determining the verification strategy corresponding to the target cluster includes: If the data cluster is an HDFS cluster, a first operation is performed at a preset time interval, and an execution result of the first operation is verified, wherein the first operation includes at least one of: creating a file, inserting data, reading data, and deleting a file; If the data cluster is a YARN cluster, submit at least one task and verify the running status of the task; If the data cluster is a Hive cluster or an HBase cluster, a second operation is performed and an execution result of the second operation is verified. The second operation includes at least one of adding data, deleting data, modifying data, and searching for data.
4. The method according to claim 3, characterized in that The step of calling the timeout thread corresponding to the target cluster for verification according to the verification strategy to obtain a corresponding verification result includes: If the data cluster is an HDFS cluster, the HDFS detection thread starts a corresponding timeout thread to perform the first operation at a preset time interval, and stores the execution result of the first operation as a verification result in the database; If the data cluster is a YARN cluster, the YARN detection thread starts the corresponding timeout thread to submit at least one task, and stores the running status of the task as a verification result in the database; If the data cluster is a Hive cluster, the Hive detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database; If the data cluster is an HBase cluster, the HBase detection thread starts a corresponding timeout thread to execute the second operation, and stores the execution result of the second operation as a verification result in the database.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: A calling interface is provided to the data visualization platform Grafana, so that Grafana extracts the verification results of each data cluster from the database and displays them in Grafana.
6. The method according to any one of claims 1 to 5, characterized in that: Before loading the relevant configuration of the data cluster from the configuration center according to a preset period, the method further includes: Get configuration information and Keytab information from the configuration center; Verify the Keytab information; If the verification is successful, data cluster detection is performed; If the verification fails, no data cluster detection is performed.
7. A big data cluster availability monitoring device, characterized in that: The device comprises: The loading module is used to load the relevant configuration of the data cluster from the configuration center according to the preset period; A first determination module, used to determine a target cluster to be monitored according to the relevant configuration of the data cluster; A second determination module is used to determine the verification strategy corresponding to the target cluster; A verification module, used to call the timeout thread corresponding to the target cluster to perform verification according to the verification strategy, and obtain a corresponding verification result; The alarm module is used to send an alarm prompt through the alarm system when there is an abnormality in the verification result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.