CN116455722A - Quota management method, device, equipment and medium based on application - Google Patents

Quota management method, device, equipment and medium based on application Download PDF

Info

Publication number
CN116455722A
CN116455722A CN202310386003.2A CN202310386003A CN116455722A CN 116455722 A CN116455722 A CN 116455722A CN 202310386003 A CN202310386003 A CN 202310386003A CN 116455722 A CN116455722 A CN 116455722A
Authority
CN
China
Prior art keywords
application
quota
request
metadata server
write operation
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
CN202310386003.2A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202310386003.2A priority Critical patent/CN116455722A/en
Publication of CN116455722A publication Critical patent/CN116455722A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • H04L41/0293Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP] for accessing web services by means of a binding identification of the management service or element
    • 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/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5054Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a quota management method, device, equipment and readable medium based on application, wherein the method comprises the following steps: setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server; in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation; sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID; in response to receiving a response message returned by the metadata server to the success application, the write operation is allowed to be performed and quota information in the metadata server is updated. By using the scheme of the invention, the application creation and management quota can be realized, the space used by the application in the storage system can be controlled more accurately, the use quota of the application can be planned better, the use diversity of the storage system can be improved, the customized service can be provided for the user, and the quality of the storage product can be improved.

Description

Quota management method, device, equipment and medium based on application
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for application-based quota management.
Background
The distributed file system DFS (Distributed File System) refers to that physical storage resources managed by the file system are not necessarily directly connected to local storage nodes, but are connected to the storage nodes through a computer network, the storage space of the DFS is actually distributed on each storage node, and the management nodes in the distributed storage system determine the allocation quota of the storage space on each storage node, so that the utilization rate of the storage resources on each storage node is balanced as much as possible. In a distributed storage system, users, user group quotas, directory quotas, nested quotas, default quotas, and the like are all based on users or directories to create quotas.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for quota management based on an application, by using the technical solution of the present invention, it is possible to create and manage a quota for an application, more precisely control a space used by an application in a storage system, better plan a usage quota for the application, improve a diversity of usage of the storage system, provide customized services for a user, and improve quality of a storage product.
Based on the above object, an aspect of an embodiment of the present invention provides a method for quota management based on application, including the steps of:
setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server;
in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation;
sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID;
in response to receiving a response message returned by the metadata server to the success application, the write operation is allowed to be performed and quota information in the metadata server is updated.
According to one embodiment of the invention, in response to an application performing a write operation in a shared directory, identifying an application ID to which the write operation corresponds includes:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
According to one embodiment of the present invention, sending a request for applying a quota corresponding to a write operation to a metadata server, and applying the corresponding quota based on the identified application ID includes:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
According to one embodiment of the present invention, further comprising:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for quota management based on an application, including:
the setting module is configured to set a corresponding application quota for the application ID of each application, and store the set application quota information into the metadata server;
the identification module is configured to respond to the application to execute the writing operation in the shared directory and identify the application ID corresponding to the writing operation;
the application module is configured to send a request for applying a quota corresponding to the writing operation to the metadata server and apply for the corresponding quota based on the identified application ID;
and the updating module is configured to allow writing operation to be performed and update quota information in the metadata server in response to receiving a response message returned by the metadata server and applied for success.
According to one embodiment of the invention, the identification module is further configured to:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
According to one embodiment of the invention, the application module is further configured to:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
According to one embodiment of the invention, the system further comprises an alarm module configured to:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: according to the quota management method based on the application, corresponding application quota is set for the application ID of each application, and the set application quota information is stored in the metadata server; in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation; sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID; in response to receiving a response message returned by the metadata server and applied for success, the technical scheme of allowing writing operation to be executed and updating quota information in the metadata server can realize application creation and quota management, can more accurately control the space used by the application in the storage system, better plan the use quota of the application, can improve the use diversity of the storage system, provide customized service for users, and improve the quality of storage products.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart diagram of a method of application-based quota management in accordance with one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for application-based quota management in accordance with one embodiment of the invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, in a first aspect, an embodiment of a method for quota management based on an application is presented. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server. An application quota specifying an app (application) id is required to be configured in the distributed storage system, and the configuration is stored in a metadata server for persistence after the configuration is completed.
S2, in response to the application executing the writing operation in the shared directory, identifying an application ID corresponding to the writing operation. When an application performs writing operation to a shared directory, a service awareness technology (matching is performed through keywords of the application in the flow) is used for identifying which application and which sub-function under the application are the current flow, and then the corresponding app id is obtained.
S3, sending a request for applying for the quota corresponding to the writing operation to the metadata server, and applying for the quota corresponding to the application ID based on the identified application ID. Firstly judging whether an application quota of a corresponding app ID exists, if so, sending a request for applying a quota to a metadata server, analyzing the request to obtain a quota amount of the application after the metadata server receives the request, comparing the applied quota amount with a quota residual amount corresponding to the identified application ID, if the applied quota amount is larger than the quota residual amount corresponding to the identified application ID, returning a response message for applying failure, and if the applied quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, returning a response message for applying success, and simultaneously returning the applied quota space amount to a client side by the metadata server, thereby realizing application creation and management quota.
S4, responding to the response message returned by the metadata server and applied for success, allowing write operation to be performed and updating quota information in the metadata server. The application ID is used for storing the quota amount of the application, namely subtracting the quota amount of the application from the residual quota amount of the application ID, so that the space used in the storage system by the application can be controlled more accurately, and the use quota of the application can be planned better.
By using the technical scheme of the invention, application creation and management quota can be realized, the space used in the storage system by the application can be controlled more accurately, the use quota of the application can be planned better, the use diversity of the storage system can be improved, customized service can be provided for users, and the quality of storage products can be improved.
In a preferred embodiment of the present invention, in response to an application performing a write operation in a shared directory, identifying an application ID corresponding to the write operation includes:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation. When an application performs writing operation to a shared directory, a service awareness technology (matching is performed through keywords of the application in the flow) is used for identifying which application and which sub-function under the application are the current flow, and then the corresponding app id is obtained.
In a preferred embodiment of the present invention, sending a request for applying a quota corresponding to a write operation to a metadata server, and applying for the quota corresponding to the application ID based on the identified application ID includes:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
In a preferred embodiment of the present invention, further comprising:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning. If the message of the application failure is received, the quota space of the application is insufficient, and the current writing operation cannot be met, so that the writing operation is refused to be executed, and a warning is sent out.
By using the technical scheme of the invention, application creation and management quota can be realized, the space used in the storage system by the application can be controlled more accurately, the use quota of the application can be planned better, the use diversity of the storage system can be improved, customized service can be provided for users, and the quality of storage products can be improved.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in mind, in a second aspect of the embodiments of the present invention, there is provided an apparatus for quota management based on an application, as shown in fig. 2, an apparatus 200 includes:
the setting module is configured to set a corresponding application quota for the application ID of each application, and store the set application quota information into the metadata server;
the identification module is configured to respond to the application to execute the writing operation in the shared directory and identify the application ID corresponding to the writing operation;
the application module is configured to send a request for applying a quota corresponding to the writing operation to the metadata server and apply for the corresponding quota based on the identified application ID;
and the updating module is configured to allow writing operation to be performed and update quota information in the metadata server in response to receiving a response message returned by the metadata server and applied for success.
In a preferred embodiment of the invention, the identification module is further configured to:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
In a preferred embodiment of the invention, the application module is further configured to:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
In a preferred embodiment of the present invention, the system further comprises an alarm module configured to:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions when executed by the processor performing the method of:
setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server;
in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation;
sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID;
in response to receiving a response message returned by the metadata server to the success application, the write operation is allowed to be performed and quota information in the metadata server is updated.
In a preferred embodiment of the present invention, in response to an application performing a write operation in a shared directory, identifying an application ID corresponding to the write operation includes:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
In a preferred embodiment of the present invention, sending a request for applying a quota corresponding to a write operation to a metadata server, and applying for the quota corresponding to the application ID based on the identified application ID includes:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
In a preferred embodiment of the present invention, further comprising:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following method:
setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server;
in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation;
sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID;
in response to receiving a response message returned by the metadata server to the success application, the write operation is allowed to be performed and quota information in the metadata server is updated.
In a preferred embodiment of the present invention, in response to an application performing a write operation in a shared directory, identifying an application ID corresponding to the write operation includes:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
In a preferred embodiment of the present invention, sending a request for applying a quota corresponding to a write operation to a metadata server, and applying for the quota corresponding to the application ID based on the identified application ID includes:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
In a preferred embodiment of the present invention, further comprising:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (10)

