
In here we document the various fail-over conditions and semantics 
provided by condor_q and condor_history while servicing the job queue and 
history stored in the job_queue.log and history files respectively.  
These fail-over semantics guarantee high availability of job data across 
various daemon or database failures.

We divide the queries into two cases: local and remote

First, condor_q:
1) Local queries are those that are specified without the -name option.  
An example:
	condor_q akini
This query gets all jobs submitted by user akini.

Local queries read the condor config file for location of the job queue, 
whether it be the schedd info, database info, etc.

2) Remote queries are any queries servicing which first requires a 
query to the collector.  This includes queries that are specified using 
the -name, -global, or the -submitter option.  

Examples:
	condor_q -global
	condor_q -submitter akini

In all cases, condor_q first queries the collector.  In the case of 
-name, condor_q queries the collector for the SCHEDD_AD with the 
NAME variable equal to the value specified after -name.  
In the case of the -global option, condor_q gets all the schedd ads from 
the collector and iterates over each one of them.  Finally, in the case of 
the -submitter option, condor_q queries the collector for the particular 
SUBMITTER_AD.

Note that since we query the SCHEDD_AD, if the schedd itself is down, then 
condor_q will return an "Unable to find schedd" error.  This may not be 
such a critical issue since if the schedd is down, the job queue data in 
the database may be stale and, as such, not particularly insightful.

Now, condor_history:
1) Local queries are those that are specified without the -name option.  
An example:
	condor_history akini
This query gets all historical jobs submitted by user akini.

Local queries read the condor config file for location of the history 
data (history file location info)

2) Remote queries are those that use the -name option
Example:
	condor_history -name akini@regular.cs.wisc.edu 2.0

- Ameet 9/1/2005


