CN109669771B - Dependency environment alternation method and device - Google Patents

Dependency environment alternation method and device Download PDF

Info

Publication number
CN109669771B
CN109669771B CN201811564455.0A CN201811564455A CN109669771B CN 109669771 B CN109669771 B CN 109669771B CN 201811564455 A CN201811564455 A CN 201811564455A CN 109669771 B CN109669771 B CN 109669771B
Authority
CN
China
Prior art keywords
environment
dependent
memory space
new
stack memory
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.)
Active
Application number
CN201811564455.0A
Other languages
Chinese (zh)
Other versions
CN109669771A (en
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.)
China United Network Communications Group Co Ltd
Unicom Big Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Big Data 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 China United Network Communications Group Co Ltd, Unicom Big Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201811564455.0A priority Critical patent/CN109669771B/en
Publication of CN109669771A publication Critical patent/CN109669771A/en
Application granted granted Critical
Publication of CN109669771B publication Critical patent/CN109669771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

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

Abstract

The present disclosure relates to the technical field of software upgrading, and provides a dependent environment alternation method, which includes: generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment; according to the checking result, transferring the metadata information to a stack memory space of the new dependent environment and asynchronously receiving the transaction service request; calculating the resource demand of the transaction service request; reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment; and when all the metadata information is judged to be migrated to the stack memory space of the new dependent environment and the transaction service request is completely accepted by the new dependent environment, sending a dependent environment alternation completion signal and destroying the old dependent environment. Accordingly, the present disclosure also provides an environment-dependent alternation device.

Description

