CN110188008A - Job scheduling main/standby switching method, device, computer equipment and storage medium - Google Patents

Job scheduling main/standby switching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110188008A
CN110188008A CN201910372318.5A CN201910372318A CN110188008A CN 110188008 A CN110188008 A CN 110188008A CN 201910372318 A CN201910372318 A CN 201910372318A CN 110188008 A CN110188008 A CN 110188008A
Authority
CN
China
Prior art keywords
information
default
scheduling
standby
host
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.)
Granted
Application number
CN201910372318.5A
Other languages
Chinese (zh)
Other versions
CN110188008B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910372318.5A priority Critical patent/CN110188008B/en
Publication of CN110188008A publication Critical patent/CN110188008A/en
Application granted granted Critical
Publication of CN110188008B publication Critical patent/CN110188008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations

Abstract

The invention discloses a kind of job scheduling main/standby switching method, device, computer equipment and storage mediums, which comprises with prefixed time interval, obtains the attribute information of default finger daemon, and carries out security inspection to attribute information;If the result of security inspection is abnormal, the equipment state of the default standby host of acquisition;If the equipment state of default standby host is stand-by state, default standby host is sent by the instruction of default active-standby switch;Break-off process, and save the scheduling information in host and operation stream information;If receiving the confirmation message that default standby host returns, default standby host is sent by scheduling information and operation stream information, so that default standby host continues to execute job scheduling task;Power cut-off process, and stand-by state is set by the equipment state of local terminal.Technical solution of the present invention solves in job scheduling main preparation system handoff procedure, and switching efficiency is low, influences the problem of job scheduling task normally executes.

Description

