CN117112139A - Cluster capacity reduction method, device, equipment and computer readable storage medium - Google Patents

Cluster capacity reduction method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN117112139A
CN117112139A CN202311139996.XA CN202311139996A CN117112139A CN 117112139 A CN117112139 A CN 117112139A CN 202311139996 A CN202311139996 A CN 202311139996A CN 117112139 A CN117112139 A CN 117112139A
Authority
CN
China
Prior art keywords
data node
target data
scaled
capacity
node
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.)
Pending
Application number
CN202311139996.XA
Other languages
Chinese (zh)
Inventor
卢成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202311139996.XA priority Critical patent/CN117112139A/en
Publication of CN117112139A publication Critical patent/CN117112139A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a cluster capacity shrinking method, device, equipment and computer readable storage medium, wherein at least one data node to be capacity shrunk in a data cluster is determined, one data node is sequentially selected from the data nodes to be capacity shrunk as a target data node, capacity shrinking is performed on the target data node, whether the target data node is successful in capacity shrinking is judged, if the target data node is successful in capacity shrinking is judged, the next data node is selected as the target data node, capacity shrinking is performed until all the data nodes to be capacity shrunk are successful, and then the process is finished. Compared with the prior art, the embodiment of the disclosure can sense the capacity shrinking result of the data node by judging whether the capacity shrinking of the target data node is successful, select the next data node as the target data node to shrink the capacity when judging that the capacity shrinking of the target data node is successful, wait for the successful capacity shrinking of the previous node, and start the capacity shrinking operation of the next node, so that the data loss in the cluster capacity shrinking process can be avoided.

Description

