Node state detection method and device of distributed storage system

文档序号:7411 发布日期:2021-09-17 浏览:26次 中文

1. A node state detection method of a distributed storage system is characterized by comprising the following steps:

periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold;

processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing the information of the node state data, and compressing and recording the sparse matrix to a node log;

extracting and decompressing the sparse matrix from the node log in response to receiving a node state detection indication, processing the sparse matrix using the feature matrix to obtain the data queue, and extracting the node state data;

a node state of the distributed storage system is determined based on the node state data, and a sub-health alarm or an error alarm is selectively issued based on the node state.

2. The method of claim 1, wherein the node state data comprises at least one of: the processor occupancy rate, the memory occupancy rate, the switch occupancy rate, the network delay, the network packet loss rate and the disk read-write rate of the node.

3. The method of claim 1, wherein the data queue is a two-dimensional array queue, wherein the number of rows of the two-dimensional array queue is the number of acquisitions when the size of the data queue reaches the processing threshold, and wherein the number of columns of the two-dimensional array queue is the number of types of node state data.

4. The method of claim 3, wherein periodically obtaining node status data using a data queue and writing the node status data to the data queue comprises periodically performing the steps of: and acquiring the node state data, newly building a row at the tail of the row of the two-dimensional array queue, and writing the node state data into the newly built row in a way that each kind of data of the node state data corresponds to the row of the two-dimensional array queue one by one.

5. The method of claim 1, further comprising: after compressing and recording the sparse matrix to a node log, also emptying the data queue and periodically acquiring the node state data again to write into the data queue.

6. The method of claim 1, wherein determining the node state of the distributed storage system based on the node state data comprises: each category in the node state data is compared to the error threshold and sub-health threshold for that category, respectively.

7. The method of claim 6, wherein selectively issuing a sub-health alarm or a false alarm based on the node status comprises:

issuing the fault alert in response to determining that there is at least one category of values for the node status data that falls within a range defined by the fault threshold for that category;

issuing the sub-health alert in response to determining that there is no value of any category of the node status data that falls within a range defined by the error threshold for that category, but there is at least one category of the node status data that falls within a range defined by the sub-health threshold for that category;

not issuing any alarm in response to determining that there is no value of any category of the node status data that falls within a range defined by the fault threshold or the sub-health threshold for that category.

8. The method of claim 7, further comprising: issuing sub-health alarm recovery information in response to determining that there is no value of any kind of the node status data that falls within a range defined by the fault threshold or the sub-health threshold for that kind and that the sub-health alarm has been issued for a node before.

9. The method of claim 8, wherein the sub-health alert recovery information is issued only once per sub-health alert, at most.

10. A node state detection apparatus of a distributed storage system, comprising:

a processor;

a controller storing program code executable by the processor, the processor executing the following steps when executing the program code:

periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold;

processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing the information of the node state data, and compressing and recording the sparse matrix to a node log;

extracting and decompressing the sparse matrix from the node log in response to receiving a node state detection indication, processing the sparse matrix using the feature matrix to obtain the data queue, and extracting the node state data;

a node state of the distributed storage system is determined based on the node state data, and a sub-health alarm or an error alarm is selectively issued based on the node state.

Background

In the distributed storage system, each node runs a storage program, and when a CPU (central processing unit), a memory, a network, or a disk of one or more nodes is in a sub-health state between a health state and a failure state, the nodes become a performance bottleneck of the entire distributed storage system. In order to detect the sub-health state more quickly, a shorter time interval is needed to collect the information of the use condition of various resources of the node, so that logs recording various resources of the node become larger, the occupied disk space becomes larger, and the stability of the system is possibly influenced; once the log is full of disks, traceability of the system log is also affected.

Aiming at the problem that the node logs influence the disk space and the node stability greatly in the prior art, no effective solution is available at present.

Disclosure of Invention

In view of this, an object of the embodiments of the present invention is to provide a node state detection method and apparatus for a distributed storage system, which can reduce a log occupation space and maintain availability of node state detection and node stability.

Based on the above object, a first aspect of the embodiments of the present invention provides a node status detection method for a distributed storage system, including the following steps:

periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold value;

processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log;

extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data;

a node status of the distributed storage system is determined based on the node status data, and a sub-health alert or error alert is selectively issued based on the node status.

In some embodiments, the node state data includes at least one of: the processor occupancy rate, the memory occupancy rate, the switch occupancy rate, the network delay, the network packet loss rate and the disk read-write rate of the node.

In some embodiments, the data queue is a two-dimensional array queue, where the number of rows of the two-dimensional array queue is the number of acquisitions when the size of the data queue reaches a processing threshold, and the number of columns of the two-dimensional array queue is the number of types of node state data.