Dependency environment alternation method and device
Technical Field
The present disclosure relates to the field of software upgrading technologies, and in particular, to a method and an apparatus for environment-dependent change.
Background
In a multi-tenant service scenario, the problem that the language dependent environment is not matched with the cluster is frequently encountered, and because the cluster depends on the language environment, when the version of the language dependent environment is low and is not enough to be compatible with the language dependent requirements of a new tenant, the version of the language dependent environment needs to be upgraded or corrected. In the prior art, when the language dependent environment version is upgraded, the cluster needs to be restarted so as to achieve the purpose of thoroughly upgrading the language dependent environment of the big data cluster. But restarting the process can result in traffic stalls and thus economic losses.
It should be noted that the above background description is only for the convenience of a clear and complete description of the technical solutions of the present disclosure and for the understanding of those skilled in the art. Such solutions are not considered to be known to those skilled in the art, merely because they have been set forth in the background section of this disclosure.
Disclosure of Invention
The present disclosure is directed to at least one of the problems of the prior art, and provides a method and an apparatus for environment-dependent alternation.
In a first aspect, an embodiment of the present disclosure provides a method for dependency environment alternation, including:
generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment;
according to the check result, transferring the metadata information to a stack memory space of a new dependent environment and asynchronously receiving a transaction service request;
calculating the resource demand of the transaction service request;
reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment;
when all metadata information is judged to be migrated to the stack memory space of the new dependent environment and the transaction service request is completely accepted by the new dependent environment, sending a dependent environment alternation completion signal and destroying the old dependent environment;
and when judging that the metadata information is not all migrated into the stack memory space of the new dependency environment or the transaction service requests are not all completely accepted by the new dependency environment, continuing to execute the step of generating the check result according to the check point information of the new dependency environment and the check point information of the old dependency environment.
In some embodiments, before the step of generating the inspection result, the method further comprises:
a stack memory space of a new dependent environment is generated and the new dependent environment is initialized.
In some embodiments, the step of migrating the metadata information into the stack memory space of the new dependency environment according to the checking result specifically includes:
searching a synchronizable checkpoint according to the checking result and generating synchronizable checkpoint state information;
migrating the metadata information to the stack memory space of the new dependency environment based on the synchronizable checkpoint state information.
In some embodiments, before the step of calculating the resource requirement of the transaction service request, the method further comprises:
judging whether the metadata information related to the transaction service request is migrated to a stack memory space of a new dependent environment;
and when judging whether the metadata information related to the transaction service request is migrated into the stack memory space of the new dependency environment, executing the step of calculating the resource demand of the transaction service request, otherwise, continuing to execute the step of generating a check result according to the check point information of the new dependency environment and the check point information of the old dependency environment.
In some embodiments, the step of calculating the resource requirement of the transaction service request specifically includes:
when the number of the transaction service requests is multiple, respectively generating a resource requirement value of each transaction service request;
obtaining a releasable stack memory space value of an old dependent environment;
generating a total resource demand value according to the resource demand values of all the transaction service requests;
when the total resource demand value is judged to be larger than the releasable stack memory space value of the old dependent environment, generating a data block assignment;
and generating the resource demand according to the resource demand total value and the data block assignment.
In a second aspect, an embodiment of the present disclosure provides a device for environment-dependent alternation, including:
the generating module is used for generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment;
the migration module is used for migrating the metadata information to the stack memory space of the new dependent environment according to the check result;
the receiving module is used for receiving the transaction service request;
the computing module is used for computing the resource demand of the transaction service request;
the increase and reduction module is used for reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment;
the first judgment module is used for judging whether all metadata information is migrated to the stack memory space of the new dependent environment and whether the transaction service request is completely accepted by the new dependent environment;
and the sending destruction module is used for sending a dependent environment alternation completion signal and destroying the old dependent environment when all the metadata information is judged to be migrated to the stack memory space of the new dependent environment and the transaction service request is completely accepted by the new dependent environment.
In some embodiments, further comprising:
and the generation initialization module is used for generating a stack memory space of the new dependency environment and initializing the new dependency environment.
In some embodiments, the migration module specifically includes:
the searching and generating submodule is used for searching a synchronizable check point according to the check result and generating synchronizable check point state information;
and the migration submodule is used for migrating the metadata information to the stack memory space of the new dependent environment according to the synchronizable checkpoint state information.
In some embodiments, further comprising:
a second determining module, configured to determine whether all metadata information related to the transaction service request has been migrated to a stack memory space of a new dependency environment.
In some embodiments, the calculation module specifically includes:
the generating submodule is used for respectively generating the resource demand value of each transaction service request when the number of the transaction service requests is multiple, generating a resource demand total value according to the resource demand values of all the transaction service requests, generating data block assignment, and generating resource demand quantity according to the resource demand total value and the data block assignment;
the acquisition submodule is used for acquiring a releasable stack memory space value of the old dependent environment;
and the judging submodule is used for judging whether the total value of the resource demand is greater than the value of the releasable stack memory space of the old dependent environment.
The present disclosure has the following beneficial effects:
according to the dependency environment alternation method and device, the stack memory space of the old dependency environment is reduced and the stack memory space of the new dependency environment is correspondingly increased according to the resource demand, and when all metadata information is judged to be migrated to the stack memory space of the new dependency environment and the transaction service request is completely accepted by the new dependency environment, a dependency environment alternation completion signal is sent out and the old dependency environment is destroyed. The change of the language dependence environment of the big data cluster can be realized on the premise of not restarting the cluster, the use experience of a user is effectively improved, and the influence of cluster restart on business or economy is avoided.
Specific embodiments of the present disclosure are disclosed in detail with reference to the following description and drawings, indicating the manner in which the principles of the disclosure may be employed. It is to be understood that the embodiments of the present disclosure are not so limited in scope. The embodiments of the present disclosure include many variations, modifications, and equivalents within the spirit and scope of the appended claims.
Features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments, in combination with or instead of the features of the other embodiments.
It should be emphasized that the term "comprises/comprising" when used herein, is taken to specify the presence of stated features, integers, steps or components but does not preclude the presence or addition of one or more other features, integers, steps or components.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without inventive exercise.
Fig. 1 is a flowchart illustrating a method for environment-dependent alternation according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating another environment-dependent alteration method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an environment-dependent changing apparatus according to an embodiment of the disclosure.
Detailed Description
For those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
Fig. 1 is a flowchart illustrating a method for environment-dependent alternation according to an embodiment of the present disclosure, as shown in fig. 1, the method includes the following steps:
step 101, generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment.
And 102, migrating the metadata information to a stack memory space of the new dependent environment according to the checking result and asynchronously receiving the transaction service request.
And 103, calculating the resource demand of the transaction service request.
And step 104, reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment.
Step 105, judging whether all metadata information is migrated to a stack memory space of the new dependent environment and whether the transaction service request is completely accepted by the new dependent environment, if so, executing step 106; if not, go to step 101.
And step 106, sending out a dependent environment alternation completion signal and destroying the old dependent environment.
The dependency environment alternation method provided in this embodiment reduces the stack memory space of the old dependency environment and correspondingly increases the stack memory space of the new dependency environment according to the resource demand, and when it is determined that all metadata information is migrated into the stack memory space of the new dependency environment and the transaction service request is completely accepted by the new dependency environment, sends out a dependency environment alternation completion signal and destroys the old dependency environment. The change of the language dependence environment of the big data cluster can be realized on the premise of not restarting the cluster, the use experience of a user is effectively improved, and the influence of cluster restart on business or economy is avoided.
Fig. 2 is a flowchart illustrating another environment-dependent alternation method according to an embodiment of the disclosure, as shown in fig. 2, the method includes the following steps:
step 201, generating a stack memory space of the new dependency environment and initializing the new dependency environment.
Preferably, the steps in this embodiment are performed by an environment-dependent alteration device.
The type of stack memory space may be a JVM (Java Virtual Machine) stack memory. The initialization process specifically includes: loading image file information (image file information), calling createotools () function and creating corresponding initial directory by profile.new (), calling corresponding configuration file by apihdfs.config (), loading initialization cluster parameters.
And after the initialization is finished, outputting a starting process log, outputting information of success starting of the new environment, and printing a progress bar through a process () function. The progress bar dynamically changes in real time to show an alternate progress depending on the environment.
Step 202, generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment.
Specifically, first, a filesystem.get () function is called to obtain the relevant metadata information, and then a syncheckpoint () function is called to compare whether the checkpoint information of the new dependent environment is consistent with the checkpoint information of the old dependent environment. Such as: assigning x to the current read check point of the check point information of the new dependent environment, assigning y to the current read check point of the check point information of the old dependent environment, and generating a check result according to the ratio of x to y.
Step 203, according to the checking result, migrating the metadata information to the stack memory space of the new dependent environment and asynchronously receiving the transaction service request.
In the environment changing method of this embodiment, in the process of gradually migrating the metadata information stored in the stack memory space of the old dependent environment to the stack memory space of the new dependent environment, the transaction service request sent by the user is also asynchronously accepted, so that the dependent environment changing can be realized without restarting and the use experience of the user is not affected.
And searching for a synchronizable checkpoint according to the checking result and generating synchronizable checkpoint state information. Migrating the metadata information to the stack memory space of the new dependency environment based on the synchronizable checkpoint state information.
Specifically, a setzreo () function is called to perform consistency calculation to find out a synchronizable checkpoint, whether a transaction service request can be prepared to be accepted is judged when a synchronizable checkpoint state is output, if the synchronizable checkpoint state can be prepared to be accepted, a syncts () is called to accept the setzreo () synchronizable checkpoint state, corresponding transaction dependencies are checked, and the transaction service request is asynchronously accepted. Here, the number of transaction service requests accepted may be plural or one.
Optionally, when it is determined that there is no free space in the stack memory space of the new dependency environment, the method may perform the subsequent steps after waiting in a queue until there is a free space in the stack memory space of the new dependency environment.
Optionally, in the process of migrating the metadata information to the stack memory space of the new dependent environment, it is determined in real time whether the metadata information generates an offset and generates an offset difference, and a corresponding update operation is performed according to the offset difference to eliminate the offset.
Step 204, determining whether all metadata information related to the transaction service request has been migrated into the stack memory space of the new dependency environment, if yes, executing step 205; if not, go to step 202.
Since the migration of the metadata information and the acceptance of the transaction service request are performed simultaneously, after the transaction service request is accepted, when it is determined that the metadata information related to the transaction service request is not migrated to the stack memory space of the new dependent environment, the transaction service request cannot be completely accepted, and step 202 is performed to migrate the metadata information related to the transaction service request to the stack memory space of the new dependent environment.
Step 205, calculating the resource demand of the transaction service request.
Optionally, the transaction service request is evaluated, and the evaluation value T of the transaction service requestijE {0,1}, when TijWhen the value is 1, the transaction service request i is allocated to the stack memory space of the new dependent environment, and the resource demand of the transaction service request is calculated.
Specifically, step 205 includes the steps of:
step 205a, when the number of the transaction service requests is multiple, respectively generating the resource requirement value of each transaction service request.
Resource requirement value DijThe transaction request can be generated according to historical data presetting or information carried in the transaction service request. Wherein D isijRepresenting a resource requirement value, i representing a transaction service request i, j representing the transaction service request i being allocated to the stack memory space j of the new dependency environment.
Step 205b, obtain the value of the releasable stack memory space of the old dependent environment.
No data is stored in the releasable stack memory space of the old dependent environment, and the value of the releasable stack memory space of the old dependent environment is recorded as M.
And step 205c, generating a total resource demand value according to the resource demand values of all the transaction service requests.
The total value of the resource demand is calculated by the formula sigma DijAnd (6) calculating.
Step 205d, determining whether the total value of the resource requirement is greater than the value of the space of the releasable stack memory of the old dependent environment, if so, executing step 205 e; if not, go to step 202.
When sigma D is judgedijAt ≧ M, which indicates that the transaction service request can be accepted, step 205e is performed. When sigma D is judgedijIf the value is less than M, it indicates that the transaction service request cannot be completely accepted, and the metadata information related to the transaction service request is not completely migrated to the stack memory space of the new dependency environment, and step 202 is executed.
Step 205e, generate data block assignments.
Data block assignment KiE { k, n }, where k represents the resource size of the data block occupied by the transaction service request and n represents the resource size of the free data block.
And step 205f, generating the resource demand according to the total resource demand value and the data block assignment.
By the formula ∑ TijDij+TijKiDij+KiDijA resource demand is generated. The resource demand represents the value of stack memory space that needs to be occupied by the currently accepted transaction service request.
Step 206, reducing the stack memory space of the old dependent environment and correspondingly increasing the stack memory space of the new dependent environment according to the resource demand.
And simultaneously releasing the stack memory space of the old dependent environment and correspondingly increasing the stack memory space of the new dependent environment. The method of the embodiment realizes the dependency environment alternation by dynamically increasing and shrinking the stack memory space of the new and old dependency environments.
Step 207, judging whether all metadata information is migrated to the stack memory space of the new dependent environment and whether the transaction service request is completely accepted by the new dependent environment, if yes, executing step 208; if not, go to step 202.
When it is determined that all metadata information has been migrated into the stack memory space of the new dependency environment and the transaction service request has been completely accepted by the new dependency environment, it indicates that the dependency environment has been changed, the data has been migrated from the old dependency environment into the new dependency environment, and the system has been switched from the old dependency environment to the new dependency environment, step 208 is executed. When it is determined that all metadata information is not migrated to the stack memory space of the new dependency environment or the transaction service request is not completely accepted by the new dependency environment, it indicates that the dependency environment is not completed in an overlapped manner, and step 202 is continuously performed.
Step 208, sending out a dependent environment alternation completion signal and destroying the old dependent environment.
It should be noted that while the operations of the disclosed methods are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
The method provided by the embodiment can realize the environment-dependent alternation through the steps, the alternation process of the environment-dependent alternation is not required to be restarted, the use experience of a user is effectively improved, and the influence of restarting on business or economic benefits is avoided.
When the method is applied to the language-dependent environment alternation of the big data cluster based on the hadoop component, the language-dependent environment alternation of the hadoop component can be completely corrected on the premise of not restarting the cluster, and the business stagnation and the economic loss caused by cluster restarting are avoided.
Fig. 3 is a schematic structural diagram of an environment-dependent changing apparatus according to an embodiment of the disclosure, as shown in fig. 3, the apparatus includes: the system comprises a generating module 11, a transferring module 12, an accepting module 13, a calculating module 14, an increasing and shrinking module 15, a first judging module 16 and a destroying sending module 17.
The generating module 11 is configured to generate a checking result according to the checkpoint information of the new dependent environment and the checkpoint information of the old dependent environment. The migration module 12 is configured to migrate the metadata information to the stack memory space of the new dependency environment according to the checking result. The accepting module 13 is used for accepting the transaction service request. The calculation module 14 is used for calculating the resource demand of the transaction service request. The scaling module 15 is configured to scale down the stack memory space of the old dependent environment according to the resource requirement and increase the stack memory space of the new dependent environment accordingly. The first determining module 16 is configured to determine whether all metadata information is migrated into the stack memory space of the new dependency environment and whether the transaction service request is completely accepted by the new dependency environment. The destruction sending module 17 is configured to send a dependency environment alternation completion signal and destroy the old dependency environment when it is determined that all the metadata information is migrated to the stack memory space of the new dependency environment and the transaction service request is completely accepted by the new dependency environment.
Further, the apparatus further comprises: an initialization module 10 is generated. The generation initialization module 10 is used to generate a stack memory space of the new dependency environment and initialize the new dependency environment.
Further, the migration module 12 specifically includes: a find generate sub-module 121 and a migrate sub-module 122. The finding generation submodule 121 is used for finding a synchronizable checkpoint according to the checking result and generating synchronizable checkpoint state information. The migration submodule 122 is configured to migrate the metadata information into the stack memory space of the new dependency environment based on the synchronizable checkpoint state information.
Further, the apparatus further comprises: a second decision module 18. The second determination module 18 is configured to determine whether metadata information associated with the transaction service request has been migrated into the stack memory space of the new dependency environment.
Further, the calculation module 14 specifically includes: a generation submodule 141, an acquisition submodule 142 and a judgment submodule 143. The generating submodule 141 is configured to generate a resource demand value of each transaction service request when the number of the transaction service requests is multiple, generate a resource demand total value according to the resource demand values of all the transaction service requests, generate a data block assignment, and generate a resource demand amount according to the resource demand total value and the data block assignment. The fetch submodule 142 is used to fetch the releasable stack memory space value of the old dependency environment. The determining submodule 143 is configured to determine whether the total resource requirement value is greater than the value of the releasable stack memory space of the old dependent environment.
The environment-dependent alternation apparatus provided in the present embodiment can be used to implement the environment-dependent alternation method provided in the present embodiment.
The dependency environment alternation apparatus provided in this embodiment reduces the stack memory space of the old dependency environment and correspondingly increases the stack memory space of the new dependency environment according to the resource demand, and when it is determined that all metadata information is migrated to the stack memory space of the new dependency environment and the transaction service request is completely accepted by the new dependency environment, sends out a dependency environment alternation completion signal and destroys the old dependency environment. The change of the language dependence environment of the big data cluster can be realized on the premise of not restarting the cluster, the use experience of a user is effectively improved, and the influence of cluster restart on business or economy is avoided.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the present disclosure are explained by applying specific embodiments in the present disclosure, and the above description of the embodiments is only used to help understanding the method and the core idea of the present disclosure; meanwhile, for a person skilled in the art, based on the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.

