| Trees | Indices | Help |
|
|---|
|
|
Queue used to manage the jobs.
|
|||
|
|||
|
|||
|
|||
|
|||
| (list, list) |
|
||
|
|||
|
|||
| str |
|
||
| str |
|
||
| list |
|
||
| list |
|
||
| _QueuedJob or None |
|
||
| list |
|
||
| job ID |
|
||
|
|||
|
|||
|
|||
| tuple (job info, log entries) |
|
||
|
|||
|
|||
| int |
|
||
| bool |
|
||
|
|||
| list |
|
||
| list |
|
||
|
|||
|
Inherited from |
|||
|
|||
| str |
|
||
| str |
|
||
| job id or None |
|
||
|
|||
| str |
|
||
| boolean |
|
||
|
|||
|
|||
_RE_JOB_FILE = re.compile(r"^job-(%s)$" % constants.JOB_ID_TEMregex matching the valid job file names |
|||
|
|||
|
Inherited from |
|||
|
|||
Constructor for JobQueue. The constructor will initialize the job queue object and then start loading the current jobs from disk, either for starting them (if they were queue) or for aborting them (if they were already running).
|
Register a new node with the queue.
|
Callback called when removing nodes from the cluster.
|
Verifies the status of an RPC call. Since we aim to keep consistency should this node (the current master) fail, we will log errors if our rpc fail, and especially log the case when more than half of the nodes fails.
|
Helper for returning the node name/ip list.
|
Writes a file locally and then replicates it to all nodes. This function will replace the contents of a file on the local node and then replicate it to all the other nodes we have.
|
Renames a file locally and then replicate the change. This function will rename a file in the local queue directory and then replicate this rename to all the other nodes we have.
|
Convert a job ID to string format. Currently this just does
|
Returns the archive directory for a job.
|
Generates a new job identifier. Job identifiers are unique during the lifetime of a cluster.
|
Returns the job file for a given job id.
|
Returns the archived job file for a give job id.
|
Extract the job id from a filename.
|
Return all known job IDs. If the parameter archived is True, archived jobs IDs will be included. Currently this argument is unused. The method only looks at disk because it's a requirement that all jobs are present on disk (so in the _memcache we don't have any extra IDs).
|
Returns the list of current job files.
|
Loads a job from the disk or memory. Given a job id, this will return the cached job object if existing, or try to load the job from the disk. If loading from disk, it will also add the job to the cache.
|
Return a list of jobs based on their IDs.
|
Check if the queue is marked from drain. This currently uses the queue drain file, which makes it a per-node flag. In the future this can be moved to the config file.
|
Sets the drain flag for the queue. This is similar to the function backend.JobQueueSetDrainFlag, and in the future we might merge them.
|
Create and store a new job. This enters the job into our job queue and also puts it on the new queue, in order for it to be picked up by the queue processors.
|
Create and store a new job.
See Also: _SubmitJobUnlocked |
Create and store multiple jobs.
See Also: _SubmitJobUnlocked |
Update a job's on disk storage. After a job has been modified, this function needs to be called in order to write the changes to disk and replicate them to the other nodes.
|
Waits for changes in a job.
|
Cancels a job. This will only succeed if the job has not started yet.
|
Marks a job as canceled.
|
Archives jobs.
|
Archives a job. This is just a wrapper over _ArchiveJobsUnlocked.
|
Archives all jobs based on age. The method will archive all jobs which are older than the age parameter. For jobs that don't have an end timestamp, the start timestamp will be considered. The special '-1' age will cause archival of all jobs (that are not running or queued).
|
Returns information about a job.
|
Returns a list of jobs in queue. This is a wrapper of _GetJobsUnlocked, which actually does the processing for each job.
|
Stops the job queue. This shutdowns all the worker threads an closes the queue.
|
|
|||
_RE_JOB_FILEregex matching the valid job file names
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Sep 3 12:34:45 2010 | http://epydoc.sourceforge.net |