Summary of the invention
For the one or more problems existed in correlation technique, the object of the present invention is to provide a kind of bill generation system and method for cluster job scheduling, with in solving the problem one of at least.
For achieving the above object, one aspect of the present invention provides a kind of bill generation system of cluster job scheduling, comprises job scheduling monitoring module, data processing module, database, interactive module and accounting engine.Wherein, job scheduling monitoring module is for monitoring the operating index data of each operation, and record the operating index data of each operation and object properties information corresponding to operation, and the operating index data of each operation and object properties information corresponding to operation are sent to data processing module.Data processing module, for receiving from the operating index data of each operation of job scheduling monitoring module and object properties information corresponding to operation, processes the operating index data of each operation, and the data after process is stored to database.Database is for storing the data of data processing module.Interactive module is used for receiving management person request and supvr's request is sent to accounting engine, and receives the bill that returns of accounting engine and present to supvr.Accounting engine is asked for the supvr received from interactive module, and from database, read according to supvr's request the data meeting supvr's request, and generate bill according to supvr's request to after the Data Analysis Services meeting supvr's request, and bill is fed back to interactive module.
Preferably, job scheduling monitoring module comprises monitoring module, logging modle and sending module.Wherein, monitoring module is for monitoring the operating index data of each operation.Logging modle is for object properties information corresponding to the operating index data and operation that record each operation.Sending module is used for the operating index data of each operation and object properties information corresponding to operation to be sent to data processing module.
Preferably, data processing module comprises data reception module and processing module.Wherein, data reception module is for receiving from the operating index data of each operation of job scheduling monitoring module and object properties information corresponding to operation.Processing module is used for processing in units of operation the operating index data of each operation, and the operating index data of each operation are classified by the object properties that operation is corresponding, and process in units of object properties, and the data after process are stored to database.
Preferably, interactive module comprises and represents interface and request processing module.Wherein, represent that interface is used for receiving management person request, and the bill returned by accounting engine presents to supvr.Request processing module is used for supvr's request to be sent to accounting engine.
Preferably, accounting engine comprises receiver module, data read module, bill generation module and result feedback module.Wherein, receiver module is asked for the supvr received from interactive module.Data read module is used for from database, reading according to supvr's request the data meeting supvr's request.Bill generation module be used for according to supvr request to meet supvr request Data Analysis Services after generate bill.The bill that result feedback module is used for bill generation module generates feeds back to interactive module.
Preferably, the form of bill comprise following one of at least: PDF, XLS and HTML.Object properties information corresponding to operation comprise following one of at least: the affiliated cluster of submission user corresponding to described operation, described operation.
The present invention also proposes a kind of bill generation method of cluster job scheduling on the other hand, comprise the following steps: job scheduling monitoring module monitors the operating index data of each operation, and record the operating index data of each operation and object properties information corresponding to operation, then the operating index data of each operation and object properties information corresponding to operation are sent to data processing module.Data processing module receives from the operating index data of each operation of job scheduling monitoring module and object properties information corresponding to operation, processes, and the data after process are stored to database to the operating index data of each operation.Supvr's request is also sent to accounting engine by interactive module receiving management person request.The supvr that accounting engine receives from interactive module asks, and from database, read according to supvr's request the normalization data meeting supvr's request, then generate bill according to supvr's request to after the Data Analysis Services meeting supvr's request, and bill is fed back to interactive module present to supvr.
Preferably, the operating index data of each operation are processed, comprising: the operating index data of each operation are processed in units of operation; And the operating index data of each operation are classified by the object properties that operation is corresponding, and process in units of object properties.
By the present invention's at least one technical scheme above-mentioned, after being processed by analyze job run achievement data, add up and normalization etc., be supplied to supvr with reasonable manner, for charge provides more reliable believable foundation.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Embodiment
Consider the one or more problems existed in correlation technique, the invention provides a kind of bill generation system and method for cluster job scheduling.Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings.Should be understood that below by the embodiment be described with reference to the drawings be exemplary, only for explaining the present invention, and can not limitation of the present invention be interpreted as.
Fig. 1 is the structural drawing of the bill generation system according to cluster job scheduling of the present invention.As shown in Figure 1, this system comprises job scheduling monitoring module 100, data processing module 200, database 300, interactive module 400 and accounting engine 500.Wherein, job scheduling monitoring module 100 is for monitoring the operating index data of each operation, and record the operating index data of each operation and object properties information corresponding to operation, and the operating index data of each operation and object properties information corresponding to operation are sent to data processing module 200.Data processing module 200 is for receiving from the operating index data of each operation of job scheduling monitoring module 100 and object properties information corresponding to operation, the operating index data of each operation are processed, and the data after process are stored to database 300.Database 300 is for storing the data of data processing module 200.Interactive module 400 is for receiving management person request and supvr's request is sent to accounting engine 500, and receives the bill that returns of accounting engine 500 and present to supvr.Accounting engine 500 is asked for the supvr received from interactive module 400, and from database 300, read according to supvr's request the data meeting supvr's request, and generate bill according to supvr's request to after the Data Analysis Services meeting supvr's request, and bill is fed back to interactive module 400.
Job scheduling monitoring module 100 comprises monitoring module 110, logging modle 120 and sending module 130.Wherein, monitoring module 110 is for monitoring the operating index data of each operation.Logging modle 120 is for object properties information corresponding to the operating index data and operation that record each operation.Sending module 130 is for being sent to data processing module 200 by the operating index data of each operation and object properties information corresponding to operation.Wherein, the operating index data of operation comprise internal memory use amount, CPU holding time etc.Object properties information corresponding to operation comprises the information such as submission user, described cluster corresponding to operation.
Data processing module 200 comprises data reception module 210 and processing module 220.Wherein, data reception module 210 is for receiving from the operating index data of each operation of job scheduling monitoring module 100 and object properties information corresponding to operation.Processing module 220 is for processing in units of operation the operating index data of each operation, and the operating index data of each operation are classified by the object properties that operation is corresponding, and process in units of object properties, and the data after process are stored to database 300.Wherein, process comprises analysis, normalizing, statistics etc.
Interactive module 400 comprises and represents interface 410 and request processing module 420.Wherein, represent that interface 410 is for receiving management person request, and the bill that accounting engine 500 returns is presented to supvr.Request processing module 420 is for being sent to accounting engine 500 by supvr's request.
Accounting engine 500 comprises receiver module 510, data read module 520, bill generation module 530 and result feedback module 540.Wherein, receiver module 510 is asked for the supvr received from interactive module 400.Data read module 520 for reading according to supvr's request the data meeting supvr's request from database 300.Bill generation module 530 for according to supvr request, to meet supvr request Data Analysis Services after generate bill.Result feedback module 540 feeds back to interactive module 400 for the bill generated by bill generation module.Wherein, the form of bill comprises PDF, XLS and HTML etc.
The bill generation method according to cluster job scheduling of the present invention is described in detail below in conjunction with accompanying drawing 2.As shown in Figure 2, the method comprises the following steps:
Step S210, job scheduling monitoring module 100 monitors the operating index data of each operation, and record the operating index data of each operation and object properties information corresponding to operation, then the operating index data of each operation and object properties information corresponding to operation are sent to data processing module 200.
The operating index data of each operation comprise internal memory use amount, CPU holding time etc.Object properties information corresponding to operation comprises the information such as submission user, affiliated cluster corresponding to operation.Record in units of operation, has accomplished the data statistics of smaller particle size, can provide reliable Data support for follow-up data statistic analysis.Have recorded the object properties information that operation is corresponding simultaneously, the Data support of multi-angle can be provided for follow-up book keeping operation, the computational resource that the All Jobs submitted to as added up certain user takies.
Step S220, data processing module 200 receives from the operating index data of each operation of job scheduling monitoring module 100 and object properties information corresponding to operation, processes, and data are stored to database 300 to the operating index data of each operation.
Because the data volume of record in job scheduling monitoring module 100 can be comparatively large, be the performance and the efficiency that improve book keeping operation function, data processing module 200 every day can automatically to the same day job run data be weighted statistics.For improving the availability of data, carry out unit normalization to data, the internal memory taken as operation is all converted into MB
*hour unit, by normalization, well makes data have comparability and with reference to property, and then provides true and reliable believable data for book keeping operation charge.Additionally provide by user, add up by the data weighting of the different levels such as cluster, the use resource in units of user accounts for the ratio data of whole resource, for charging provides the foundation of more perspective.
Step S230, supvr's request is also sent to accounting engine 500 by interactive module 400 receiving management person request.
Supvr can select relevant condition of keeping accounts, as select time scope, cluster wide etc.
Step S240, the supvr that accounting engine 500 receives from interactive module 400 asks, and from database 300, read according to supvr's request the data meeting supvr's request, then generate bill according to supvr's request to after the Data Analysis Services meeting supvr's request, and bill is fed back to interactive module 400 and present to supvr.
Can charge according to concrete operating index data genaration bill, if CPU use amount is by every core × hour charge 1 yuan, also resource can be used to account for the percentage cost fee of whole resource by user, because supvr can calculate operation cost according to the electricity charge, depreciation of machinery etc. sometimes, and shares the expenses equally accordingly.Therefore, bill generation method of the present invention is that supvr charges and provides the Data support of multi-angle.
Meanwhile, can be drawn with curve map the resource data counted in units of user and be represented, make between different user, to use the contrast of resource situation more directly perceived, very clear.
Supvr directly can browse bill, also book keeping operation content can be derived with document form with forms such as PDF, XLS, thus facilitates user to the secondary treating of data, and as write monthly magazine, superior reports machine resources service condition etc.
Should be understood that above-described embodiment is only schematic embodiment, do not limit the present invention and only can be realized by above-described embodiment.Those of ordinary skill in the art can also propose other amendments or change according to such scheme, and these amendments or change all should be included in of the present invention comprising within scope.
Supvr is supplied to reasonable manner, for charge provides more reliable believable foundation after being processed by analyze job run achievement data, add up and normalization etc.
Although illustrate and describe embodiments of the invention, for the ordinary skill in the art, be appreciated that and can carry out multiple change, amendment, replacement and modification to these embodiments without departing from the principles and spirit of the present invention, scope of the present invention is by claims and equivalency thereof.