HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-devel] queries to the collector or the schedd



I was following the code that condor_q uses to talk to the schedd, and
wrote the following short notes. Did I get anything wrong?

-Erik

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

There are three files that deal with classad queries in Condor that
live in condor_c++_util

The two higher-level ones are condor_q.C and condor_query.C.
condor_q.C defines the CondorQ object, which is used to query the
schedd. condor_query.C defines the CondorQuery object, which retrieves
classads from the collector. In the 'condor_q' utility, the CondorQ object
is named 'CondorQ Q', which isn't the easiest thing to search for in vi.

Both the CondorQ object and the CondorQuery object include a GenericQuery
object named 'query'.  The GenericQuery object lives in generic_query.C
The GenericQuery is used to build a Classad that can be sent to either the
collector or the schedd to match with. It contains a set of "constraints"
that are pushed into it. When it's time to get the list of ads that
the CondorQ or CondorQuery object is interested in, it constructs a new
classad by calling query.makeQuery().  Then GenericQuery code creates a
new ad that has a 'requirements=...' that matches the constraints that
were placed into the GenericQuery object.

After the call to query.makeQuery, the CondorQ or CondorQuery object
sends the ad it constructed with makeQuery to the schedd or collector
and gets back a list of classads matching the constraints.