Distributed metadata management method, remote heterogeneous metadata management system and device

By introducing the MySQL database and node election strategy into the Hadoop cluster, the Hadoop ecosystem's high latency, security, and scalability problems in large-scale data storage and computing are solved, and efficient and reliable data management and computing task processing are achieved.

CN118535537BActive Publication Date: 2024-10-29E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411014915.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-29
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

The Hadoop ecosystem has high read and write latency, insufficient data security, limited scalability, and risks of data consistency and loss in large-scale data storage and computing. Especially when a node fails or a network failure occurs, it results in low task efficiency and poor reliability. .

Method used

By introducing the MySQL database, a remote heterogeneous metadata management system is implemented, using node election strategies to select adaptive storage nodes and computing nodes in the Hadoop cluster, splitting file storage and processing tasks, and being independent of the Hadoop ecosystem, improving task execution efficiency and reducing overhead. Cluster performance requirements.

Benefits of technology

It improves the efficiency and reliability of data storage and computing tasks, enhances the fault tolerance and scalability of the cluster, reduces the performance requirements for the Hadoop cluster, and improves data security and storage success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535537B_ABST
    Figure CN118535537B_ABST
Patent Text Reader

Abstract

The present application relates to a distributed metadata management method, a heterogeneous metadata management system and a device. The method comprises: receiving a storage request sent by a cluster node manager through a MySQL database when a file on a client is ready to be written into a Hadoop cluster; extracting metadata information of the file to generate a metadata wide table according to the storage request; obtaining an adapted storage node for the file on the Hadoop cluster using a node election strategy according to the metadata wide table and the node information table. The cluster node manager sends an address request to the core management node based on the adapted storage node. The core management node obtains the data storage address based on the address request, and splits the file into an odd number of copies and stores them in the location corresponding to the data storage address. The present application can realize the generation of a node selection strategy independent of the Hadoop ecosystem, and the reliability and scalability of the cluster can be guaranteed without the need for the Hadoop cluster to have high-end performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of database and big data storage, and in particular to a distributed metadata management method, a heterogeneous metadata management system and a device. Background Art

[0002] For large-scale data storage and computing, the commonly used solution is to introduce the Hadoop ecosystem. Hadoop is an open source distributed computing framework. Its technical architecture mainly includes: Hadoop Distributed File System (HDFS), which is used to store large-scale data sets in multiple nodes in the cluster and provide high reliability and high throughput data access; Hadoop YARN (Yet Another Resource Negotiator), which is responsible for dividing cluster resources into containers, assigning tasks to available containers for execution through the scheduler, and realizing cluster resource allocation and task scheduling; MapReduce, as Hadoop's computing framework, is used to process large-scale data sets in parallel.

[0003] However, in actual use, the architecture of native Hadoop is based on a distributed computing framework with disk storage. Data needs to be read from disk instead of memory, which will result in higher read and write delays and lower efficiency for real-time computing and low-latency processing tasks. And because Hadoop's data storage and computing are distributed, data is transmitted and processed between multiple nodes, which is vulnerable to the risk of data leakage and attack. When a node fails or the network fails, it may also cause data inconsistency and loss. In addition, Hadoop's scalability is limited by hardware resources and network bandwidth. In large-scale data processing tasks, cluster hosts are required to have higher device performance to ensure efficient execution of tasks.

[0004] Hadoop has numerous limitations in use, from data storage and file copy allocation to task publishing. As long as the network or physical environment of the cluster changes, data security is at risk. Not only is writing restricted, but various problems caused by dependencies due to native architectural defects are also prone to occur during the recovery process. Summary of the invention

[0005] Based on this, it is necessary to provide a distributed metadata management method, a heterogeneous metadata management system and equipment that can overcome the many limitations of the native Hadoop ecosystem and generate node selection strategies independently of the Hadoop ecosystem, asynchronously affecting Hadoop itself, and not requiring the Hadoop cluster to have high performance, thereby only focusing on the storage space of the Hadoop cluster itself.

