A method for realizing data reading and writing, a distributed file system, and a client
A distributed file and data read and write technology, applied in the field of distributed systems, can solve the problem of high latency of read and write requests, and achieve the effect of enhanced scalability and improved read speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0060] Such as figure 1 As shown, in order to realize the flow chart of the method for reading and writing data, the embodiment of the present application provides a method for realizing reading and writing of data, which is applied to the first client of the distributed file system, and the distributed file system includes at least two control node, at least one data node respectively connected to the at least two control nodes, the first client is respectively connected to the at least two control nodes and the at least one data node, wherein the at least two control nodes Including at least a first control node and at least one second control node, the method includes:
[0061] Step 101, judging whether the first request issued is a data write request or a data read request, the write data request is a request for writing first data, and the read data request is a request for reading second data;
[0062] Step 102, if it is a data write request, write the first data into t...
Embodiment 2
[0081] Using the example provided by the embodiment of this application figure 2 The HDFS architecture shown has a beneficial technical effect on breaking through the linear expansion bottleneck in the existing HDFS architecture, realizing dynamic expansion, and effectively coping with the linear growth of the number of Clients and Datanodes.
[0082] If the system read requests are high, you need to dynamically add a new Namenode; the specific expansion process is as follows:
[0083] 1. When a Namenode is added to the system, during the startup process, it will elect itself as the Master Namenode through the distributed election algorithm;
[0084] 2. The election process will fail because the Master Namenode already exists in the system. Therefore, the new Namenode initiates registration information to the Master Namenode.
[0085] 3. The Master Namenode queries the registration information to confirm whether the newly added Namenode has been registered. If it has been re...
Embodiment 3
[0096] Such as image 3 As shown, the embodiment of the present application also provides a client for reading and writing data in a distributed file system, the distributed file system includes at least two control nodes, and at least one of the at least two control nodes respectively connected A data node, the client is respectively connected to the at least two control nodes and the at least one data node, wherein the at least two control nodes include at least a first control node and at least one second control node, The clients include:
[0097] A receiving module 301, configured to receive a first request;
[0098] A judging module 302, configured to judge whether the first request is a data write request or a data read request, and obtain a judgment result, wherein the data write request is a request for writing the first data, and the data read request is a request for reading the first data 2. data requests;
[0099] A data writing module 303, configured to receiv...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


