Re: [classad-users] collections, views, partitions


Date: Wed, 17 Apr 2002 10:47:55 -0500 (CDT)
From: Alain Aslag Roy <roy@xxxxxxxxxxx>
Subject: Re: [classad-users] collections, views, partitions
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




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