[0006] In a first aspect, the present application provides a distributed metadata management method, which is applied to a heterogeneous metadata management system in different locations, wherein the heterogeneous metadata management system includes a client, a Hadoop cluster, and a MySQL database, wherein the Hadoop cluster includes a cluster node manager, a core management node, a computing node, and a storage node; the MySQL database stores a node information table describing each node of the Hadoop cluster; when a file of the client is ready to be written into the Hadoop cluster, the method includes:

[0007] Receiving a storage request sent by the cluster node manager;

[0008] Extracting metadata information of the file according to the storage request to generate a metadata wide table;

[0009] According to the metadata wide table and the node information table, the node election strategy is used to obtain the adaptive storage node of the file on the Hadoop cluster; the cluster node manager sends an address request to the core management node according to the adaptive storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

[0010] In one embodiment, obtaining the adapted storage node for the file on the Hadoop cluster by using a node election strategy according to the metadata wide table and the node information table includes:

[0011] Obtaining a tuple of the metadata wide table; the tuple is obtained by extracting a feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdividing it into multiple split objects, and combining it with the preset weight of each node of the Hadoop cluster; the tuple includes the feature value of each split object and the digitized file;

[0012] The tuples are grouped according to the characteristic values ​​of each of the split objects, and the characteristic values ​​of each of the split objects after grouping are modulo using the node information table to generate a node index list corresponding to the file;

[0013] The node index list is evaluated using a node election strategy to obtain an adapted storage node for the file on the Hadoop cluster.

[0014] In one embodiment, the node index list includes the prepared storage nodes and the data indexes corresponding to the prepared storage nodes, and the node election strategy includes:

[0015] Acquire the inclination, hash characteristics, keep-alive storage node address and node priority of each of the data indexes in real time;

[0016] Performing weighted summation and / or regression analysis and / or machine learning on the inclination, hash feature, keep-alive storage node address, and node priority to determine the election score of each of the reserve storage nodes;

[0017] The data storage node selected at each moment is adaptively adjusted according to the election score.

[0018] In one embodiment, after the core management node obtains the data storage address according to the address request and splits the file into an odd number of copies and stores them in locations corresponding to the data storage address, the method further includes:

[0019] The metadata wide table is updated according to the location where the file is stored.

[0020] In one embodiment, when the client issues a computing task to the Hadoop cluster, the method further includes:

[0021] Receiving a computing request sent by the cluster node manager;

[0022] According to the computing request, the heartbeat detection result of the node in the node information table is obtained, and according to the heartbeat detection result, the node election strategy is used to obtain the adaptive computing node and computing node address of the computing task on the Hadoop cluster.

[0023] In one embodiment, the adaptation computing node includes a computing master node and a computing slave node, and the method further includes:

[0024] According to the computing master node, obtaining node configuration information of the computing slave node;

[0025] The computing tasks are grouped according to the node configuration information to obtain grouped tasks, and each of the grouped tasks is sent to a corresponding computing slave node.

[0026] In one embodiment, after the computing slave nodes complete their respective grouping tasks, they send the grouping task results to the computing master node for aggregation to obtain the task computing results. The method further includes:

[0027] According to the calculation result of the task, an end instruction is sent to each of the calculation slave nodes; each of the calculation slave nodes releases and recycles resources according to the end instruction and waits for the next calculation task.

[0028] In a second aspect, the present application further provides a heterogeneous metadata management system, which includes a client, a Hadoop cluster and a MySQL database, wherein the Hadoop cluster includes a cluster node manager, a core management node, a computing node and a storage node; the MySQL database stores a node information table describing each node of the Hadoop cluster, and when a file of the client is to be written into the Hadoop cluster, the MySQL database is used to:

[0029] Receiving a storage request sent by the cluster node manager;

[0030] Extracting metadata information of the file according to the storage request to generate a metadata wide table;

[0031] According to the metadata wide table and the node information table, the node election strategy is used to obtain the adaptive storage node of the file on the Hadoop cluster; the cluster node manager sends an address request to the core management node according to the adaptive storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

[0032] 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 the processor implements the contents described in the first aspect when executing the computer program.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the contents described in the first aspect when executed by a processor.