Cluster capacity reduction method, device, equipment and computer readable storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a cluster capacity reduction method, a cluster capacity reduction device, cluster capacity reduction equipment and a computer readable storage medium.
Background
In general, the scale of the data cluster planning in the early stage is relatively large, and later, as the development of the service is not expected, the stored data is relatively less, and the resource utilization rate of the cluster is relatively low. In order to save the cost of the cluster, the cluster needs to be scaled, namely, part of data nodes are off line, and the data stored on the original data nodes need to be migrated to the rest nodes, so that the data is required to be prevented from being lost in the process.
In the related art, the capacity reduction of the data nodes in the cluster is mainly realized by remotely operating the data nodes through the management component, so that the data nodes are off-line.
In the existing scheme, when a single data node is contracted, the state of the node is not judged, so that the situation that the display cluster is successfully contracted, but the actual data node is still in the contracted state, and an operator cannot sense the real contracted result in real time; when a plurality of data nodes are contracted simultaneously, as the contraction process of each data node is asynchronous, the contraction operation of the next node is started without waiting for successful contraction of the previous node, and data loss is possibly caused.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, an apparatus, a device, and a computer readable storage medium for cluster volume reduction, so as to sense a volume reduction result of a data node, and avoid data loss in a cluster volume reduction process.
In a first aspect, an embodiment of the present disclosure provides a method for shrinking a cluster, where the method includes:
determining at least one data node to be scaled in a data cluster;
sequentially selecting one data node from the data nodes to be scaled as a target data node;
carrying out capacity shrinking on the target data node;
judging whether the target data node is successfully scaled;
and if the target data node is successfully scaled, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled.
In some embodiments, the determining at least one data node in the data cluster to be scaled includes:
acquiring a current service scene;
and determining at least one data node to be scaled in the data cluster according to the current service scene.
In some embodiments, after the determining at least one data node in the data cluster to be scaled, the method further comprises:
and responding to the selection operation of the user on the identification of the at least one data node to be scaled, and selecting the at least one data node to be scaled in batches.
In some embodiments, the shrinking the target data node includes:
and calling an offline interface to perform offline operation on the target data node.
In some embodiments, the invoking the offline interface to perform an offline operation on the target data node includes:
acquiring parameter information of the target data node;
and calling an offline interface to offline the target data node corresponding to the parameter information of the target data node.
In some embodiments, the determining whether the target data node is successfully scaled includes:
acquiring the state of the target data node every preset time;
and judging whether the target data node is successfully scaled or not based on the state of the target data node.
In some embodiments, the method further comprises:
and if the target data node is judged to be failed in capacity reduction, the target data node is reserved, the failure reason is recorded, and the next data node is selected as the target data node to be subjected to capacity reduction until all the data nodes to be subjected to capacity reduction are successfully reduced.
In some embodiments, the method further comprises:
and if the target data node is determined to be shrinking, waiting for the completion of the shrinking of the target data node, and then performing the shrinking operation of the next data node.
In a second aspect, an embodiment of the present disclosure provides a cluster capacity reduction device, where the device includes:
the determining module is used for determining at least one data node to be scaled in the data cluster;
the selecting module is used for sequentially selecting one data node from the data nodes to be scaled as a target data node;
the capacity shrinking module is used for shrinking the capacity of the target data node;
the judging module is used for judging whether the target data node is successfully scaled;
and the control module is used for selecting the next data node as the target data node to shrink if the target data node is successfully shrunk, and ending the process until all the data nodes to be shrunk are successfully shrunk.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement a method as described in the first aspect.
According to the cluster capacity reduction method, device and equipment and the computer readable storage medium, through determining at least one data node to be capacity reduced in a data cluster, one data node is sequentially selected from the data nodes to be capacity reduced to serve as a target data node, capacity reduction is conducted on the target data node, whether the target data node is successful in capacity reduction is judged, if the target data node is judged to be successful in capacity reduction, the next data node is selected to serve as the target data node, capacity reduction is conducted until all the data nodes to be capacity reduced are completed successfully. Compared with the prior art, the embodiment of the disclosure can sense the capacity shrinking result of the data node by judging whether the capacity shrinking of the target data node is successful, select the next data node as the target data node to shrink the capacity when judging that the capacity shrinking of the target data node is successful, wait for the successful capacity shrinking of the previous node, and start the capacity shrinking operation of the next node, so that the data loss in the cluster capacity shrinking process can be avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a cluster capacity reduction method provided in an embodiment of the present disclosure;
fig. 2 is a flowchart of a cluster capacity reduction method according to another embodiment of the present disclosure;
fig. 3 is a flowchart of a cluster capacity reduction method according to another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a cluster capacity-shrinking device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
In general, the scale of the data cluster planning in the early stage is relatively large, and later, as the development of the service is not expected, the stored data is relatively less, and the resource utilization rate of the cluster is relatively low. In order to save the cost of the cluster, the cluster needs to be scaled, namely, part of data nodes are off line, and the data stored on the original data nodes need to be migrated to the rest nodes, so that the data is required to be prevented from being lost in the process.
In the related art, the capacity reduction of the data nodes in the cluster is mainly realized by remotely operating the data nodes through the management component, so that the data nodes are off-line.
In the existing scheme, when a single data node is contracted, the state of the node is not judged, so that the situation that the display cluster is successfully contracted, but the actual data node is still in the contracted state, and an operator cannot sense the real contracted result in real time; when a plurality of data nodes are contracted simultaneously, as the contraction process of each data node is asynchronous, the contraction operation of the next node is started without waiting for successful contraction of the previous node, and data loss is possibly caused. In view of this problem, embodiments of the present disclosure provide a cluster capacity reduction method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a cluster capacity reduction method provided in an embodiment of the present disclosure. The method can be applied to electronic equipment which is deployed in the data cluster, in particular to data cluster supervision equipment, can be applied to a scene of managing the data cluster, and can also be applied to a scene of shrinking the data cluster. It can be appreciated that the cluster capacity reduction method provided by the embodiment of the present disclosure may also be applied in other scenarios.
The cluster capacity reduction method shown in fig. 1 is described below, and the method comprises the following specific steps:
s101, determining at least one data node to be scaled in a data cluster.
In this step, the electronic device determines at least one data node in the data cluster to be scaled. The number of the data nodes to be scaled may be one or more, and the embodiment of the disclosure is not limited. For example, the electronic device may determine at least one data node to be scaled in the data cluster according to the size of the current service of the data cluster, or the electronic device may determine at least one data node to be scaled in the data cluster according to the amount of data stored in the data cluster.
S102, sequentially selecting one data node from the data nodes to be scaled as a target data node.
After determining at least one data node to be scaled in the data cluster, the electronic device sequentially selects one data node from the data nodes to be scaled as a target data node. The selection may be sequentially or randomly selected, and the embodiment of the disclosure is not specifically limited. Specifically, a functional module for batch capacity reduction is newly added in the electronic device, and a data node can be selected from the data nodes to be capacity-reduced through the functional module for batch capacity reduction as a target data node.
S103, the target data node is scaled.
After one data node is selected as a target data node, the electronic equipment performs capacity shrinking on the target data node, namely, the target data node is offline, so that the number of the data nodes is reduced, and the cluster cost is reduced.
S104, judging whether the target data node is successfully scaled.
The essence of this step is to determine whether the target data node has completed the capacity reduction. For example, the electronic device may send a capacity reduction state request to a target data node, and determine that the capacity reduction of the target data node is successful when the capacity reduction state fed back by the target data node is received as the capacity reduction success. Otherwise, when the received capacity shrinking state fed back by the target data node is not capacity shrinking success, and is other state, determining that the target data node is not capacity shrinking success.
And S105, if the target data node is successfully scaled, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled, and ending.
If the target data node is successfully scaled, the electronic equipment selects the next data node from the data nodes to be scaled as the target data node, further scales the target data node, and if the scaling is successful, selects the next data node as the target data node, scales until all the data nodes to be scaled are scaled successfully, and then ends.
According to the embodiment of the disclosure, by determining at least one data node to be scaled in a data cluster, sequentially selecting one data node from the data nodes to be scaled as a target data node, scaling the target data node, judging whether the target data node is scaled successfully, and if so, selecting the next data node as the target data node, scaling until all the data nodes to be scaled are scaled successfully, and ending. Compared with the prior art, the embodiment of the disclosure can sense the capacity shrinking result of the data node by judging whether the capacity shrinking of the target data node is successful, select the next data node as the target data node to shrink the capacity when judging that the capacity shrinking of the target data node is successful, wait for the successful capacity shrinking of the previous node, and start the capacity shrinking operation of the next node, so that the data loss in the cluster capacity shrinking process can be avoided.
Fig. 2 is a flowchart of a cluster capacity reduction method according to another embodiment of the present disclosure, as shown in fig. 2, where the method includes the following steps:
s201, acquiring a current service scene.
In this step, the electronic device obtains the current service scenario. Specifically, the electronic device may determine the current service scenario according to the current stored data amount, the current service scale situation, and the like.
S202, determining at least one data node to be scaled in the data cluster according to the current service scene.
After the current service scene is acquired, the electronic equipment determines at least one data node to be scaled in the data cluster according to the current service scene. For example, the number of data nodes to be scaled corresponding to different service scenarios is different, and the electronic device may determine at least one data node to be scaled in the data cluster according to the number of data nodes to be scaled corresponding to the current service scenario.
S203, responding to the selection operation of the user on the identification of the data nodes to be scaled, and selecting the data nodes to be scaled in batches.
For example, the identification of each data node is displayed on the front-end page, the user can perform the operation of selecting the identification of the data node to be scaled, and the electronic device responds to the operation of selecting the identification of the data node to be scaled by the user, and batch-selects the data node to be scaled. In some embodiments, a batch capacity-shrinking function module is added, and after batch selection, batch capacity shrinking can be performed on at least one data node to be capacity-shrunk through the batch capacity-shrinking function module, so that capacity shrinking efficiency is improved.
Alternatively, the selected operation may include, but is not limited to, a single click, double click, drag, box, hook, etc. operation.
S204, sequentially selecting one data node from the data nodes to be scaled as a target data node.
Specifically, the implementation process and principle of S204 and S102 are consistent, and will not be described herein.
S205, calling a downloading interface to perform downloading operation on the target data node.
A cluster management tool is configured in the electronic device, and interfaces, such as an offline interface, a status interface, and the like, are provided in the management tool. In the step, the electronic equipment calls the offline interface to perform offline operation on the target data node, so that the target data node is offline, the number of data nodes is reduced, and the cluster cost is reduced.
S206, judging whether the target data node is successfully scaled.
Specifically, the implementation process and principle of S206 and S104 are consistent, and will not be described herein.
In some embodiments, disabling the server in S206 includes, but is not limited to, S2061, S2062:
s2061, acquiring the state of the target data node every preset time.
S2062, judging whether the target data node is successfully scaled based on the state of the target data node.
And S207, if the target data node is successfully scaled, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled, and ending.
Specifically, the implementation process and principle of S207 and S105 are identical, and will not be described here again.
The embodiment of the disclosure obtains the current service scene.
In the step, the electronic device acquires a current service scene, determines at least one data node to be scaled in a data cluster according to the current service scene, and responds to the selection operation of the user on the identification of the at least one data node to be scaled to select the at least one data node to be scaled in batches. Further, one data node is sequentially selected from the data nodes to be scaled to serve as a target data node, and a downlink interface is called to perform downlink operation on the target data node. And judging whether the target data node is successfully scaled, if so, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled, and ending. And the user responds to the selection operation of the identification of the at least one data node to be scaled, the data node to be scaled is selected in batches, the scaling of the data node is more flexible, the subsequent batch scaling of the at least one data node to be scaled is convenient, the scaling efficiency is improved, the offline interface is further called to perform the offline operation on the target data node, the number of the data nodes is reduced, the cluster cost is reduced, whether the target data node is scaled successfully is further judged, if the target data node is judged to be scaled successfully, the next data node is selected as the target data node to be scaled until the data node to be scaled is finished after all the data nodes to be scaled are scaled successfully, the scaling result of the data node can be perceived, and after the previous node is scaled successfully, the scaling operation of the next node is started, and the data loss in the cluster scaling process can be avoided.
Fig. 3 is a flowchart of a cluster capacity reduction method according to another embodiment of the present disclosure, as shown in fig. 3, where the method includes the following steps:
s301, determining at least one data node to be scaled in the data cluster.
Specifically, the implementation process and principle of S301 and S101 are identical, and will not be described herein.
S302, sequentially selecting one data node from the data nodes to be scaled as a target data node.
Specifically, the implementation process and principle of S302 and S102 are consistent, and will not be described herein.
S303, acquiring parameter information of the target data node.
In this step, the electronic device may acquire parameter information of the target data node. Optionally, the parameter information of the target data node may include an identification of the target data node, an internet protocol (Internet Protocol, IP) address, etc.
S304, calling an offline interface to offline the target data node corresponding to the parameter information of the target data node.
After the parameter information of the target data node is obtained, the electronic equipment can call an offline interface to offline the target data node corresponding to the parameter information of the target data node, so that the target data node is offline, the number of data nodes is reduced, and the cluster cost is reduced.
S305, acquiring the state of the target data node every preset time.
And the electronic equipment acquires the state of the target data node every preset time interval. For example, a cluster management tool is configured in the electronic device, and some interfaces, such as an offline interface, a status interface, and the like, are arranged in the management tool, and the electronic device obtains the status of the target data node through the status interface. The state of the target data node may include disabled (Decommissioned), active disabled (Decommissioned), failed disabled (failed).
S306, judging whether the target data node is successfully scaled or not based on the state of the target data node.
After the state of the target data node is obtained, the electronic equipment judges whether the target data node is successfully scaled according to the state of the target data node. Specifically, when the state of the target data node is deactivated (Decommissioned), judging that the target data node is successfully scaled; when the state of the target data node is in the disabling state (Decommissioning), judging that the target data node is shrinking; and when the state of the target data node is failed in the outage (failed), judging that the target data node fails in the capacity reduction.
And S307, if the target data node is judged to be failed in capacity reduction, the target data node is reserved, the failure reason is recorded, and the next data node is selected as the target data node to be subjected to capacity reduction until all the data nodes to be subjected to capacity reduction are successfully reduced.
If the target data node is judged to be failed in capacity reduction, the electronic equipment reserves the target data node, records the failure reason, selects the next data node as the target data node to be subjected to capacity reduction until the data node to be subjected to capacity reduction is completed after the capacity reduction is successful, so that the capacity reduction of the subsequent data node is prevented from being influenced by the capacity reduction failure of a certain data node, the capacity reduction time can be saved, and the capacity reduction efficiency is improved. Recording the reason of the capacity reduction failure of the data node can facilitate the subsequent processing.
In some embodiments, the electronic device may wait for the other data nodes in the data nodes to be scaled to be full, and then re-scale the data nodes with the failed scaling.
In some embodiments, if it is determined that the target data node is shrinking, the next data node is shrunk after the target data node is shrunk.
According to the embodiment of the disclosure, by determining at least one data node to be scaled in the data cluster, one data node is sequentially selected from the data nodes to be scaled as a target data node. Further, acquiring the parameter information of the target data node, calling a downlink interface, and downlink the target data node corresponding to the parameter information of the target data node. And further, acquiring the state of the target data node at preset time intervals, judging whether the target data node is successfully scaled based on the state of the target data node, if so, reserving the target data node, recording the failure reason, and selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled. Compared with the prior art, in the embodiment of the disclosure, the parameter information of the target data node is acquired, the offline interface is called, and the target data node corresponding to the parameter information of the target data node is offline, so that the target data node is offline, the number of data nodes is reduced, and the cluster cost is reduced. And judging whether the capacity shrinkage of the target data node is successful or not, sensing the capacity shrinkage result of the data node, if the capacity shrinkage failure of the target data node is judged, reserving the target data node, recording the reason of the failure, selecting the next data node as the target data node to complete the capacity shrinkage until all the data nodes to be subjected to the capacity shrinkage are successful, preventing the capacity shrinkage of the subsequent data node from being influenced by the capacity shrinkage failure of a certain data node, saving the capacity shrinkage time, improving the capacity shrinkage efficiency, recording the reason of the capacity shrinkage failure of the data node, and facilitating the subsequent processing.
Fig. 4 is a schematic structural diagram of a cluster capacity-shrinking device according to an embodiment of the disclosure. The cluster volume reduction device may be an electronic device as described in the above embodiments, or the cluster volume reduction device may be a part or component in the electronic device. The cluster capacity reduction device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the cluster capacity reduction method, as shown in fig. 4, where the cluster capacity reduction device 40 includes: a determining module 41, a selecting module 42, a shrinking module 43, a judging module 44 and a control module 45; wherein, the determining module 41 is configured to determine at least one data node to be scaled in the data cluster; the selecting module 42 is configured to sequentially select one data node from the data nodes to be scaled as a target data node; the capacity shrinking module 43 is used for shrinking the capacity of the target data node; the judging module 44 is configured to judge whether the target data node is successfully scaled; and the control module 45 is configured to select the next data node as the target data node for capacity reduction if the target data node is successfully scaled, until all the data nodes to be scaled are successfully scaled.
Optionally, when the determining module 41 determines at least one data node to be scaled in the data cluster, the determining module is specifically configured to: acquiring a current service scene; and determining at least one data node to be scaled in the data cluster according to the current service scene.
Optionally, after determining at least one data node to be scaled in the data cluster, the cluster scaling device 40 further includes: bulk selection module 46; the batch selection module 46 is configured to respond to a selection operation of the user for identifying the at least one data node to be scaled, and batch select the at least one data node to be scaled.
Optionally, when the capacity shrinking module 43 performs capacity shrinking on the target data node, the capacity shrinking module is specifically configured to: and calling an offline interface to perform offline operation on the target data node.
Optionally, when the capacity reduction module 43 calls a offline interface to perform an offline operation on the target data node, the method is specifically used for: acquiring parameter information of the target data node; and calling an offline interface to offline the target data node corresponding to the parameter information of the target data node.
Optionally, when the determining module 44 determines whether the target data node is successfully scaled, the determining module is specifically configured to: acquiring the state of the target data node every preset time; and judging whether the target data node is successfully scaled or not based on the state of the target data node.
Optionally, the control module 45 is further configured to: and if the target data node is judged to be failed in capacity reduction, the target data node is reserved, the failure reason is recorded, and the next data node is selected as the target data node to be subjected to capacity reduction until all the data nodes to be subjected to capacity reduction are successfully reduced.
The cluster capacity-shrinking device in the embodiment shown in fig. 4 may be used to implement the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the disclosure. Referring now in particular to fig. 5, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 600 may include a processing means (e.g., a central processor, a graphics processor, etc.) 601 that may perform various suitable actions and processes to implement the cluster scaling method of embodiments as described in the present disclosure according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flowchart, thereby implementing the cluster reduction method as described above. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In addition, the embodiment of the disclosure also provides a vehicle, including: a memory; a processor; a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement the cluster reduction method as described above.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining at least one data node to be scaled in a data cluster;
sequentially selecting one data node from the data nodes to be scaled as a target data node;
carrying out capacity shrinking on the target data node;
judging whether the target data node is successfully scaled;
and if the target data node is successfully scaled, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled.
Alternatively, the electronic device may perform other steps described in the above embodiments when the above one or more programs are executed by the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A method for shrinking a cluster, comprising:
determining at least one data node to be scaled in a data cluster;
sequentially selecting one data node from the data nodes to be scaled as a target data node;
carrying out capacity shrinking on the target data node;
judging whether the target data node is successfully scaled;
and if the target data node is successfully scaled, selecting the next data node as the target data node to be scaled until all the data nodes to be scaled are successfully scaled.
2. The method of claim 1, wherein the determining at least one data node in the data cluster to be scaled comprises:
acquiring a current service scene;
and determining at least one data node to be scaled in the data cluster according to the current service scene.
3. The method of claim 1, wherein after the determining at least one data node in the data cluster to be scaled, the method further comprises:
and responding to the selection operation of the user on the identification of the at least one data node to be scaled, and selecting the at least one data node to be scaled in batches.
4. The method of claim 1, wherein the scaling the target data node comprises:
and calling an offline interface to perform offline operation on the target data node.
5. The method of claim 4, wherein the invoking the offline interface to perform the offline operation on the target data node comprises:
acquiring parameter information of the target data node;
and calling an offline interface to offline the target data node corresponding to the parameter information of the target data node.
6. The method of claim 1, wherein said determining whether the target data node is successfully scaled comprises:
acquiring the state of the target data node every preset time;
and judging whether the target data node is successfully scaled or not based on the state of the target data node.
7. The method according to claim 1, wherein the method further comprises:
and if the target data node is judged to be failed in capacity reduction, the target data node is reserved, the failure reason is recorded, and the next data node is selected as the target data node to be subjected to capacity reduction until all the data nodes to be subjected to capacity reduction are successfully reduced.
8. A cluster capacity reduction device, comprising:
the determining module is used for determining at least one data node to be scaled in the data cluster;
the selecting module is used for sequentially selecting one data node from the data nodes to be scaled as a target data node;
the capacity shrinking module is used for shrinking the capacity of the target data node;
the judging module is used for judging whether the target data node is successfully scaled;
and the control module is used for selecting the next data node as the target data node to shrink if the target data node is successfully shrunk, and ending the process until all the data nodes to be shrunk are successfully shrunk.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202311139996.XA 2023-09-05 2023-09-05 Cluster capacity reduction method, device, equipment and computer readable storage medium Pending CN117112139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311139996.XA CN117112139A (en) 2023-09-05 2023-09-05 Cluster capacity reduction method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311139996.XA CN117112139A (en) 2023-09-05 2023-09-05 Cluster capacity reduction method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117112139A true CN117112139A (en) 2023-11-24

