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

RE: [condor-users] Invoking condor commands from java applications



Derek,

Thanks, I hadn't looked into the -format option yet, but I'll certainly use
it as you suggested. I did notice the -xml option for some commands; is that
an alternative with the same benefits?  XML is a natural solution for Java.

Hans.

-----Original Message-----
From: Derek Wright [mailto:wright@xxxxxxxxxxx] 
Sent: 22 January 2004 01:20
To: condor-users@xxxxxxxxxxx
Subject: Re: [condor-users] Invoking condor commands from java applications 

On Wed, 21 Jan 2004 08:52:07 +0100  "Abbink, Hans" wrote:

> Currently I generate submit files, use Java's exec feature to start
> commands like condor_submit and condor_status and parse their
> output. It works, but it's not very elegant and somewhat fragile in
> the long run because it depends on assumptions about the output
> generated by those commands.

for everyone writing scripts, java programs, etc, to parse
condor_status or condor_q output, you should *always* invoke
these tools using "-format" options.

a) you can get condor_status or condor_q to give you whatever
information you want in whatever format is easiest for you to parse.

b) the attributes that are sometimes chopped short to fit on a single
80 column screen (like the resource name in condor_status) can be
printed out in full.

and most importantly:

c) you *never* have to worry about us changing the formatting of the
default output and breaking your script, since -format will always
work and will always print out whatever you told it to print.

for more details, see the condor_q command reference page:

http://www.cs.wisc.edu/condor/manual/v6.6/condor_q.html

(-format also works with condor_status, it's just that the condor_q
reference page has more details and some examples).

enjoy,
-derek
Condor Support Information:
http://www.cs.wisc.edu/condor/condor-support/
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>

Condor Support Information:
http://www.cs.wisc.edu/condor/condor-support/
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>