1. A method of application-based quota management, comprising the steps of:
setting a corresponding application quota for the application ID of each application, and storing the set application quota information into a metadata server;
in response to an application executing a write operation in the shared directory, identifying an application ID corresponding to the write operation;
sending a request for applying for a quota corresponding to the writing operation to the metadata server, and applying for the corresponding quota based on the identified application ID;
in response to receiving a response message returned by the metadata server to the success application, the write operation is allowed to be performed and quota information in the metadata server is updated.
2. The method of claim 1, wherein, in response to the application performing a write operation in the shared directory, identifying the application ID to which the write operation corresponds comprises:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
3. The method of claim 1, wherein sending a request to the metadata server to apply for a quota corresponding to the write operation, and applying for the corresponding quota based on the identified application ID comprises:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
4. The method as recited in claim 1, further comprising:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
5. An apparatus for application-based quota management, the apparatus comprising:
the setting module is configured to set a corresponding application quota for the application ID of each application, and store the set application quota information into the metadata server;
the identification module is configured to respond to the application to execute the writing operation in the shared directory and identify the application ID corresponding to the writing operation;
the application module is configured to send a request for applying for a quota corresponding to the writing operation to the metadata server, and apply for the corresponding quota based on the identified application ID;
and the updating module is configured to allow writing operation to be performed and update quota information in the metadata server in response to receiving a response message returned by the metadata server and applied for success.
6. The apparatus of claim 5, wherein the identification module is further configured to:
in response to an application performing a write operation in the shared directory, a match is made through keywords in traffic of the write operation to identify an application ID corresponding to the write operation.
7. The apparatus of claim 5, wherein the application module is further configured to:
sending a request for applying a quota corresponding to the writing operation to a metadata server;
responding to the request received by the metadata server, and analyzing the request to obtain quota of the application;
comparing the quota amount of the application with the quota residual amount corresponding to the identified application ID;
responding to the request that the quota amount is larger than the quota residual amount corresponding to the identified application ID, and returning a response message of failure request;
and responding to the request that the quota amount is smaller than or equal to the quota residual amount corresponding to the identified application ID, and returning a response message of successful request.
8. The apparatus of claim 5, further comprising an alert module configured to:
and in response to receiving the response message of the application failure returned by the metadata server, refusing to execute the writing operation and sending out a corresponding warning.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-4.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any of claims 1-4.
CN202310386003.2A 2023-04-07 2023-04-07 Quota management method, device, equipment and medium based on application Pending CN116455722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310386003.2A CN116455722A (en) 2023-04-07 2023-04-07 Quota management method, device, equipment and medium based on application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310386003.2A CN116455722A (en) 2023-04-07 2023-04-07 Quota management method, device, equipment and medium based on application

