Hi John,
My response may be a bit brief, because I'm travelling right now.
>Conceptually, what is the difference between a 'View' and a 'Partition'
>within a ClassAdCollection?
A partition is a particular type of view, essentially. It's probably not a
kind of view that you need. For example, if you partition on "Universe"
with job ClassAds, you could get a partition view for "Vanillia",
"Standard", "MPI", or whatever.
> What I'm doing right now is just getting ClassAds that
>match a constraint expression out of a ClassAdCollection. That can be done by
>making a Query, binding it to the ClassAdCollection, and calling
>Query("root", constraint). However, I also need to get results back in
>order of Rank.
You can make a rank expression when you create a subview. If you want to
have a view of the machines that are Linux, and you want to rank based on
the Coolness attribute, you could do this:
collection->CreateSubView("myview", "root",
"other.OSType == \"Linux\"",
"other.Coolness");
The rank is just an expression, so it could be more complicated:
other.Coolness / other.Badness
Does that help, or does it not answer your question?
-alain
|