Task execution method, device and equipment and computer readable storage medium
By using token information to perform tasks in Hadoop clusters, the pressure on the key distribution center is reduced, task execution performance is improved, and the disaster recovery capability and reliability of the cluster are enhanced.
Patent Information
- Application Number
- CN202411958403.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-18
AI Technical Summary
When Hadoop cluster executes tasks sent by the client, it causes the key distribution center to bear huge pressure, affecting the task execution performance, and becoming a bottleneck in the cluster system.
The token information is sent to the client through the management node of the file storage system. The client carries the token information to send target tasks to the resource scheduling platform. The resource scheduling platform executes tasks based on the token information and returns the execution result.
Reduces the pressure on the key distribution center, improves task execution performance, and enhances the disaster recovery capability, stability and reliability of the cluster.
Smart Images

Figure CN119847703A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a task execution method, device, equipment, and computer-readable storage medium. Background Art
[0002] In the big data environment, a large amount of sensitive data is stored and processed in the distributed (Hadoop) cluster. In the related technology, the Hadoop cluster uses Kerberos authentication to prevent data leakage and malicious access. Kerberos authentication is to achieve mutual authentication between the client and the server through the key distribution center (KDC).
[0003] Kerberos ensures that only authorized users can access this data through strict identity authentication. Kerberos authentication can verify the legitimacy of nodes and prevent unauthorized nodes from illegally accessing the cluster to steal data or interfere with services.
[0004] However, when the Hadoop cluster executes tasks sent by the client, it will start many task execution units. Each task execution unit needs to pass Kerberos authentication before accessing the cluster to execute tasks, which will cause huge pressure on the key distribution center, affect the execution performance of the task, and become the bottleneck of the cluster system. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a task execution method, device, equipment and computer-readable storage medium, which can reduce the pressure on the key distribution center, improve the execution performance of the task, enhance the disaster recovery capability of the cluster, and improve the stability and reliability of the cluster.
[0006] In a first aspect, an embodiment of the present disclosure provides a task execution method, which is applied to a distributed cluster, wherein the distributed cluster includes a file storage system and a resource scheduling platform, and the method includes:
[0007] When it is determined that the client has passed the authentication of the key distribution center, the token information is sent to the client through the management node of the file storage system;
[0008] Receiving, through the resource scheduling platform, a target task sent by a client, wherein the target task carries the token information;
[0009] The target task is executed based on the token information through the resource scheduling platform, and the execution result of the target task is returned to the client.
[0010] In a second aspect, an embodiment of the present disclosure provides a task execution method, which is applied to a client, wherein the distributed cluster includes a file storage system and a resource scheduling platform, and the method includes:
[0011] The client is authenticated by the key distribution center to obtain the authentication result;
[0012] After authentication is passed, token information is requested from the management node of the file storage system;
[0013] Sending a target task to a resource scheduling platform, wherein the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client;
[0014] Receive the execution result of the target task returned by the resource scheduling platform.
[0015] In a third aspect, an embodiment of the present disclosure provides a task execution device, which is applied to a distributed cluster, wherein the distributed cluster includes a file storage system and a resource scheduling platform, and the device includes:
[0016] The sending module is used to send token information to the client through the management node of the file storage system after determining that the client has passed the authentication of the key distribution center;
[0017] A receiving module, used for receiving a target task sent by a client through a resource scheduling platform, wherein the target task carries the token information;
[0018] The execution module is used to execute the target task based on the token information through the resource scheduling platform and return the execution result of the target task to the client.
[0019] In a fourth aspect, an embodiment of the present disclosure provides a task execution device, which is applied to a client, wherein the distributed cluster includes a file storage system and a resource scheduling platform, and the device includes:
[0020] The authentication module is used to authenticate the client through the key distribution center and obtain the authentication result;
[0021] The application module is used to apply for token information from the management node of the file storage system after the authentication is passed;
[0022] A sending module is used to send a target task to a resource scheduling platform, wherein the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client;
[0023] The receiving module is used to receive the execution result of the target task returned by the resource scheduling platform.
[0024] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:
[0025] Memory;
[0026] Processor; and
[0027] Computer programs;
[0028] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect or the second aspect.
[0029] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method as described in the first aspect or the second aspect.
[0030] In a seventh aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0031] The task execution method, apparatus, device and computer-readable storage medium provided by the embodiments of the present disclosure, when it is determined that the client has passed the authentication of the key distribution center, token information is sent to the client through the management node of the file storage system, the target task sent by the client is received through the resource scheduling platform, the target task carries the token information, the target task is executed based on the token information through the resource scheduling platform, and the execution result of the target task is returned to the client. Compared with the prior art, the embodiments of the present disclosure, when it is determined that the client has passed the authentication of the key distribution center, token information is sent to the client through the management node of the file storage system, and authentication is performed through the token information when executing the task, without the need for authentication by the key distribution center, which can reduce the pressure on the key distribution center, improve the execution performance of the task, enhance the disaster recovery capability of the cluster, and improve the stability and reliability of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1 A flowchart of a task execution method provided by an embodiment of the present disclosure;
[0035] Figure 2 A flowchart of a task execution method provided by another embodiment of the present disclosure;
[0036] Figure 3 A signaling diagram of a task execution method provided by an embodiment of the present disclosure;
[0037] Figure 4 A flowchart of a task execution method provided by an embodiment of the present disclosure;
[0038] Figure 5 A schematic diagram of the overall process of the task execution method provided by the embodiment of the present disclosure;
[0039] Figure 6 A schematic diagram of the structure of a task execution device provided in an embodiment of the present disclosure;
[0040] Figure 7 A schematic diagram of the structure of a task execution device provided in an embodiment of the present disclosure;
[0041] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0044] In the big data environment, a large amount of sensitive data is stored and processed in the distributed (Hadoop) cluster. In the related technology, the Hadoop cluster uses Kerberos authentication to prevent data leakage and malicious access. Kerberos authentication is to achieve mutual authentication between the client and the server through the key distribution center (KDC).
[0045] Kerberos ensures that only authorized users can access this data through strict identity authentication. Kerberos authentication can verify the legitimacy of nodes and prevent unauthorized nodes from illegally accessing the cluster to steal data or interfere with services.
[0046] However, when the Hadoop cluster executes tasks sent by the client, it will start many task execution units. Each task execution unit needs to pass Kerberos authentication before accessing the cluster to execute tasks, which will cause huge pressure on the key distribution center, affect the execution performance of the task, and become the bottleneck of the cluster system.
[0047] To address this problem, an embodiment of the present disclosure provides a task execution method, which is described below in conjunction with a specific embodiment.
[0048] Figure 1 A flowchart of a task execution method provided in an embodiment of the present disclosure. The execution subject of the method is an electronic device. The electronic device may be a server cluster, for example, a distributed cluster (Hadoop). The method may be applied to a scenario where distributed cluster tasks are executed, and may be applied to a scenario where a distributed cluster performs security authentication. It is understood that the task execution method provided in an embodiment of the present disclosure may also be applied in other scenarios.
[0049] Below Figure 1 The task execution method shown in the figure is introduced. The method can be applied to a distributed cluster. The distributed cluster (Hadoop) includes a file storage system (HDFS) and a resource scheduling platform (YARN). The specific steps of the method are as follows:
[0050] S101. When it is determined that the client has passed the authentication of the key distribution center, token information is sent to the client through the management node of the file storage system.
[0051] In this step, if Figure 3 As shown in the figure, the client will connect to the key distribution center (KDC) for authentication. When it is determined that the client has passed the authentication of the key distribution center, the distributed cluster will send token information to the client through the management node (NameNode) of the file storage system (HDFS). The client will receive the token information and store it. Optionally, the token information can be a Token or other information that can be used as a credential, without limitation.
[0052] S102: Receive a target task sent by a client through a resource scheduling platform, wherein the target task carries the token information.
[0053] In this step, if Figure 3 As shown, the client initiates a target task to the resource scheduling platform (YARN), the target task carries the token information, and the distributed cluster receives the target task sent by the client through the resource scheduling platform.
[0054] S103: Execute the target task based on the token information through the resource scheduling platform, and return the execution result of the target task to the client.
[0055] Furthermore, after receiving the target task, the distributed cluster will access the file storage system (HDFS) based on the token information through the resource scheduling platform to execute the target task and return the execution result of the target task to the client. When executing the task, authentication is performed through the token information, and there is no need for authentication through the key distribution center, which can reduce the pressure on the key distribution center and improve the execution performance of the task.
[0056] After determining that the client has passed the authentication of the key distribution center, the disclosed embodiment sends token information to the client through the management node of the file storage system, receives the target task sent by the client through the resource scheduling platform, the target task carries the token information, executes the target task based on the token information through the resource scheduling platform, and returns the execution result of the target task to the client. Compared with the prior art, after determining that the client has passed the authentication of the key distribution center, the disclosed embodiment sends token information to the client through the management node of the file storage system, authenticates through the token information when executing the task, and does not need to pass the authentication of the key distribution center, which can reduce the pressure of the key distribution center, improve the execution performance of the task, enhance the disaster recovery capability of the cluster, and improve the stability and reliability of the cluster.
[0057] Figure 2 A flowchart of a task execution method provided by another embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method includes the following steps:
[0058] S201. After it is determined that the client has passed the authentication of the key distribution center, a token application sent by the client is received through a management node of the file storage system.
[0059] In this step, after confirming that the client has passed the authentication of the key distribution center, Figure 3 As shown, the client sends a token application to the management node (NameNode) of the file storage system, and the distributed cluster receives the token application sent by the client through the management node of the file storage system.
[0060] S202: The management node of the file storage system sends the token information to the client based on the token application.
[0061] Further, the distributed cluster will send the token information to the client through the management node of the file storage system based on the token application. Optionally, the token information can be a Token, or other information that can be used as a credential, without limitation.
[0062] S203: Receive a target task sent by the client through the resource scheduling platform, wherein the target task carries the token information.
[0063] Specifically, the implementation process and principle of S203 and S102 are the same, and will not be repeated here.
[0064] S204: Allocate the target task to the node manager of the resource scheduling platform through the resource manager of the resource scheduling platform.
[0065] The resource scheduling platform (YARN) includes a resource manager (RM) and a node manager (NM). In this step, after receiving the target task, the distributed cluster will allocate the target task through the resource manager of the resource scheduling platform and assign the target task to the node manager of the resource scheduling platform.
[0066] S205: Start one or more task execution units through the node manager of the resource scheduling platform, and send the token information to the one or more task execution units.
[0067] In this step, if Figure 3 As shown, the distributed cluster starts one or more task execution units (containers) through the node manager of the resource scheduling platform and distributes the token information to the one or more task execution units.
[0068] S206: Execute the target task based on the token information through the one or more task execution units to obtain an execution result of the target task, and report the execution result of the target task to the resource manager of the resource scheduling platform.
[0069] In this step, if Figure 3 As shown, the distributed cluster will access the file storage system (HDFS) based on the token information through the one or more task execution units to execute the target task, obtain the execution result of the target task, and report the execution result of the target task to the resource manager of the resource scheduling platform.
[0070] S207: Return the execution result of the target task to the client through the resource manager of the resource scheduling platform, and destroy the token information.
[0071] In this step, if Figure 3 As shown, the distributed cluster returns the execution result of the target task to the client through the resource manager of the resource scheduling platform, and when the task is completed, the token information is destroyed.
[0072] After determining that the client has passed the authentication of the key distribution center, the disclosed embodiment receives the token application sent by the client through the management node of the file storage system, sends the token information to the client based on the token application through the management node of the file storage system, and receives the target task sent by the client through the resource scheduling platform, wherein the target task carries the token information. Further, the target task is assigned to the node manager of the resource scheduling platform through the resource manager of the resource scheduling platform, one or more task execution units are started through the node manager of the resource scheduling platform, and the token information is sent to the one or more task execution units, and the target task is executed based on the token information by the one or more task execution units to obtain the execution result of the target task, and the execution result of the target task is reported to the resource manager of the resource scheduling platform. Then, the execution result of the target task is returned to the client through the resource manager of the resource scheduling platform, and the token information is destroyed. Compared with the prior art, the embodiment of the present disclosure starts one or more task execution units through the node manager of the resource scheduling platform, and sends the token information to the one or more task execution units, and the one or more task execution units execute the target task based on the token information. When executing the task, authentication is performed through the token information, and there is no need to be authenticated by the key distribution center. This can reduce the pressure on the key distribution center, improve the execution performance of the task, enhance the disaster recovery capability of the cluster, and improve the stability and reliability of the cluster.
[0073] Figure 4 The task execution method flow chart provided in the embodiment of the present disclosure is applied to the client, and the distributed cluster includes a file storage system and a resource scheduling platform, such as Figure 4 As shown, the method includes the following steps:
[0074] S301. Authenticate the client through the key distribution center and obtain the authentication result.
[0075] In this step, the client first passes the Kerberos authentication. Figure 5 As shown, the client is authenticated by the key distribution center to obtain an authentication result.
[0076] In some embodiments, S301 may include but is not limited to S3011 and S3012:
[0077] S3011, sending an authentication request to a key distribution center; the key distribution center is used to authenticate the client based on the authentication request and return an authentication result to the client;
[0078] S3012. Receive the authentication result returned by the key distribution center.
[0079] In this embodiment, the client sends an authentication request to the key distribution center, the key distribution center authenticates the client according to the authentication request and returns the authentication result to the client, and then the client receives the authentication result returned by the key distribution center.
[0080] S302: After the authentication is passed, apply for token information from the management node of the file storage system.
[0081] In this step, once the authentication is passed, the client can access the file storage system (HDFS). The client will apply for token information from the management node of the file storage system. Optionally, the token information can be Token or other information that can be used as a credential, without limitation.
[0082] In some embodiments, S302 applies for token information from the management node of the file storage system, which may include but is not limited to S3021 and S3022:
[0083] S3021, sending a token application to a management node of a file storage system; the management node of the file storage system is used to send the token information to the client based on the token application;
[0084] S3022. Receive the token information sent by the management node of the file storage system.
[0085] In this embodiment, Figure 5 As shown, the client sends a token acquisition application to the management node (NameNode) of the file storage system. Further, the management node of the file storage system sends the token information to the client based on the token application, and the client receives the token information sent by the management node of the file storage system.
[0086] S303, sending the target task to the resource scheduling platform, wherein the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client.
[0087] In this step, the client will initiate a target task to the resource scheduling platform (YARN), which carries the token information. The distributed cluster will receive the target task sent by the client through the resource scheduling platform. After receiving the target task, the resource scheduling platform will access the file storage system (HDFS) based on the token information to execute the target task and return the execution result of the target task to the client. When executing the task, the token information is used for authentication, and there is no need to authenticate through the key distribution center, which can reduce the pressure on the key distribution center and improve the execution performance of the task.
[0088] Specifically, the resource scheduling platform (YARN) includes a resource manager (RM) and a node manager (NM). After receiving the target task, the distributed cluster will allocate the target task through the resource manager of the resource scheduling platform, assign the target task to the node manager of the resource scheduling platform, start one or more task execution units (containers) through the node manager of the resource scheduling platform, and send the token information to the one or more task execution units. Figure 5 As shown, the target task is executed by accessing the file storage system (HDFS) based on the token information through one or more task execution units, obtaining the execution result of the target task, and reporting the execution result of the target task to the resource manager of the resource scheduling platform. The execution result of the target task is returned to the client through the resource manager of the resource scheduling platform, the task execution is completed, and the token information is destroyed.
[0089] S304: Receive the execution result of the target task returned by the resource scheduling platform.
[0090] In this step, after the resource scheduling platform returns the execution result of the target task to the client, the client receives the execution result of the target task returned by the resource scheduling platform.
[0091] The disclosed embodiment authenticates the client through the key distribution center to obtain the authentication result. When the authentication is passed, the token information is applied for from the management node of the file storage system. Further, the target task is sent to the resource scheduling platform, and the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client. Then, the execution result of the target task returned by the resource scheduling platform is received. Compared with the prior art, the disclosed embodiment applies for token information from the management node of the file storage system after the authentication is passed, and sends the target task to the resource scheduling platform. The target task carries the token information. When executing the task, the token information is used for authentication, and there is no need to pass the authentication of the key distribution center. This can reduce the pressure on the key distribution center, improve the execution performance of the task, enhance the disaster recovery capability of the cluster, and improve the stability and reliability of the cluster.
[0092] Figure 6 The structure diagram of the task execution device provided in the embodiment of the present disclosure. The task execution device may be a distributed cluster as described in the above embodiment, or the task execution device may be a component or assembly in the distributed cluster. The task execution device provided in the embodiment of the present disclosure may execute the processing flow provided in the task execution method embodiment, such as Figure 6As shown, the task execution device 50 is applied to a distributed cluster, which includes a file storage system and a resource scheduling platform. The task execution device 50 includes: a sending module 51, a receiving module 52, and an execution module 53; wherein the sending module 51 is used to send token information to the client through the management node of the file storage system after determining that the client has passed the authentication of the key distribution center; the receiving module 52 is used to receive the target task sent by the client through the resource scheduling platform, and the target task carries the token information; the execution module 53 is used to execute the target task based on the token information through the resource scheduling platform, and return the execution result of the target task to the client.
[0093] Optionally, when the sending module 51 sends the token information to the client through the management node of the file storage system, it is specifically used to: receive a token application sent by the client through the management node of the file storage system; and send the token information to the client based on the token application through the management node of the file storage system.
[0094] Optionally, when the execution module 53 executes the target task based on the token information through the resource scheduling platform and returns the execution result of the target task to the client, it is specifically used to: assign the target task to the node manager of the resource scheduling platform through the resource manager of the resource scheduling platform; start one or more task execution units through the node manager of the resource scheduling platform, and send the token information to the one or more task execution units; execute the target task based on the token information through the one or more task execution units, obtain the execution result of the target task, and report the execution result of the target task to the resource manager of the resource scheduling platform; return the execution result of the target task to the client through the resource manager of the resource scheduling platform, and destroy the token information.
[0095] Figure 6 The task execution device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0096] Figure 7 The structure diagram of the task execution device provided in the embodiment of the present disclosure. The task execution device may be the client as described in the above embodiment, or the task execution device may be a component or assembly in the client. The task execution device provided in the embodiment of the present disclosure may execute the processing flow provided in the task execution method embodiment, such as Figure 7As shown, the task execution device 70 is applied to the client, and the distributed cluster includes a file storage system and a resource scheduling platform. The task execution device 70 includes: an authentication module 71, an application module 72, a sending module 73, and a receiving module 74; wherein the authentication module 71 is used to authenticate the client through the key distribution center to obtain an authentication result; the application module 72 is used to apply for token information from the management node of the file storage system after the authentication is passed; the sending module 73 is used to send the target task to the resource scheduling platform, and the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client; the receiving module 74 is used to receive the execution result of the target task returned by the resource scheduling platform.
[0097] Optionally, the authentication module 71 authenticates the client through the key distribution center, and when the authentication result is obtained, it is specifically used to: send an authentication request to the key distribution center; the key distribution center is used to authenticate the client based on the authentication request and return the authentication result to the client; receive the authentication result returned by the key distribution center.
[0098] Optionally, when the application module 72 applies for token information from the management node of the file storage system, it is specifically used to: send a token application to the management node of the file storage system; the management node of the file storage system is used to issue the token information to the client based on the token application; and receive the token information issued by the management node of the file storage system.
[0099] Figure 7 The task execution device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0100] Figure 8 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 8 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0101] like Figure 8As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the task execution method of the embodiment described in the present disclosure. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0102] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the task execution method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0104] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0105] In some embodiments, the client and the server 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0106] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0107] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0108] When it is determined that the client has passed the authentication of the key distribution center, the token information is sent to the client through the management node of the file storage system;
[0109] Receiving, through the resource scheduling platform, a target task sent by a client, wherein the target task carries the token information;
[0110] The target task is executed based on the token information through the resource scheduling platform, and the execution result of the target task is returned to the client.
[0111] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0115] 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: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0118] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0119] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A task execution method, characterized in that: Applied to a distributed cluster, the distributed cluster includes a file storage system and a resource scheduling platform, the method includes: When it is determined that the client has passed the authentication of the key distribution center, the token information is sent to the client through the management node of the file storage system; Receiving, through the resource scheduling platform, a target task sent by a client, wherein the target task carries the token information; The target task is executed based on the token information through the resource scheduling platform, and the execution result of the target task is returned to the client.
2. The method according to claim 1, characterized in that The sending of the token information to the client through the management node of the file storage system includes: Receive the token application sent by the client through the management node of the file storage system; The token information is sent to the client through the management node of the file storage system based on the token application.
3. The method according to claim 1, characterized in that The executing the target task based on the token information through the resource scheduling platform and returning the execution result of the target task to the client includes: Allocate the target task to the node manager of the resource scheduling platform through the resource manager of the resource scheduling platform; Start one or more task execution units through a node manager of a resource scheduling platform, and send the token information to the one or more task execution units; Executing the target task based on the token information through the one or more task execution units, obtaining an execution result of the target task, and reporting the execution result of the target task to a resource manager of the resource scheduling platform; The execution result of the target task is returned to the client through the resource manager of the resource scheduling platform, and the token information is destroyed.
4. A task execution method, characterized in that: Applied to the client, the distributed cluster includes a file storage system and a resource scheduling platform, and the method includes: The client is authenticated by the key distribution center to obtain the authentication result; After authentication is passed, token information is requested from the management node of the file storage system; Sending a target task to a resource scheduling platform, wherein the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client; Receive the execution result of the target task returned by the resource scheduling platform.
5. The method according to claim 4, characterized in that The client is authenticated by the key distribution center to obtain the authentication result, including: Sending an authentication request to a key distribution center; the key distribution center is used to authenticate the client based on the authentication request and return an authentication result to the client; Receive the authentication result returned by the key distribution center.
6. The method according to claim 4, characterized in that The token information obtained from the management node of the file storage system includes: Sending a token application to a management node of a file storage system; the management node of the file storage system is used to send the token information to the client based on the token application; Receive the token information sent by the management node of the file storage system.
7. A task execution device, characterized in that: Applied to a distributed cluster, the distributed cluster includes a file storage system and a resource scheduling platform, and the device includes: The sending module is used to send token information to the client through the management node of the file storage system after determining that the client has passed the authentication of the key distribution center; A receiving module, used for receiving a target task sent by a client through a resource scheduling platform, wherein the target task carries the token information; The execution module is used to execute the target task based on the token information through the resource scheduling platform and return the execution result of the target task to the client.
8. A task execution device, characterized in that: Applied to the client, the distributed cluster includes a file storage system and a resource scheduling platform, and the device includes: The authentication module is used to authenticate the client through the key distribution center and obtain the authentication result; The application module is used to apply for token information from the management node of the file storage system after the authentication is passed; A sending module is used to send a target task to a resource scheduling platform, wherein the target task carries the token information; the resource scheduling platform is used to receive the target task sent by the client, execute the target task based on the token information, and return the execution result of the target task to the client; The receiving module is used to receive the execution result of the target task returned by the resource scheduling platform.
9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Service authentication method, server, electronic device and storage medium
CN112422477A
Method and system for performing backup operations using access tokens via command line interface (CLI)
US10057246B1