In some embodiments, periodically obtaining node status data and writing the node status data to the data queue using the data queue comprises periodically performing the steps of: and acquiring node state data, newly building a row at the tail of the row of the two-dimensional array queue, and writing the node state data into the newly built row in a way that each kind of data of the node state data corresponds to the row of the two-dimensional array queue one by one.

In some embodiments, the method further comprises: after the sparse matrix is compressed and recorded to the node log, the data queue is also emptied and node state data is again periodically retrieved to write to the data queue.

In some embodiments, determining the node state of the distributed storage system based on the node state data comprises: each category in the node status data is compared to the error threshold and sub-health threshold for that category, respectively.

In some embodiments, selectively issuing sub-health or fault alerts based on node status includes:

issuing a fault alert in response to determining that there is at least one category of node status data whose value falls within a range defined by a fault threshold for that category;

issuing a sub-health alert in response to determining that there is no value of any kind of node status data that falls within a range defined by the fault threshold for that kind, but there is at least one kind of node status data that falls within a range defined by the sub-health threshold for that kind;

no alarm is issued in response to determining that there is no value of any kind of node status data that falls within the range defined by the fault threshold or sub-health threshold for that kind.

In some embodiments, the method further comprises: the sub-health alert recovery message is issued in response to determining that no value of any kind of node state data falls within a range defined by the error threshold or sub-health threshold of that kind and that a sub-health alert has been issued previously for the node.

In some embodiments, the sub-health alert recovery information is issued only once at most for each sub-health alert.

A second aspect of an embodiment of the present invention provides an apparatus, including:

a processor;

a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:

periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold value;

processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log;

extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data;

a node status of the distributed storage system is determined based on the node status data, and a sub-health alert or error alert is selectively issued based on the node status.

In some embodiments, the node state data includes at least one of: the processor occupancy rate, the memory occupancy rate, the switch occupancy rate, the network delay, the network packet loss rate and the disk read-write rate of the node.

In some embodiments, the data queue is a two-dimensional array queue, where the number of rows of the two-dimensional array queue is the number of acquisitions when the size of the data queue reaches a processing threshold, and the number of columns of the two-dimensional array queue is the number of types of node state data.

In some embodiments, periodically obtaining node status data and writing the node status data to the data queue using the data queue comprises periodically performing the steps of: and acquiring node state data, newly building a row at the tail of the row of the two-dimensional array queue, and writing the node state data into the newly built row in a way that each kind of data of the node state data corresponds to the row of the two-dimensional array queue one by one.

In some embodiments, the steps further comprise: after the sparse matrix is compressed and recorded to the node log, the data queue is also emptied and node state data is again periodically retrieved to write to the data queue.

In some embodiments, determining the node state of the distributed storage system based on the node state data comprises: each category in the node status data is compared to the error threshold and sub-health threshold for that category, respectively.

In some embodiments, selectively issuing sub-health or fault alerts based on node status includes:

issuing a fault alert in response to determining that there is at least one category of node status data whose value falls within a range defined by a fault threshold for that category;

issuing a sub-health alert in response to determining that there is no value of any kind of node status data that falls within a range defined by the fault threshold for that kind, but there is at least one kind of node status data that falls within a range defined by the sub-health threshold for that kind;

no alarm is issued in response to determining that there is no value of any kind of node status data that falls within the range defined by the fault threshold or sub-health threshold for that kind.

In some embodiments, the steps further comprise: the sub-health alert recovery message is issued in response to determining that no value of any kind of node state data falls within a range defined by the error threshold or sub-health threshold of that kind and that a sub-health alert has been issued previously for the node.

In some embodiments, the sub-health alert recovery information is issued only once at most for each sub-health alert.

The invention has the following beneficial technical effects: according to the node state detection method and device of the distributed storage system, the node state data are periodically acquired by using the data queue and written into the data queue until the size of the data queue reaches a processing threshold value; processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log; extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data; the node state of the distributed storage system is determined based on the node state data, and the sub-health alarm or the error alarm is selectively sent out based on the node state, so that the occupied space of the log can be reduced, and the usability and the node stability of node state detection can be maintained.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, 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 drawings without creative efforts.

FIG. 1 is a schematic flow chart illustrating a node status detection method of a distributed storage system according to the present invention;

FIG. 2 is a schematic flow chart illustrating the first two steps of the node status detection method for a distributed storage system according to the present invention;

fig. 3 is a schematic flowchart of the last two steps of the node state detection method of the distributed storage system according to the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.

It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.

In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a node state detection method for a distributed storage system, which reduces a log occupation space and maintains node state detection availability and node stability. Fig. 1 is a schematic flowchart illustrating a node state detection method of a distributed storage system according to the present invention.

The node state detection method of the distributed storage system, as shown in fig. 1, includes the following steps:

step S101, periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold value;

step S103, processing the data queue by using a preset characteristic matrix, obtaining a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log;