Job scheduling main/standby switching method, device, computer equipment and storage medium
Technical field
The present invention relates to field of information processing more particularly to job scheduling main/standby switching method, device, computer equipment and Storage medium.
Background technique
In the enterprise information management of modernization, businesslike job scheduling system plays an important role.For example, Tws system System is a kind of public scheduling system of prevalence.Wherein, Tws, i.e. Tivoli Workload Scheduler, enterprise's job scheduling Software is the business software that a International Business Machine Corporation (IBM) provides.
However, in practical applications, since machine hardware failure, system failure, system core process missing etc. can not be pre- The reason of knowing, and operation is caused to be unable to normal consistency, so that operation maintenance personnel needs switch between standby machine, to ensure to make Industry is dispatched system and is operated normally.
In the method for tradition switching, generally use artificial or semi-artificial mode, to the master machine of the scheduling system with Standby machine switches over, i.e., is manually entered switching command by operation maintenance personnel, or carry out by way of executing default script, The time is relatively long by its RTO (Recovery Time Object, recovery time target), to impact to job scheduling. Stringent field is required to scheduling timeliness in electric business, logistics, financial transaction etc., traditional approach has not been able to satisfy timeliness gradually and has wanted It asks.
Therefore, the scheduling system switching method of one kind efficiently, inexpensive is found as those skilled in the art's urgent need to resolve The problem of.
Summary of the invention
The embodiment of the present invention provides a kind of job scheduling main/standby switching method, device, computer equipment and storage medium, with It solves in job scheduling main preparation system handoff procedure, switching efficiency is low, influences the problem of job scheduling task normally executes.
A kind of job scheduling main/standby switching method, comprising:
With prefixed time interval, the attribute information of default finger daemon is obtained, and safety is carried out to the attribute information It checks, obtains security inspection result;
If the security inspection result is abnormal, the equipment state of the default standby host of acquisition;
If the equipment state of the default standby host is stand-by state, send the instruction of default active-standby switch to described default Standby host;
Break-off process, and scheduling information and operation stream information are obtained from the progress of work, wherein the scheduling Information and the operation stream information are used for executive job scheduling task;
Save the scheduling information and the operation stream information;
If receiving the confirmation message that the default standby host returns, the scheduling information and the operation stream information are sent out It is sent to the default standby host, so that the default standby host continues to execute the job scheduling task;
Terminate the progress of work, and sets the stand-by state for the equipment state of local terminal.
A kind of job scheduling active-standby switch device, comprising:
Detection module for obtaining the attribute information of default finger daemon with prefixed time interval, and is believed the attribute Breath carries out security inspection, obtains security inspection result;
Handover preparation module, if for the security inspection result being abnormal, the equipment state of the default standby host of acquisition;
Instruction sending module, if the equipment state for the default standby host is stand-by state, by default active-standby switch Instruction is sent to the default standby host;
Data obtaining module is used for break-off process, and scheduling information and job stream are obtained from the progress of work Information, wherein the scheduling information and the operation stream information are used for executive job scheduling task;
Information preservation module, for saving the scheduling information and the operation stream information;
Information sending module, if the confirmation message returned for receiving the default standby host, by the scheduling information It is sent to the default standby host with the operation stream information, so that the default standby host continues to execute the job scheduling task;
Module is completed in switching, is set as described standby for terminating the progress of work, and by the equipment state of local terminal Use state.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize above-mentioned job scheduling active-standby switch side when executing the computer program Method.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter Calculation machine program realizes above-mentioned job scheduling main/standby switching method when being executed by processor.
Above-mentioned job scheduling main/standby switching method, device, computer equipment and storage medium are obtained with prefixed time interval The attribute information of default finger daemon is taken, and security inspection is carried out to attribute information, that is, with the granularity of process level, to host Operating status is monitored in real time, makes it possible to find host exception in time, and make a response;With the detection master based on application layer The mode of machine exception is compared, and the inspection of process level can be with look-ahead to host exception, and enters active-standby switch as early as possible, thus most Limits avoid active-standby switch influence caused by job scheduling;After detecting host exception, suspend the work in host Make process, saves scheduling information and operation stream information in host, and after receiving the confirmation message that default standby host returns, it will Scheduling information and operation stream information are sent to default standby host, and power cut-off process, and host equipment state is set as stand-by state, That is, scheduling information and operation stream information in progress to host and to be processed saves, and be sent to preset it is standby Machine, to continue to execute job scheduling task for presetting standby host, so that energy seamless interfacing between standby machine, does not influence job scheduling The execution of task improves active-standby switch efficiency.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is an application environment schematic diagram of job scheduling main/standby switching method in one embodiment of the invention;
Fig. 2 is the flow chart of job scheduling main/standby switching method in one embodiment of the invention;
Fig. 3 is the flow chart for sending operation stream information in one embodiment of the invention default standby host;
Fig. 4 is the flow chart of step S1 in job scheduling main/standby switching method in one embodiment of the invention;
Fig. 5 is the flow chart of step S4 in job scheduling main/standby switching method in one embodiment of the invention;
Fig. 6 is the schematic diagram of job scheduling active-standby switch device in one embodiment of the invention;
Fig. 7 is the schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Job scheduling main/standby switching method provided by the invention, can be applicable in the application environment such as Fig. 1, wherein host It is that the server of job scheduling service is provided for user;Default standby host is the standby server of host, is provided similarly for user Job scheduling service;Host and default standby host quantitatively can be one-to-one or one-to-many relationship;Host and default standby host Between by network connection, network can be cable network or wireless network.Job scheduling provided in an embodiment of the present invention is active and standby Switching method is applied to host.
In one embodiment, as shown in Fig. 2, providing a kind of job scheduling main/standby switching method, specific implementation flow Include the following steps:
S1: with prefixed time interval, the attribute information of default finger daemon is obtained, and safety inspection is carried out to attribute information It looks into, obtains security inspection result.
It is that user provides when job scheduling services the process for including that default finger daemon, which is host,.Wherein, job scheduling takes Business refers to as unit of operation, the volume of data such as is submitted, uploaded, replicated, backed up, restored, print grasp to user data Make;User typically refers to multi-user, i.e., for multi-user simultaneously to host data request service, host generates corresponding operation tune for it Degree service.It is to be appreciated that job scheduling service is demand according to each operation to system hardware and software resource, each operation The factors such as duration are executed, by host work organization to be treated at a data structure, are closed so that being formed to rely between operation System, the process then sequentially executed.
In process level, job scheduling service can be decomposed into several process collaboration processing numbers of users in running background According to guarantee that job scheduling can be executed smoothly.
The attribute information of default finger daemon, in particular to the relevant information in progress information table, including but not limited into The mark of journey, shared memory space, operating status, sleep state, deadlock state etc..Wherein, progress information table is in system Core is the data link table of process distribution, with the relevant information of storage process in the process of running.
Security inspection is carried out to attribute, refers to standard value when operating normally according to host, to the attribute value of each attribute Consistency check is carried out, so that it is guaranteed that default finger daemon is in normal operating conditions.For example, host is carrying out operation for user When scheduling, there can be no deadlock states or corpse state etc. for each default finger daemon.
With prefixed time interval, i.e., according to the needs of practical application, the category of default finger daemon is obtained at regular intervals Property information, and carry out security inspection.Wherein, the unit of prefixed time interval can be millisecond or second.
Specifically, while host-initiated job scheduling, new process is established by host, and using the process as tracking Person (tracker) process, meanwhile, for follower's process, task of timer is set.Wherein, task of timer includes with certain time Interval, obtains the attribute information of default finger daemon, and attribute information is compared with the predetermined normal level of attribute information, from And obtain security inspection result.That is, host establish process and default finger daemon between carry out interprocess communication (IPC, InterProcess Communication), the concrete mode of interprocess communication includes pipeline, message queue, semaphore, shares Storage etc., herein with no restrictions.
S2: if security inspection result is abnormal, the equipment state of the default standby host of acquisition.
Security inspection result is exception, that is, represents host and play pendulum as the job scheduling service that user provides In.Security inspection result is abnormal situation, and including but not limited to process deadlock, default finger daemon missing, host are restarted Job scheduling service normally cannot start or restore afterwards.
Default standby host is to be similarly user to provide the server of job scheduling service.
Equipment state, represents whether default standby host is in ready state, and continues as user and provide job scheduling service. Equipment state mainly includes stand-by state, ready state and not-ready state.Wherein, stand-by state refer to default standby host be in In machine, active-standby switch is waited for;Ready state refers to that default standby host can carry out active-standby switch;Not-ready state refers to pre- Equipment machine is not ready to finish, and not can be carried out active-standby switch still.
Specifically, it can be communicated by socket (socket) between host and default standby host, that is, if safety is examined The fruit that comes to an end is exception, then host can initiate socket communication to default standby host, obtains the equipment state of default standby host;Default Standby host end, socket service routine will respond the communication request of host, and the equipment state of default standby host is returned to host.
S3: if the equipment state of default standby host is stand-by state, default standby host is sent by the instruction of default active-standby switch.
Stand-by state can be the specific character string made an appointment between host and default standby host, for example, " Standby " Deng.
Default active-standby switch instruction, is to carry out the information code of active-standby switch for enabling default standby host.Default active-standby switch Instruction can be the specific character string made an appointment between host and default standby host, for example, " Action " etc..
Specifically, when the equipment state of default standby host is stand-by state, it is logical that host can initiate socket to default standby host The instruction of default active-standby switch is sent default standby host by letter.
It is corresponding, at default standby host end, when default standby host is after receiving the instruction of default active-standby switch, will to from Body initializes, to reach ready state.Wherein, initialization operation refers to initiating task dispatch service, enables and preset Finger daemon etc..
S4: break-off process, and scheduling information and operation stream information are obtained from the progress of work, wherein scheduling information Executive job scheduling task is used for operation stream information.
The progress of work is process relevant to job scheduling in host system memory.
During job scheduling, host is executed as unit of job scheduling task;Job scheduling task is mainly wrapped Include scheduling information and operation stream information two parts.
Wherein, scheduling information is sequencing queue of the host to job stream execution sequence during job scheduling.Scheduling letter Breath includes but is not limited to, and current work scheduler task is performed before and/or the id of job scheduling task later (identification, identification information), the subtask id of current work scheduler task and subtask execute sequence Deng.
Operation stream information is mainly user data.For example, the data that user reads or is stored in from database, different The data etc. exchanged between system.
Specifically, in host side, the progress of work can be suspended with calling system function kill (), and passes through follower IPC between process and the progress of work is communicated, and scheduling information and operation are obtained from progress information table corresponding to the progress of work Stream information.
S5: scheduling information and operation stream information are saved.
It specifically, can will be in scheduling information and job stream information preservation to mainframe memory.Wherein, mainframe memory packet Include temporary buffer, the disk storage space etc. in memory.
S6: it if receiving the confirmation message that default standby host returns, sends scheduling information and operation stream information to default Standby host, so that default standby host continues to execute job scheduling task.
The confirmation message that default standby host returns, i.e., when default standby host reaches ready state, what default standby host was sent to host It can start the information code of active-standby switch.Similar with the instruction of default active-standby switch, confirmation message can be host and pre- equipment The specific character string made an appointment between machine, for example, " Ready " etc..
Specifically, when host receives the confirmation message that default standby host returns, then scheduling information and job stream can be believed Breath is sent to default standby host in a manner of socket communication.Corresponding, at default standby host end, default standby host is by basis Scheduling information and operation stream information establish the progress of work, to realize the purpose for continuing to execute job scheduling task.
S7: power cut-off process, and stand-by state is set by the equipment state of local terminal.
Specifically, host can call kill () function directly to kill the progress of work, discharge the memory headroom of host, together When, stand-by state is set by the equipment state of local terminal.It is to be appreciated that at this point, the role of host and default standby host carries out It exchanges, thus the active-standby switch for the scheduling that fulfils assignment.
In the present embodiment, with prefixed time interval, obtain the attribute information of default finger daemon, and to attribute information into Row security inspection, that is, with the granularity of process level, operational state of mainframe is monitored in real time, makes it possible to find master in time Machine is abnormal, and makes a response;Compared with the mode of the detection host exception based on application layer, the inspection of process level can be pre- in advance Host exception is measured, and enters active-standby switch as early as possible, to avoid active-standby switch shadow caused by job scheduling to greatest extent It rings;After detecting host exception, suspend the progress of work in host, saves scheduling information and job stream letter in host Breath, and after receiving the confirmation message that default standby host returns, default standby host is sent by scheduling information and operation stream information, and Host equipment state is set as stand-by state, that is, tune in progress to host and to be processed by power cut-off process Degree information and operation stream information are saved, and are sent to default standby host, to continue to execute job scheduling times for presetting standby host Business improves active-standby switch efficiency so that energy seamless interfacing between standby machine, does not influence the execution of job scheduling task.
Further, in one embodiment, the another of default standby host is sent by operation stream information as shown in figure 3, realizing One embodiment, specifically, for step S5, i.e. preservation scheduling information and operation stream information, including such as step:
S51: detection scheduling information and operation stream information the space occupied size.
Specifically, scheduling information and operation stream information first can be saved in disk storage space by host in the form of a file File, for example, being saved by dump () function to scheduling information and operation stream information;Then it is obtained by df () function Space size shared by file represents scheduling information and operation stream information the space occupied size.
S52: if scheduling information and operation stream information the space occupied size are more than preset threshold, job stream letter is saved Breath.
Preset threshold influences pre- equipment for judging whether scheduling information and operation stream information the space occupied size reach The stage of machine response speed.
That is, host needs to re-send to default standby host first by after scheduling information and job stream information preservation;If scheduling information It is more than preset threshold with operation stream information the space occupied size, then host needs, which take a long time, is saved, to make It obtains after the confirmation message that default standby host returns reaches, cannot still carry out active-standby switch immediately, and then influence the speed of active-standby switch Degree.
Simultaneously as during active-standby switch, if can trigger fallback mechanism after the data processing failure of application layer, make Standby host must be preset and restart job scheduling service according to default job processing flow, it can regenerate scheduling information;Therefore, if Scheduling information and operation stream information the space occupied size are more than preset threshold, then only save operation stream information, cast out scheduling letter Breath is conducive to save host memory space, accelerates the process for sending operation stream information to default standby host.
Wherein, job processing flow is preset, is defined by application layer, the business for being responsible for executing is serviced by job scheduling and is patrolled Volume.
Specifically, it is unit that preset threshold, which can be MB (Mbytes) or GB (gigabytes), for example, if preset threshold is 1GB, scheduling information and operation stream information the space occupied size are 1.5GB, then the space size is more than preset threshold, host side Job stream information is only saved, specific implementation process is identical as step S5, and details are not described herein again.
Also, it on the basis of the preservation operation stream information that step S51 to step S2 is realized, for step S6, even connects The confirmation message that default standby host returns is received, then sends default standby host for scheduling information and operation stream information, including walk as follows It is rapid:
S61: if receiving the confirmation message that default standby host returns, default standby host is sent by operation stream information.
Specifically, when the confirmation message for receiving default standby host return, default standby host only is sent by operation stream information, The specific implementation process of transmission is identical as step S6, and details are not described herein again.
In the present embodiment, according to big between scheduling information and operation stream information the space occupied size and preset threshold Small relationship, it is determined whether need to send scheduling information to default standby host;If scheduling information and operation stream information the space occupied Size is more than preset threshold, then only saves and send operation stream information, can save the memory space of host, reduce between active and standby The data volume for needing to transmit, speeding up data transmission process complete active-standby switch so that default standby host be allowed faster to enter working condition Process.
Further, in one embodiment, as shown in figure 4, attribute information includes number of processes and process identity information, into Number of passes amount is the quantity of the default finger daemon currently operated normally, and each default finger daemon respectively corresponds a process identification (PID) Information, process identity information are used for its corresponding default finger daemon of unique identification.For step S1, i.e., to the attribute information Security inspection is carried out, obtains security inspection as a result, specifically comprising the following steps:
S11: number of processes and preset quantity are subjected to comparison of coherence, and by process identity information and preset mark letter Breath carries out comparison of coherence.
Preset quantity in the case that job scheduling operates normally that is, in host, presets the total quantity of finger daemon.
Default identification information is the mark of each default finger daemon in host in the case where job scheduling normal operation Information specifically can be the default process name for guarding progress.
In one embodiment, default finger daemon may include 7 processes, be netman (host process) respectively, JOBMananger (dynamic job control process), writer (main field communication process), mailman (internal communication process), Batchman (executive plan associated process), jobman (operation is related), monman (monitoring is related).
Specifically, host side can obtain the process of the default finger daemon run in current memory by top () function Then the process identity information of quantity and each process is screened according to preset quantity and default identification information.
S12: if number of processes is equal with preset quantity, and process identity information is consistent with default identification information, then pacifies Full property inspection result is normal.
Specifically, it if the number of processes for the default finger daemon being currently running is equal with preset quantity, and presets The process identity information of finger daemon and default identification information correspond, then gained security inspection result is normal.
S13: if number of processes is unequal with preset quantity, or there are at least one process identity informations and default mark Information is inconsistent, then security inspection result is abnormal.
Specifically, if the number of processes and preset quantity of the default finger daemon being currently running are unequal, or it is pre- If the process identity information of finger daemon have it is any one or more not corresponding with default identification information, then gained security inspection It as a result is abnormal.
In the present embodiment, according to the preset quantity of default finger daemon and default identification information in host memory into Cheng Jinhang screening obtains security inspection as a result, the operating status of default finger daemon more simple, fast can be obtained.
Further, in one embodiment, as shown in figure 5, being directed to step S4, i.e. break-off process, and from work into Scheduling information and operation stream information are obtained in journey, are specifically comprised the following steps:
S41: the job identification information in the progress of work is obtained.
Job identification information is for unique identification one data structure as unit of operation.It is to be appreciated that one Complicated operation may need multiple processes collaborative works to complete.
For example, such as " jc01 " identifies netman (host process), " jc02 " identifies JOBMananger (dynamic job control Process processed), " jc03 " identifies writer (main field communication process), and " jc04 " identifies mailman (internal communication process), " jc05 " It identifies batchman (executive plan associated process), " jc06 " identifies jobman (operation is related) and " jc07 " identifies monman (monitoring is related).It is to be appreciated that the operation such as the data for multi-user are submitted, duplication, backup, it can be common by several processes It completes, also, includes job identification information in the progress information table of each process.
Specifically, the job identification information in the progress of work can be obtained by the specific fields in progress information table.
S42: from default job scheduling task configuration file, obtain corresponding with job identification information scheduling information and Operation stream information.
Default job scheduling task configuration file, to record job identification information and scheduling information and operation stream information Corresponding relationship, that is, a corresponding scheduling information of job identification information and an operation stream information.
Specifically, presetting job scheduling task configuration file can be in the form of text file, including but not limited to XML lattice Formula, JSON format etc..Wherein, XML (Extensible Markup Language, extensible markup language), is that one kind is used for Label electronic document makes it have structural markup language;JSON (JavaScript Object Notation, JS object letter Spectrum) be a kind of lightweight data interchange format.JSON file is stored with ASCII coding mode, is independent of operation System, quickly can be read or be generated by computer program, be a kind of data interchange format of prevalence.
Default job scheduling task configuration file, can specifically be deployed in host local terminal or other be connected with the machine it is pre- If in database, herein with no restrictions.
Specifically, host side reads default job scheduling task configuration file, and inquires to obtain according to job identification information Corresponding scheduling information and operation stream information.
In the present embodiment, relative to obtaining scheduling information and operation stream information from the progress of work, host side by from It is obtained in default job scheduling task configuration file, it is possible to reduce IPC communication, and then the cost of IPC communication is saved, improve system Treatment effeciency.
Further, in one embodiment, after step S6, and before step S7, if that is, receive it is default The confirmation message that standby host returns, then after sending default standby host for scheduling information and operation stream information, and in power cut-off Process, and before setting stand-by state for the equipment state of local terminal, specifically further comprise the steps of:
S8: scheduling information and operation stream information are deleted.
Specifically, scheduling information and operation stream information are deleted from local side, to discharge memory space.
In the present embodiment, due to sending default standby host for scheduling information and operation stream information, that is, master is completed The step of standby switching most critical, deletes scheduling information at this point, default standby host, which can take over host, continues to execute job scheduling task The memory space of host side can be discharged with operation stream information.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of job scheduling active-standby switch device is provided, the job scheduling active-standby switch device with it is upper Job scheduling main/standby switching method in embodiment is stated to correspond.As shown in fig. 6, the job scheduling active-standby switch device includes inspection Module 61, handover preparation module 62, instruction sending module 63, data obtaining module 64, information preservation module 65, information is surveyed to send Module 67 is completed in module 66 and switching.Detailed description are as follows for each functional module:
Detection module 61, for obtaining the attribute information of default finger daemon with prefixed time interval, and to attribute information Security inspection is carried out, security inspection result is obtained;
Handover preparation module 62, if for security inspection result being abnormal, the equipment state of the default standby host of acquisition;
Instruction sending module 63 refers to default active-standby switch if the equipment state for presetting standby host is stand-by state Order is sent to default standby host;
Data obtaining module 64 is used for break-off process, and scheduling information and job stream letter are obtained from the progress of work Breath, wherein scheduling information and operation stream information are used for executive job scheduling task;
Information preservation module 65, for saving scheduling information and operation stream information;
Information sending module 66, if the confirmation message returned for receiving default standby host, by scheduling information and operation Stream information is sent to default standby host, so that default standby host continues to execute job scheduling task;
Module 67 is completed in switching, is used for power cut-off process, and set stand-by state for the equipment state of local terminal.
Further, information preservation module 65, comprising:
Space detection sub-module 651, for detecting scheduling information and operation stream information the space occupied size;
Information preservation submodule 652, if being more than default threshold for scheduling information and operation stream information the space occupied size Value, then save operation stream information;
Also, information sending module 66, comprising:
Information sending submodule 661, if the confirmation message returned for receiving default standby host, operation stream information is sent out It is sent to default standby host.
Further, detection module 61, including
Number of processes Comparative sub-module 611, for number of processes and preset quantity to be carried out comparison of coherence, and will be into Journey identification information and default identification information carry out comparison of coherence;
It is identified information Comparative sub-module 612, if it is equal with preset quantity for number of processes, and process identification (PID) is believed Breath is consistent with default identification information, then security inspection result is normal;
Testing result confirmation module 613, if for number of processes and preset quantity it is unequal, or there are at least one into Journey identification information and default identification information are inconsistent, then security inspection result is exception
Further, data obtaining module 64, comprising:
Job identification acquisition of information submodule 641, for obtaining the job identification information in the progress of work;
Information reading submodule 642, for obtaining and job identification information from default job scheduling task configuration file Corresponding scheduling information and operation stream information.
Further, job scheduling active-standby switch device, further includes:
Information deletion module 68, for deleting scheduling information and operation stream information.
Specific restriction about job scheduling active-standby switch device may refer to above for job scheduling active-standby switch The restriction of method, details are not described herein.Modules in above-mentioned job scheduling active-standby switch device can be fully or partially through Software, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the place in computer equipment It manages in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution or more The corresponding operation of modules.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 7.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with Realize a kind of job scheduling main/standby switching method.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor realize job scheduling in above-described embodiment when executing computer program The step of main/standby switching method, such as step S1 shown in Fig. 2 to step S7.Alternatively, reality when processor executes computer program The function of each module/unit of job scheduling active-standby switch device in existing above-described embodiment, such as module 61 shown in Fig. 6 is to module 67 function.To avoid repeating, which is not described herein again.
In one embodiment, a computer readable storage medium is provided, computer program, computer program are stored thereon with Job scheduling main/standby switching method in above method embodiment is realized when being executed by processor, alternatively, the computer program is located Manage the function that each module/unit in job scheduling active-standby switch device in above-mentioned apparatus embodiment is realized when device executes.To avoid It repeats, which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided by the present invention, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of job scheduling main/standby switching method, which is characterized in that the job scheduling main/standby switching method includes:
With prefixed time interval, the attribute information of default finger daemon is obtained, and security inspection is carried out to the attribute information, Obtain security inspection result;
If the security inspection result is abnormal, the equipment state of the default standby host of acquisition;
If the equipment state of the default standby host is stand-by state, the pre- equipment is sent by the instruction of default active-standby switch Machine;
Break-off process, and scheduling information and operation stream information are obtained from the progress of work, wherein the scheduling information Executive job scheduling task is used for the operation stream information;
Save the scheduling information and the operation stream information;
If receiving the confirmation message that the default standby host returns, send the scheduling information and the operation stream information to The default standby host, so that the default standby host continues to execute the job scheduling task;
Terminate the progress of work, and sets the stand-by state for the equipment state of local terminal.
2. job scheduling main/standby switching method as described in claim 1, which is characterized in that it is described save the scheduling information and The operation stream information, comprising:
Detect the scheduling information and operation stream information the space occupied size;
If the scheduling information and operation stream information the space occupied size are more than preset threshold, the job stream is saved Information;
If also, the confirmation message for receiving the default standby host and returning, by the scheduling information and the job stream Information is sent to the default standby host, comprising:
If receiving the confirmation message that the default standby host returns, the default standby host is sent by the operation stream information.
3. job scheduling main/standby switching method as described in claim 1, which is characterized in that the attribute information includes process number Amount and process identity information, it is described that security inspection is carried out to the attribute information, obtain security inspection result, comprising:
The number of processes and preset quantity are subjected to comparison of coherence, and by the process identity information and preset mark letter Breath carries out comparison of coherence;
If the number of processes is equal with preset quantity, and the process identity information is consistent with the default identification information, Then the security inspection result is normal;
If the number of processes and preset quantity are unequal, or there are process identity informations described at least one and described default Identification information is inconsistent, then the security inspection result is abnormal.
4. job scheduling main/standby switching method as described in claim 1, which is characterized in that described to be obtained from the progress of work Take scheduling information and operation stream information, comprising:
Obtain the job identification information in the progress of work;
From default job scheduling task configuration file, obtain corresponding with the job identification information scheduling information and The operation stream information.
5. job scheduling main/standby switching method as described in claim 1, which is characterized in that if receiving described preset described The confirmation message that standby host returns, then send the default standby host for the scheduling information and the operation stream information, so that institute It states after default standby host continues to execute the job scheduling task, and terminates the progress of work described, and by local terminal The equipment state is set as before the stand-by state, the job scheduling main/standby switching method, further includes:
Delete the scheduling information and the operation stream information.
6. a kind of job scheduling active-standby switch device, which is characterized in that the job scheduling active-standby switch device, comprising:
Detection module, for prefixed time interval, obtaining the attribute information of default finger daemon, and to the attribute information into Row security inspection obtains security inspection result;
Handover preparation module, if for the security inspection result being abnormal, the equipment state of the default standby host of acquisition;
Instruction sending module instructs default active-standby switch if the equipment state for the default standby host is stand-by state It is sent to the default standby host;
Data obtaining module is used for break-off process, and scheduling information and operation stream information are obtained from the progress of work, Wherein, the scheduling information and the operation stream information are used for executive job scheduling task;
Information preservation module, for saving the scheduling information and the operation stream information;
Information sending module, if the confirmation message returned for receiving the default standby host, by the scheduling information and institute It states operation stream information and is sent to the default standby host, so that the default standby host continues to execute the job scheduling task;
Module is completed in switching, is set as the spare shape for terminating the progress of work, and by the equipment state of local terminal State.
7. job scheduling active-standby switch device as claimed in claim 6, which is characterized in that the information preservation module, comprising:
Space detection sub-module, for detecting the scheduling information and operation stream information the space occupied size;
Information preservation submodule, if being more than default threshold for the scheduling information and operation stream information the space occupied size Value, then save the operation stream information;
Also, the information sending module, comprising:
Information sending submodule, if the confirmation message returned for receiving the default standby host, by the operation stream information It is sent to the default standby host.
8. job scheduling active-standby switch device as claimed in claim 6, which is characterized in that the detection module, comprising:
Number of processes Comparative sub-module, for the number of processes and preset quantity to be carried out comparison of coherence, and will be described Process identity information and default identification information carry out comparison of coherence;
It is identified information Comparative sub-module, if it is equal with preset quantity for the number of processes, and the process identification (PID) Information is consistent with the default identification information, then the security inspection result is normal;
Testing result confirmation module, if it is unequal for the number of processes and preset quantity, or there are described at least one Process identity information and the default identification information are inconsistent, then the security inspection result is abnormal.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to Any one of 5 job scheduling main/standby switching methods.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization job scheduling active-standby switch side as described in any one of claim 1 to 5 when the computer program is executed by processor Method.
CN201910372318.5A 2019-05-06 2019-05-06 Job scheduling master-slave switching method and device, computer equipment and storage medium Active CN110188008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910372318.5A CN110188008B (en) 2019-05-06 2019-05-06 Job scheduling master-slave switching method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910372318.5A CN110188008B (en) 2019-05-06 2019-05-06 Job scheduling master-slave switching method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110188008A true CN110188008A (en) 2019-08-30
CN110188008B CN110188008B (en) 2022-10-21