[0034] The above-mentioned distributed metadata management method, off-site heterogeneous metadata management system and device, through the MySQL database, receive the storage request sent by the cluster node manager when the client's file is ready to be written to the Hadoop cluster; according to the storage request, extract the metadata information of the file to generate a metadata wide table; according to the metadata wide table and the node information table, use the node election strategy to obtain the adapter storage node for the file on the Hadoop cluster. The cluster node manager sends an address request to the core management node based on the adapter storage node; the core management node obtains the data storage address based on the address request, and splits the file into an odd number of parts, and stores them in the location corresponding to the data storage address. It realizes the generation of node selection strategies independent of the Hadoop ecosystem, asynchronously affects the node selection of the Hadoop cluster, improves the efficiency of task execution, and does not require the Hadoop cluster to have high-end performance, and can ensure the reliability and scalability of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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.

[0036] Figure 1 A block diagram of a heterogeneous metadata management system in different locations according to an embodiment;

[0037] Figure 2 A schematic diagram of a process of a distributed metadata management method in one embodiment;

[0038] Figure 3 This is a schematic diagram of a specific flow chart of step 203 in an embodiment;

[0039] Figure 4 A schematic diagram of a process flow of a node election strategy in an embodiment;

[0040] Figure 5 A schematic diagram of a flow chart for executing a computing task in one embodiment;

[0041] Figure 6 FIG. 5 is a schematic diagram of a specific flow chart of step 502 in a preferred embodiment. DETAILED DESCRIPTION

[0042] 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.

[0043] The distributed metadata management method provided in the embodiment of the present application can be applied to Figure 1 In the heterogeneous metadata management system shown in FIG.

[0044] The Hadoop cluster 102 includes a cluster node manager resourcemanager, a core management node namenode, a computing node master_node, and a storage node Data_node. The MySQL database 103 stores a node information table master_namenode_info describing each node of the Hadoop cluster.

[0045] The client 101 communicates with the Hadoop cluster 102 through the network. When the file of the client 101 is ready to be written into the Hadoop cluster, the client 101 sends a write request to the cluster node manager resourcemanager of the Hadoop cluster 102, and the cluster node manager resourcemanager sends a storage request to the MySQL database 103 according to the write request.

[0046] The MySQL database 103 receives the storage request sent by the cluster node manager, extracts the metadata information of the file to generate a metadata wide table according to the storage request, and obtains the adaptive storage node of the file on the Hadoop cluster by using the node election strategy according to the metadata wide table and the node information table.

[0047] The cluster node manager resourcemanager sends an address request to the core management node namenode according to the adapter storage node.

[0048] The core management node namenode obtains the data storage address according to the address request, splits the file into an odd number of parts, and stores them in the location corresponding to the data storage address.

[0049] The client 101 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.

[0050] The Hadoop cluster 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0051] In an exemplary embodiment, Figure 2 As shown, a distributed metadata management method is provided, which is applied to Figure 1 Taking the MySQL database in as an example, when the client's file is ready to be written into the Hadoop cluster, the following steps 201 to 203 are included.

[0052] Step 201: Receive a storage request sent by the cluster node manager.

[0053] In the prior art, when a client file is ready to be written into the Hadoop cluster, the cluster node manager of the Hadoop cluster will allocate a storage node for the client file according to the write request of the file. In this application, by setting up a MySQL database, the original cluster node manager is reconstructed for scheduling logic. After receiving the write request sent by the client, the reconstructed cluster node manager resourcemanager generates a storage request and sends it to the MySQL database. The MySQL database acts as a scheduler to generate corresponding node scheduling logic for the client's file, thereby avoiding data security and node scheduling failure problems caused by changes in the network environment or physical environment of the Hadoop cluster.

[0054] It should be noted that after receiving the write request sent by the client, the cluster node manager resourcemanager of this application will generate a corresponding task id according to the request type. If there is already a task occupied under the task id or the node host is offline, no storage request will be generated, but a failure instruction will be returned to the MySQL database.

[0055] Step 202: extract metadata information of the file according to the storage request to generate a metadata wide table.

[0056] The metadata information includes the names of files and directories, file sizes, file copy information, file permissions and owners, file timestamps, directory subdirectories and file lists, data block location information, data block checksums, etc.

