condor.classad.tests
Class QueryTest

Object
  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.

Author:
Marvin Solomon

Field Summary
static int COLLECTOR_COMM_PORT
          Collector port.
 
Constructor Summary
QueryTest()
           
 
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

COLLECTOR_COMM_PORT

public static final int COLLECTOR_COMM_PORT
Collector port.

See Also:
Constant Field Values
Constructor Detail

QueryTest

public QueryTest()
Method Detail

main

public static void main(String[] args)
Main program. Command-line options are
-v
Request more verbose debugging output (may be repeated).
-vnn
Set the debugging level to nn.
-mnn
Limit the number of items printed by "select *" to nn.
-c
Get the ads directly from the Condor collector rather than readting them from a file (and ignore the "from" clause of the query).
-s
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.

Parameters:
args - the command-line arguments.