Family

ID=67715687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910372318.5A Active CN110188008B (en) 2019-05-06 2019-05-06 Job scheduling master-slave switching method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110188008B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035262A (en) * 2020-09-22 2020-12-04 中国建设银行股份有限公司 Method and device for multi-host dynamic management adjustment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136900A (en) * 2006-10-16 2008-03-05 中兴通讯股份有限公司 Fast transparent fault shift device and implementing method facing to service
JP2009098715A (en) * 2007-10-12 2009-05-07 Nec Corp Redundant system device, job execution method in redundant system device, and execution program
CN104270462A (en) * 2014-10-21 2015-01-07 浪潮电子信息产业股份有限公司 High-availability method for WINDOWS rendering cluster job scheduling
CN104866395A (en) * 2014-02-24 2015-08-26 中国移动通信集团福建有限公司 Data backup method, data backup system, main-backup switching method and main-backup switching system
CN106874090A (en) * 2017-01-23 2017-06-20 北京思特奇信息技术股份有限公司 Job scheduling method and system based on cloud system
CN109491843A (en) * 2018-11-13 2019-03-19 郑州云海信息技术有限公司 A kind of fault monitoring method and device of application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136900A (en) * 2006-10-16 2008-03-05 中兴通讯股份有限公司 Fast transparent fault shift device and implementing method facing to service
JP2009098715A (en) * 2007-10-12 2009-05-07 Nec Corp Redundant system device, job execution method in redundant system device, and execution program
CN104866395A (en) * 2014-02-24 2015-08-26 中国移动通信集团福建有限公司 Data backup method, data backup system, main-backup switching method and main-backup switching system
CN104270462A (en) * 2014-10-21 2015-01-07 浪潮电子信息产业股份有限公司 High-availability method for WINDOWS rendering cluster job scheduling
CN106874090A (en) * 2017-01-23 2017-06-20 北京思特奇信息技术股份有限公司 Job scheduling method and system based on cloud system
CN109491843A (en) * 2018-11-13 2019-03-19 郑州云海信息技术有限公司 A kind of fault monitoring method and device of application

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035262A (en) * 2020-09-22 2020-12-04 中国建设银行股份有限公司 Method and device for multi-host dynamic management adjustment

