-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Job Status and Control (JSC) interface #202
Conversation
Provide a high-level abstraction to allow monitoring and controlling of the status of Flux jobs. Designed to expose the job status and control abstraction in a way to hide the underlying data layout of job information stored within Flux's KVS data store. Expect that schedulers and runtime tools will be its main users. This abstraction provides the producers of job information including a task and program execution service module including wreckrun with an opportunity to change and optimize the data layout of jobs within the KVS without presenting major impacts to the implementation of the schedulers and runtime tools. The main design considerations are the following: - Abstract out implementation-dependent job states; - Provide flexible and easily extensible mechanisms to pass job info; - Use a minimalistic API set. Build on Job Control Block (JCB): Our data schema containing the information needed to manage a particular job. Contains information such as jobid, resources owned by the job, as well as the processes spawned by the job. JSC converts the raw information on a job into an JCB, implemented as an JSON dictionary object. The current JCB structure is described in tables in README.md. Provide three main calls of JSC: - jsc_notify_status () Register a callback to the asynchronous status change notification service. callback will be invoked when the state of a job changes; - jsc_query_jcb () Query the key attribute of JCB of jobid; - jsc_update_jcb () updates the key attribute within JCB of jobid. Provide standalone utility and testers: Created an utility command to facilitate testing: flux-jstat. Its usage is the following: Usage: flux-jstat notify flux-jstat query jobid <top level JCB attribute> flux-jstat update jobid <top level JCB attribute> <JCB JSON> flux-core/t/t2001-jsc.t also contains various test cases that use this utility.
@garlick is there a way to hear from Travis CI before creating a pull request like this? |
@dongahn, you can sign up for an account at travis-ci.org and then Actually I think travis-ci.org can use your github credentials so you don't On May 22, 2015 6:36 PM, "Dong H. Ahn" [email protected] wrote:
|
@dongahn: this is nice work. A couple of review comments after a superficial skim: It would be good to split this commit into (minimally):
Your API includes json-c |
Good suggestions by @garlick. Also when you rebase your commits you might as well fold in your travis fixes. One other very minor thing is leading whitespace in |
Oh, also can you split the addition to |
All nice suggestions! @garlick and @grondo. I will split this PR into multiple ones with the suggested fixes. But I am a bit concerned about using a json string in the jsc interfaces. It is good in term of not creating a dependency to JSON-C. But what is the performance argument? For the common case of using JSON-C, will a user have to convert a json_object into a string representation before passing it into an API and the API then have to recreate a json_object object from it? This can add pretty large overheads for passing a large string like a large rdl. Perhaps a right thing to do is to have an opaque type flux_json_t and allow the user to pass an json_object or a string as the argument to that? The API can then have an additional flag which allows the uses to tell which type? |
@dongahn: in the general case it's just a question of where the conversion is done. The message functions and the KVS for the most part treat the user's Could your json_object JCB be replaced with a regular abstract type with accessors? Especially considering that the primary KVS object store value will be a json string (or maybe just a string) in the near future, not a json_object? |
@garlick I think this is one of those things which would be best to discuss in person. I wanted to avoid using a user defined type for JCB because the job schema is still in flux and JSON would be more flexible until the schema is set in stone. I will swing by your office early next week. |
OK. Spoke with @garlick and @grondo. The following will be my course of actions.
|
I don't think you need to split into multiple PRs, but maybe just a short series of testable (if possible) commits in a single PR. |
Closing this. A new PR will be issued. |
Provide a high-level abstraction to allow monitoring and controlling
of the status of Flux jobs. Designed to expose the job status and
control abstraction in a way to hide the underlying data layout of
job information stored within Flux's KVS data store.
Expect that schedulers and runtime tools will be its main users. This
abstraction provides the producers of job information including
a task and program execution service module including wreckrun with
an opportunity to change and optimize the data layout of jobs within
the KVS without presenting major impacts to the implementation
of the schedulers and runtime tools.
The main design considerations are the following:
Build on Job Control Block (JCB):
Our data schema containing the information needed to manage a
particular job. Contain information such as jobid, resources owned
by the job, as well as the processes spawned by the job. JSC converts
the raw information on a job into an JCB, implemented as an JSON
dictionary object. The current JCB structure is described in tables
in README.md.
Provide three main calls of JSC:
status change notification service. callback will be invoked
when the state of a job changes;
Provide standalone utility and testers:
Created an utility command to facilitate testing: flux-jstat. Its
usage is the following:
Usage: flux-jstat notify
flux-jstat query jobid
flux-jstat update jobid
flux-core/t/t2001-jsc.t also contains various test cases that use
this utility.