WO2017101642A1 - 分布式系统的数据节点升级方法及装置 - Google Patents
分布式系统的数据节点升级方法及装置 Download PDFInfo
- Publication number
- WO2017101642A1 WO2017101642A1 PCT/CN2016/106804 CN2016106804W WO2017101642A1 WO 2017101642 A1 WO2017101642 A1 WO 2017101642A1 CN 2016106804 W CN2016106804 W CN 2016106804W WO 2017101642 A1 WO2017101642 A1 WO 2017101642A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- data node
- node
- copy
- primary
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Definitions
- the present invention relates to the field of computer network technologies, and in particular, to a data node upgrade method and apparatus for a distributed system.
- Distributed storage is the decentralized storage of data on multiple independent devices.
- a distributed system is a cluster system with many data nodes, and each data node can be understood as a data storage server. When doing data storage, storing several pieces of data into corresponding data nodes is the core concept of a distributed system.
- the generally adopted method is to shut down the data node and stop the external service service of the data node, that is, the data node is offline, offline.
- the data node is upgraded.
- the data node is started, that is, the data node is brought online, so that the upgraded data node provides the external service service.
- the data node of the distributed system generally has a backup. Different master copy data, the data node needs to be restarted after the upgrade, and the master copy data of the data node is re-decisive.
- the decision process takes a long time, and the start and stop of the data node causes the service service delay or error of the data node. Etc., thus affecting the business services of distributed systems.
- the present invention has been made in order to provide a data node upgrade method for a distributed system that overcomes the above problems or at least partially solves the above problems, and a data node upgrade device for a corresponding distributed system.
- a data node upgrade method for a distributed system for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and multiple From copy data, methods include:
- a data node upgrading apparatus for a distributed system for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and From the copy data, the device includes:
- a selection module configured to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes
- a transfer module configured to transfer a service load of the first data node to the at least one second data node, where the second data node backs up the slave copy data corresponding to the primary copy data in the first data node;
- the upgrade module is configured to perform offline processing on the first data node to complete the upgrade of the first data node offline.
- a computer program comprising computer readable code that, when run on a computing device, causes the computing device to perform the data node upgrade method of the distributed system described above.
- a computer readable medium storing the above computer program is provided.
- the upgrade instruction is received, and the first data node to be upgraded is selected from the plurality of data nodes; the traffic load of the first data node is transferred to the at least one second data node, and the second data node backup has a corresponding The slave data of the primary replica data in the first data node; performing offline processing on the first data node to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding the data node The impact of shutting down and starting business services on distributed systems.
- FIG. 1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention
- FIG. 2 is a schematic flow chart of a data node upgrade method of a distributed system according to another embodiment of the present invention.
- FIG. 3 is a functional block diagram of a data node upgrading apparatus of a distributed system in accordance with one embodiment of the present invention
- FIG. 4 is a functional block diagram of a data node upgrading apparatus of a distributed system according to another embodiment of the present invention.
- FIG. 5 is a block diagram schematically showing a computing device for performing a data node upgrade method of a distributed system according to an embodiment of the present invention
- Fig. 6 schematically shows a storage unit for holding or carrying program code implementing a data node upgrade method of a distributed system according to an embodiment of the present invention.
- a plurality of data nodes are used to back up the primary copy data and the plurality of secondary copy data of the data, that is, the primary copy data of the data is more
- the copy data is stored separately on a plurality of different data nodes.
- both the primary replica data and the secondary replica data may be stored on each data node of the distributed system.
- the service service is provided by the primary replica data of the data node.
- FIG. 1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
- Step S100 Receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
- a data node to be upgraded after receiving the upgrade instruction, starting to upgrade the data node of the distributed system, in order to implement a smooth upgrade of the distributed system, selecting a data node to be upgraded from multiple data nodes of the distributed system, specifically,
- the data node to be upgraded may be randomly selected from a plurality of data nodes, or the data node to be upgraded may be selected according to the load condition of the plurality of data nodes, as the first data node to be upgraded, where the first to be upgraded is selected.
- a data node selection is not specifically limited.
- Step S101 Transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
- the traffic load of the first data node is transferred to the at least one second data node, where the service access service is provided by the at least one second data node instead of the first data node, and the primary data node is The business access of the replica data is transferred to the slave replica data of at least one second data node.
- the first data node may store the primary replica data of different data. Therefore, when performing the traffic load transfer, the service access provided by all the primary replica data stored by the first data node needs to be transferred to the primary. Copy data from the copy data.
- a data node from which to select at least one second data node that is responsible for the traffic load of the first data node For example, for one piece of data, three data nodes can be used to back up the primary copy data and the two secondary copy data of the data. If the first data node backs up the primary copy data of three copies of the data, the three data are The backup data is backed up at least on two data nodes. When performing business load transfer, it is generally transferred to a slave copy data, so it needs to be from at least two. Among the data nodes, a data node that assumes the traffic load of the first data node is selected as at least one second data node.
- the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
- Step S102 Perform offline processing on the first data node to complete the upgrade of the first data node offline.
- the first data node After transferring the traffic load of the first data node to the at least one second data node by using step S101, the first data node only backs up the slave replica data with the data.
- the service service is generally provided by the master replica data. That is to say, the first data node is disconnected from the service of the distributed system, and the first data node can be offlined, the first data node is taken offline, and the first data node is upgraded offline.
- receiving an upgrade instruction selecting a first data node to be upgraded from a plurality of data nodes, and transferring a service load of the first data node to at least one second data node, the second data node
- the backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
- FIG. 2 is a flow chart showing a data node upgrade method of a distributed system according to another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
- Step S200 Receive an upgrade instruction, analyze a service load of a data node of the distributed system, and select a data node with a minimum service load pressure as the first data node to be upgraded.
- the traffic load refers to the amount of access to the primary replica data of the data node.
- the service services provided by each data node are not the same. Some data nodes have high traffic load pressure, and some data nodes have low traffic load pressure.
- the data of the distributed system is received.
- the service load of the node is analyzed, and the data node with the lowest traffic load pressure is selected as the first data node to be upgraded.
- the present invention is to upgrade all the data nodes of the distributed system. Therefore, the first data node to be upgraded is the data node with the least traffic load pressure among the un-upgraded data nodes, and the data node with the lowest traffic load pressure can be avoided.
- Step S201 Search, according to the primary replica data identifier of the first data node, a data node that backs up the secondary replica data corresponding to the primary replica data in the first data node in the data node of the distributed system.
- a piece of data is used by multiple data nodes to back up the primary copy data and the plurality of secondary copy data of the data, and the same identification is set for the primary copy data and the copy data, so as to facilitate According to the identifier, the primary copy data or the secondary data is searched, and different identifiers are set for different data, so that the primary copy data of the data or the copy data can be accurately found, which saves the search time and improves the upgrade efficiency.
- the service service of the primary data of the first data node needs to be transferred to the secondary data of the other data node.
- the primary copy of the first data node is not The business service of the data is transferred to the slave copy data of any data node, but to the data node backed up with the slave copy data corresponding to the master copy data in the first data node.
- the first data node may back up the data with different data.
- the primary replica data if the first data node is to be upgraded, needs to transfer the business services of all the primary replica data in the first data node to the secondary replica data of the other data nodes. Therefore, it is necessary to look up, in the data node of the distributed system, the data node backed up with the replica data corresponding to all the primary replica data in the first data node according to the primary replica data identifier of the first data node.
- Step S202 analyzing a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and selecting at least one second data node according to the load balancing policy.
- the data node that backs up the slave copy data corresponding to the master copy data in the first data node is found by using step S201, however, the traffic load of the first data node is not transferred to all the found data nodes, for example, for one
- the data has one data node backed up with the master copy data and two data node backups with the slave copy data. When the business load of the data of the first data node is transferred, only the backup data can be transferred to the backup. One of the data nodes.
- the traffic load pressure of the data node is analyzed, and the traffic load policy is selected according to the load balancing policy.
- the load refers to the load balancing of the traffic load of the data nodes of the distributed system, without the pressure of the traffic load of some data nodes is large, and the traffic load pressure of some data nodes is very small, here not only consider that the backup has corresponding to
- the traffic load of the data node of the replica data from the primary replica data in the first data node also takes into account the traffic load of the data node after the traffic load is transferred.
- the at least one second data node selected in this step is a data node with a small traffic load pressure.
- selecting at least one second data node according to the load balancing policy can overcome the defect that the traffic load of the data node with high traffic load pressure is caused by the arbitrary transfer of the traffic load.
- the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
- Step S203 converting the copy data of the at least one second data node into the main copy data, and converting the corresponding main copy data of the first data node into the slave copy data.
- the traffic load of the first data node needs to be transferred to the at least one second data node.
- the service load is generally provided by the primary replica data
- at least one The second data node is a data node that backs up the replica data corresponding to the primary replica data of the first data node, and therefore, the replica data of the at least one second data node needs to be converted into the primary replica data
- the first data node is The corresponding primary copy data is converted into secondary replica data, thereby transferring the traffic load to the at least one second data node.
- Step S204 Perform offline processing on the first data node to complete the upgrade of the first data node offline.
- the first data node After the service load of the first data node is transferred to the at least one second data node by using step S203, the first data node will no longer provide the service service. At this time, the first data node can be offline, and the first line is offline. The data node is upgraded.
- the method further includes:
- Step S205 relocating the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
- the access request from the replica data in the first data node is relocated to the primary replica data corresponding to the replica data in the other data node.
- the copy data is used to provide a service service from the primary data corresponding to the copy data from the other data nodes after the positioning, wherein the first data node may be the first data node before the copy data may be the traffic load transfer.
- the backup copy data can also be obtained from the copy data after the business load is transferred.
- Step S206 after the first data node completes the upgrade, performing online processing on the upgraded first data node.
- the first data node After the upgrade of the first data node is completed online, the first data node needs to be brought online, so that the first data node continues to provide service services.
- the service load of the at least one third data node needs to be transferred to the upgraded first data node, so that the upgraded first data node is restored to provide service services, where after the upgrade
- the first data node backup has slave data corresponding to the primary copy data in the third data node.
- the traffic load of the at least one third data node is transferred to the first data node, where the first data node replaces the at least one third data node to provide a service service, and the at least one third data node is the master.
- the business service of the replica data is transferred to the slave replica data of the first data node.
- Step S207 Searching, in the data node of the distributed system, the data node backed up with the primary replica data corresponding to the replica data in the first data node after the upgrade according to the upgraded data identifier of the first data node.
- the traffic load of other data nodes needs to be transferred to the first data node, and the first data node can provide the service service.
- the backup data may be searched for in the data node of the distributed system according to the secondary data identifier of the first data node.
- Step S208 analyzing a service load of the data node corresponding to the primary replica data corresponding to the replica data in the upgraded first data node, and selecting from the load balancing policy according to the load balancing policy One less third data node.
- step S207 After searching for the data nodes corresponding to the primary replica data of the replica data in the upgraded first data node according to step S207, analyzing the traffic load of the data nodes, determining the traffic load of the data nodes, according to the load.
- the equalization strategy selects a data node with a large traffic load as the third data node, thereby reducing the traffic load of the third data node, and balancing the traffic load of the distributed system.
- Step S209 Convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
- the traffic load of the at least one third data node needs to be transferred to the first data node.
- the service load is generally provided by the primary replica data
- at least one The third data node is a data node backed up with the primary copy data corresponding to the copy data in the first data node, and therefore, the primary copy data of the at least one third data node needs to be converted into the secondary copy data, and the upgraded
- the correspondence of a data node is converted from the replica data to the primary replica data, thereby transferring the traffic load to the first data node, so that the upgraded data node is restored to provide the service service.
- the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided.
- the service service is affected.
- the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found.
- the primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy.
- Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed.
- the system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out.
- the first data node is processed online.
- the backup of the data node of the distributed system has a corresponding correspondence.
- the data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one A third data node, thereby reducing the traffic load of the third data node, and achieving a smooth upgrade of the distributed system.
- FIG. 3 shows a functional block diagram of a data node upgrade device of a distributed system in accordance with one embodiment of the present invention. As shown in FIG. 3, the device includes: a selection module 300, a transfer module 310, and an upgrade module 320.
- the selecting module 300 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
- the transferring module 310 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
- the upgrade module 320 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
- the device receives an upgrade instruction, selects a first data node to be upgraded from a plurality of data nodes, and transfers a service load of the first data node to at least one second data node, the second data node
- the backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
- the device includes: a selection module 400, a transfer module 410, and an upgrade module 420.
- the selecting module 400 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
- the transfer module 410 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
- the upgrade module 420 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
- the device further includes: a processing module 430, configured to: after the first data node completes the upgrade, Performing online processing on the upgraded first data node;
- the transfer module 410 is further adapted to: transfer the traffic load of the at least one third data node to the upgraded first data node, so that the upgraded first data node resumes providing the service service, wherein the upgraded first data node
- the backup has secondary copy data corresponding to the primary copy data in the third data node.
- the transferring module 410 is further adapted to: convert the copied data of the at least one second data node into the primary copy data, and convert the corresponding primary copy data of the first data node into the secondary copy data.
- the device further includes: a searching module 440 and an analyzing module 450.
- the searching module 440 is adapted to search, in the data node of the distributed system, the data node that is backed up with the secondary copy data corresponding to the primary copy data in the first data node according to the primary copy data identifier of the first data node.
- the analyzing module 450 is adapted to analyze a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and select at least one second data node from the load balancing policy.
- the transferring module 410 is further adapted to: convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
- the searching module 440 is further adapted to: according to the upgraded data identifier of the upgraded first data node, searching for a backup in the data node of the distributed system and corresponding to the copy data from the first data node after the upgrade Data node of the primary replica data;
- the analyzing module 450 is further configured to: analyze a service load that is backed up with a data node corresponding to the primary replica data of the replica data in the upgraded first data node, and select at least one third data node from the load balancing policy according to the load balancing policy .
- the selecting module 400 is further adapted to: analyze the traffic load of the data node of the distributed system, and select the data node with the smallest traffic load as the first data node to be upgraded.
- the apparatus further includes: a positioning module 460, configured to relocate the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
- a positioning module 460 configured to relocate the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
- the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided.
- the service service is affected.
- the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found.
- the primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy.
- Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed.
- the system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out.
- the first data node is processed online.
- the backup of the data node of the distributed system has a corresponding correspondence.
- the data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one third data node is eliminated, thereby reducing the traffic load of the third data node, and implementing a smooth upgrade of the distributed system.
- modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
- the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
- any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
- Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
- DSP digital signal processor
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
- a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
- signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
- Figure 5 illustrates a computing device that can implement a method of acquiring application information in accordance with the present invention.
- the computing device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a storage device 520.
- Storage device 520 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
- Save Storage device 520 has a storage space 530 that stores program code 531 for performing any of the method steps described above.
- storage space 530 storing program code may include various program code 531 for implementing various steps in the above methods, respectively.
- the program code can be read from or written to one or more computer program products.
- These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card, or a floppy disk.
- a computer program product is typically a portable or fixed storage unit such as that shown in FIG.
- the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to storage device 520 in the computing device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit comprises computer readable code 531 ' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 510, which when executed by the computing device causes the computing device Perform the various steps in the method described above.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种分布式系统的数据节点升级方法及装置。在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,该方法包括:接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。图1
Description
相关申请的交叉参考
本申请主张在2015年12月17日在中国提交的中国专利申请号No.201510954639.8的优先权,其全部内容通过引用包含于此。
本发明涉及计算机网络技术领域,具体涉及一种分布式系统的数据节点升级方法及装置。
分布式存储就是将数据分散存储在多台独立的设备上。分布式系统为具有很多数据节点的集群系统,每个数据节点可以理解为一个数据存储服务器。在做数据存储时,将若干条数据存储到对应的数据节点中,这是分布式系统核心的概念。
在现有技术中,当需要对分布式系统的数据节点进行升级时,一般采用的方法是将数据节点关停,停止该数据节点对外的业务服务,也就是说将数据节点下线,在线下对数据节点进行升级,在数据节点升级完成后,再说将数据节点启动,也就是将数据节点上线,使升级后的数据节点对外提供业务服务,然而,在分布式系统的数据节点上一般备份有不同的主副本数据,数据节点在升级后需要重新启动,重新决策数据节点的主副本数据,该决策过程需要耗费很长时间,而且数据节点的启停,导致数据节点的业务服务延时或错误等,从而对分布式系统的业务服务造成影响。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的分布式系统的数据节点升级方法和相应的分布式系统的数据节点升级装置。
根据本发明的一个方面,提供了一种分布式系统的数据节点升级方法,在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,方法包括:
接收升级指令,从多个数据节点中选择待升级的第一数据节点;
将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;
对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
根据本发明的另一方面,提供了一种分布式系统的数据节点升级装置,在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,装置包括:
选择模块,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点;
转移模块,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;
升级模块,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
根据本发明的又一个方面,提供一种计算机程序,其包括计算机可读代码,当计算机可读代码在计算设备上运行时,导致计算设备执行上述的分布式系统的数据节点升级方法。
根据本发明的再一个方面,提供一种计算机可读介质,其中存储了上述计算机程序。
根据本发明提供的方案,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技
术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图概述
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的分布式系统的数据节点升级方法的流程示意图;
图2示出了根据本发明另一个实施例的分布式系统的数据节点升级方法的流程示意图;
图3示出了根据本发明一个实施例的分布式系统的数据节点升级装置的功能框图;
图4示出了根据本发明另一个实施例的分布式系统的数据节点升级装置的功能框图;
图5示意性地示出了用于执行根据本发明实施例的分布式系统的数据节点升级方法的计算设备的框图;以及
图6示意性地示出了用于保持或者携带实现根据本发明实施例的分布式系统的数据节点升级方法的程序代码的存储单元。
本发明的较佳实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,也就是说将该份数据的主副本数据和多
个从副本数据分别存储于多个不同的数据节点上。针对不同的数据,在分布式系统的每个数据节点上既可能存储有主副本数据也可能存储有从副本数据,一般情况下,由数据节点的主副本数据提供业务服务。
图1示出了根据本发明一个实施例的分布式系统的数据节点升级方法的流程示意图。如图1所示,该方法包括以下步骤:
步骤S100,接收升级指令,从多个数据节点中选择待升级的第一数据节点。
具体地,在接收到升级指令后,开始对分布式系统的数据节点进行升级,为了实现分布式系统的平滑升级,从分布式系统的多个数据节点中选择待升级的数据节点,具体地,可以从多个数据节点中随机选择待升级的数据节点,也可以根据多个数据节点的负载情况选择要进行升级的数据节点,作为待升级的第一数据节点,这里对如何选择待升级的第一数据节点选择不做具体限定。
步骤S101,将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。
在本发明实施例中,将第一数据节点的业务负载转移给至少一个第二数据节点,指由至少一个第二数据节点代替第一数据节点提供业务访问服务,将对第一数据节点的主副本数据的业务访问转移给至少一个第二数据节点的从副本数据。
在分布式系统中,第一数据节点可能存储有不同数据的主副本数据,因此,在进行业务负载转移时,需要将第一数据节点存储的所有主副本数据所提供的业务访问都转移给主副本数据的从副本数据。
针对一份数据,会有多个从副本数据,且多个从副本数据分别存储于不同的数据节点,因此,需要查找到备份有对应于第一数据节点的所有主副本数据的从副本数据的数据节点,从中选择承担第一数据节点的业务负载的至少一个第二数据节点。例如,针对一份数据,可以由3个数据节点用于备份该份数据的主副本数据和2个从副本数据,若第一数据节点备份有3份数据的主副本数据,则这3份数据的从副本数据至少备份于两个数据节点上,在进行业务负载转移时,一般是转移至一个从副本数据,因此,需要从至少两
个数据节点中选择承担第一数据节点的业务负载的数据节点,作为至少一个第二数据节点。
这里将第一数据节点的业务负载转移给至少一个第二数据节点,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时。
步骤S102,对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
在利用步骤S101将第一数据节点的业务负载转移给至少一个第二数据节点后,第一数据节点仅备份有数据的从副本数据,在上文提到了,业务服务一般是由主副本数据提供,也就说,第一数据节点与分布式系统的业务脱离,可以对第一数据节点进行下线处理,使第一数据节点下线,并在线下对第一数据节点进行升级。
根据本发明上述实施例提供的方法,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。
图2示出了根据本发明另一个实施例的分布式系统的数据节点升级方法的流程示意图。如图2所示,该方法包括以下步骤:
步骤S200,接收升级指令,对分布式系统的数据节点的业务负载进行分析,将业务负载压力最小的数据节点选择为待升级的第一数据节点。
在本发明实施例中,业务负载指对数据节点的主副本数据的访问量。在分布式系统中,每个数据节点对外提供的业务服务并不相同,有些数据节点的业务负载压力大,有些数据节点的业务负载压力小,在接收到升级指令后,对分布式系统的数据节点的业务负载进行分析,将业务负载压力最小的数据节点选择为待升级的第一数据节点。本发明是对分布式系统的全部数据节点进行升级,因此,待升级的第一数据节点是未升级的数据节点中的业务负载压力最小的数据节点,选择业务负载压力最小的数据节点,可以避免因数据
节点升级,将业务服务转移给其他数据节点而给分布式系统造成影响。
步骤S201,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点。
在分布式系统中,一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,并且为主副本数据和从副本数据设置了相同的标识,以便于根据标识查找主副本数据或从副本数据,针对不同的数据,设置了不同的标识,从而可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率。
在根据步骤S200选择出待升级的第一数据节点后,需要将第一数据节点的主副本数据的业务服务转移给其他数据节点的从副本数据,当然,并不是将第一数据节点的主副本数据的业务服务转移给任意数据节点的从副本数据,而是转移给备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,此外,第一数据节点可能备份有不同数据的主副本数据,若要对该第一数据节点进行升级,就需要将第一数据节点中所有主副本数据的业务服务转移给其他数据节点的从副本数据。因此,需要根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中所有主副本数据的从副本数据的数据节点。
步骤S202,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。
利用步骤S201查找到备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,然而,并不是将第一数据节点的业务负载转移给查找到的全部数据节点,例如,针对一份数据,有一个数据节点备份有主副本数据和两个数据节点备份有从副本数据,在将第一数据节点的该份数据的业务负载转移时,仅能转移给备份有从副本数据的两个数据节点中的一个。
在本发明实施例中,通过对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,分析数据节点的业务负载压力大小,根据负载均衡策略从其中选择出至少一个第二数据节点,其中,负载
均衡策略指分布式系统的数据节点的业务负载压力均衡,而不会出现有些数据节点的业务负载压力很大,而有些数据节点的业务负载压力很小的情况,这里不仅考虑到备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载,还要考虑到业务负载转移后,数据节点的业务负载情况。本步骤中选择的至少一个第二数据节点是业务负载压力较小的数据节点。这里根据负载均衡策略选择至少一个第二数据节点能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷。
由于第一数据节点可能备份有多个主副本数据,因此根据负载均衡策略选择的数据节点也可能为多个。这里将第一数据节点的业务负载转移给至少一个第二数据节点,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时。
步骤S203,将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据。
在根据步骤S202选择出至少一个第二数据节点后,需要将第一数据节点的业务负载转移给至少一个第二数据节点,在分布式系统中,一般由主副本数据提供业务负载,而至少一个第二数据节点是备份有第一数据节点的主副本数据对应的从副本数据的数据节点,因此,需要将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据,从而将业务负载转移给至少一个第二数据节点。
步骤S204,对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
利用步骤S203将第一数据节点的业务负载转移给至少一个第二数据节点后,第一数据节点将不再提供业务服务,此时,即可将第一数据节点下线,在线下对第一数据节点进行升级。
虽然上文提到了一般由数据节点的主副本数据提供业务服务,但也可能存在访问数据节点的从副本数据的情况,因此,方法还包括:
步骤S205,将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据。
具体指,在用户对第一数据节点中从副本数据发起访问请求后,将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据,使定位后的其他数据节点中与从副本数据对应的主副本数据/从副本数据提供业务服务,其中,第一数据节点中从副本数据可以是业务负载转移前,第一数据节点所备份的从副本数据,也可以是业务负载转移后得到的从副本数据。
步骤S206,在第一数据节点完成升级后,对升级后的第一数据节点进行上线处理。
在线下完成对第一数据节点升级后,需要将第一数据节点上线,以使第一数据节点继续提供业务服务。
在升级后的第一数据节点上线后,需要将至少一个第三数据节点的业务负载转移给升级后的第一数据节点,以使升级后的第一数据节点恢复提供业务服务,其中,升级后的第一数据节点备份有对应于第三数据节点中主副本数据的从副本数据。
在本发明实施例中,将至少一个第三数据节点的业务负载转移给第一数据节点,指由第一数据节点代替至少一个第三数据节点提供业务服务,将至少一个第三数据节点的主副本数据的业务服务转移给第一数据节点的从副本数据。具体可以通过以下方法步骤实现:
步骤S207,根据升级后的第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点。
在将第一数据节点上线后,需要将其他数据节点的业务负载转移给第一数据节点,第一数据节点才可以提供业务服务。
在将数据备份于数据节点上时,为主副本数据和从副本数据设置了相同的标识,因此,可以根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有第一数据节点的从副本数据对应的主副本数据的数据节点。
步骤S208,对备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至
少一个第三数据节点。
在根据步骤S207查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点后,对这些数据节点的业务负载进行分析,确定这些数据节点的业务负载情况,根据负载均衡策略从中选择业务负载压力较大的数据节点作为第三数据节点,从而减轻第三数据节点的业务负载,使得分布式系统的业务负载压力均衡。
步骤S209,将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据。
在根据步骤S208选择出至少一个第三数据节点后,需要将至少一个第三数据节点的业务负载转移给第一数据节点,在分布式系统中,一般由主副本数据提供业务负载,而至少一个第三数据节点是备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,因此,需要将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据,从而将业务负载转移给第一数据节点,以使已升级数据节点恢复提供业务服务。
根据本发明上述实施例提供的方法,在对分布式系统的数据节点的业务负载进行分析后,将业务负载压力最小的数据节点选择为待升级的第一数据节点,可以避免对分布式系统的业务服务造成影响,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点,能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时,在第一数据节点完成升级后,对第一数据节点进行上线处理,根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,对备份有对应于第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一
个第三数据节点,从而减轻第三数据节点的业务负载,实现了分布式系统的平滑升级。
图3示出了根据本发明一个实施例的分布式系统的数据节点升级装置的功能框图。如图3所示,该装置包括:选择模块300、转移模块310、升级模块320。
选择模块300,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点。
转移模块310,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。
升级模块320,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
根据本发明上述实施例提供的装置,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。
图4示出了根据本发明另一个实施例的分布式系统的数据节点升级装置的功能框图。如图4所示,该装置包括:选择模块400、转移模块410、升级模块420。
选择模块400,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点。
转移模块410,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。
升级模块420,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。
可选地,装置还包括:处理模块430,适于在第一数据节点完成升级后,
对升级后的第一数据节点进行上线处理;
转移模块410进一步适于:将至少一个第三数据节点的业务负载转移给升级后的第一数据节点,以使升级后的第一数据节点恢复提供业务服务,其中,升级后的第一数据节点备份有对应于第三数据节点中主副本数据的从副本数据。
可选地,转移模块410进一步适于:将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据。
可选地,装置还包括:查找模块440和分析模块450。
查找模块440,适于根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据对应的从副本数据的数据节点。
分析模块450,适于对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。
可选地,转移模块410进一步适于:将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据。
可选地,查找模块440进一步适于:根据升级后的第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点;
分析模块450进一步适于:对备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。
可选地,选择模块400进一步适于:对分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。
可选地,装置还包括:定位模块460,适于将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据。
根据本发明上述实施例提供的装置,在对分布式系统的数据节点的业务负载进行分析后,将业务负载压力最小的数据节点选择为待升级的第一数据节点,可以避免对分布式系统的业务服务造成影响,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点,能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时,在第一数据节点完成升级后,对第一数据节点进行上线处理,根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,对备份有对应于第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点,从而减轻第三数据节点的业务负载,实现了分布式系统的平滑升级。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映
的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的分布式系统的数据节点升级设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图5示出了可以实现根据本发明的获取应用信息的方法的计算设备。该计算设备传统上包括处理器510和以存储设备520形式的计算机程序产品或者计算机可读介质。存储设备520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存
储设备520具有存储用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,存储程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘、紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图6所示的便携式或者固定存储单元。该存储单元可以具有与图5的计算设备中的存储设备520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的计算机可读代码531',即可以由诸如510之类的处理器读取的代码,当这些代码由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
Claims (18)
- 一种分布式系统的数据节点升级方法,在所述分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,所述方法包括:接收升级指令,从多个数据节点中选择待升级的第一数据节点;将所述第一数据节点的业务负载转移给至少一个第二数据节点,所述第二数据节点备份有对应于所述第一数据节点中主副本数据的从副本数据;对所述第一数据节点进行下线处理,以在线下完成对所述第一数据节点的升级。
- 根据权利要求1所述的方法,其中,所述方法还包括:在所述第一数据节点完成升级后,对升级后的所述第一数据节点进行上线处理,将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点,以使升级后的所述第一数据节点恢复提供业务服务,其中,升级后的所述第一数据节点备份有对应于所述第三数据节点中主副本数据的从副本数据。
- 根据权利要求2所述的方法,其中,所述将第一数据节点的业务负载转移给至少一个第二数据节点进一步包括:将所述至少一个第二数据节点的从副本数据转换为主副本数据,将所述第一数据节点的对应主副本数据转换为从副本数据。
- 根据权利要求2或3所述的方法,其中,在将所述第一数据节点的业务负载转移给至少一个第二数据节点之前,所述方法还包括:根据所述第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点;对所述备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。
- 根据权利要求2-4任一项所述的方法,其中,所述将至少一个第三数 据节点的业务负载转移给升级后的所述第一数据节点进一步包括:将所述至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的所述第一数据节点的对应从副本数据转换为主副本数据。
- 根据权利要求4所述的方法,其中,在将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点之前,所述方法还包括:根据升级后的所述第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点;对所述备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。
- 根据权利要求1-6任一项所述的方法,其中,所述从多个数据节点中选择待升级的第一数据节点进一步包括:对所述分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。
- 根据权利要求1-7任一项所述的方法,其中,在升级后的所述第一数据节点上线之前,所述方法还包括:将针对所述第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与所述从副本数据对应的主副本数据/从副本数据。
- 一种分布式系统的数据节点升级装置,在所述分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,所述装置包括:选择模块,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点;转移模块,适于将所述第一数据节点的业务负载转移给至少一个第二数据节点,所述第二数据节点备份有对应于所述第一数据节点中主副本数据的从副本数据;升级模块,适于对所述第一数据节点进行下线处理,以在线下完成对所 述第一数据节点的升级。
- 根据权利要求9所述的装置,其中,所述装置还包括:处理模块,适于在所述第一数据节点完成升级后,对升级后的所述第一数据节点进行上线处理;所述转移模块进一步适于:将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点,以使升级后的所述第一数据节点恢复提供业务服务,其中,升级后的所述第一数据节点备份有对应于所述第三数据节点中主副本数据的从副本数据。
- 根据权利要求10所述的装置,其中,所述转移模块进一步适于:将所述至少一个第二数据节点的从副本数据转换为主副本数据,将所述第一数据节点的对应主副本数据转换为从副本数据。
- 根据权利要求10或11所述的装置,其中,所述装置还包括:查找模块,适于根据所述第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于所述第一数据节点中主副本数据对应的从副本数据的数据节点;分析模块,适于对所述备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。
- 根据权利要求10-12任一项所述的装置,其中,所述转移模块进一步适于:将所述至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的所述第一数据节点的对应从副本数据转换为主副本数据。
- 根据权利要求12所述的装置,其中,所述查找模块进一步适于:根据升级后的所述第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点;所述分析模块进一步适于:对所述备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。
- 根据权利要求9-14任一项所述的装置,其中,所述选择模块进一步适于:对所述分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。
- 根据权利要求9-15任一项所述的装置,其中,所述装置还包括:定位模块,适于将针对所述第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与所述从副本数据对应的主副本数据/从副本数据。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一项所述的分布式系统的数据节点升级方法。
- 一种计算机可读介质,其中存储了如权利要求17所述的计算机程序。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510954639.8 | 2015-12-17 | ||
| CN201510954639.8A CN105610903B (zh) | 2015-12-17 | 2015-12-17 | 分布式系统的数据节点升级方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017101642A1 true WO2017101642A1 (zh) | 2017-06-22 |
Family
ID=55990437
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/106804 Ceased WO2017101642A1 (zh) | 2015-12-17 | 2016-11-22 | 分布式系统的数据节点升级方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105610903B (zh) |
| WO (1) | WO2017101642A1 (zh) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105610903B (zh) * | 2015-12-17 | 2020-02-18 | 北京奇虎科技有限公司 | 分布式系统的数据节点升级方法及装置 |
| CN106354531B (zh) * | 2016-08-25 | 2020-03-27 | 杭州华为数字技术有限公司 | 物理节点升级方法及装置 |
| CN109561125B (zh) * | 2017-09-27 | 2021-11-09 | 阿里巴巴集团控股有限公司 | 一种数据传输方法、分布式系统中复制数据的方法及装置 |
| CN107943510A (zh) * | 2017-11-23 | 2018-04-20 | 郑州云海信息技术有限公司 | 分布式存储系统升级方法、系统、装置及可读存储介质 |
| CN111142921A (zh) * | 2018-11-02 | 2020-05-12 | 成都鼎桥通信技术有限公司 | 软件升级方法及装置 |
| CN112711376B (zh) * | 2019-10-25 | 2022-12-23 | 北京金山云网络技术有限公司 | 对象存储系统中对象主副本文件的确定方法及装置 |
| CN114697213A (zh) * | 2022-03-30 | 2022-07-01 | 联想(北京)有限公司 | 一种升级方法及装置 |
| CN115955399B (zh) * | 2022-12-12 | 2023-09-15 | 安芯网盾(北京)科技有限公司 | 一种分布式多节点检测引擎的升降级方法及系统 |
| CN116225778A (zh) * | 2022-12-27 | 2023-06-06 | 中国邮政储蓄银行股份有限公司 | 分布列数据的扩容方法、装置及电子设备 |
| CN116680256B (zh) * | 2023-07-21 | 2024-01-09 | 腾讯科技(深圳)有限公司 | 数据库节点升级方法、装置和计算机设备 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130246498A1 (en) * | 2012-03-16 | 2013-09-19 | Stephen Zucknovich | Content distribution management system |
| CN103970567A (zh) * | 2014-04-28 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | 一种云存储系统固件在线升级的方法 |
| CN104954444A (zh) * | 2015-05-27 | 2015-09-30 | 华为技术有限公司 | 一种迁移缓存数据的方法及设备 |
| CN105610903A (zh) * | 2015-12-17 | 2016-05-25 | 北京奇虎科技有限公司 | 分布式系统的数据节点升级方法及装置 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103729436A (zh) * | 2013-12-27 | 2014-04-16 | 中国科学院信息工程研究所 | 一种分布式元数据管理方法及系统 |
-
2015
- 2015-12-17 CN CN201510954639.8A patent/CN105610903B/zh active Active
-
2016
- 2016-11-22 WO PCT/CN2016/106804 patent/WO2017101642A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130246498A1 (en) * | 2012-03-16 | 2013-09-19 | Stephen Zucknovich | Content distribution management system |
| CN103970567A (zh) * | 2014-04-28 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | 一种云存储系统固件在线升级的方法 |
| CN104954444A (zh) * | 2015-05-27 | 2015-09-30 | 华为技术有限公司 | 一种迁移缓存数据的方法及设备 |
| CN105610903A (zh) * | 2015-12-17 | 2016-05-25 | 北京奇虎科技有限公司 | 分布式系统的数据节点升级方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105610903A (zh) | 2016-05-25 |
| CN105610903B (zh) | 2020-02-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10045397B2 (en) | Data complementing method and apparatus | |
| CN106095592B (zh) | 一种前景应用程序场景同步方法及装置、系统 | |
| CN103761165B (zh) | 日志备份方法及装置 | |
| CN105610903B (zh) | 分布式系统的数据节点升级方法及装置 | |
| US6983352B2 (en) | System and method for point in time backups | |
| US9122647B2 (en) | System and method to backup objects on an object storage platform | |
| US10613847B2 (en) | Information handling system to treat demoted firmware with replacement firmware | |
| US10459812B2 (en) | Seamless method for booting from a degraded software raid volume on a UEFI system | |
| CN106537364A (zh) | 存储事务 | |
| CN101930372A (zh) | 程序更新系统及方法 | |
| CN107391303B (zh) | 数据处理方法、装置、系统、服务器及计算机存储介质 | |
| CN106970856B (zh) | 对数据进行备份、恢复及挂载的数据管理系统及方法 | |
| US10789087B2 (en) | Insight usage across computing nodes running containerized analytics | |
| CN106682021B (zh) | 数据库迁移方法及装置 | |
| CN105550306A (zh) | 多副本数据的读写方法及系统 | |
| WO2016101759A1 (zh) | 一种数据路由方法、数据管理装置和分布式存储系统 | |
| WO2016101751A1 (zh) | 一种分布式存储系统中的主从平衡方法和装置 | |
| US10445193B2 (en) | Database failure recovery in an information handling system | |
| CN112764897B (zh) | 任务请求的处理方法、装置、系统及计算机可读存储介质 | |
| US10466919B2 (en) | Information handling system with elastic configuration pools in flash dual in-line memory modules | |
| WO2016095644A1 (zh) | 数据库的高可用解决方法和装置 | |
| WO2016091068A1 (zh) | 一种特殊指令的执行方法及装置 | |
| WO2015196844A1 (zh) | 任务分配方法、装置、系统和服务器 | |
| CN109120674B (zh) | 大数据平台的部署方法及装置 | |
| WO2016091072A1 (zh) | 分布式数据存储方法及分布式数据集群系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16874699 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16874699 Country of ref document: EP Kind code of ref document: A1 |