Also Published As

Publication number Publication date
CN110188008B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
CN107016480B (en) Task scheduling method, device and system
CN105354113B (en) A kind of system and method for server, management server
US10635473B2 (en) Setting support program, setting support method, and setting support device
CN111124702B (en) Performance data acquisition method, device and computer readable storage medium
CN109739482B (en) Service logic execution system and method based on dynamic language
CN104639374A (en) Application program deployment management system
CN109426550B (en) Resource scheduling method and equipment
CN107992407A (en) System and method using USB flash disk to android terminal equipment debugging
CN110413432B (en) Information processing method, electronic equipment and storage medium
CN112799786A (en) Exit method, device, equipment and storage medium of micro-service instance
CN110221845A (en) Using dispositions method, device, equipment and medium
CN110704177A (en) Computing task processing method and device, computer equipment and storage medium
CN102314382A (en) Method and module for emergently probing system information
CN109542591A (en) Task compensation deals method, apparatus, computer equipment and storage medium
CN114138549A (en) Data backup and recovery method based on kubernets system
CN114003439B (en) Data backup method, device, equipment and storage medium
CN109697112B (en) Distributed intensive one-stop operating system and implementation method
CN110188008A (en) Job scheduling main/standby switching method, device, computer equipment and storage medium
CN113157426B (en) Task scheduling method, system, equipment and storage medium
CN113157411B (en) Celery-based reliable configurable task system and device
CN114691407A (en) Method and device for acquiring vehicle log, electronic equipment and storage medium
CN101094050A (en) Method for capturing information of task of leading resetting system or device failure
CN108241616B (en) Message pushing method and device
WO2020253044A1 (en) Service configuration method and apparatus, and computer device and storage medium
US20230101776A1 (en) Desired state configuration for virtual machines

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