Class QueryTest

  extended bycondor.classad.tests.QueryTest

public class QueryTest
extends Object

Main program to exercise the matching feature of classads. It reads ads from a file in the same format as the output of Fetch, runs a query in an SQL-like langauge on them, and prints the results. The query comes either from the command line or from standard input. It looks like this:

    select Name, Arch, Memory, Disk, Idle = timeInterval(ConsoleIdle)
    from ads_bin
    where ConsoleIdle > 24*60*60
This class is meant to be an example of programming with classads, to be studied and adapted. It should not be used as a black box.

Marvin Solomon

Field Summary
          Collector port.
Constructor Summary
Method Summary
static void main(String[] args)
          Main program.
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int COLLECTOR_COMM_PORT
Collector port.

See Also:
Constant Field Values
Constructor Detail


public QueryTest()
Method Detail


public static void main(String[] args)
Main program. Command-line options are
Request more verbose debugging output (may be repeated).
Set the debugging level to nn.
Limit the number of items printed by "select *" to nn.
Get the ads directly from the Condor collector rather than readting them from a file (and ignore the "from" clause of the query).
Let the server do the filtering: Send the "where" clause as part of the query to the collector, so that only matching ads are returned. (Implies -c).
Any remaining words on the command line are assumed to be query. If there are no non-flag arguments, the query is read from stdin.

args - the command-line arguments.