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

[Condor-users] quoted strings in quill schema



We're hacking on some enhancments to Quill, and we're looking for some
input. 

Quill currently has a schema for historical jobs that is roughly:

History_Horizontal (cid int, pid int, EnteredHistoryTable timestamp with
time zone, Owner text, QDate int, RemoteWallClockTime int, RemoteUserCpu
float, RemoteSysCpu float, ImageSize int, JobStatus int, JobPrio int,
Cmd text, CompletionDate int, LastRemoteHost text, primary key(cid,pid))

Anything from the job's classad that is not one of those columns goes into
the "vertical" schema:

History_Vertical (cid int, pid int, attr text, val text, 
primary key (cid, pid, attr))

(ie just <12, 3, "FileSystemDomain", "cs.wisc.edu">, for the FileSystemDomain
attribute of job 12.3)

In the current Quill, all of the strings are stored with doublequotes in the
database - so you'd have
SELECT Owner from History_Horizontal;
"epaulson"

The new schema has many more columns in the horizontal table, so fewer things
have to be looked up in the vertical table. Some of the things in the new
horizontal table are classad expressions, such as Requirements. The strings 
that are expressions are not quoted, so you would have something like:

SELECT Owner, Requirements from History_Horizontal;
"epaulson" | (Arch == "INTEL") && (OpSys == "LINUX") && ((Memory * 10
24) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

Basically, we store the exact some output that you'd get from the right-hand
side of 'condor_q -l' 

However, and here is where we need feedback, we think the quotes around
the Owner field (and the other string fields in the horizontal tables)
make them harder to use - it's stored in the database as a 'text' column,
so it's already clear that it's a string. If you've got other tables in
the database that you want to use, it's likely that you have the owner
name unquoted, so the quotes in the Quill data make it harder for to
join the two tables together.

If we drop the quotes though, you wouldn't be able to tell if something is 
a string, like Owner, or if something is an expression, like requirements,
just by looking at it. Furthermore, if we drop the quotes, if you've already
built something around Quill you'd have to go through and add them (or take
out the code that you've got to strip the quotes)

So, the question is should we store literals quoted or unquoted?

Thanks,

-Erik