[0057] Specifically, according to the storage request, the metadata information of the file is extracted to generate a metadata wide table, and the metadata wide table is stored in a MySQL database. Since the metadata is separated from the Hadoop cluster, when a node fails or a network failure occurs, the remote metadata can better maintain the consistency of the data source, making the Hadoop cluster more fault-tolerant.

[0058] Step 203: According to the metadata wide table and the node information table, using a node election strategy, obtain an adaptive storage node for the file on the Hadoop cluster.

[0059] The cluster node manager sends an address request to the core management node according to the adapter storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

[0060] Specifically, in existing large-scale processing tasks, in order to ensure task execution, the performance of all host machines in the Hadoop cluster is often required to be sufficiently powerful. This application introduces the MySQL database to manage the metadata of the task, and the node information of each node in the Hadoop cluster is also stored in the MySQL database in the form of a data table. A well-trained node election strategy is also provided on the MySQL database. The MySQL database selects an adapter storage node on the Hadoop cluster for the client's file based on the node information table and the metadata wide table using a well-trained node election strategy. At this time, the cluster node manager only needs to send an address request to the core management node according to the adapter storage node, and the core management node obtains the data storage address according to the address request, and splits the file into an odd number of copies to obtain the file physical mirror slice of the file, which is stored in the position corresponding to the data storage address, so that the Hadoop cluster does not need to have high-end performance, but only needs to pay attention to its own storage space. Compared with the cluster host that requires high performance in the prior art, it is more cost-effective and easier to promote, that is, it has better fault tolerance and scalability.

[0061] In the above-mentioned distributed metadata management method, through the MySQL database, when the client's file is ready to be written to the Hadoop cluster, a storage request sent by the cluster node manager is received; according to the storage request, the metadata information of the file is extracted to generate a metadata wide table; according to the metadata wide table and the node information table, the node election strategy is used to obtain the adapter storage node of the file on the Hadoop cluster. The cluster node manager sends an address request to the core management node based on the adapter storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts, and stores them in the location corresponding to the data storage address. It realizes the generation of node selection strategies independent of the Hadoop ecosystem, asynchronously affects the node selection of the Hadoop cluster, improves the efficiency of task execution, and does not require the Hadoop cluster to have high-end performance, and can ensure the reliability and scalability of the cluster.

[0062] In an exemplary embodiment, Figure 3 As shown, step 203 obtains the adapted storage node for the file on the Hadoop cluster according to the metadata wide table and the node information table using a node election strategy, specifically including the following steps 301 to 303.

[0063] Step 301, obtaining a tuple of the metadata wide table.

[0064] The tuple is obtained by extracting the feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdividing it into multiple split objects, and combining it with the preset weight of each node of the Hadoop cluster. The tuple includes the feature value of each split object and the digitized file.

[0065] Specifically, after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdivides it into multiple split objects, it extracts the feature value of each split object, and combines it with the preset node weights of the Hadoop cluster using a hash aggregation algorithm according to the keywords of the split object to obtain a tuple (k, v), where k represents the feature value of each split object and v represents the digitized file.

[0066] Step 302: group the tuples according to the characteristic values ​​of the split objects, and use the node information table to modulo the characteristic values ​​of the split objects after grouping to generate a node index list corresponding to the file.

[0067] Specifically, the tuple (k, v) is grouped according to the characteristic value k of each split object, and the node information table master_namenode_info is used to perform hash node modulus on the characteristic value k of each split object after grouping, to determine the reserve storage node where each split object is to be stored, and generate a node index list corresponding to the file based on these reserve storage nodes to prevent node data skew during the storage process and increase the burden on some nodes.

[0068] Step 303: Use a node election strategy to evaluate the node index list to obtain an adaptive storage node for the file on the Hadoop cluster.

[0069] Specifically, each split object of the file may have multiple reserve storage nodes. The reserve storage nodes are evaluated using a node election strategy to select the optimal storage node for the file, thereby improving the reliability and security of cluster data storage.

[0070] Preferably, if Figure 4 As shown, the node index list includes the prepared storage nodes and the data indexes corresponding to the prepared storage nodes. The node election strategy includes the following steps 401 to 403.