Publications (1)

Publication Number Publication Date
CN116455722A true CN116455722A (en) 2023-07-18

Family

ID=87129744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310386003.2A Pending CN116455722A (en) 2023-04-07 2023-04-07 Quota management method, device, equipment and medium based on application

Country Status (1)

Country Link
CN (1) CN116455722A (en)

Similar Documents

Publication Publication Date Title
CN108696581B (en) Distributed information caching method and device, computer equipment and storage medium
WO2021080964A1 (en) Consent management system
CN107111510B (en) Method and device for operating VNF packet
CN108156030B (en) Method and device for synchronizing configuration strategies
CN108810125B (en) Service discovery method and system for physical node
CN113691635B (en) Method and device for calling microservice, electronic equipment and readable storage medium
CN109905431A (en) Message treatment method and system, storage medium, electronic equipment
CN108132991A (en) A kind of H5 pages loading method and system
CN112333289A (en) Reverse proxy access method, device, electronic equipment and storage medium
CN104539742A (en) Information push method, information push device and information push system
CN114157639B (en) Method, device and equipment for collecting information of intelligent network card of server and readable medium
CN108279924A (en) Program dissemination method and device
EP4189997A1 (en) Service request handling
CN113806075A (en) Method, device and equipment for container hot updating CPU core of kubernets cluster and readable medium
CN116455722A (en) Quota management method, device, equipment and medium based on application
WO2016145871A1 (en) Monitor task updating method and device
CN113806076B (en) Method, device, equipment and readable medium for distributing four-control environment memory
US11924294B2 (en) Service request handling
US20230275974A1 (en) Network functionality (nf) aware service provision based on service communication proxy (scp)
CN114595069A (en) Service offline method and device, electronic equipment and storage medium
CN112231612B (en) Method and device for transmitting configuration information, storage medium and electronic device
CN108848156B (en) Access gateway processing method, device and storage medium
CN114205329A (en) Equipment coding method and device
CN111343172A (en) Network access authority dynamic processing method and device
CN112527375B (en) Method, device, equipment and readable medium for modifying volume QoS configuration

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