Re: [HTCondor-devel] class ad attributes


Date: Fri, 22 Jan 2016 15:19:09 +0000
From: John M Knoeller <johnkn@xxxxxxxxxxx>
Subject: Re: [HTCondor-devel] class ad attributes

You have it right.   Add attributes to your job by using +Attr=value syntax in your submit file, query attributes in code by

using ad->LookupInteger()  or ad->LookupString, etc.

 

If you want to insert attributes in c++ code, I would recommend using one of the ad->Assign methods.   Older HTCondor code

Will sometimes use ad->Insert, but this is mostly because ad->Assign was not available when it was written.

 

-tj

 

From: HTCondor-devel [mailto:htcondor-devel-bounces@xxxxxxxxxxx] On Behalf Of ??
Sent: Thursday, January 21, 2016 8:44 PM
To: htcondor-devel <htcondor-devel@xxxxxxxxxxx>
Subject: Re: [HTCondor-devel] class ad attributes

 

Does anyone else know how to do this? Thanks!

 

Kathy

 

 

------------------ Original ------------------

From:  "Erik Paulson";<epaulson@xxxxxxxxxxx>;

Date:  Thu, Jan 21, 2016 11:29 PM

To:  "åå"<715620615@xxxxxx>;

Cc:  "htcondor-devel"<htcondor-devel@xxxxxxxxxxx>;

Subject:  Re: [HTCondor-devel] class ad attributes

 

I think that's right - but I haven't done any serious Condor development in several years, so hopefully someone with more recent experience can chime in.

 

-Erik

 

 

On Tue, Jan 19, 2016 at 9:13 AM, åå <715620615@xxxxxx> wrote:

Hi Erik,

 

Thanks for you spent time looking. I think I did not describe the question clearly. I want to add an attribute in the submit description file, since it do not appear in the Job ClassAd Attributes lists(I got from appendix A of condor manual), so I should add the attribute in the  way like "+AttributeName = value", is it right? And then I need to get the value in the dedicated scheduler's source code, is the way like "job->LookupInteger(AttributeName, value)" right? or anything in other part of the source code I need to pay attention?

 

Thanks!

 

Kathy

 

------------------ Original ------------------

From:  "Erik Paulson";<epaulson@xxxxxxxxxxx>;

Date:  Mon, Jan 18, 2016 06:26 AM

To:  "åå"<715620615@xxxxxx>;

Cc:  "htcondor-devel"<htcondor-devel@xxxxxxxxxxx>;

Subject:  Re: [HTCondor-devel] class ad attributes

 

Do you want to do this at submit time, either in condor_submit or in the schedd, or while the job is running and insert data from the execution side?

 

-Erik

 

 

On Sun, Jan 17, 2016 at 2:35 AM, åå <715620615@xxxxxx> wrote:

Hi,

 

I want to add some other attributes in the job class ad, and it can realize by inserting +attributeName = value in the submit file, now I want to get the attribute value in the Condor source code, how can I realize it? I notice some codes like "job->LookupInteger(ATTR_MAX_HOSTS, hosts)", can it be got in the same way just like

"job->LookUpInteger(AttributeName, value)"?

 

And another question is I want to add some attributes dynamically in the source code, is the

 "ad->Insert(attributeName, value)" way right? And then I can get the attribute value just like the above, is it right?

 

Thanks,

 

Kathy


_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel

 


_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel

 

[← Prev in Thread] Current Thread [Next in Thread→]