[0071] Step 401, obtaining in real time the inclination, hash characteristics, keep-alive storage node address of each of the data indexes and the node priority of each of the standby storage nodes.

[0072] The skewness of the data index refers to the uneven distribution of data on different nodes. Ideally, data should be evenly distributed across nodes to avoid overloading certain nodes and affecting overall read and write performance. The MySQL database counts the amount of data on each reserve storage node based on the pre-stored node information table master_namenode_info, and calculates the variance or standard deviation of the data distribution to quantify the skewness of the data index on each reserve storage node. Nodes with severe data skew will be considered non-preferred options to avoid further burdening the nodes.

[0073] The hash feature of the data index can characterize the intrinsic structure of the data. For example, by mapping the data to different buckets through a hash function, data with similar characteristics can be reasonably distributed, ensuring the dispersion and consistency of the data and preventing the formation of hot data, because hot data may cause the access frequency of certain nodes to be abnormally high, thereby affecting the overall response time and stability of the cluster.

[0074] The keep-alive storage node address is the address of a "healthy" node in each reserve storage node that has no failures or performance degradation. The node information table master_namenode_info stored in the MySQL database is updated in real time as the node changes. Therefore, the MySQL database monitors the status of each node, the health status of the node host hardware, and the availability of software services in real time. Only when the node meets the set health standards can it be listed as a reserve storage node to ensure the reliability and persistence of data storage.

[0075] In addition to the three hard indicators mentioned above, node priority should also be considered when selecting nodes based on business needs, geographical distribution, or resource allocation strategies. For example, in a multi-data center architecture, data may be stored in nodes closer to users (clients) to reduce latency; or when resources are tight, storage nodes with lower costs may be used first.

[0076] Step 402: Perform weighted summation and / or regression analysis and / or machine learning on the inclination, hash feature, keep-alive storage node address, and node priority to determine the election score of each of the reserve storage nodes.

[0077] Specifically, in addition to the above four indicators, the impact of the node read / write transmission speed peak, the node instantaneous CPU usage, the network read / write transmission speed value data, etc. on the node election can also be considered. By constructing and training one or more evaluation models, the weighted sum and / or regression analysis and / or machine learning of the indicators of each node are performed to obtain the election score of each of the prepared storage nodes.

[0078] Step 403: Adaptively adjust the data storage node selected at each moment according to the election score.

[0079] Specifically, according to the election scores of the prepared storage nodes, the node with the highest score is automatically selected as the data storage location. And as the cluster status changes, such as node performance fluctuations, data access mode changes, etc., the data storage node selected at each moment will be adaptively adjusted to adapt to the changing environment.

[0080] It should be noted that the data storage nodes include storage master nodes and storage slave nodes, and the MySQL database uses a greedy algorithm to select the master node and the slave node.

[0081] In this preferred embodiment, the node election strategy is used to effectively perform intelligent evaluation and decision-making on the storage location of files, ensuring efficient and secure storage of data while optimizing resource utilization and performance of the entire cluster system.

[0082] In one embodiment, the core management node obtains the data storage address according to the address request, splits the file into an odd number of parts, and stores them in the location corresponding to the data storage address. The method also includes: updating the metadata wide table according to the location where the file is stored.

[0083] Specifically, when the file is stored, the metadata information of the file has changed, so the metadata wide table originally stored in the MySQL database needs to be updated. At the same time, the MySQL database will write the log of the file storage process to the local logfile file.

[0084] In one embodiment, Figure 5 As shown, when the client issues a computing task to the Hadoop cluster, the method further includes the following steps 501 to 502.

[0085] Step 501: Receive a computing request sent by the cluster node manager.

[0086] Specifically, the user (client) publishes a computing task through the RESTful interface provided by Hadoop, and the cluster node manager resourcemanager generates a computing request based on the computing task and sends it to the MySQL database.

[0087] Step 502: According to the computing request, obtain the heartbeat detection result of the node in the node information table, and according to the heartbeat detection result, use the node election strategy to obtain the adaptive computing node and computing node address of the computing task on the Hadoop cluster.

[0088] The adaptation computing nodes include a computing master node and a computing slave node.