step S105, in response to receiving the node state detection indication, extracting and decompressing a sparse matrix from the node log, processing the sparse matrix by using a characteristic matrix to obtain a data queue, and extracting node state data;

and step S107, determining the node state of the distributed storage system based on the node state data, and selectively sending a sub-health alarm or an error alarm based on the node state.

The invention provides a node resource recording and sub-health diagnosis device based on compressed sensing, which uses a specific matrix to convert characteristics of CPU occupancy rate, memory occupancy rate, Swap (switch) occupancy rate, network time delay, network packet loss, IO (read-write) rate of a disk and the like of all storage systems acquired at a time interval into a sparse matrix, and records non-zero values as a log file. And (3) detecting a sub-health program, reading resource occupation information of the log file in a period of time after the log file is subjected to reverse matrix calculation and node recovery, judging whether each resource is in a sub-health state, and reporting an alarm if the sub-health state exists.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.

In some embodiments, the node state data includes at least one of: the processor occupancy rate, the memory occupancy rate, the switch occupancy rate, the network delay, the network packet loss rate and the disk read-write rate of the node.

In some embodiments, the data queue is a two-dimensional array queue, where the number of rows of the two-dimensional array queue is the number of acquisitions when the size of the data queue reaches a processing threshold, and the number of columns of the two-dimensional array queue is the number of types of node state data.

In some embodiments, periodically obtaining node status data and writing the node status data to the data queue using the data queue comprises periodically performing the steps of: and acquiring node state data, newly building a row at the tail of the row of the two-dimensional array queue, and writing the node state data into the newly built row in a way that each kind of data of the node state data corresponds to the row of the two-dimensional array queue one by one.

In some embodiments, the method further comprises: after the sparse matrix is compressed and recorded to the node log, the data queue is also emptied and node state data is again periodically retrieved to write to the data queue.

The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. 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 disclosed embodiments of the present invention.

In some embodiments, determining the node state of the distributed storage system based on the node state data comprises: each category in the node status data is compared to the error threshold and sub-health threshold for that category, respectively.

In some embodiments, selectively issuing sub-health or fault alerts based on node status includes:

issuing a fault alert in response to determining that there is at least one category of node status data whose value falls within a range defined by a fault threshold for that category;

issuing a sub-health alert in response to determining that there is no value of any kind of node status data that falls within a range defined by the fault threshold for that kind, but there is at least one kind of node status data that falls within a range defined by the sub-health threshold for that kind;

no alarm is issued in response to determining that there is no value of any kind of node status data that falls within the range defined by the fault threshold or sub-health threshold for that kind.

In some embodiments, the sub-health alert recovery information is issued in response to determining that no value of any kind of node state data falls within a range defined by the error threshold or sub-health threshold of that kind and that a sub-health alert has been previously issued for the node.

In some embodiments, the sub-health alert recovery information is issued only once at most for each sub-health alert.

The computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.

The following further illustrates embodiments of the invention in terms of specific examples.

The embodiment of the present invention may be divided into two parts, namely, a "generation log" and an "analysis log", which respectively correspond to steps S101 and S103 and steps S105 and S107, and refer to fig. 2 and fig. 3 respectively to understand a part of corresponding embodiments.

Fig. 2 corresponds to steps S101 and 103:

(1) and creating a two-dimensional array queue, wherein the two-dimensional array queue is used for recording all system resource information of each acquisition time point, and the system resource information comprises CPU occupancy rate, memory occupancy rate, Swap occupancy rate, network time delay, network packet loss, IO rate of a disk and the like.

(2) Judging whether the queue is not full, and jumping to the step (3) if the queue is not full; and (6) if the current is full.

(3) And collecting system resource information, including CPU occupancy rate, memory occupancy rate, Swap occupancy rate, network delay, network packet loss, IO rate of a disk and the like.

(4) And (4) counting all collected information into a queue.

(5) And (2) returning after waiting for a period of time.

(6) And multiplying all values of the whole queue by a specific matrix to transform into a sparse matrix.

(7) The sparse matrix is compressed and logged.

(8) Dequeue the queue head, and return to (2).

Fig. 2 constructs a method of continuously collecting and outputting logs, which enables continuous production of logs for a long time at a low storage cost.

Fig. 3 corresponds to steps S105, 107:

(1) and reading the log information.

(2) And multiplying the read information by the specific matrix to recover the recorded system resource information before, wherein the recorded system resource information comprises characteristics such as CPU occupancy rate, memory occupancy rate, Swap occupancy rate, network delay, network packet loss, IO rate of a disk and the like.

(3) And judging whether each resource item is larger than a sub-health alarm threshold value or not according to the acquired system resource information.

(4) If the sub-health alarm threshold value is larger than the sub-health alarm threshold value, alarming; and if the alarm is not greater than the sub-health alarm threshold, reporting alarm recovery.