Claims (10)

1. A dependency environment alternation method, wherein the dependency environment is a JVM runtime environment, the method comprising:
generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment;
according to the check result, transferring the metadata information to a stack memory space of a new dependent environment and asynchronously receiving a transaction service request;
calculating the resource demand of the transaction service request;
reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment;
when all metadata information is judged to be migrated to the stack memory space of the new dependent environment and the transaction service request is completely accepted by the new dependent environment, sending a dependent environment alternation completion signal and destroying the old dependent environment;
and when judging that the metadata information is not all migrated into the stack memory space of the new dependency environment or the transaction service requests are not all completely accepted by the new dependency environment, continuing to execute the step of generating the check result according to the check point information of the new dependency environment and the check point information of the old dependency environment.
2. The environment-dependent alteration method according to claim 1, further comprising, before the step of generating the inspection result:
a stack memory space of a new dependent environment is generated and the new dependent environment is initialized.
3. The method of claim 1, wherein the step of migrating the metadata information to the stack memory space of the new dependency environment according to the checking result comprises:
searching a synchronizable checkpoint according to the checking result and generating synchronizable checkpoint state information;
migrating the metadata information to the stack memory space of the new dependency environment based on the synchronizable checkpoint state information.
4. The dependency environment alternation method as claimed in claim 1, further comprising, before the step of calculating the resource requirement of the transaction service request:
judging whether the metadata information related to the transaction service request is migrated to a stack memory space of a new dependent environment;
and when judging that the metadata information related to the transaction service request is migrated to the stack memory space of the new dependent environment, executing the step of calculating the resource demand of the transaction service request, otherwise, continuing to execute the step of generating a check result according to the check point information of the new dependent environment and the check point information of the old dependent environment.
5. The method of claim 1, wherein the step of calculating the resource requirement of the transaction service request comprises:
when the number of the transaction service requests is multiple, respectively generating a resource requirement value of each transaction service request;
obtaining a releasable stack memory space value of an old dependent environment;
generating a total resource demand value according to the resource demand values of all the transaction service requests;
when the total resource demand value is judged to be larger than the releasable stack memory space value of the old dependence environment, generating a data block assignment value, wherein the data block assignment value is KiE { k, n }, wherein k represents the resource size of the data block occupied by the transaction service request, and n represents the resource size of the free data block;
and generating the resource demand according to the resource demand total value and the data block assignment.
6. A dependent environment alternation apparatus, wherein the dependent environment is a JVM execution environment, the apparatus comprising:
the generating module is used for generating a checking result according to the checking point information of the new dependent environment and the checking point information of the old dependent environment;
the migration module is used for migrating the metadata information to the stack memory space of the new dependent environment according to the check result;
the receiving module is used for receiving the transaction service request;
the computing module is used for computing the resource demand of the transaction service request;
the increase and reduction module is used for reducing the stack memory space of the old dependent environment according to the resource demand and correspondingly increasing the stack memory space of the new dependent environment;
the first judgment module is used for judging whether all metadata information is migrated to the stack memory space of the new dependent environment and whether the transaction service request is completely accepted by the new dependent environment;
and the sending destruction module is used for sending a dependent environment alternation completion signal and destroying the old dependent environment when all the metadata information is judged to be migrated to the stack memory space of the new dependent environment and the transaction service request is completely accepted by the new dependent environment.
7. The environment-dependent changing apparatus according to claim 6, further comprising:
and the generation initialization module is used for generating a stack memory space of the new dependency environment and initializing the new dependency environment.
8. The environment-dependent changing apparatus according to claim 6, wherein the migration module specifically comprises:
the searching and generating submodule is used for searching a synchronizable check point according to the check result and generating synchronizable check point state information;
and the migration submodule is used for migrating the metadata information to the stack memory space of the new dependent environment according to the synchronizable checkpoint state information.
9. The environment-dependent changing apparatus according to claim 6, further comprising:
a second determining module, configured to determine whether all metadata information related to the transaction service request has been migrated to a stack memory space of a new dependency environment.
10. The environment-dependent changing apparatus according to claim 6, wherein the computing module further comprises:
a generating submodule for respectively generating the resource demand value of each transaction service request when the number of the transaction service requests is multiple, generating a resource demand total value according to the resource demand values of all the transaction service requests, generating a data block assignment, generating a resource demand amount according to the resource demand total value and the data block assignment, and the data block assignment KiE { k, n }, wherein k represents the resource size of the data block occupied by the transaction service request, and n represents the resource size of the free data block;
the acquisition submodule is used for acquiring a releasable stack memory space value of the old dependent environment;
and the judging submodule is used for judging whether the total value of the resource demand is greater than the value of the releasable stack memory space of the old dependent environment.
CN201811564455.0A 2018-12-20 2018-12-20 Dependency environment alternation method and device Active CN109669771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811564455.0A CN109669771B (en) 2018-12-20 2018-12-20 Dependency environment alternation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811564455.0A CN109669771B (en) 2018-12-20 2018-12-20 Dependency environment alternation method and device