[0089] Specifically, the MySQL database extracts the computing nodes with stronger performance in the node information table master_namenode_info to generate the computing node information table master_resourcemanager_info. The core management node namenode keeps the heartbeat detection of the nodes in the computing node information table master_resourcemanager_info active.

[0090] The MySQL database obtains the heartbeat detection results of each computing node from the core management node namenode according to the computing request. If the heartbeat detection result shows that there is a computing master node that is down or has lost connection, the MySQL database transmits the downtime information to the cluster node manager resourcemanager, selects the next computing master node, updates the node information table master_namenode_info, and ensures the normal operation of the computing node. Then, using the node election strategy described in the previous embodiment, the adaptive computing node and computing node address of the computing task on the Hadoop cluster are obtained from the node information table master_namenode_info.

[0091] It should be noted that the core management node namenode will maintain an active heartbeat detection of each node host. If a machine in the cluster goes offline, it will actively write the index back to the MySQL database in real time and back up the thumbnail file on the master node.

[0092] Preferably, if Figure 6 As shown, after step 502 obtains the adapted computing node and computing node address of the computing task on the Hadoop cluster, the method further includes the following steps 601 to 602.

[0093] Step 601: Obtain node configuration information of the computing slave node according to the computing master node.

[0094] Specifically, due to the communication connection relationship between the master and slave nodes, the node configuration information of the computing slave nodes communicating with the computing master node can be obtained through the computing master node.

[0095] Step 602: group the computing tasks according to the node configuration information to obtain grouped tasks, and send each of the grouped tasks to a corresponding computing slave node.

[0096] Specifically, according to the node configuration information of each computing slave node, the allocation weight of each computing slave node is sensed and generated, and the computing tasks are grouped according to the allocation weight, so that the grouped tasks processed by each computing slave node can adapt to the node configuration, thereby improving the completion efficiency of the computing tasks.

[0097] More specifically, after the computing slave nodes complete their respective grouping tasks, they send the grouping task results to the computing master node for aggregation to obtain the task calculation results. The MySQL database sends an end instruction to each computing slave node based on the task calculation results; each computing slave node releases and recycles resources based on the end instruction and waits for the next computing task.

[0098] In this embodiment, when the client issues a computing task to the Hadoop cluster, the selection of computing nodes is implemented through heartbeat detection and node election strategy, thereby improving the processing efficiency of cluster computing tasks.

[0099] In a preferred example embodiment, 100 5G big data files are used and stored in three hosts, all of which are configured with (6 cores, 12G memory, centos7 operating system, and 1T SSD hard disk). The Hadoop ecosystem version is 2.4.4, the MySQL database version is 5.7.42, the language used is scala, the network bandwidth is 1000Mbit / s, and other development environments are normal. The native Hadoop ecosystem and the heterogeneous metadata management system of this application are used to read and write the 100 5G files provided above.

[0100] The native Hadoop architecture is referred to as (H), the heterogeneous metadata management system of the present application is referred to as (MH), and s represents time in seconds. The storage results of the two are compared, as shown in Table 1 below.

[0101] Table 1

[0102]

[0103] Comparison of the readout results of the two is shown in Table 2 below.

[0104] Table 2

[0105]

[0106] According to the test results, the storage capacity of the Hadoop cluster that uses MySQL to store Hadoop metadata has increased significantly with the increase in the number of read and write files. The system's read success rate has increased by 29.843%, and the write success rate has increased by 44.255%, achieving a significant performance improvement.

[0107] 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 to be 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.

[0108] 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 when the processor executes the computer program, the following steps are implemented:

[0109] Step 1: Receive a storage request sent by the cluster node manager.

[0110] Step 2: According to the storage request, extract the metadata information of the file to generate a metadata wide table.

[0111] Step 3: According to the metadata wide table and the node information table, using the node election strategy, obtain the adaptive storage node of the file on the Hadoop cluster.

[0112] The cluster node manager sends an address request to the core management node according to the adapter storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0114] Obtaining a tuple of the metadata wide table; the tuple is obtained by extracting a feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdividing it into multiple split objects, and combining it with the preset weight of each node of the Hadoop cluster; the tuple includes the feature value of each split object and the digitized file;

