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

Re: [HTCondor-users] How to query for list of schedd in c++ api



The classads package is for using ClassAds in programs that *donât* interact with HTCondor.   It is a low-level api that has functions to create, query, and manipulate ClassAds, but doesnât know anything about the schema used  by HTCondor or the HTCondor daemons, nor does it know about the HTCondor wire protocol used by condor_status to query the Collector.

 

The library that has all of the HTCondor utility functions is libcondor_utils_X_Y_Z.so, where X,Y, and Z are the version number of HTCondor.

This is not a formal, public API for HTCondor however.  It can and *will* change without warning from version to version, and it is not documented in any way.   

 

The only public API that you can use to programmatically do what condor_status does is the HTCondor python bindings.  htcondor.so.

 

More information about how to use the python bindings here:

https://htcondor-python.readthedocs.io/en/latest/

 

-tj

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Cheng-Jui Yu
Sent: Tuesday, March 19, 2019 9:13 PM
To: htcondor-users@xxxxxxxxxxx
Subject: [HTCondor-users] How to query for list of schedd in c++ api

 

Dear HTCondor experts,

 

We are starting to use the classad c++ api and we are following the classad page: https://research.cs.wisc.edu/htcondor/classad/c++tut.html

 

The first thing that we need to do in the c++ api is to get a list of schedd(s). Like in the command:

 

"condor_status -schedd"

 

How to get list of schedd  in the c++ api ?  

 

I have installed the "devel" package for condor-8.6.5-1.el6.x86_64

 

I have the /usr/lib64/libclassad.so for REL6 and

 

and header files in /usr/include/classad/

attrrefs.h              collection.h  lexer.h         util.h

cclassad.h              common.h      lexerSource.h   value.h

classadCache.h          debug.h       literals.h      view.h

classad_distribution.h  exprList.h    matchClassad.h  xmlLexer.h

classadErrno.h          exprTree.h    operators.h     xmlSink.h

classad.h               fnCall.h      query.h         xmlSource.h

classadItor.h           indexfile.h   sink.h

classad_stl.h           jsonSink.h    source.h

collectionBase.h        jsonSource.h  transaction.h

 

I found  "ClassAdArray queryScheddAds(String constraint);" from http://research.cs.wisc.edu/htcondor/manual/v8.6/6_1Web_Service.html

6.1.10 Methods for ClassAd Management .

 

Does queryScheddAds(...) return the list of schedd(s)? I can't find it in   /usr/include/classad/ header files.  Is it in another package?  Should I download something else?  

Thanks.