Publications (2)

Publication Number Publication Date
CN109669771A CN109669771A (en) 2019-04-23
CN109669771B true CN109669771B (en) 2021-02-19

Family

ID=66144526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811564455.0A Active CN109669771B (en) 2018-12-20 2018-12-20 Dependency environment alternation method and device

Country Status (1)

Country Link
CN (1) CN109669771B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741619B (en) * 2009-12-24 2012-05-23 中国人民解放军信息工程大学 Self-curing J2EE application server for intrusion tolerance and self-curing method thereof
US8832390B1 (en) * 2010-07-12 2014-09-09 Vmware, Inc. Online classification of memory pages based on activity level using dynamically adjustable scan rates
CN105740041A (en) * 2016-01-04 2016-07-06 杭州华三通信技术有限公司 Virtual machine online migration method and device
JP2018005576A (en) * 2016-07-01 2018-01-11 富士通株式会社 Live migration program and live migration method
CN107291527B (en) * 2017-05-23 2020-04-03 华为技术有限公司 Pre-copy migration stop pre-judgment method and device
CN108279969A (en) * 2018-02-26 2018-07-13 中科边缘智慧信息科技(苏州)有限公司 Stateful service container thermomigration process based on memory compression transmission

Also Published As

Publication number Publication date
CN109669771A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
US8756591B2 (en) Generating compiled code that indicates register liveness
US10726121B2 (en) Methods and apparatus for improving sandboxed code execution by caching container image templates
US9558023B2 (en) Live application mobility from one operating system level to an updated operating system level and applying overlay files to the updated operating system
US11928489B2 (en) Extension application mechanisms through intra-process operation systems
US11016861B2 (en) Crash recoverability for graphics processing units (GPU) in a computing environment
US10185573B2 (en) Caching based operating system installation
US10318343B2 (en) Migration methods and apparatuses for migrating virtual machine including locally stored and shared data
CN110750336A (en) OpenStack virtual machine memory hot-expanding method
CN112256444B (en) DAG-based service processing method, device, server and storage medium
CN111679860A (en) Distributed information processing method and device
CN114253713A (en) Asynchronous batch processing method and system based on reactivor
JP6385471B2 (en) Migration and remote runtime integration
US10592255B2 (en) Resource-based boot sequence
CN112631994A (en) Data migration method and system
CN109669771B (en) Dependency environment alternation method and device
CN114546581A (en) Service-free container starting method and related equipment
CN116339908A (en) Virtual machine starting method, device, computer equipment and storage medium
US20190018935A1 (en) Techniques of managing licenses of virtual desktops
CN113791873A (en) Virtual machine creating method, computing device and storage medium
US10606681B2 (en) Incremental dump with fast reboot
CN112445587A (en) Task processing method and task processing device
US20230305929A1 (en) Adaptive data mover resource allocation in scalable data protection environment
WO2023138453A1 (en) Container loading method and apparatus
JP2020113244A (en) Rtos application debugging device and method for debugging rtos application
CN107256171B (en) Multi-system installation and switching method and system based on BIOS

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
GR01 Patent grant
GR01 Patent grant