[0115] The tuples are grouped according to the characteristic values ​​of each of the split objects, and the characteristic values ​​of each of the split objects after grouping are modulo using the node information table to generate a node index list corresponding to the file;

[0116] The node index list is evaluated using a node election strategy to obtain an adapted storage node for the file on the Hadoop cluster.

[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0118] Acquire the inclination, hash characteristics, keep-alive storage node address and node priority of each of the data indexes in real time;

[0119] Performing weighted summation and / or regression analysis and / or machine learning on the inclination, hash feature, keep-alive storage node address, and node priority to determine the election score of each of the reserve storage nodes;

[0120] The data storage node selected at each moment is adaptively adjusted according to the election score.

[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: updating the metadata wide table according to the location where the file is stored.

[0122] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0123] When the client issues a computing task to the Hadoop cluster, receiving a computing request sent by the cluster node manager;

[0124] According to the computing request, the heartbeat detection result of the node in the node information table is obtained, and according to the heartbeat detection result, the node election strategy is used to obtain the adaptive computing node and computing node address of the computing task on the Hadoop cluster.

[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0126] According to the computing master node, obtaining node configuration information of the computing slave node;

[0127] The computing tasks are grouped according to the node configuration information to obtain grouped tasks, and each of the grouped tasks is sent to a corresponding computing slave node.

[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0129] When the computing slave nodes complete their respective grouping tasks, they send the grouping task results to the computing master node for aggregation to obtain the task computing results;

[0130] According to the calculation result of the task, an end instruction is sent to each of the calculation slave nodes; each of the calculation slave nodes releases and recycles resources according to the end instruction and waits for the next calculation task.

[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0132] Step 1: Receive a storage request sent by the cluster node manager.

[0133] Step 2: According to the storage request, extract the metadata information of the file to generate a metadata wide table.

[0134] Step 3: According to the metadata wide table and the node information table, using the node election strategy, obtain the adaptive storage node of the file on the Hadoop cluster.

[0135] The cluster node manager sends an address request to the core management node according to the adapter storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0137] Obtaining a tuple of the metadata wide table; the tuple is obtained by extracting a feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdividing it into multiple split objects, and combining it with the preset weight of each node of the Hadoop cluster; the tuple includes the feature value of each split object and the digitized file;

[0138] The tuples are grouped according to the characteristic values ​​of each of the split objects, and the characteristic values ​​of each of the split objects after grouping are modulo using the node information table to generate a node index list corresponding to the file;

[0139] The node index list is evaluated using a node election strategy to obtain an adapted storage node for the file on the Hadoop cluster.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0141] Acquire the inclination, hash characteristics, keep-alive storage node address and node priority of each of the data indexes in real time;

[0142] Performing weighted summation and / or regression analysis and / or machine learning on the inclination, hash feature, keep-alive storage node address, and node priority to determine the election score of each of the reserve storage nodes;

[0143] The data storage node selected at each moment is adaptively adjusted according to the election score.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: updating the metadata wide table according to the location where the file is stored.

[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0146] When the client issues a computing task to the Hadoop cluster, receiving a computing request sent by the cluster node manager;

[0147] According to the computing request, the heartbeat detection result of the node in the node information table is obtained, and according to the heartbeat detection result, the node election strategy is used to obtain the adaptive computing node and computing node address of the computing task on the Hadoop cluster.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] According to the computing master node, obtaining node configuration information of the computing slave node;

[0150] The computing tasks are grouped according to the node configuration information to obtain grouped tasks, and each of the grouped tasks is sent to a corresponding computing slave node.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] When the computing slave nodes complete their respective grouping tasks, they send the grouping task results to the computing master node for aggregation to obtain the task computing results;

[0153] According to the calculation result of the task, an end instruction is sent to each of the calculation slave nodes; each of the calculation slave nodes releases and recycles resources according to the end instruction and waits for the next calculation task.

[0154] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps corresponding to the distributed metadata management method described in the above embodiments are implemented.

[0155] 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.

[0156] 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.

