May be we better also have a parameter N saying we only need the list of last N jobs.
I am seeing a common pattern here - get the list of jobs that are yet to complete (JobSubmissionProtocol.jobsToComplete), get the list of running jobs, queued jobs, jobs that have started in the last N hours, last N jobs etc. We have two options here:
- Get all jobs list from the JT and prune them on the client side.
- Pass a filter to the JT asking for only those jobs that we need.
When the number of jobs could get very long, the second option seems better - less data from JT to client, accomodates all the above types of listing jobs in a single RPC, for e.g., we then won't need a separate jobsToComplete. Thoughts?