Only sub-health alarms are illustrated in the present embodiment, but in fact false alarms may be implemented in the same manner, or both.

Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention. The above-described method steps and system elements may also be implemented using a controller and a computer-readable storage medium for storing a computer program for causing the controller to implement the functions of the above-described steps or elements.

As can be seen from the foregoing embodiments, in the node state detection method of the distributed storage system provided in the embodiments of the present invention, node state data is periodically obtained by using a data queue and written into the data queue until the size of the data queue reaches a processing threshold; processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log; extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data; the node state of the distributed storage system is determined based on the node state data, and the sub-health alarm or the error alarm is selectively sent out based on the node state, so that the occupied space of the log can be reduced, and the usability and the node stability of node state detection can be maintained.

It should be particularly noted that, the steps in the embodiments of the node state detection method of the distributed storage system described above may be mutually intersected, replaced, added, and deleted, and therefore, the node state detection method of the distributed storage system based on these reasonable permutation and combination transformations shall also belong to the scope of the present invention, and shall not limit the scope of the present invention to the described embodiments.

In view of the foregoing, a second aspect of the embodiments of the present invention provides an embodiment of a node status detection apparatus for a distributed storage system, which reduces a log occupation space and maintains node status detection availability and node stability. The device comprises:

a processor;

a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:

periodically acquiring node state data by using a data queue and writing the node state data into the data queue until the size of the data queue reaches a processing threshold value;

processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log;

extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data;

a node status of the distributed storage system is determined based on the node status data, and a sub-health alert or error alert is selectively issued based on the node status.

The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.

In some embodiments, the node state data includes at least one of: the processor occupancy rate, the memory occupancy rate, the switch occupancy rate, the network delay, the network packet loss rate and the disk read-write rate of the node.

In some embodiments, the data queue is a two-dimensional array queue, where the number of rows of the two-dimensional array queue is the number of acquisitions when the size of the data queue reaches a processing threshold, and the number of columns of the two-dimensional array queue is the number of types of node state data.

In some embodiments, periodically obtaining node status data and writing the node status data to the data queue using the data queue comprises periodically performing the steps of: and acquiring node state data, newly building a row at the tail of the row of the two-dimensional array queue, and writing the node state data into the newly built row in a way that each kind of data of the node state data corresponds to the row of the two-dimensional array queue one by one.

In some embodiments, the steps further comprise: after the sparse matrix is compressed and recorded to the node log, the data queue is also emptied and node state data is again periodically retrieved to write to the data queue.

In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

In some embodiments, determining the node state of the distributed storage system based on the node state data comprises: each category in the node status data is compared to the error threshold and sub-health threshold for that category, respectively.

In some embodiments, selectively issuing sub-health or fault alerts based on node status includes:

issuing a fault alert in response to determining that there is at least one category of node status data whose value falls within a range defined by a fault threshold for that category;

issuing a sub-health alert in response to determining that there is no value of any kind of node status data that falls within a range defined by the fault threshold for that kind, but there is at least one kind of node status data that falls within a range defined by the sub-health threshold for that kind;

no alarm is issued in response to determining that there is no value of any kind of node status data that falls within the range defined by the fault threshold or sub-health threshold for that kind.

In some embodiments, the sub-health alert recovery information is issued in response to determining that no value of any kind of node state data falls within a range defined by the error threshold or sub-health threshold of that kind and that a sub-health alert has been previously issued for the node.

In some embodiments, the sub-health alert recovery information is issued only once at most for each sub-health alert.

The apparatuses and devices disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, and the like, or may be a large terminal device, such as a server, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus and device. The client disclosed in the embodiment of the present invention may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.

As can be seen from the foregoing embodiments, the node state detection apparatus of the distributed storage system provided in the embodiments of the present invention periodically obtains node state data by using a data queue and writes the node state data into the data queue until the size of the data queue reaches a processing threshold; processing the data queue by using a preset characteristic matrix to obtain a sparse matrix storing information of node state data, compressing the sparse matrix and recording the sparse matrix to a node log; extracting and decompressing a sparse matrix from the node log in response to receiving the node state detection indication, processing the sparse matrix with a feature matrix to obtain a data queue, and extracting node state data; the node state of the distributed storage system is determined based on the node state data, and the sub-health alarm or the error alarm is selectively sent out based on the node state, so that the occupied space of the log can be reduced, and the usability and the node stability of node state detection can be maintained.

It should be particularly noted that the above-mentioned embodiment of the apparatus employs the embodiment of the node state detection method of the distributed storage system to specifically describe the working process of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the node state detection method of the distributed storage system. Of course, since the steps in the node state detection method embodiment of the distributed storage system may be intersected, replaced, added, or deleted, these reasonable permutations and combinations should also fall within the scope of the present invention, and should not limit the scope of the present invention to the described embodiment.

Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.

The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.

Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种区块链网络异常检测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!