Author: justi9
Date: 2008-09-23 13:27:36 -0400 (Tue, 23 Sep 2008)
New Revision: 2534
Modified:
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/sql/schema.sql
Log:
Schema update to get condor changes
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2008-09-23 17:22:51 UTC (rev 2533)
+++ mgmt/trunk/mint/python/mint/schema.py 2008-09-23 17:27:36 UTC (rev 2534)
@@ -3,6 +3,591 @@
from datetime import datetime
from qpid.management import objectId
+class Slot(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('SlotStats', cascade='null', default=None)
+ statsPrev = ForeignKey('SlotStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ AccountingGroup = StringCol(length=1000, default=None)
+ Arch = StringCol(length=1000, default=None)
+ CheckpointPlatform = StringCol(length=1000, default=None)
+ ClientMachine = StringCol(length=1000, default=None)
+ ConcurrencyLimits = StringCol(length=1000, default=None)
+ Cpus = IntCol(default=None)
+ CurrentRank = FloatCol(default=None)
+ Disk = IntCol(default=None)
+ FileSystemDomain = StringCol(length=1000, default=None)
+ GlobalJobId = StringCol(length=1000, default=None)
+ ImageSize = IntCol(default=None)
+ IsValidCheckpointPlatform = StringCol(length=4000, default=None)
+ JobId = StringCol(length=1000, default=None)
+ JobStart = TimestampCol(default=None)
+ KFlops = IntCol(default=None)
+ Machine = StringCol(length=1000, default=None)
+ MaxJobRetirementTime = StringCol(length=4000, default=None)
+ Memory = IntCol(default=None)
+ Mips = IntCol(default=None)
+ MyAddress = StringCol(length=1000, default=None)
+ Name = StringCol(length=1000, default=None)
+ OpSys = StringCol(length=1000, default=None)
+ PreemptingConcurrencyLimits = StringCol(length=1000, default=None)
+ PreemptingOwner = StringCol(length=1000, default=None)
+ PreemptingUser = StringCol(length=1000, default=None)
+ PreemptingRank = FloatCol(default=None)
+ RemoteOwner = StringCol(length=1000, default=None)
+ RemoteUser = StringCol(length=1000, default=None)
+ Requirements = StringCol(length=4000, default=None)
+ PublicNetworkIpAddr = StringCol(length=1000, default=None)
+ Rank = StringCol(length=4000, default=None)
+ SlotID = IntCol(default=None)
+ Start = StringCol(length=4000, default=None)
+ StarterAbilityList = StringCol(length=4000, default=None)
+ TotalClaimRunTime = IntCol(default=None)
+ TotalClaimSuspendTime = IntCol(default=None)
+ TotalCpus = IntCol(default=None)
+ TotalDisk = IntCol(default=None)
+ TotalJobRunTime = IntCol(default=None)
+ TotalJobSuspendTime = IntCol(default=None)
+ TotalMemory = IntCol(default=None)
+ TotalSlots = IntCol(default=None)
+ TotalVirtualMemory = IntCol(default=None)
+ UidDomain = StringCol(length=1000, default=None)
+ VirtualMemory = IntCol(default=None)
+ WindowsBuildNumber = IntCol(default=None)
+ WindowsMajorVersion = IntCol(default=None)
+ WindowsMinorVersion = IntCol(default=None)
+
+ CondorPlatform = StringCol(length=1000, default=None)
+ CondorVersion = StringCol(length=1000, default=None)
+ DaemonStartTime = TimestampCol(default=None)
+
+
+class SlotStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ slot = ForeignKey('Slot', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ Activity = StringCol(length=1000, default=None)
+ ClockDay = IntCol(default=None)
+ ClockMin = IntCol(default=None)
+ CondorLoadAvg = FloatCol(default=None)
+ ConsoleIdle = IntCol(default=None)
+ EnteredCurrentActivity = TimestampCol(default=None)
+ EnteredCurrentState = TimestampCol(default=None)
+ KeyboardIdle = IntCol(default=None)
+ LastBenchmark = TimestampCol(default=None)
+ LastFetchWorkCompleted = TimestampCol(default=None)
+ LastFetchWorkSpawned = TimestampCol(default=None)
+ LastPeriodicCheckpoint = TimestampCol(default=None)
+ LoadAvg = FloatCol(default=None)
+ MyCurrentTime = TimestampCol(default=None)
+ NextFetchWorkDelay = TimestampCol(default=None)
+ State = StringCol(length=1000, default=None)
+ TimeToLive = IntCol(default=None)
+ TotalCondorLoadAvg = FloatCol(default=None)
+ TotalLoadAvg = FloatCol(default=None)
+ TotalTimeBackfillBusy = IntCol(default=None)
+ TotalTimeBackfillIdle = IntCol(default=None)
+ TotalTimeBackfillKilling = IntCol(default=None)
+ TotalTimeClaimedBusy = IntCol(default=None)
+ TotalTimeClaimedIdle = IntCol(default=None)
+ TotalTimeClaimedRetiring = IntCol(default=None)
+ TotalTimeClaimedSuspended = IntCol(default=None)
+ TotalTimeMatchedIdle = IntCol(default=None)
+ TotalTimeOwnerIdle = IntCol(default=None)
+ TotalTimePreemptingKilling = IntCol(default=None)
+ TotalTimePreemptingVacating = IntCol(default=None)
+ TotalTimeUnclaimedBenchmarking = IntCol(default=None)
+ TotalTimeUnclaimedIdle = IntCol(default=None)
+
+ MonitorSelfAge = IntCol(default=None)
+ MonitorSelfCPUUsage = FloatCol(default=None)
+ MonitorSelfImageSize = FloatCol(default=None)
+ MonitorSelfRegisteredSocketCount = IntCol(default=None)
+ MonitorSelfResidentSetSize = IntCol(default=None)
+ MonitorSelfTime = TimestampCol(default=None)
+
+
+
+
+class Job(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('JobStats', cascade='null', default=None)
+ statsPrev = ForeignKey('JobStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ scheduler = ForeignKey('Scheduler', cascade='null', default=None)
+ submitter = ForeignKey('Submitter', cascade='null', default=None)
+ AccountingGroup = StringCol(length=1000, default=None)
+ Args = StringCol(length=4000, default=None)
+ ClusterId = IntCol(default=None)
+ Cmd = StringCol(length=4000, default=None)
+ ConcurrencyLimits = StringCol(length=4000, default=None)
+ CustomGroup = StringCol(length=1000, default=None)
+ CustomId = StringCol(length=1000, default=None)
+ CustomPriority = IntCol(default=None)
+ GlobalJobId = StringCol(length=1000, default=None)
+ InRsv = StringCol(length=4000, default=None)
+ Iwd = StringCol(length=4000, default=None)
+ JobStatus = IntCol(default=None)
+ Note = StringCol(length=4000, default=None)
+ Out = StringCol(length=4000, default=None)
+ Owner = StringCol(length=1000, default=None)
+ ProcId = IntCol(default=None)
+ QDate = TimestampCol(default=None)
+ Requirements = StringCol(length=4000, default=None)
+ Title = StringCol(length=1000, default=None)
+ UserLog = StringCol(length=4000, default=None)
+ HoldReason = StringCol(length=4000, default=None)
+
+
+ def GetAd(self, model, callback, JobAd):
+ actualArgs = dict()
+ actualArgs["JobAd"] = JobAd
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "GetAd",
+ callback, args=actualArgs)
+
+ def SetAttribute(self, model, callback, Name, Value):
+ actualArgs = dict()
+ actualArgs["Name"] = Name
+ actualArgs["Value"] = Value
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "SetAttribute",
+ callback, args=actualArgs)
+
+ def Hold(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Hold",
+ callback, args=actualArgs)
+
+ def Release(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Release",
+ callback, args=actualArgs)
+
+ def Remove(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Remove",
+ callback, args=actualArgs)
+
+ def Fetch(self, model, callback, File, Start, End, Data):
+ actualArgs = dict()
+ actualArgs["File"] = File
+ actualArgs["Start"] = Start
+ actualArgs["End"] = End
+ actualArgs["Data"] = Data
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Fetch",
+ callback, args=actualArgs)
+
+class JobStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ job = ForeignKey('Job', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+
+
+
+
+class Scheduler(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('SchedulerStats', cascade='null', default=None)
+ statsPrev = ForeignKey('SchedulerStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ JobQueueBirthdate = TimestampCol(default=None)
+ MaxJobsRunning = IntCol(default=None)
+ Machine = StringCol(length=1000, default=None)
+ MyAddress = StringCol(length=1000, default=None)
+ Name = StringCol(length=1000, default=None)
+ PublicNetworkIpAddr = StringCol(length=1000, default=None)
+
+ CondorPlatform = StringCol(length=1000, default=None)
+ CondorVersion = StringCol(length=1000, default=None)
+ DaemonStartTime = TimestampCol(default=None)
+
+
+class SchedulerStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ scheduler = ForeignKey('Scheduler', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ NumUsers = IntCol(default=None)
+ TotalHeldJobs = IntCol(default=None)
+ TotalIdleJobs = IntCol(default=None)
+ TotalJobAds = IntCol(default=None)
+ TotalRemovedJobs = IntCol(default=None)
+ TotalRunningJobs = IntCol(default=None)
+
+ MonitorSelfAge = IntCol(default=None)
+ MonitorSelfCPUUsage = FloatCol(default=None)
+ MonitorSelfImageSize = FloatCol(default=None)
+ MonitorSelfRegisteredSocketCount = IntCol(default=None)
+ MonitorSelfResidentSetSize = IntCol(default=None)
+ MonitorSelfTime = TimestampCol(default=None)
+
+
+
+
+class Submitter(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('SubmitterStats', cascade='null', default=None)
+ statsPrev = ForeignKey('SubmitterStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ scheduler = ForeignKey('Scheduler', cascade='null', default=None)
+ JobQueueBirthdate = IntCol(default=None)
+ Machine = StringCol(length=1000, default=None)
+ Name = StringCol(length=1000, default=None)
+ ScheddName = StringCol(length=1000, default=None)
+
+
+class SubmitterStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ submitter = ForeignKey('Submitter', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ HeldJobs = IntCol(default=None)
+ IdleJobs = IntCol(default=None)
+ RunningJobs = IntCol(default=None)
+
+
+
+
+class Negotiator(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('NegotiatorStats', cascade='null',
default=None)
+ statsPrev = ForeignKey('NegotiatorStats', cascade='null',
default=None)
+ classInfos = dict() # brokerId => classInfo
+ Name = StringCol(length=1000, default=None)
+ Machine = StringCol(length=1000, default=None)
+ MyAddress = StringCol(length=1000, default=None)
+
+ CondorPlatform = StringCol(length=1000, default=None)
+ CondorVersion = StringCol(length=1000, default=None)
+ DaemonStartTime = TimestampCol(default=None)
+
+
+ def GetLimits(self, model, callback, Limits):
+ actualArgs = dict()
+ actualArgs["Limits"] = Limits
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "GetLimits",
+ callback, args=actualArgs)
+
+ def SetLimit(self, model, callback, Name, Max):
+ actualArgs = dict()
+ actualArgs["Name"] = Name
+ actualArgs["Max"] = Max
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "SetLimit",
+ callback, args=actualArgs)
+
+ def Reconfig(self, model, callback):
+ actualArgs = dict()
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Reconfig",
+ callback, args=actualArgs)
+
+class NegotiatorStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ negotiator = ForeignKey('Negotiator', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+
+ MonitorSelfAge = IntCol(default=None)
+ MonitorSelfCPUUsage = FloatCol(default=None)
+ MonitorSelfImageSize = FloatCol(default=None)
+ MonitorSelfRegisteredSocketCount = IntCol(default=None)
+ MonitorSelfResidentSetSize = IntCol(default=None)
+ MonitorSelfTime = TimestampCol(default=None)
+
+
+
+
+class Acl(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('AclStats', cascade='null', default=None)
+ statsPrev = ForeignKey('AclStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ broker = ForeignKey('Broker', cascade='null', default=None)
+ policyFile = StringCol(length=1000, default=None)
+ enforcingAcl = BoolCol(default=None)
+ transferAcl = BoolCol(default=None)
+ lastAclLoad = TimestampCol(default=None)
+
+
+ def reloadACLFile(self, model, callback):
+ """Reload the ACL file"""
+ actualArgs = dict()
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "reloadACLFile",
+ callback, args=actualArgs)
+
+class AclStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ acl = ForeignKey('Acl', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ aclDenyCount = BigIntCol(default=None)
+
+
+
+
+class Cluster(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('ClusterStats', cascade='null', default=None)
+ statsPrev = ForeignKey('ClusterStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ broker = ForeignKey('Broker', cascade='null', default=None)
+ clusterName = StringCol(length=1000, default=None)
+ clusterID = StringCol(length=1000, default=None)
+ publishedURL = StringCol(length=1000, default=None)
+ clusterSize = SmallIntCol(default=None)
+ status = StringCol(length=1000, default=None)
+ members = StringCol(length=4000, default=None)
+
+
+ def stopClusterNode(self, model, callback):
+ actualArgs = dict()
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "stopClusterNode",
+ callback, args=actualArgs)
+
+ def stopFullCluster(self, model, callback):
+ actualArgs = dict()
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "stopFullCluster",
+ callback, args=actualArgs)
+
+class ClusterStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ cluster = ForeignKey('Cluster', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+
+
+
+
+class Store(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('StoreStats', cascade='null', default=None)
+ statsPrev = ForeignKey('StoreStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ broker = ForeignKey('Broker', cascade='null', default=None)
+ location = StringCol(length=1000, default=None)
+ defaultInitialFileCount = SmallIntCol(default=None)
+ defaultDataFileSize = IntCol(default=None)
+ tplIsInitialized = BoolCol(default=None)
+ tplDirectory = StringCol(length=1000, default=None)
+ tplWritePageSize = IntCol(default=None)
+ tplWritePages = IntCol(default=None)
+ tplInitialFileCount = SmallIntCol(default=None)
+ tplDataFileSize = IntCol(default=None)
+ tplCurrentFileCount = IntCol(default=None)
+
+
+class StoreStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ store = ForeignKey('Store', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ tplTransactionDepth = IntCol(default=None)
+ tplTransactionDepthLow = IntCol(default=None)
+ tplTransactionDepthHigh = IntCol(default=None)
+ tplTxnPrepares = BigIntCol(default=None)
+ tplTxnCommits = BigIntCol(default=None)
+ tplTxnAborts = BigIntCol(default=None)
+ tplOutstandingAIOs = IntCol(default=None)
+ tplOutstandingAIOsLow = IntCol(default=None)
+ tplOutstandingAIOsHigh = IntCol(default=None)
+
+
+
+
+class Journal(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ sourceScopeId = BigIntCol(default=None)
+ sourceObjectId = BigIntCol(default=None)
+ creationTime = TimestampCol(default=None)
+ deletionTime = TimestampCol(default=None)
+ managedBroker = StringCol(length=1000, default=None)
+ statsCurr = ForeignKey('JournalStats', cascade='null', default=None)
+ statsPrev = ForeignKey('JournalStats', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ queue = ForeignKey('Queue', cascade='null', default=None)
+ name = StringCol(length=1000, default=None)
+ directory = StringCol(length=1000, default=None)
+ baseFileName = StringCol(length=1000, default=None)
+ writePageSize = IntCol(default=None)
+ writePages = IntCol(default=None)
+ readPageSize = IntCol(default=None)
+ readPages = IntCol(default=None)
+ initialFileCount = SmallIntCol(default=None)
+ dataFileSize = IntCol(default=None)
+ currentFileCount = IntCol(default=None)
+
+
+ def expand(self, model, callback, by):
+ """Increase number of files allocated for this
journal"""
+ actualArgs = dict()
+ actualArgs["by"] = by
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "expand",
+ callback, args=actualArgs)
+
+class JournalStats(SQLObject):
+ class sqlmeta:
+ lazyUpdate = True
+
+ recTime = TimestampCol(default=None)
+ journal = ForeignKey('Journal', cascade='null', default=None)
+ classInfos = dict() # brokerId => classInfo
+ recordDepth = IntCol(default=None)
+ recordDepthLow = IntCol(default=None)
+ recordDepthHigh = IntCol(default=None)
+ enqueues = BigIntCol(default=None)
+ dequeues = BigIntCol(default=None)
+ txnEnqueues = BigIntCol(default=None)
+ txnDequeues = BigIntCol(default=None)
+ txnCommits = BigIntCol(default=None)
+ txnAborts = BigIntCol(default=None)
+ outstandingAIOs = IntCol(default=None)
+ outstandingAIOsLow = IntCol(default=None)
+ outstandingAIOsHigh = IntCol(default=None)
+ freeFileCount = IntCol(default=None)
+ freeFileCountLow = IntCol(default=None)
+ freeFileCountHigh = IntCol(default=None)
+ availableFileCount = IntCol(default=None)
+ availableFileCountLow = IntCol(default=None)
+ availableFileCountHigh = IntCol(default=None)
+ writeWaitFailures = BigIntCol(default=None)
+ writeBusyFailures = BigIntCol(default=None)
+ readRecordCount = BigIntCol(default=None)
+ readBusyFailures = BigIntCol(default=None)
+ writePageCacheDepth = IntCol(default=None)
+ writePageCacheDepthLow = IntCol(default=None)
+ writePageCacheDepthHigh = IntCol(default=None)
+ readPageCacheDepth = IntCol(default=None)
+ readPageCacheDepthLow = IntCol(default=None)
+ readPageCacheDepthHigh = IntCol(default=None)
+
+
+
+
class System(SQLObject):
class sqlmeta:
lazyUpdate = True
@@ -518,530 +1103,77 @@
-class Acl(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+classToSchemaNameMap = dict()
+schemaNameToClassMap = dict()
+schemaReservedWordsMap = {"in": "inRsv", "In":
"InRsv",
+ "connection": "clientConnection", "Connection":
"ClientConnection",
+ "other": "otherRsv"}
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('AclStats', cascade='null', default=None)
- statsPrev = ForeignKey('AclStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- broker = ForeignKey('Broker', cascade='null', default=None)
- policyFile = StringCol(length=1000, default=None)
- enforcingAcl = BoolCol(default=None)
- transferAcl = BoolCol(default=None)
- lastAclLoad = TimestampCol(default=None)
+classToSchemaNameMap['Slot'] = 'Slot'
+schemaNameToClassMap['Slot'] = Slot
+Slot.sqlmeta.addJoin(SQLMultipleJoin('SlotStats',
joinMethodName='stats'))
- def reloadACLFile(self, model, callback):
- """Reload the ACL file"""
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "reloadACLFile",
- callback, args=actualArgs)
+classToSchemaNameMap['Job'] = 'Job'
+schemaNameToClassMap['Job'] = Job
-class AclStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Job', joinMethodName='jobs'))
- recTime = TimestampCol(default=None)
- acl = ForeignKey('Acl', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- aclDenyCount = BigIntCol(default=None)
+Submitter.sqlmeta.addJoin(SQLMultipleJoin('Job', joinMethodName='jobs'))
+Job.sqlmeta.addJoin(SQLMultipleJoin('JobStats', joinMethodName='stats'))
+classToSchemaNameMap['Scheduler'] = 'Scheduler'
+schemaNameToClassMap['Scheduler'] = Scheduler
-class Cluster(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+Scheduler.sqlmeta.addJoin(SQLMultipleJoin('SchedulerStats',
joinMethodName='stats'))
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('ClusterStats', cascade='null', default=None)
- statsPrev = ForeignKey('ClusterStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- broker = ForeignKey('Broker', cascade='null', default=None)
- clusterName = StringCol(length=1000, default=None)
- clusterID = StringCol(length=1000, default=None)
- publishedURL = StringCol(length=1000, default=None)
- clusterSize = SmallIntCol(default=None)
- status = StringCol(length=1000, default=None)
- members = StringCol(length=4000, default=None)
+classToSchemaNameMap['Submitter'] = 'Submitter'
+schemaNameToClassMap['Submitter'] = Submitter
+Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Submitter',
joinMethodName='submitters'))
- def stopClusterNode(self, model, callback):
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "stopClusterNode",
- callback, args=actualArgs)
- def stopFullCluster(self, model, callback):
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "stopFullCluster",
- callback, args=actualArgs)
+Submitter.sqlmeta.addJoin(SQLMultipleJoin('SubmitterStats',
joinMethodName='stats'))
-class ClusterStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+classToSchemaNameMap['Negotiator'] = 'Negotiator'
+schemaNameToClassMap['Negotiator'] = Negotiator
- recTime = TimestampCol(default=None)
- cluster = ForeignKey('Cluster', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
+Negotiator.sqlmeta.addJoin(SQLMultipleJoin('NegotiatorStats',
joinMethodName='stats'))
+classToSchemaNameMap['Acl'] = 'acl'
+schemaNameToClassMap['acl'] = Acl
+Broker.sqlmeta.addJoin(SQLMultipleJoin('Acl', joinMethodName='acls'))
-class Store(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+Acl.sqlmeta.addJoin(SQLMultipleJoin('AclStats', joinMethodName='stats'))
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('StoreStats', cascade='null', default=None)
- statsPrev = ForeignKey('StoreStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- broker = ForeignKey('Broker', cascade='null', default=None)
- location = StringCol(length=1000, default=None)
- defaultInitialFileCount = SmallIntCol(default=None)
- defaultDataFileSize = IntCol(default=None)
- tplIsInitialized = BoolCol(default=None)
- tplDirectory = StringCol(length=1000, default=None)
- tplWritePageSize = IntCol(default=None)
- tplWritePages = IntCol(default=None)
- tplInitialFileCount = SmallIntCol(default=None)
- tplDataFileSize = IntCol(default=None)
- tplCurrentFileCount = IntCol(default=None)
+classToSchemaNameMap['Cluster'] = 'cluster'
+schemaNameToClassMap['cluster'] = Cluster
+Broker.sqlmeta.addJoin(SQLMultipleJoin('Cluster',
joinMethodName='clusters'))
-class StoreStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
- recTime = TimestampCol(default=None)
- store = ForeignKey('Store', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- tplTransactionDepth = IntCol(default=None)
- tplTransactionDepthLow = IntCol(default=None)
- tplTransactionDepthHigh = IntCol(default=None)
- tplTxnPrepares = BigIntCol(default=None)
- tplTxnCommits = BigIntCol(default=None)
- tplTxnAborts = BigIntCol(default=None)
- tplOutstandingAIOs = IntCol(default=None)
- tplOutstandingAIOsLow = IntCol(default=None)
- tplOutstandingAIOsHigh = IntCol(default=None)
+Cluster.sqlmeta.addJoin(SQLMultipleJoin('ClusterStats',
joinMethodName='stats'))
+classToSchemaNameMap['Store'] = 'Store'
+schemaNameToClassMap['Store'] = Store
+Broker.sqlmeta.addJoin(SQLMultipleJoin('Store',
joinMethodName='stores'))
-class Journal(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+Store.sqlmeta.addJoin(SQLMultipleJoin('StoreStats',
joinMethodName='stats'))
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('JournalStats', cascade='null', default=None)
- statsPrev = ForeignKey('JournalStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- queue = ForeignKey('Queue', cascade='null', default=None)
- name = StringCol(length=1000, default=None)
- directory = StringCol(length=1000, default=None)
- baseFileName = StringCol(length=1000, default=None)
- writePageSize = IntCol(default=None)
- writePages = IntCol(default=None)
- readPageSize = IntCol(default=None)
- readPages = IntCol(default=None)
- initialFileCount = SmallIntCol(default=None)
- dataFileSize = IntCol(default=None)
- currentFileCount = IntCol(default=None)
+classToSchemaNameMap['Journal'] = 'Journal'
+schemaNameToClassMap['Journal'] = Journal
+Queue.sqlmeta.addJoin(SQLMultipleJoin('Journal',
joinMethodName='journals'))
- def expand(self, model, callback, by):
- """Increase number of files allocated for this
journal"""
- actualArgs = dict()
- actualArgs["by"] = by
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "expand",
- callback, args=actualArgs)
-class JournalStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
+Journal.sqlmeta.addJoin(SQLMultipleJoin('JournalStats',
joinMethodName='stats'))
- recTime = TimestampCol(default=None)
- journal = ForeignKey('Journal', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- recordDepth = IntCol(default=None)
- recordDepthLow = IntCol(default=None)
- recordDepthHigh = IntCol(default=None)
- enqueues = BigIntCol(default=None)
- dequeues = BigIntCol(default=None)
- txnEnqueues = BigIntCol(default=None)
- txnDequeues = BigIntCol(default=None)
- txnCommits = BigIntCol(default=None)
- txnAborts = BigIntCol(default=None)
- outstandingAIOs = IntCol(default=None)
- outstandingAIOsLow = IntCol(default=None)
- outstandingAIOsHigh = IntCol(default=None)
- freeFileCount = IntCol(default=None)
- freeFileCountLow = IntCol(default=None)
- freeFileCountHigh = IntCol(default=None)
- availableFileCount = IntCol(default=None)
- availableFileCountLow = IntCol(default=None)
- availableFileCountHigh = IntCol(default=None)
- writeWaitFailures = BigIntCol(default=None)
- writeBusyFailures = BigIntCol(default=None)
- readRecordCount = BigIntCol(default=None)
- readBusyFailures = BigIntCol(default=None)
- writePageCacheDepth = IntCol(default=None)
- writePageCacheDepthLow = IntCol(default=None)
- writePageCacheDepthHigh = IntCol(default=None)
- readPageCacheDepth = IntCol(default=None)
- readPageCacheDepthLow = IntCol(default=None)
- readPageCacheDepthHigh = IntCol(default=None)
-
-
-
-
-class Slot(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('SlotStats', cascade='null', default=None)
- statsPrev = ForeignKey('SlotStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- AccountingGroup = StringCol(length=1000, default=None)
- Arch = StringCol(length=1000, default=None)
- CheckpointPlatform = StringCol(length=1000, default=None)
- ClientMachine = StringCol(length=1000, default=None)
- ConcurrencyLimits = StringCol(length=1000, default=None)
- Cpus = IntCol(default=None)
- CurrentRank = FloatCol(default=None)
- Disk = IntCol(default=None)
- FileSystemDomain = StringCol(length=1000, default=None)
- GlobalJobId = StringCol(length=1000, default=None)
- ImageSize = IntCol(default=None)
- IsValidCheckpointPlatform = StringCol(length=4000, default=None)
- JobId = StringCol(length=1000, default=None)
- JobStart = TimestampCol(default=None)
- KFlops = IntCol(default=None)
- Machine = StringCol(length=1000, default=None)
- MaxJobRetirementTime = StringCol(length=4000, default=None)
- Memory = IntCol(default=None)
- Mips = IntCol(default=None)
- MyAddress = StringCol(length=1000, default=None)
- Name = StringCol(length=1000, default=None)
- OpSys = StringCol(length=1000, default=None)
- PreemptingConcurrencyLimits = StringCol(length=1000, default=None)
- PreemptingOwner = StringCol(length=1000, default=None)
- PreemptingUser = StringCol(length=1000, default=None)
- PreemptingRank = FloatCol(default=None)
- RemoteOwner = StringCol(length=1000, default=None)
- RemoteUser = StringCol(length=1000, default=None)
- Requirements = StringCol(length=4000, default=None)
- PublicNetworkIpAddr = StringCol(length=1000, default=None)
- Rank = StringCol(length=4000, default=None)
- SlotID = IntCol(default=None)
- Start = StringCol(length=4000, default=None)
- StarterAbilityList = StringCol(length=4000, default=None)
- TotalClaimRunTime = IntCol(default=None)
- TotalClaimSuspendTime = IntCol(default=None)
- TotalCpus = IntCol(default=None)
- TotalDisk = IntCol(default=None)
- TotalJobRunTime = IntCol(default=None)
- TotalJobSuspendTime = IntCol(default=None)
- TotalMemory = IntCol(default=None)
- TotalSlots = IntCol(default=None)
- TotalVirtualMemory = IntCol(default=None)
- UidDomain = StringCol(length=1000, default=None)
- VirtualMemory = IntCol(default=None)
- WindowsBuildNumber = IntCol(default=None)
- WindowsMajorVersion = IntCol(default=None)
- WindowsMinorVersion = IntCol(default=None)
-
- CondorPlatform = StringCol(length=1000, default=None)
- CondorVersion = StringCol(length=1000, default=None)
- DaemonStartTime = TimestampCol(default=None)
-
-
-class SlotStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- slot = ForeignKey('Slot', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- Activity = StringCol(length=1000, default=None)
- ClockDay = IntCol(default=None)
- ClockMin = IntCol(default=None)
- CondorLoadAvg = FloatCol(default=None)
- ConsoleIdle = IntCol(default=None)
- EnteredCurrentActivity = TimestampCol(default=None)
- EnteredCurrentState = TimestampCol(default=None)
- KeyboardIdle = IntCol(default=None)
- LastBenchmark = TimestampCol(default=None)
- LastFetchWorkCompleted = TimestampCol(default=None)
- LastFetchWorkSpawned = TimestampCol(default=None)
- LastPeriodicCheckpoint = TimestampCol(default=None)
- LoadAvg = FloatCol(default=None)
- MyCurrentTime = TimestampCol(default=None)
- NextFetchWorkDelay = TimestampCol(default=None)
- State = StringCol(length=1000, default=None)
- TimeToLive = IntCol(default=None)
- TotalCondorLoadAvg = FloatCol(default=None)
- TotalLoadAvg = FloatCol(default=None)
- TotalTimeBackfillBusy = IntCol(default=None)
- TotalTimeBackfillIdle = IntCol(default=None)
- TotalTimeBackfillKilling = IntCol(default=None)
- TotalTimeClaimedBusy = IntCol(default=None)
- TotalTimeClaimedIdle = IntCol(default=None)
- TotalTimeClaimedRetiring = IntCol(default=None)
- TotalTimeClaimedSuspended = IntCol(default=None)
- TotalTimeMatchedIdle = IntCol(default=None)
- TotalTimeOwnerIdle = IntCol(default=None)
- TotalTimePreemptingKilling = IntCol(default=None)
- TotalTimePreemptingVacating = IntCol(default=None)
- TotalTimeUnclaimedBenchmarking = IntCol(default=None)
- TotalTimeUnclaimedIdle = IntCol(default=None)
-
- MonitorSelfAge = IntCol(default=None)
- MonitorSelfCPUUsage = FloatCol(default=None)
- MonitorSelfImageSize = FloatCol(default=None)
- MonitorSelfRegisteredSocketCount = IntCol(default=None)
- MonitorSelfResidentSetSize = IntCol(default=None)
- MonitorSelfTime = TimestampCol(default=None)
-
-
-
-
-class Job(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('JobStats', cascade='null', default=None)
- statsPrev = ForeignKey('JobStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- scheduler = ForeignKey('Scheduler', cascade='null', default=None)
- submitter = ForeignKey('Submitter', cascade='null', default=None)
- AccountingGroup = StringCol(length=1000, default=None)
- Args = StringCol(length=4000, default=None)
- ClusterId = IntCol(default=None)
- Cmd = StringCol(length=4000, default=None)
- ConcurrencyLimits = StringCol(length=4000, default=None)
- CustomGroup = StringCol(length=1000, default=None)
- CustomId = StringCol(length=1000, default=None)
- CustomPriority = IntCol(default=None)
- GlobalJobId = StringCol(length=1000, default=None)
- InRsv = StringCol(length=4000, default=None)
- Iwd = StringCol(length=4000, default=None)
- JobStatus = IntCol(default=None)
- Note = StringCol(length=4000, default=None)
- Out = StringCol(length=4000, default=None)
- Owner = StringCol(length=1000, default=None)
- ProcId = IntCol(default=None)
- QDate = TimestampCol(default=None)
- Requirements = StringCol(length=4000, default=None)
- Title = StringCol(length=1000, default=None)
- UserLog = StringCol(length=4000, default=None)
- HoldReason = StringCol(length=4000, default=None)
-
-
- def GetAd(self, model, callback, JobAd):
- actualArgs = dict()
- actualArgs["JobAd"] = JobAd
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "GetAd",
- callback, args=actualArgs)
-
- def SetAttribute(self, model, callback, Name, Value):
- actualArgs = dict()
- actualArgs["Name"] = Name
- actualArgs["Value"] = Value
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "SetAttribute",
- callback, args=actualArgs)
-
- def Hold(self, model, callback, Reason):
- actualArgs = dict()
- actualArgs["Reason"] = Reason
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "Hold",
- callback, args=actualArgs)
-
- def Release(self, model, callback, Reason):
- actualArgs = dict()
- actualArgs["Reason"] = Reason
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "Release",
- callback, args=actualArgs)
-
- def Remove(self, model, callback, Reason):
- actualArgs = dict()
- actualArgs["Reason"] = Reason
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "Remove",
- callback, args=actualArgs)
-
- def Fetch(self, model, callback, File, Start, End, Data):
- actualArgs = dict()
- actualArgs["File"] = File
- actualArgs["Start"] = Start
- actualArgs["End"] = End
- actualArgs["Data"] = Data
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
- conn.callMethod(originalId, classInfo, "Fetch",
- callback, args=actualArgs)
-
-class JobStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- job = ForeignKey('Job', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
-
-
-
-
-class Scheduler(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('SchedulerStats', cascade='null', default=None)
- statsPrev = ForeignKey('SchedulerStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- JobQueueBirthdate = TimestampCol(default=None)
- MaxJobsRunning = IntCol(default=None)
- Machine = StringCol(length=1000, default=None)
- MyAddress = StringCol(length=1000, default=None)
- Name = StringCol(length=1000, default=None)
- PublicNetworkIpAddr = StringCol(length=1000, default=None)
-
- CondorPlatform = StringCol(length=1000, default=None)
- CondorVersion = StringCol(length=1000, default=None)
- DaemonStartTime = TimestampCol(default=None)
-
-
-class SchedulerStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- scheduler = ForeignKey('Scheduler', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- NumUsers = IntCol(default=None)
- TotalHeldJobs = IntCol(default=None)
- TotalIdleJobs = IntCol(default=None)
- TotalJobAds = IntCol(default=None)
- TotalRemovedJobs = IntCol(default=None)
- TotalRunningJobs = IntCol(default=None)
-
- MonitorSelfAge = IntCol(default=None)
- MonitorSelfCPUUsage = FloatCol(default=None)
- MonitorSelfImageSize = FloatCol(default=None)
- MonitorSelfRegisteredSocketCount = IntCol(default=None)
- MonitorSelfResidentSetSize = IntCol(default=None)
- MonitorSelfTime = TimestampCol(default=None)
-
-
-
-
-class Submitter(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- sourceScopeId = BigIntCol(default=None)
- sourceObjectId = BigIntCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('SubmitterStats', cascade='null', default=None)
- statsPrev = ForeignKey('SubmitterStats', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- scheduler = ForeignKey('Scheduler', cascade='null', default=None)
- JobQueueBirthdate = IntCol(default=None)
- Machine = StringCol(length=1000, default=None)
- Name = StringCol(length=1000, default=None)
- ScheddName = StringCol(length=1000, default=None)
-
-
-class SubmitterStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- recTime = TimestampCol(default=None)
- submitter = ForeignKey('Submitter', cascade='null', default=None)
- classInfos = dict() # brokerId => classInfo
- HeldJobs = IntCol(default=None)
- IdleJobs = IntCol(default=None)
- RunningJobs = IntCol(default=None)
-
-
-
-
-classToSchemaNameMap = dict()
-schemaNameToClassMap = dict()
-schemaReservedWordsMap = {"in": "inRsv", "In":
"InRsv",
- "connection": "clientConnection", "Connection":
"ClientConnection",
- "other": "otherRsv"}
-
classToSchemaNameMap['System'] = 'System'
schemaNameToClassMap['System'] = System
@@ -1133,63 +1265,3 @@
Session.sqlmeta.addJoin(SQLMultipleJoin('SessionStats',
joinMethodName='stats'))
-classToSchemaNameMap['Acl'] = 'acl'
-schemaNameToClassMap['acl'] = Acl
-
-Broker.sqlmeta.addJoin(SQLMultipleJoin('Acl', joinMethodName='acls'))
-
-
-Acl.sqlmeta.addJoin(SQLMultipleJoin('AclStats', joinMethodName='stats'))
-
-classToSchemaNameMap['Cluster'] = 'cluster'
-schemaNameToClassMap['cluster'] = Cluster
-
-Broker.sqlmeta.addJoin(SQLMultipleJoin('Cluster',
joinMethodName='clusters'))
-
-
-Cluster.sqlmeta.addJoin(SQLMultipleJoin('ClusterStats',
joinMethodName='stats'))
-
-classToSchemaNameMap['Store'] = 'Store'
-schemaNameToClassMap['Store'] = Store
-
-Broker.sqlmeta.addJoin(SQLMultipleJoin('Store',
joinMethodName='stores'))
-
-
-Store.sqlmeta.addJoin(SQLMultipleJoin('StoreStats',
joinMethodName='stats'))
-
-classToSchemaNameMap['Journal'] = 'Journal'
-schemaNameToClassMap['Journal'] = Journal
-
-Queue.sqlmeta.addJoin(SQLMultipleJoin('Journal',
joinMethodName='journals'))
-
-
-Journal.sqlmeta.addJoin(SQLMultipleJoin('JournalStats',
joinMethodName='stats'))
-
-classToSchemaNameMap['Slot'] = 'Slot'
-schemaNameToClassMap['Slot'] = Slot
-
-Slot.sqlmeta.addJoin(SQLMultipleJoin('SlotStats',
joinMethodName='stats'))
-
-classToSchemaNameMap['Job'] = 'Job'
-schemaNameToClassMap['Job'] = Job
-
-Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Job', joinMethodName='jobs'))
-
-Submitter.sqlmeta.addJoin(SQLMultipleJoin('Job', joinMethodName='jobs'))
-
-
-Job.sqlmeta.addJoin(SQLMultipleJoin('JobStats', joinMethodName='stats'))
-
-classToSchemaNameMap['Scheduler'] = 'Scheduler'
-schemaNameToClassMap['Scheduler'] = Scheduler
-
-Scheduler.sqlmeta.addJoin(SQLMultipleJoin('SchedulerStats',
joinMethodName='stats'))
-
-classToSchemaNameMap['Submitter'] = 'Submitter'
-schemaNameToClassMap['Submitter'] = Submitter
-
-Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Submitter',
joinMethodName='submitters'))
-
-
-Submitter.sqlmeta.addJoin(SQLMultipleJoin('SubmitterStats',
joinMethodName='stats'))
-
Modified: mgmt/trunk/mint/sql/schema.sql
===================================================================
--- mgmt/trunk/mint/sql/schema.sql 2008-09-23 17:22:51 UTC (rev 2533)
+++ mgmt/trunk/mint/sql/schema.sql 2008-09-23 17:27:36 UTC (rev 2534)
@@ -406,6 +406,36 @@
last_error VARCHAR(1000)
);
+CREATE TABLE negotiator (
+ id SERIAL PRIMARY KEY,
+ rec_time TIMESTAMP,
+ source_scope_id BIGINT,
+ source_object_id BIGINT,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_curr_id INT,
+ stats_prev_id INT,
+ name VARCHAR(1000),
+ machine VARCHAR(1000),
+ my_address VARCHAR(1000),
+ condor_platform VARCHAR(1000),
+ condor_version VARCHAR(1000),
+ daemon_start_time TIMESTAMP
+);
+
+CREATE TABLE negotiator_stats (
+ id SERIAL PRIMARY KEY,
+ rec_time TIMESTAMP,
+ negotiator_id INT,
+ monitor_self_age INT,
+ monitor_self_cpu_usage FLOAT,
+ monitor_self_image_size FLOAT,
+ monitor_self_registered_socket_count INT,
+ monitor_self_resident_set_size INT,
+ monitor_self_time TIMESTAMP
+);
+
CREATE TABLE queue (
id SERIAL PRIMARY KEY,
rec_time TIMESTAMP,
@@ -855,6 +885,12 @@
ALTER TABLE link_stats ADD CONSTRAINT link_id_exists FOREIGN KEY (link_id) REFERENCES
link (id) ON DELETE SET NULL;
+ALTER TABLE negotiator ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES negotiator_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE negotiator ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES negotiator_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE negotiator_stats ADD CONSTRAINT negotiator_id_exists FOREIGN KEY
(negotiator_id) REFERENCES negotiator (id) ON DELETE SET NULL;
+
ALTER TABLE queue ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES queue_stats (id) ON DELETE SET NULL;
ALTER TABLE queue ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES queue_stats (id) ON DELETE SET NULL;