[0157] 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 distributed metadata management method, applied to a heterogeneous metadata management system, characterized in that: The heterogeneous metadata management system includes a client, a Hadoop cluster and a MySQL database. The Hadoop cluster includes a cluster node manager, a core management node, a computing node and a storage node. The MySQL database stores a node information table describing each node of the Hadoop cluster; When the client's file is ready to be written into the Hadoop cluster, the method includes: Receiving a storage request sent by the cluster node manager; Extracting metadata information of the file according to the storage request to generate a metadata wide table; The tuple of the metadata wide table is obtained; the tuple is obtained by extracting the feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdivides it into multiple split objects, and combining it with the preset node weights of each Hadoop cluster; the tuple includes the feature value of each split object and the digitized file; the tuple is grouped according to the feature value of each split object, and the node information table is used to take the modulus of the feature value of each split object after grouping to generate a node index list corresponding to the file; the node index list is evaluated using a node election strategy to obtain an adapted storage node for the file on the Hadoop cluster; the cluster node manager sends an address request to the core management node according to the adapted storage node; the core management node obtains a data storage address according to the address request, and splits the file into an odd number of parts and stores them in a position corresponding to the data storage address.

2. The distributed metadata management method according to claim 1, characterized in that: The node index list includes the prepared storage nodes and the data indexes corresponding to the prepared storage nodes, and the node election strategy includes: Acquire the inclination, hash characteristics, keep-alive storage node address and node priority of each of the data indexes in real time; Performing weighted summation and / or regression analysis and / or machine learning on the inclination, hash feature, keep-alive storage node address, and node priority to determine the election score of each of the reserve storage nodes; The data storage node selected at each moment is adaptively adjusted according to the election score.

3. The distributed metadata management method according to claim 1, characterized in that: The core management node obtains the data storage address according to the address request, splits the file into an odd number of copies, and stores the copies in locations corresponding to the data storage address, the method further comprising: The metadata wide table is updated according to the location where the file is stored.

4. The distributed metadata management method according to claim 1, characterized in that: When the client issues a computing task to the Hadoop cluster, the method further includes: Receiving a computing request sent by the cluster node manager; According to the computing request, the heartbeat detection result of the node in the node information table is obtained, and according to the heartbeat detection result, the node election strategy is used to obtain the adaptive computing node and computing node address of the computing task on the Hadoop cluster.

5. The distributed metadata management method according to claim 4, characterized in that: The adaptation computing node includes a computing master node and a computing slave node, and the method further includes: According to the computing master node, obtaining node configuration information of the computing slave node; The computing tasks are grouped according to the node configuration information to obtain grouped tasks, and each of the grouped tasks is sent to a corresponding computing slave node.

6. The distributed metadata management method according to claim 5, characterized in that: When the computing slave nodes complete their respective grouping tasks, the grouping task results are sent to the computing master node for aggregation to obtain task computing results. The method further includes: According to the calculation result of the task, an end instruction is sent to each of the calculation slave nodes; each of the calculation slave nodes releases and recycles resources according to the end instruction and waits for the next calculation task.

7. A heterogeneous metadata management system, characterized in that: The heterogeneous metadata management system comprises a client, a Hadoop cluster and a MySQL database. The Hadoop cluster comprises a cluster node manager, a core management node, a computing node and a storage node. The MySQL database stores a node information table describing each node of the Hadoop cluster. When a file of the client is to be written into the Hadoop cluster, the MySQL database is used to: Receiving a storage request sent by the cluster node manager; Extracting metadata information of the file according to the storage request to generate a metadata wide table; Obtain a tuple of the metadata wide table; the tuple is obtained by extracting a feature value of each split object after the MapReduce component of the Hadoop cluster processes the entity of the file into a byte stream and subdivides it into multiple split objects, and combining it with the preset node weights of the Hadoop cluster; the tuple includes the feature value of each split object and the digitized file; the tuple is grouped according to the feature value of each split object, and the node information table is used to take the modulus of the feature value of each split object after grouping, so as to generate a node index list corresponding to the file; Using a node election strategy to evaluate the node index list, and obtaining an adaptive storage node for the file on the Hadoop cluster; The cluster node manager sends an address request to the core management node according to the adapter storage node; the core management node obtains the data storage address according to the address request, and splits the file into an odd number of parts and stores them in the position corresponding to the data storage address.

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.