Family

ID=88801991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311139996.XA Pending CN117112139A (en) 2023-09-05 2023-09-05 Cluster capacity reduction method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117112139A (en)

Similar Documents

Publication Publication Date Title
CN111240834B (en) Task execution method, device, electronic equipment and storage medium
CN111580974B (en) GPU instance allocation method, device, electronic equipment and computer readable medium
CN113835992A (en) Memory leak processing method and device, electronic equipment and computer storage medium
CN110489219B (en) Method, device, medium and electronic equipment for scheduling functional objects
CN116302271A (en) Page display method and device and electronic equipment
CN117112139A (en) Cluster capacity reduction method, device, equipment and computer readable storage medium
CN115167874A (en) Automatic driving software mirror image deployment method and device, electronic equipment and readable medium
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN111552705B (en) Data processing method and device based on chart, electronic equipment and medium
CN111182062B (en) Service multi-activity calling method, system and electronic equipment
CN109815429B (en) Browser page closing processing method and device
CN110502891B (en) Method, device, medium and electronic equipment for acquiring process memory leakage
CN111930391B (en) Application data processing method and device, server and user terminal
CN111314457B (en) Method and device for setting virtual private cloud
CN117369953B (en) Mirror synchronization method, device, equipment and storage medium
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN115237892B (en) Data migration method and device
CN110895550A (en) Method and device for processing acquired data
CN112732568B (en) System log acquisition method and device, storage medium and terminal
CN111626787B (en) Resource issuing method, device, medium and equipment
CN116977468A (en) Image frame drawing processing method, device, equipment and medium
CN116339846A (en) Process management method and device, storage medium and electronic equipment
CN113722634A (en) Data processing method and device, electronic equipment and computer readable medium
CN117520228A (en) Command processing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination