CN108304213A - Run the hot restorative procedure and device of program - Google Patents
Run the hot restorative procedure and device of program Download PDFInfo
- Publication number
- CN108304213A CN108304213A CN201810027334.6A CN201810027334A CN108304213A CN 108304213 A CN108304213 A CN 108304213A CN 201810027334 A CN201810027334 A CN 201810027334A CN 108304213 A CN108304213 A CN 108304213A
- Authority
- CN
- China
- Prior art keywords
- program
- class file
- configuration information
- program class
- data access
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/72—Code refactoring
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of hot restorative procedures and device of operation program, including:According to data access request, query configuration information;Judge whether configuration information includes the update configuration information for the program for providing data access service;Wherein, update configuration information record have by the first program class file replace with it is repaired after the second program class file information;If the determination result is YES, then it is obtained according to update configuration information and loads the second program class file;The executable program of the second program class file is run in operating system with response data access request.The present invention can solve the problems, such as to take in the repair process of operation program in the prior art longer, can greatly shorten the reparation duration of operation program, and realize that process is simple, operation is flexible, to program development and user using all bringing many facilities.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of hot restorative procedure and device of operation program.
Background technology
Currently, when on the line of server-side run program go wrong (such as there are loophole bug for the program file of operation) when,
Since its repair process usually requires to undergo the processes such as development environment, pre- hair ring border and the publication of program successively, exist
Program repair process takes longer problem and (usually more than half an hour, when operation machine is more, can also take hours very
To the more time), it is used to program development and user and all brings inconvenience, while it is also possible to caused to developer larger
Loss of assets and credibility loss.
In view of the above problems, in the prior art by heat deployment technology and hot loading technique come to running program
It is updated into Mobile state.But there are following limitations for heat deployment technology and hot loading technique:Heat deployment technology (such as tomcat
Heat deployment module) usually require to reload entire application, that time-consuming is very nearly the same with the duration of restarting server, not
It is long effectively to solve the problems, such as that operation program reparation takes;And usually there is modification of program and limit larger (example in hot loading technique
Such as Hotswap, only allows amending method body, do not allow to increase new agreement, do not allow new field, method and do not allow to change
Method signature etc. strongly limits the type solved the problems, such as), complicated (such as JRebel and jvm close couplings are installed more for installation
It is complicated), safeguard that not applicable (such as Groovy is generally only used for repairing itself script and ask for inconvenient (such as OSGi) and script
Topic, other scripts are then not suitable for) etc. problems, also can not effectively solve on this basis operation program reparation take compared with
Long problem.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly
State the hot restorative procedure and device of a kind of operation program of problem.
According to an aspect of the invention, there is provided a kind of hot restorative procedure of operation program, including:According to data access
Request, query configuration information;Judge whether configuration information includes the update configuration information for the program for providing data access service;Its
In, update configuration information record have by the first program class file replace with it is repaired after the second program class file information;If
Judging result is yes, then is obtained according to update configuration information and load the second program class file;Second is run in operating system
The executable program of program class file is with response data access request.
Optionally, update configuration information also records and has:Storage road of second program class file in distributed file system
Diameter;
It is obtained according to update configuration information and is further comprised the step of loading the second program class file:
Distributed file system is accessed according to store path, obtains the second program class file;
The second program class file is loaded using program Classloader, generates executable program.
Optionally, the second program class file being stored in distributed file system is ordered according to default naming rule
Name presets naming rule using version information as foundation;
The step of accessing distributed file system according to store path, obtain the second program class file further comprises:
Highest second program class file of version information is searched in distributed file system according to default naming rule.
Optionally, according to data access request, before query configuration information, method further comprises:In the first program
The predeterminated position of class file is inserted into Agent code;Wherein, predeterminated position is identified according to pre-set mark.
According to another aspect of the present invention, a kind of hot repair apparatus for coating of operation program is provided, including:Enquiry module,
For according to data access request, query configuration information;Judgment module, for judging configuration information whether comprising offer data visit
Ask the update configuration information of the program of service;Wherein, update configuration information record, which has, replaces with the first program class file through repairing
The information of the second program class file after multiple;Load-on module, for if the determination result is YES, then being obtained according to update configuration information
And load the second program class file;Run module, the executable program for running the second program class file in operating system
With response data access request.
Optionally, update configuration information also records and has:Storage road of second program class file in distributed file system
Diameter;Load-on module further comprises:Acquiring unit obtains the second journey for accessing distributed file system according to store path
Sequence class file;Loading unit generates executable program for loading the second program class file using program Classloader.
Optionally, the second program class file being stored in distributed file system is ordered according to default naming rule
Name presets naming rule using version information as foundation;Then acquiring unit is further used for:According to default naming rule in distribution
Highest second program class file of version information is searched in file system.
Optionally, device further comprises:Agent is inserted into module, for the predeterminated position in the first program class file
It is inserted into Agent code;Wherein, predeterminated position is identified according to pre-set mark.
Another aspect according to the present invention provides a kind of computing device, including:Processor, memory, communication interface and
Communication bus, processor, memory and communication interface complete mutual communication by communication bus;Memory is for storing extremely
A few executable instruction, executable instruction make the processor execute the corresponding behaviour of hot restorative procedure of above-mentioned operation program
Make.
According to the present invention in another aspect, provide a kind of computer storage media, at least one is stored in storage medium
Executable instruction, executable instruction make processor execute the corresponding operation of hot restorative procedure such as above-mentioned operation program.
In the hot restorative procedure and device of operation program provided by the invention, it can be looked into first according to data access request
Configuration information corresponding with the request is ask, and judges configuration information whether comprising offer data access service according to query result
The update configuration information of program;Wherein, update configuration information record have by the first program class file replace with it is repaired after the
The information of two program class files;If the determination result is YES, then it is obtained according to update configuration information and loads the second program class file;
The executable program of the second program class file is run in operating system with response data access request.It can be seen that of the invention
Corresponding configuration information can be accessed according to data access request, and needs are repaiied according to the update configuration information in configuration information
Multiple program class file carries out quick replacement, substantially reduces the repair time of operation program, realizes that process is simple, operates spirit
It is living, it is used to program development and user and all brings many facilities.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention,
And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field
Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the hot restorative procedure for operation program that the embodiment of the present invention one provides;
Fig. 2 shows a kind of flow charts of the hot restorative procedure of operation program provided by Embodiment 2 of the present invention;
Fig. 3 is to show that server-side internal process provided by Embodiment 2 of the present invention interacts schematic diagram;
Fig. 4 shows a kind of structure diagram of the hot repair apparatus for coating for operation program that the embodiment of the present invention three provides;
Fig. 5 shows a kind of structure diagram of the hot repair apparatus for coating for operation program that the embodiment of the present invention four provides;
Fig. 6 shows a kind of structural schematic diagram for computing device that according to embodiments of the present invention six provide.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Fig. 1 shows a kind of flow chart of the hot restorative procedure for operation program that the embodiment of the present invention one provides.Such as Fig. 1 institutes
Show, this method includes:
Step S110:According to data access request, query configuration information.
Wherein, data access request is the data access request that user terminal is sent to server-side, is used to access server-side
In corresponding data.In this step, it in the data access request received, is not accessed according to data access request directly
Corresponding data, but inquire configuration information corresponding with the data access request.Wherein, above-mentioned configuration information is that dynamic is newer
Configuration information.In practical operation, programmer can change configuration information according to the operating condition of program in configuration file.Specifically
In implementation, the present invention is not construed as limiting the mode of dynamic modification configuration information.
Step S120:Judge whether configuration information includes the update configuration information for the program for providing data access service.
Wherein, update configuration information record have by the first program class file replace with it is repaired after the second program class file
Information.Wherein, the first program class file is that there are the program class files that problem needs to repair.Work as hair in program operation process
When existing above-mentioned first program class file operation is problematic, programmer under line to the problem repaired to obtain it is repaired after the
Two program class files, and in the configuration information of the first program class file record by the first program class file replace with it is repaired after
The second program class file update configuration information.In this step, whether judge in above-mentioned configuration information comprising offer data
The update configuration information for accessing the program of service illustrates that the program of data access service is not necessarily to repair if judging result is no,
That is the first program class file can normal operation, execute step S150;If the determination result is YES, S130 is thened follow the steps.
Step S130:It is obtained according to update configuration information and loads the second program class file.
Specifically, if the judging result in step S120 is yes, illustrate to need the program to providing data access service
Carry out repair.In this step, realize reparation process be specially will load object by the first program class file replace with through
The second program class file after reparation, the specific implementation process is as follows:Before executing this step, due to type 2 programming file
It is previously uploaded to corresponding file system (in specific implementation, the step for executed by programmer), then in this step, from upper
It states and obtains type 2 programming file in file system and it is loaded, generate the executable program of the second program class file
(can be the executable programs such as program code in specific implementation), so that subsequent step (corresponding step S140) is in operating system
The middle above-mentioned executable program of operation.Wherein, the file system for uploading the second program class file can be by those skilled in the art's root
It is selected according to actual conditions, this is not limited by the present invention.The acquisition modes of type 2 programming file can there are many, such as
Version information is added in the name of the second program class file, corresponding type 2 programming file and right is obtained according to version information
It load etc., and the present invention is not construed as limiting the acquisition modes of type 2 programming file.
Step S140:The executable program of the second program class file is run in operating system to ask with response data access
It asks.
Specifically, the executable program generated in operating procedure S130 in operating system, and operation result is returned and is used
Family end makes coming into force for repair procedure to respond the data access request of user terminal transmission.
Step S150:The first program class file to providing data access service loads, and is run in operating system
The executable program of first program class file is with response data access request.
In specific implementation, the process of inquiry, judgement, load and operation in above-mentioned each step can be within several seconds
It completes, the reparation duration of operation program can be greatly reduced, realize to there are the mesh that problem is quickly repaired in operation program
's.It can be seen that in the hot restorative procedure of operation program provided by the invention, it can be accessed and be corresponded to according to data access request
Configuration information, and according to the update configuration information in configuration information to the program class file repaired of needs carry out quick replacement with
Realize the purpose quickly repaired to operation program of problems on line.The present invention can greatly shorten operation program
Reparation duration realizes that process is simple, operation is flexible, is used to program development and user and all brings many facilities.
Fig. 2 shows a kind of flow charts of the hot restorative procedure of operation program provided by Embodiment 2 of the present invention.Fig. 3 is to show
Server-side internal process interaction schematic diagram of the present invention is gone out.Wherein, the program in the present embodiment is run in Aspectj tools,
Special compiler is provided in Aspectj to be used to generate the Class files in accordance with Java byte code specifications.As shown in Fig. 2,
This method includes:
Step S210:It is inserted into Agent code in the predeterminated position of the first program class file, wherein above-mentioned predeterminated position
It is identified according to pre-set mark.
Wherein, the first program class file is to run the program class file to go wrong on line, and for example there is the journeys of loophole bug
Sequence class file etc..In the present embodiment, first the predeterminated position of the first program class file is known according to pre-set mark
Not, then in above-mentioned predetermined position insertion Agent code to generate proxy class corresponding with the first program class file,
In, above-mentioned proxy class is used to trigger each step executed in subsequent step (corresponding step S220- step S260).It is above-mentioned default
Position generally in the method inlet of the first program class file, or can also program class file other positions (according to reality
Depending on the situation of border), this is not limited by the present invention.The concrete form of pre-set mark and Agent code can be by
Those skilled in the art are configured according to actual conditions, and this is not limited by the present invention.
In specific implementation, if the first program class file is ClassA.Then when executing this step, basis is pre-set first
The first program class file of mark pair ClassA in predeterminated position be identified, then above-mentioned predetermined position be inserted into act on behalf of
Program code is to generate the proxy class ClassProxy of ClassA.Wherein, ClassProxy is (right for triggering execution subsequent step
Answer step S220- step S260) in each step.
Step S220:According to data access request, query configuration information.
Wherein, data access request is the data access request that user terminal is sent to server-side, is used to access server-side
In corresponding data.After the data access request for receiving user terminal transmission, proxy class is according to above-mentioned data access request
Corresponding with data access request configuration information (ClassProxy roots in specific implementation are inquired in the configuration module of server-side
According to the data access request received, the configuration information of ClassA is inquired first in the configuration module of server-side).Wherein, on
It is the newer configuration information of dynamic to state configuration information, in practical operation, programmer can according to the operating condition of program there will be
The program of problem restoration information (such as restoration information can be " with ClassA ' replace ClassA " etc. similar informations, wherein
ClassA ' be ClassA it is repaired after sequence class file) be recorded in above-mentioned configuration information.
Wherein, to the mode of dynamic modification configuration information can there are many, such as it is dynamic to configuration information by open source software
State is modified, and the present invention is not construed as limiting the mode of dynamic modification configuration information.
Step S230:Judge whether configuration information includes the update configuration information for the program for providing data access service.
Wherein, update configuration information record have by the first program class file replace with it is repaired after the second program class file
Information.Specifically, when the program of the first program class file operation when something goes wrong, under programmer is online to the above problem do with
Repair obtain it is repaired after the second program class file, and in the configuration information of the first program class file configuration by the first program
Class file replace with it is repaired after the second program class file update configuration information (in specific implementation, update configuration information can
Think similar informations such as " replacing ClassA with ClassA ' ".Wherein, ClassA is program class file of problems, ClassA '
For to the file after being repaired there are problem in ClassA).It can be seen that when there are corresponding updates to match in configuration information
When confidence ceases, then illustrate that the program of data access service is repaired, therefore in this step, for being looked into step S220
The configuration information ask judges whether said comprising above-mentioned update configuration information if judging result is no in above-mentioned configuration information
The program of bright data access service without repairing, i.e. the first program class file can normal operation, execute step S260;If judging knot
Fruit is yes, thens follow the steps 240.
Step S240:Distributed file system is accessed according to store path, obtains the second program class file, and utilize program
Classloader loads the second program class file, generates executable program.
Programmer obtain it is repaired after the second program class file after, further by above-mentioned second program class file upload
To corresponding distributed file system (can be the similar systems such as OSS systems in specific implementation), and by the second program class file
Store path in above-mentioned distributed file system is recorded in the update configuration information of the first program class file.Then in this step
In rapid, realize that the process of reparation is specially:By load object by the first program class file replace with it is repaired after the second program
Class file, detailed process can be executed by following two step:First, it is visited according to the store path recorded in update configuration information
Ask distributed file system to obtain corresponding second program class file (by taking Fig. 3 as an example, if providing the program of data access service
For the first program class file A, is then corresponded to and accessed in distributed file system according to the store path recorded in update configuration information
The second program class file A ');Secondly, the second program class file of acquisition is loaded with life in corresponding load-on module
At executable program.In specific implementation, load-on module can be Classloader, be jvm (Java Virtual
Machine, Java Virtual Machine) file load module.
It wherein, can be according to default naming rule in order to more accurately obtain corresponding second program class file
Second program class file is named.In specific implementation, above-mentioned naming rule is using version information as foundation.If for example, first
Program class file is named as abcd.class, then the second program class file is named as abcd_ { version } .class,
Version is version information (i.e. version number).If version number is 1, the second program class file is named as abcd_1.class;
If version number is 2, second program class file is named as abcd_2.class, etc..Wherein, above-mentioned
Version fields can be supported repeatedly to change, then when searching and obtaining the second program class file, existed according to default naming rule
Highest second program class file of version information is searched in distributed file system, if being named as example, existing simultaneously
The program class file of abcd.class and abcd_1.class then obtains the program class file of abcd_1.class as the second journey
Sequence class file;If existing simultaneously the program class file for being named as abcd_1.class and abcd_2.class, name is obtained
The program class file of abcd_2.class is as the second program class file.Above-mentioned basis states default naming rule and searches the second program
The processing mode of class file can quick and precisely identify and obtain it is newest it is repaired after the second program class file, complete it is to be repaired
Multiple program class file and it is repaired after program class file between flexible replacement.
Step S250:The executable program of the second program class file is run in operating system to ask with response data access
It asks.
Specifically, the executable program for obtaining and being generated in operating procedure S240, and operation result is returned into user terminal, with
The data access request that user terminal is sent is responded, coming into force for repair procedure is made.
Step S260:The first program class file to providing data access service loads, and is run in operating system
The executable program of first program class file is with response data access request.
In specific implementation, the process that inquiry, judgement, load and operation in above-mentioned each step come into force can be at several seconds
Within complete, can greatly reduce operation program reparation duration, realize to operation program in there are problems quickly to be repaired
Purpose.Also, the load mechanism of class in the static agent function and program of aspectj can be combined by the present embodiment,
It can not only realize the reparation to arbitrary Java files, and only have one kind since it executes logic, improve logic execution
Safety, risk is relatively low.It can be seen that the hot restorative procedure of operation program provided by the invention can not only greatly shorten
Run the repair time of program, realize that process is simple, operation is flexible, and there is higher safety, to program development with
And user uses and brings many facilities.
Fig. 4 shows a kind of structure diagram of the hot repair apparatus for coating for operation program that the embodiment of the present invention three provides.Such as Fig. 4
Shown, which includes:Enquiry module 41, judgment module 42, load-on module 43 and operation module 44.
Enquiry module 41 is used for according to data access request, query configuration information.
Judgment module 42 is used to judge configuration information, and whether confidence is matched in the update comprising the program for providing data access service
Breath;Wherein, update configuration information record have by the first program class file replace with it is repaired after the second program class file letter
Breath.
Load-on module 43 according to update configuration information for if the determination result is YES, then obtaining and loading the second program class text
Part generates corresponding executable program;If judging result is no, to provide data access service the first program class file into
Row load, generates corresponding executable program.
Operation module 44 in operating system for running above-mentioned executable program with response data access request.
Fig. 5 shows a kind of structure diagram of the hot repair apparatus for coating for operation program that the embodiment of the present invention four provides.This reality
The program applied in example is run in Aspectj tools, is abided by due to being provided with special compiler in Aspectj for generating
The Class files of Java byte code specifications, therefore the operating file in the present embodiment is Class files.As shown in figure 5, should
Device includes:Enquiry module 51, judgment module 52, load-on module 53, operation module 54 and Agent are inserted into module 55.
Wherein, load-on module 53 further comprises:Acquiring unit 531 and loading unit 532.
Enquiry module 51 is used for according to data access request, query configuration information.
Judgment module 52 is used to judge configuration information, and whether confidence is matched in the update comprising the program for providing data access service
Breath;Wherein, update configuration information record have by the first program class file replace with it is repaired after the second program class file letter
Breath.Also, update configuration information, which also records, to be had:Store path of second program class file in distributed file system.
Load-on module 53 according to update configuration information for if the determination result is YES, then obtaining and loading the second program class text
Part generates corresponding executable program;If judging result is no, to provide data access service the first program class file into
Row load, generates corresponding executable program.
Acquiring unit 531 is used to access distributed file system according to store path, obtains the second program class file.Its
In, the second program class file being stored in distributed file system is named according to default naming rule, presets name rule
Then using version information as foundation.
Loading unit 532 is used to load the second program class file using program Classloader, generates executable program.
Operation module 54 in operating system for running above-mentioned executable program with response data access request.
Agent is inserted into module 55 and is used to be inserted into Agent code in the predeterminated position of the first program class file;Its
In, predeterminated position is identified according to pre-set mark.
The concrete structure and operation principle of above-mentioned modules can refer to the description of corresponding steps in embodiment of the method, herein
It repeats no more.
It can be seen that in the hot repair compound subtraction unit of operation program provided by the invention, the implementation procedure of modules
Can be completed within several seconds, can greatly reduce operation program reparation duration, realize to operation program in there are problem into
The purpose that row is quickly repaired.Also, the present invention can also be by the load mechanism of class in the static agent function and program of aspectj
It is combined, can not only realize the reparation to arbitrary Java files, and only have one kind since it executes logic, improve
The safety that logic executes, risk are relatively low.It can be seen that the hot restorative procedure of operation program provided by the invention can not only
The repair time of operation program is greatly shortened, realizes that process is simple, operation is flexible, and there is higher safety, gives journey
Sequence is developed and user uses and brings many facilities.
The embodiment of the present application five provides a kind of nonvolatile computer storage media, the computer storage media storage
There are an at least executable instruction, the computer executable instructions to can perform the heat of the operation program in above-mentioned any means embodiment
Restorative procedure.
Executable instruction specifically can be used for so that processor executes following operation:
According to data access request, query configuration information;
Judge whether configuration information includes the update configuration information for the program for providing data access service;Wherein, update is matched
Confidence breath record have by the first program class file replace with it is repaired after the second program class file information;
If the determination result is YES, then it is obtained according to update configuration information and loads the second program class file;
The executable program of the second program class file is run in operating system with response data access request.
In a kind of optional mode, update configuration information, which also records, to be had:Second program class file is in distributed field system
Store path in system;
Then executable instruction is further used for so that processor executes following operation:
Distributed file system is accessed according to store path, obtains the second program class file;
The second program class file is loaded using program Classloader, generates executable program.
In a kind of optional mode, the second program class file in distributed file system is stored according to default name
Rule is named, and presets naming rule using version information as foundation;
Then executable instruction is further used for so that processor executes following operation:
Highest second program class file of version information is searched in distributed file system according to default naming rule.
In a kind of optional mode, executable instruction is additionally operable to so that processor executes following operation:
It is inserted into Agent code in the predeterminated position of the first program class file;Wherein, predeterminated position is according to pre-setting
Mark be identified.
Fig. 6 shows a kind of structural schematic diagram of according to embodiments of the present invention six computing device, present invention specific implementation
Example does not limit the specific implementation of computing device.
As shown in fig. 6, the computing device may include:Processor (processor) 602, communication interface
(Communications Interface) 604, memory (memory) 606 and communication bus 608.
Wherein:
Processor 602, communication interface 604 and memory 606 complete mutual communication by communication bus 608.
Communication interface 604, for being communicated with the network element of miscellaneous equipment such as client or other servers etc..
Processor 602 can specifically execute the hot restorative procedure embodiment of above-mentioned operation program for executing program 610
In correlation step.
Specifically, program 610 may include program code, which includes computer-managed instruction.
Processor 602 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that computing device includes can be same type of processor, such as one or more CPU;Also may be used
To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 606, for storing program 610.Memory 606 may include high-speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 610 specifically can be used for so that processor 602 executes following operation:
According to data access request, query configuration information;
Judge whether configuration information includes the update configuration information for the program for providing data access service;Wherein, update is matched
Confidence breath record have by the first program class file replace with it is repaired after the second program class file information;
If the determination result is YES, then it is obtained according to update configuration information and loads the second program class file;
The executable program of the second program class file is run in operating system with response data access request.
In a kind of optional mode, update configuration information, which also records, to be had:Second program class file is in distributed field system
Store path in system;
Then program 610 is further used for so that processor 602 executes following operation:
Distributed file system is accessed according to store path, obtains the second program class file;
The second program class file is loaded using program Classloader, generates executable program.
In a kind of optional mode, the second program class file in distributed file system is stored according to default name
Rule is named, and presets naming rule using version information as foundation;
Then program 610 is further used for so that processor 602 executes following operation:According to default naming rule in distribution
Highest second program class file of version information is searched in file system.
In a kind of optional mode, program 610 is additionally operable to so that processor 602 executes following operation:
It is inserted into Agent code in the predeterminated position of the first program class file;Wherein, predeterminated position is according to pre-setting
Mark be identified.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect
Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors
Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice
In the hot repair apparatus for coating of microprocessor or digital signal processor (DSP) to realize operation program according to the ... of the embodiment of the present invention
Some or all components some or all functions.The present invention is also implemented as executing side as described herein
Some or all equipment or program of device (for example, computer program and computer program product) of method.It is such
Realize that the program of the present invention can may be stored on the computer-readable medium, or can be with the shape of one or more signal
Formula.Such signal can be downloaded from internet website and be obtained, and either be provided on carrier signal or with any other shape
Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch
To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame
Claim.
Claims (10)
1. a kind of hot restorative procedure of operation program comprising:
According to data access request, query configuration information;
Judge whether the configuration information includes the update configuration information for the program for providing data access service;Wherein, it is described more
New configuration information record have by the first program class file replace with it is repaired after the second program class file information;
If the determination result is YES, then it is obtained according to the update configuration information and loads second program class file;
The executable program of the second program class file is run in operating system to respond the data access request.
2. according to the method described in claim 1, wherein, the update configuration information, which also records, to be had:The second program class text
Store path of the part in distributed file system;
It is described to be obtained according to update configuration information and further comprised the step of loading second program class file:
The distributed file system is accessed according to the store path, obtains second program class file;
Second program class file is loaded using program Classloader, generates executable program.
3. according to the method described in claim 2, wherein, be stored in the second program class file in distributed file system according to
Default naming rule is named, and the default naming rule is using version information as foundation;
It is described that the distributed file system is accessed according to the store path, the step of obtaining second program class file into
One step includes:
The highest second program class text of version information is searched in the distributed file system according to the default naming rule
Part.
4. according to any methods of claim 1-3, wherein described according to data access request, query configuration information
Before, the method further includes:It is inserted into Agent code in the predeterminated position of first program class file;Wherein,
The predeterminated position is identified according to pre-set mark.
5. a kind of hot repair apparatus for coating of operation program comprising:
Enquiry module, for according to data access request, query configuration information;
Judgment module, for judging the configuration information, whether confidence is matched in the update comprising the program for providing data access service
Breath;Wherein, it is described update configuration information record have by the first program class file replace with it is repaired after the second program class file
Information;
Load-on module, for if the determination result is YES, then being obtained according to the update configuration information and loading second program
Class file;
Module is run, for running the executable program of the second program class file in operating system to respond the data access
Request.
6. device according to claim 5, wherein the update configuration information, which also records, to be had:The second program class text
Store path of the part in distributed file system;The load-on module further comprises:
Acquiring unit obtains the second program class text for accessing the distributed file system according to the store path
Part;
Loading unit generates executable program for loading second program class file using program Classloader.
7. device according to claim 6, wherein be stored in the second program class file in distributed file system according to
Default naming rule is named, and the default naming rule is using version information as foundation;
Then the acquiring unit is further used for:According to the default naming rule version is searched in the distributed file system
Highest second program class file of this information.
8. according to any devices of claim 5-7, wherein described device further comprises:Agent is inserted into module,
It is inserted into Agent code for the predeterminated position in first program class file;Wherein, the predeterminated position is according in advance
The mark of setting is identified.
9. a kind of computing device, including:Processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory makes processor execute such as claim 1- for storing an at least executable instruction, the executable instruction
The corresponding operation of hot restorative procedure of operation program described in any one of 4.
10. a kind of computer storage media, an at least executable instruction, the executable instruction are stored in the storage medium
Make the corresponding operation of hot restorative procedure of operation program of the processor execution as described in any one of claim 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810027334.6A CN108304213A (en) | 2018-01-11 | 2018-01-11 | Run the hot restorative procedure and device of program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810027334.6A CN108304213A (en) | 2018-01-11 | 2018-01-11 | Run the hot restorative procedure and device of program |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108304213A true CN108304213A (en) | 2018-07-20 |
Family
ID=62868943
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810027334.6A Pending CN108304213A (en) | 2018-01-11 | 2018-01-11 | Run the hot restorative procedure and device of program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108304213A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933356A (en) * | 2019-03-26 | 2019-06-25 | 杭州云英网络科技有限公司 | The hot replacement method of remote agent class and device |
CN110134432A (en) * | 2019-04-19 | 2019-08-16 | 平安科技(深圳)有限公司 | The bug restorative procedure of application, device, computer equipment |
CN110286936A (en) * | 2019-06-27 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Hot restorative procedure, device, electronic equipment and storage medium |
CN110633099A (en) * | 2019-09-05 | 2019-12-31 | 北京无限光场科技有限公司 | Application program repairing method, device, equipment and readable medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771762A (en) * | 2009-01-06 | 2010-07-07 | 北京邮电大学 | Method and system for dynamically loading services in service system |
US20120131562A1 (en) * | 2010-11-22 | 2012-05-24 | Samsung Electronics Co., Ltd. | Method and apparatus for upgrading virtual machine in a portable terminal |
CN102819438A (en) * | 2011-06-08 | 2012-12-12 | 金蝶软件(中国)有限公司 | Hot-load method and device and information system |
CN106055368A (en) * | 2016-06-02 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Application updating method and device |
CN106095502A (en) * | 2016-06-13 | 2016-11-09 | 北京奇虎科技有限公司 | Hot restorative procedure, device, server and the system of a kind of Android application |
CN106708494A (en) * | 2015-11-18 | 2017-05-24 | 北京神州泰岳软件股份有限公司 | JAR upgrading method and apparatus |
-
2018
- 2018-01-11 CN CN201810027334.6A patent/CN108304213A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771762A (en) * | 2009-01-06 | 2010-07-07 | 北京邮电大学 | Method and system for dynamically loading services in service system |
US20120131562A1 (en) * | 2010-11-22 | 2012-05-24 | Samsung Electronics Co., Ltd. | Method and apparatus for upgrading virtual machine in a portable terminal |
CN102819438A (en) * | 2011-06-08 | 2012-12-12 | 金蝶软件(中国)有限公司 | Hot-load method and device and information system |
CN106708494A (en) * | 2015-11-18 | 2017-05-24 | 北京神州泰岳软件股份有限公司 | JAR upgrading method and apparatus |
CN106055368A (en) * | 2016-06-02 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Application updating method and device |
CN106095502A (en) * | 2016-06-13 | 2016-11-09 | 北京奇虎科技有限公司 | Hot restorative procedure, device, server and the system of a kind of Android application |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933356A (en) * | 2019-03-26 | 2019-06-25 | 杭州云英网络科技有限公司 | The hot replacement method of remote agent class and device |
CN109933356B (en) * | 2019-03-26 | 2022-06-03 | 杭州云毅网络科技有限公司 | Remote proxy hot replacement method and device |
CN110134432A (en) * | 2019-04-19 | 2019-08-16 | 平安科技(深圳)有限公司 | The bug restorative procedure of application, device, computer equipment |
CN110134432B (en) * | 2019-04-19 | 2024-09-17 | 平安科技(深圳)有限公司 | Bug repairing method and device for application and computer equipment |
CN110286936A (en) * | 2019-06-27 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Hot restorative procedure, device, electronic equipment and storage medium |
CN110633099A (en) * | 2019-09-05 | 2019-12-31 | 北京无限光场科技有限公司 | Application program repairing method, device, equipment and readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108304213A (en) | Run the hot restorative procedure and device of program | |
US8561024B2 (en) | Developing software components and capability testing procedures for testing coded software component | |
US20180246803A1 (en) | Targeted software testing | |
US8856724B2 (en) | Systems and methods for incremental software development | |
US20160306737A1 (en) | Automated error checking system for a software application and method therefor | |
US20170010889A1 (en) | Continuous integration with reusable context aware jobs | |
CN105204916B (en) | Project process operation method and device based on environmental variance | |
US20080320071A1 (en) | Method, apparatus and program product for creating a test framework for testing operating system components in a cluster system | |
US10248551B2 (en) | Selective object testing in a client-server environment | |
US9753750B2 (en) | Global feature library useable with continuous delivery | |
CN104536870B (en) | A kind of process monitoring method and device | |
Vivian et al. | Rapid and efficient analysis of 20,000 RNA-seq samples with Toil | |
Lier et al. | The cognitive interaction toolkit–improving reproducibility of robotic systems experiments | |
US20150242395A1 (en) | Systems and methods for equipment sharing | |
US8397217B2 (en) | Integrating templates into tests | |
CN117251298B (en) | Pipeline task cyclic execution method, system, equipment and medium | |
US9760364B2 (en) | Checks for software extensions | |
CN110674024B (en) | Electronic equipment integrated test system and method thereof | |
US20170083306A1 (en) | Download of a package of code | |
CN109144524B (en) | Version release method of subject game on education platform and electronic equipment | |
CN104778091B (en) | The operation method and device of application program | |
Thomas et al. | Simulation factory: Taming application configuration and workflow on high-end resources | |
US7152189B2 (en) | Testing distributed services by using multiple boots to timeshare a single computer | |
CN113377468B (en) | Script execution method and device, electronic equipment and storage medium | |
JP5404464B2 (en) | Computer-implemented method, computer-readable storage medium and system for performing distributed runtime diagnostics in a hierarchical parallel environment including a plurality of processing elements |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180720 |