rhmessaging commits: r2536 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-23 17:20:30 -0400 (Tue, 23 Sep 2008)
New Revision: 2536
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Fixed default value return for GetAds when there is a timeout
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-23 18:51:18 UTC (rev 2535)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-23 21:20:30 UTC (rev 2536)
@@ -476,7 +476,7 @@
# wait for up to 20 seconds for completion to be called
succeeded = wait(predicate, timeout=20)
if not succeeded:
- self.job_ads = {"":{"VALUE": "", "TYPE": "expression"}}
+ self.job_ads = {"":{"VALUE": "", "TYPE": 0}}
return self.job_ads
16 years, 3 months
rhmessaging commits: r2535 - in mgmt/trunk/mint: python/mint and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-23 14:51:18 -0400 (Tue, 23 Sep 2008)
New Revision: 2535
Added:
mgmt/trunk/mint/python/mint/Makefile
mgmt/trunk/mint/sql/Makefile
Removed:
mgmt/trunk/mint/xml/condor.xml
Modified:
mgmt/trunk/mint/Makefile
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/xml/Makefile
Log:
Add new makefiles to simplify the schema generation process
Modified: mgmt/trunk/mint/Makefile
===================================================================
--- mgmt/trunk/mint/Makefile 2008-09-23 17:27:36 UTC (rev 2534)
+++ mgmt/trunk/mint/Makefile 2008-09-23 18:51:18 UTC (rev 2535)
@@ -1,4 +1,4 @@
-.PHONY: build install schema schema-sql schema-python clean
+.PHONY: build install schema clean
include ../etc/Makefile.common
@@ -26,11 +26,7 @@
install -d ${share}/sql
install sql/* ${share}/sql
-schema: schema-python schema-sql
-
-schema-python:
- @if [ -z "$$SCHEMA_XML" ]; then echo "SCHEMA_XML is not set. SCHEMA_XML should contain a space-separated list of XML schema files to be parsed."; exit 1; fi
- python python/mint/schemaparser.py python/mint/schema.py ${dsn} ${SCHEMA_XML}
-
-schema-sql:
- sqlobject-admin sql -m mint -m mint.schema -c ${dsn} | sed -e '1,2d' > sql/schema.sql
+schema:
+ $(MAKE) schema -C xml
+ $(MAKE) schema -C python/mint
+ $(MAKE) schema -C sql
Added: mgmt/trunk/mint/python/mint/Makefile
===================================================================
--- mgmt/trunk/mint/python/mint/Makefile (rev 0)
+++ mgmt/trunk/mint/python/mint/Makefile 2008-09-23 18:51:18 UTC (rev 2535)
@@ -0,0 +1,8 @@
+.PHONY: schema
+
+dsn := "postgresql://localhost/"
+
+schema: schema.py
+
+schema.py: ../../xml/*.xml
+ python schemaparser.py schema.py ${dsn} $^
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2008-09-23 17:27:36 UTC (rev 2534)
+++ mgmt/trunk/mint/python/mint/schema.py 2008-09-23 18:51:18 UTC (rev 2535)
@@ -671,6 +671,18 @@
conn.callMethod(originalId, classInfo, "connect",
callback, args=actualArgs)
+ def queueMoveMessages(self, model, callback, srcQueue, destQueue, qty):
+ """Move messages from one queue to another"""
+ actualArgs = dict()
+ actualArgs["srcQueue"] = srcQueue
+ actualArgs["destQueue"] = destQueue
+ actualArgs["qty"] = qty
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "queueMoveMessages",
+ callback, args=actualArgs)
+
class BrokerStats(SQLObject):
class sqlmeta:
lazyUpdate = True
Added: mgmt/trunk/mint/sql/Makefile
===================================================================
--- mgmt/trunk/mint/sql/Makefile (rev 0)
+++ mgmt/trunk/mint/sql/Makefile 2008-09-23 18:51:18 UTC (rev 2535)
@@ -0,0 +1,8 @@
+.PHONY: schema
+
+dsn := "postgresql://localhost/"
+
+schema: schema.sql
+
+schema.sql: ../python/mint/*.py
+ sqlobject-admin sql -m mint -m mint.schema -c ${dsn} | sed -e '1,2d' > schema.sql
Modified: mgmt/trunk/mint/xml/Makefile
===================================================================
--- mgmt/trunk/mint/xml/Makefile 2008-09-23 17:27:36 UTC (rev 2534)
+++ mgmt/trunk/mint/xml/Makefile 2008-09-23 18:51:18 UTC (rev 2535)
@@ -1,8 +1,8 @@
-.PHONY: all clean
+.PHONY: schema clean
-FILES := qpid.xml qpid-store.xml qpid-acl.xml qpid-cluster.xml
+FILES := qpid.xml qpid-store.xml qpid-acl.xml qpid-cluster.xml condor.xml
-all: ${FILES}
+schema: ${FILES}
clean:
rm -f ${FILES}
@@ -18,3 +18,6 @@
qpid-cluster.xml:
svn export http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/cpp/src/qpid/cl... qpid-cluster.xml
+
+condor.xml:
+ wget "http://git.et.redhat.com/?p=mrg-grid.git;a=blob_plain;f=src/management/co..." -O condor.xml
Deleted: mgmt/trunk/mint/xml/condor.xml
===================================================================
--- mgmt/trunk/mint/xml/condor.xml 2008-09-23 17:27:36 UTC (rev 2534)
+++ mgmt/trunk/mint/xml/condor.xml 2008-09-23 18:51:18 UTC (rev 2535)
@@ -1,630 +0,0 @@
-<schema package="mrg.grid">
-
-<!--
- License Text
--->
-
-<group name="daemon-stats">
- <property name="CondorPlatform"
- type="sstr"
- desc="The Condor platform string for the daemon's platform"/>
- <property name="CondorVersion"
- type="sstr"
- desc="The Condor version string for the daemon's version"/>
- <property name="DaemonStartTime"
- type="absTime" unit="nanosecond"
- desc="Number of nanoseconds since epoch when the daemon
- was started"/>
-
- <statistic name="MonitorSelfAge" type="uint32"/>
- <statistic name="MonitorSelfCPUUsage" type="double"/>
- <statistic name="MonitorSelfImageSize" type="double"/>
- <statistic name="MonitorSelfRegisteredSocketCount" type="uint32"/>
- <statistic name="MonitorSelfResidentSetSize" type="uint32"/>
- <statistic name="MonitorSelfTime" type="absTime"/>
-</group>
-
-<!--
-CpuBusy = ((LoadAvg - CondorLoadAvg) >= 0.500000)
-CpuBusyTime = 0
-CpuIsBusy = FALSE
-
-HasCheckpointing = TRUE
-HasFileTransfer = TRUE
-HasIOProxy = TRUE
-HasJava = TRUE
-HasJICLocalConfig = TRUE
-HasJICLocalStdin = TRUE
-HasJobDeferral = TRUE
-HasMPI = TRUE
-HasPerFileEncryption = TRUE
-HasReconnect = TRUE
-HasRemoteSyscalls = TRUE
-HasTDP = TRUE
-HasVM = FALSE
-
-JavaMFlops = 8.156164
-JavaVendor = "Free Software Foundation, Inc."
-JavaVersion = "1.4.2"
-
-Subnet = "10.16.43"
-
-Set by Collector:
- UpdateSequenceNumber = 627
- UpdatesHistory = "0x00000000000000000000000000000000"
- UpdatesLost = 0
- UpdatesSequenced = 58
- UpdatesTotal = 59
--->
-
- <class name="Slot">
- <group name="daemon-stats"/>
-
- <property name="AccountingGroup"
- type="sstr"
- optional="y"
- desc="AccountingGroup of the running job, fully
- qualified with a UidDomain, UidDomain taken from
- RemoteUser, only present when a job is
- executing"/>
- <statistic name="Activity"
- type="sstr"
- desc="One of: Idle, No job activity; Busy, Job is
- running; Suspended, Job is suspended; Vacating,
- Job is being removed; Killing, Job is being
- killed; Benchmarking, Benchmarks being run"/>
- <property name="Arch"
- type="sstr"
- desc="Slot's architecture, e.g.: ALPHA, Diginal Alpha;
- HPPA1, HP PA-RISC 1.x (7000 series); HPPA2, HP
- PA-RISC 2.x (8000 series); IA64, Intel Itanium;
- INTEL, Intel x86 (Pentium, Xeon, etc); SGI, SGI
- MIPS; SUN4u, Sun UltraSparc; SUN4x, Sun Sparc
- (not UltraSparc); PPC, Power Macintosh; PPC64,
- 64-bit Power Macintosh; X86_64, AMD/Intel 64-bit
- x86"/>
- <property name="CheckpointPlatform"
- type="sstr"
- desc="Opaque string encoding OS, hardware and kernel
- attributes"/>
- <property name="ClientMachine"
- type="sstr"
- optional="y"
- desc="The hostname of the machine that has claimed the
- slot, only present when slot is claimed"/>
- <statistic name="ClockDay"
- type="uint32"
- desc="Day of the week: 0 = Sunday, 1 = Monday, ..., 6 =
- Saturaday"/>
- <statistic name="ClockMin"
- type="uint32" unit="minute"
- desc="Number of elapsed minutes since midnight"/>
- <property name="ConcurrencyLimits"
- type="sstr"
- optional="y"
- desc="Set of concurrency limits associated with the
- current job"/>
- <statistic name="CondorLoadAvg"
- type="double"
- desc="Portion of LoadAvg generated by Condor (job or
- benchmark)"/>
- <statistic name="ConsoleIdle"
- type="uint32" unit="second"
- desc="Seconds since activity on console keyboard or
- mouse"/>
- <property name="Cpus"
- type="uint32"
- desc="Number of CPUs in slot"/>
- <!-- XXX: CurrentRank could quite possibly be a statistic -->
- <property name="CurrentRank"
- type="double"
- optional="y"
- desc="Slots' affinity for running the job it is
- currently hosting, calculated as Rank expression
- evaluated in context of the running job's ad"/>
- <property name="Disk"
- type="uint32" unit="KiB"
- desc="Amount of disk space in KiB available in the slot"/>
- <statistic name="EnteredCurrentActivity"
- type="absTime" unit="nanosecond"
- desc="Time at which current Activity was entered,
- number of nanoseconds since Unix epoch"/>
- <statistic name="EnteredCurrentState"
- type="absTime" unit="nanosecond"
- desc="Time at which current State was entered,
- number of seconds since Unix epoch"/>
- <property name="FileSystemDomain"
- type="sstr"
- desc="Configured namespace shared by slots with
- uniformly mounted shared storage"/>
- <property name="GlobalJobId"
- type="sstr"
- optional="y"
- desc="The running job's GlobalJobId, only present when
- a job is executing"/>
- <!-- XXX: ImageSize could quite possibly be a statistic -->
- <property name="ImageSize"
- type="uint32" unit="KiB"
- optional="y"
- desc="Estimate of the memory image size, in KiB, of the
- running job, only present when a job is
- executing, pulled by STARTD_JOB_EXPRS"/>
- <property name="IsValidCheckpointPlatform"
- type="lstr"
- desc="A configurable expression representing if a
- checkpointed job can run on the slot, part of the
- slot's Requirements along with the Start
- expression"/>
- <!-- XXX: JobId could quite possibly be a statistic, snapshots
- would show use over time -->
- <property name="JobId"
- type="sstr"
- optional="y"
- desc="The running job's identifier,
- i.e. ClusterId.ProcId, only present when a job is
- executing"/>
- <property name="JobStart"
- type="absTime" unit="nanosecond"
- optional="y"
- desc="The number of nanosecond since epoch when the job
- began executing, only present when a job is
- executing"/>
- <statistic name="KeyboardIdle"
- type="uint32" unit="second"
- desc="Number of seconds since any activity on any
- keyboard or mouse associated with the machine,
- including pseudo-terminals"/>
- <property name="KFlops"
- type="uint32"
- desc="Relative floating point performance on a Linpack
- benchmark"/>
- <statistic name="LastBenchmark"
- type="absTime" unit="nanosecond"
- desc="Number of nanoseconds since epoch when the last
- benchmark was run"/>
- <statistic name="LastFetchWorkCompleted"
- type="absTime" unit="nanosecond"
- desc="Number of nanoseconds since epoch when the
- FetchWork Hook returned"/>
-
- <statistic name="LastFetchWorkSpawned"
- type="absTime" unit="nanosecond"
- desc="Number of nanoseconds since epoch when the
- FetchWork Hook was invoked"/>
- <statistic name="LastPeriodicCheckpoint"
- type="absTime" unit="nanosecond"
- desc="The number of nanoseconds since epoch when the
- job last performed a periodic checkpoint, only
- present when a job is executing"/>
-<!--
- <statistic name="LastHeardFrom"
- type="absTime" unit="nanosecond"
- desc="Time when the Collector received an update from
- the slot, nanoseconds since epoch, inserted by
- Collector"/>
--->
- <statistic name="LoadAvg"
- type="double"
- desc="Load average of CPUs hosting the slot"/>
- <property name="Machine"
- type="sstr"
- desc="The fully qualified hostname of slot's host
- machine"/>
- <property name="MaxJobRetirementTime"
- type="lstr" unit="second"
- desc="Expression evaluated in context of job ad
- producing the number of seconds a job is allowed
- to finish before being killed, relevant when job
- is being kicked out of the slot"/>
- <property name="Memory"
- type="uint32" unit="MiB"
- desc="Amount of RAM available in the slot, in MiB"/>
- <property name="Mips"
- type="uint32"
- desc="Relative integer performance on a Dhrystone
- benchmark"/>
- <property name="MyAddress"
- type="sstr"
- desc="IP:Port of StartD in charge of the slot"/>
- <statistic name="MyCurrentTime"
- type="absTime" unit="nanosecond"
- desc="The number of nanoseconds since epoch that the
- slot produced an updated ad"/>
-<!--
- <property name="MyType"
- type="sstr"
- desc="Always 'Machine'"\>
--->
- <property name="Name"
- type="sstr"
- index="y"
- desc="Name of the slot, either the same as Machine,
- slot#@Machine, or a configured value"/>
- <statistic name="NextFetchWorkDelay"
- type="absTime" unit="nanosecond"
- desc="Number of nanoseconds until the next FetchWork
- Hook will be invoked"/>
- <property name="OpSys"
- type="sstr"
- desc="Slot's operating system, e.g.: HPUX10, HPUX
- 10.20; HPUX11, HPUX B.11.00; LINUX, Linux
- 2.[0,2,4,6].x kernels; OSF1, Diginal Unix 4.x;
- OSX, Darwin; OSX10_2, Darwin 6.4; SOLARIS25,
- Solaris 2.4 or 5.5; SOLARIS251, Solaris 2.5.1 or
- 5.5.1; SOLARIS26, Solaris 2.6 or 5.6; SOLARIS27,
- Solaris 2.7 or 5.7; SOLARIS28, Solaris 2.8 or
- 5.8; SOLARIS29, Solaris 2.9 or 5.9; WINNT50,
- Windows 2000; WINNT51, Windows XP; WINNT52,
- Windows Server 2003; WINNT60, Windows Vista"/>
- <property name="PreemptingConcurrencyLimits"
- type="sstr"
- optional="y"
- desc="Set of concurrency limits associated with the
- preempting job"/>
- <property name="PreemptingOwner"
- type="sstr"
- optional="y"
- desc="The name of the user originally preempting the
- current job, i.e. the incoming user, only present
- when slot is claimed"/>
- <!-- XXX: PreemptingUser could quite possibly be a statistic -->
- <property name="PreemptingUser"
- type="sstr"
- optional="y"
- desc="The name of the user preempting the current job,
- different from PreemptingOwner only if the claim
- was given to another user who is using it to
- preempt, only present when slot is claimed"/>
- <!-- XXX: PreemptingRank could quite possibly be a statistic -->
- <property name="PreemptingRank"
- type="double"
- optional="y"
- desc="Slots' affinity for running the incoming,
- preempting, job, calculated as Rank expression
- evaluated in context of the incoming job's ad,
- only present when slot is claimed"/>
- <!-- XXX: RemoteOwner could quite possibly be a statistic, showing
- use over time -->
- <property name="RemoteOwner"
- type="sstr"
- optional="y"
- desc="The name of the user who originally claimed the
- slot, only present when slot is claimed"/>
- <!-- XXX: RemoteUser could quite possibly be a statistic, showing
- use over time -->
- <property name="RemoteUser"
- type="sstr"
- optional="y"
- desc="The name of the user who is currently using the
- slot, different from RemoteOwner only if the
- claim was given to another user who is using the
- slot, only present when slot is claimed"/>
- <property name="Requirements"
- type="lstr"
- desc="Expression evaluated in the context of a job ad
- to determine if the slot will run a job"/>
- <property name="PublicNetworkIpAddr"
- type="sstr"
- desc="IP:Port used to communicate with the slot"/>
- <property name="Rank"
- type="lstr"
- desc="Configured expression representing how the slot
- prefers jobs"/>
- <property name="SlotID"
- type="uint32"
- desc="The # in the slot's Name, i.e. Name='slot#@Machine'"/>
- <property name="Start"
- type="lstr"
- desc="Expression evaluated to determine if a slot is
- willing to start running a job"/>
- <property name="StarterAbilityList"
- type="lstr"
- desc="StringList, comma separated, set of abilities the
- slot has, i.e. HasFileTransfer,HasJava,HasVM,
- query with stringListMember('Element',
- StarterAbilityList)"/>
- <statistic name="State"
- type="sstr"
- desc="One of: Owner, unavailable to Condor; Unclaimed,
- available to Condor, but no job match yet;
- Matched, job found, but not yet claimed; Claimed,
- claimed and job likely running (see Activity);
- Preempting, running job is being kicked off the
- slot"/>
-<!--
- <statistic name="TargetType"
- type="sstr"
- desc="Always 'Job'"/>
--->
- <statistic name="TimeToLive"
- type="uint32" unit="second"
- desc="Number of second until StartD managing the slot
- has until it will exit"/>
- <!-- XXX: TotalClaimRunTime is a statistic -->
- <property name="TotalClaimRunTime"
- type="uint32" unit="second"
- optional="y"
- desc="Number of seconds the current claim has spent
- running jobs, only present when slot is
- claimed"/>
- <!-- XXX: TotalClaimSuspendTime is a statistic -->
- <property name="TotalClaimSuspendTime"
- type="uint32" unit="second"
- optional="y"
- desc="Number of seconds the current claim has spent
- with suspended jobs, only present when slot is
- claimed"/>
- <statistic name="TotalCondorLoadAvg"
- type="double"
- desc="Portion of TotalLoadAvg generated by Condor (jobs
- or benchmarks)"/>
- <property name="TotalCpus"
- type="uint32"
- desc="Total number of CPUs on slot's host machine, or
- NUM_CPUS configuration option"/>
- <property name="TotalDisk"
- type="uint32" unit="KiB"
- desc="Amount of disk space available on the slot's host
- machine"/>
- <!-- XXX: TotalJobRunTime is a statistic -->
- <property name="TotalJobRunTime"
- type="uint32" unit="second"
- optional="y"
- desc="Number of seconds the current job has spent
- running, i.e. Claimed/Busy, only present when
- slot is claimed"/>
- <!-- XXX: TotalJobSuspendTime is a statistic -->
- <property name="TotalJobSuspendTime"
- type="uint32" unit="second"
- optional="y"
- desc="Number of seconds the current job has spent
- suspended, i.e. Claimed/Suspended, only present
- when slot is claimed"/>
- <statistic name="TotalLoadAvg"
- type="double"
- desc="Total load average of the slot's host machine"/>
- <property name="TotalMemory"
- type="uint32" unit="MiB"
- desc="Total RAM available on slot's machine, in MiB"/>
- <property name="TotalSlots"
- type="uint32"
- desc="Total number of slots sharing the Machine"/>
- <statistic name="TotalTimeBackfillBusy"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Backfill and Activity=Busy since the
- Startd started"/>
- <statistic name="TotalTimeBackfillIdle"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Backfill and Activity=Idle since the
- Startd started"/>
- <statistic name="TotalTimeBackfillKilling"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Backfill and Activity=Killing since the
- Startd started"/>
- <statistic name="TotalTimeClaimedBusy"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Claimed and Activity=Busy since the
- Startd started"/>
- <statistic name="TotalTimeClaimedIdle"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Claimed and Activity=Idle since the
- Startd started"/>
- <statistic name="TotalTimeClaimedRetiring"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Claimed and Activity=Retiring since the
- Startd started"/>
- <statistic name="TotalTimeClaimedSuspended"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Claimed and Activity=Suspended since the
- Startd started"/>
- <statistic name="TotalTimeMatchedIdle"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Matched and Activity=Idle since the
- Startd started"/>
- <statistic name="TotalTimeOwnerIdle"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Owner and Activity=Idle since the
- Startd started"/>
- <statistic name="TotalTimePreemptingKilling"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Preempting and Activity=Killing since the
- Startd started"/>
- <statistic name="TotalTimePreemptingVacating"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Preempting and Activity=Vacating since the
- Startd started"/>
- <statistic name="TotalTimeUnclaimedBenchmarking"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Unclaimed and Activity=Benchmarking since
- the Startd started"/>
- <statistic name="TotalTimeUnclaimedIdle"
- type="uint32" unit="second"
- desc="Accumulated number of seconds the slot has been
- in State=Unclaimed and Activity=Idle since the
- Startd started"/>
- <property name="TotalVirtualMemory"
- type="uint32" unit="KiB"
- desc="Amount of swap space available on slot"/>
- <property name="UidDomain"
- type="sstr"
- desc="Configured namespace shared by slots with
- uniform uid/gid entries, i.e. same logins and
- groups"/>
- <property name="VirtualMemory"
- type="uint32" unit="KiB"
- desc="Amount of currently available virtual memory
- (swap space) in KiB"/>
- <property name="WindowsBuildNumber"
- type="uint32"
- desc="Integer extracted from the platform type,
- representing a build number for a Windows
- operating system, only present on Windows
- slots"/>
- <property name="WindowsMajorVersion"
- type="uint32"
- desc="Integer extracted from the platform type,
- representing a major version number for a Windows
- operating system, only present on Windows
- slots, e.g. 5 for OpSys=WINNT50"/>
- <property name="WindowsMinorVersion"
- type="uint32"
- desc="Integer extected from the platform type,
- representing a minor version numer for a Windows
- operating system, only present on Windows
- slots, e.g. 2 for OpSys=WINNT52"/>
-
-<!--
- <property name="AdditionalAttributes" type="map"/>
--->
- </class>
-
-<!--
-Exec Host, Order(Rank?), StartTime, TotalTime (Sys, User), Project, AccountingGroup
--->
- <class name="Job">
- <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
- <property name="submitterRef" type="objId" references="mrg.grid.Submitter"/>
-
- <property name="AccountingGroup" type="sstr" optional="y" desc=""/>
- <property name="Args" type="lstr" optional="y" desc=""/>
- <property name="ClusterId"
- type="uint32" index="y"
- desc="The id of the cluster the job belongs
- to. ClusterIds are unique within a SchedD."/>
- <property name="Cmd" type="lstr" desc=""/>
- <property name="ConcurrencyLimits" type="lstr" optional="y" desc=""/>
- <property name="CustomGroup" type="sstr" optional="y" desc=""/>
- <property name="CustomId" type="sstr" optional="y" desc=""/>
- <property name="CustomPriority" type="uint32" optional="y" desc=""/>
- <property name="GlobalJobId" type="sstr" desc=""/>
- <property name="In"
- type="lstr"
- desc="The file where the job's standard input is read
- from."/>
- <property name="Iwd" type="lstr" desc=""/>
- <property name="JobStatus"
- type="uint32"
- desc="One of: 0, unexpanded; 1, idle; 2, running; 3,
- removed; 4, completed; 5, held; or, 6, submission
- error"/>
- <property name="Note"
- type="lstr" optional="y"
- desc="An arbitrary note attached to the job."/>
- <property name="Out"
- type="lstr"
- desc="The file where the job's standard output is
- written."/>
- <property name="Owner"
- type="sstr"
- desc="The submitter of the job."/>
- <property name="ProcId"
- type="uint32" index="y"
- desc="The id of the job within its cluster. ProcIds re
- unique within a cluster."/>
- <property name="QDate"
- type="absTime" unit="nanoseconds"
- desc="The number of nanoseconds since epoch when the
- job was submitted."/>
- <property name="Requirements" type="lstr" desc=""/>
-<!--
- <property name="Scheduler" type="sstr" desc=""/>
--->
- <property name="Title" type="sstr" optional="y" desc=""/>
- <property name="UserLog" type="lstr" optional="y" desc=""/>
-
-
- <property name="HoldReason" type="lstr" optional="y" desc=""/>
-
- <method name="GetAd">
- <arg name="JobAd" dir="O" type="map"
- desc="(name,value,type) tuples; Values are INTEGER, FLOAT,
- STRING and EXPR. The EXPR value is not first class,
- it is an unquoted, with double quotes, string"/>
- </method>
-
- <method name="SetAttribute">
- <arg name="Name" dir="I" type="sstr"/>
- <arg name="Value" dir="I" type="lstr"/>
- </method>
-
- <method name="Hold">
- <arg name="Reason" dir="I" type="sstr"/>
- </method>
-
- <method name="Release">
- <arg name="Reason" dir="I" type="sstr"/>
- </method>
-
- <method name="Remove">
- <arg name="Reason" dir="I" type="sstr"/>
- </method>
-
- <method name="Fetch">
- <arg name="File" dir="I" type="sstr"/>
- <arg name="Start" dir="I" type="uint32"/>
- <arg name="End" dir="I" type="uint32"/>
- <arg name="Data" dir="O" type="lstr"/>
- </method>
- </class>
-
- <class name="Scheduler">
- <group name="daemon-stats"/>
-
- <property name="JobQueueBirthdate" type="absTime"/>
- <property name="MaxJobsRunning" type="uint32" desc=""/>
- <property name="Machine" type="sstr" desc=""/>
- <property name="MyAddress" type="sstr" desc=""/>
- <statistic name="NumUsers" type="uint32"/>
- <property name="Name" type="sstr" index="y" desc=""/>
- <property name="PublicNetworkIpAddr" type="sstr" desc=""/>
- <statistic name="TotalHeldJobs" type="uint32"/>
- <statistic name="TotalIdleJobs" type="uint32"/>
- <statistic name="TotalJobAds" type="uint32"/>
- <statistic name="TotalRemovedJobs" type="uint32"/>
- <statistic name="TotalRunningJobs" type="uint32"/>
- </class>
-
- <class name="Submitter">
- <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
-
- <statistic name="HeldJobs" type="uint32"/>
- <statistic name="IdleJobs" type="uint32"/>
- <property name="JobQueueBirthdate" type="uint32"/>
- <property name="Machine" type="sstr"/>
- <property name="Name" type="sstr" index="y"/>
- <statistic name="RunningJobs" type="uint32"/>
- <property name="ScheddName" type="sstr"/>
- </class>
-
- <class name="Negotiator">
- <property name="Name" type="sstr" index="y"/>
- <property name="Machine" type="sstr"/>
- <property name="MyAddress" type="sstr" desc=""/>
-
- <!-- NOTE: MonitorSelf* statistics are currently missing in 7.0.0 -->
- <group name="daemon-stats"/>
-
- <method name="GetLimits">
- <arg name="Limits" dir="O" type="map"/>
- </method>
-
- <method name="SetLimit">
- <arg name="Name" dir="I" type="sstr"/>
- <arg name="Max" dir="I" type="uint32"/>
- </method>
-
- <method name="Reconfig"/>
- </class>
-</schema>
16 years, 3 months
rhmessaging commits: r2534 - in mgmt/trunk/mint: sql and 1 other directory.
by rhmessaging-commits@lists.jboss.org
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;
16 years, 3 months
rhmessaging commits: r2533 - in mgmt/trunk/mint: xml and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-23 13:22:51 -0400 (Tue, 23 Sep 2008)
New Revision: 2533
Added:
mgmt/trunk/mint/xml/
mgmt/trunk/mint/xml/Makefile
mgmt/trunk/mint/xml/condor.xml
Log:
Add a makefile to fetch all the schema files we use to update the mint
schema.
As a temporary workaround, I directly copied in the current condor
schema file.
Added: mgmt/trunk/mint/xml/Makefile
===================================================================
--- mgmt/trunk/mint/xml/Makefile (rev 0)
+++ mgmt/trunk/mint/xml/Makefile 2008-09-23 17:22:51 UTC (rev 2533)
@@ -0,0 +1,20 @@
+.PHONY: all clean
+
+FILES := qpid.xml qpid-store.xml qpid-acl.xml qpid-cluster.xml
+
+all: ${FILES}
+
+clean:
+ rm -f ${FILES}
+
+qpid.xml:
+ svn export http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/specs/managemen... qpid.xml
+
+qpid-store.xml:
+ svn export http://anonsvn.jboss.org/repos/rhmessaging/store/trunk/cpp/lib/qmf-schema... qpid-store.xml
+
+qpid-acl.xml:
+ svn export http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/cpp/src/qpid/ac... qpid-acl.xml
+
+qpid-cluster.xml:
+ svn export http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/cpp/src/qpid/cl... qpid-cluster.xml
Added: mgmt/trunk/mint/xml/condor.xml
===================================================================
--- mgmt/trunk/mint/xml/condor.xml (rev 0)
+++ mgmt/trunk/mint/xml/condor.xml 2008-09-23 17:22:51 UTC (rev 2533)
@@ -0,0 +1,630 @@
+<schema package="mrg.grid">
+
+<!--
+ License Text
+-->
+
+<group name="daemon-stats">
+ <property name="CondorPlatform"
+ type="sstr"
+ desc="The Condor platform string for the daemon's platform"/>
+ <property name="CondorVersion"
+ type="sstr"
+ desc="The Condor version string for the daemon's version"/>
+ <property name="DaemonStartTime"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the daemon
+ was started"/>
+
+ <statistic name="MonitorSelfAge" type="uint32"/>
+ <statistic name="MonitorSelfCPUUsage" type="double"/>
+ <statistic name="MonitorSelfImageSize" type="double"/>
+ <statistic name="MonitorSelfRegisteredSocketCount" type="uint32"/>
+ <statistic name="MonitorSelfResidentSetSize" type="uint32"/>
+ <statistic name="MonitorSelfTime" type="absTime"/>
+</group>
+
+<!--
+CpuBusy = ((LoadAvg - CondorLoadAvg) >= 0.500000)
+CpuBusyTime = 0
+CpuIsBusy = FALSE
+
+HasCheckpointing = TRUE
+HasFileTransfer = TRUE
+HasIOProxy = TRUE
+HasJava = TRUE
+HasJICLocalConfig = TRUE
+HasJICLocalStdin = TRUE
+HasJobDeferral = TRUE
+HasMPI = TRUE
+HasPerFileEncryption = TRUE
+HasReconnect = TRUE
+HasRemoteSyscalls = TRUE
+HasTDP = TRUE
+HasVM = FALSE
+
+JavaMFlops = 8.156164
+JavaVendor = "Free Software Foundation, Inc."
+JavaVersion = "1.4.2"
+
+Subnet = "10.16.43"
+
+Set by Collector:
+ UpdateSequenceNumber = 627
+ UpdatesHistory = "0x00000000000000000000000000000000"
+ UpdatesLost = 0
+ UpdatesSequenced = 58
+ UpdatesTotal = 59
+-->
+
+ <class name="Slot">
+ <group name="daemon-stats"/>
+
+ <property name="AccountingGroup"
+ type="sstr"
+ optional="y"
+ desc="AccountingGroup of the running job, fully
+ qualified with a UidDomain, UidDomain taken from
+ RemoteUser, only present when a job is
+ executing"/>
+ <statistic name="Activity"
+ type="sstr"
+ desc="One of: Idle, No job activity; Busy, Job is
+ running; Suspended, Job is suspended; Vacating,
+ Job is being removed; Killing, Job is being
+ killed; Benchmarking, Benchmarks being run"/>
+ <property name="Arch"
+ type="sstr"
+ desc="Slot's architecture, e.g.: ALPHA, Diginal Alpha;
+ HPPA1, HP PA-RISC 1.x (7000 series); HPPA2, HP
+ PA-RISC 2.x (8000 series); IA64, Intel Itanium;
+ INTEL, Intel x86 (Pentium, Xeon, etc); SGI, SGI
+ MIPS; SUN4u, Sun UltraSparc; SUN4x, Sun Sparc
+ (not UltraSparc); PPC, Power Macintosh; PPC64,
+ 64-bit Power Macintosh; X86_64, AMD/Intel 64-bit
+ x86"/>
+ <property name="CheckpointPlatform"
+ type="sstr"
+ desc="Opaque string encoding OS, hardware and kernel
+ attributes"/>
+ <property name="ClientMachine"
+ type="sstr"
+ optional="y"
+ desc="The hostname of the machine that has claimed the
+ slot, only present when slot is claimed"/>
+ <statistic name="ClockDay"
+ type="uint32"
+ desc="Day of the week: 0 = Sunday, 1 = Monday, ..., 6 =
+ Saturaday"/>
+ <statistic name="ClockMin"
+ type="uint32" unit="minute"
+ desc="Number of elapsed minutes since midnight"/>
+ <property name="ConcurrencyLimits"
+ type="sstr"
+ optional="y"
+ desc="Set of concurrency limits associated with the
+ current job"/>
+ <statistic name="CondorLoadAvg"
+ type="double"
+ desc="Portion of LoadAvg generated by Condor (job or
+ benchmark)"/>
+ <statistic name="ConsoleIdle"
+ type="uint32" unit="second"
+ desc="Seconds since activity on console keyboard or
+ mouse"/>
+ <property name="Cpus"
+ type="uint32"
+ desc="Number of CPUs in slot"/>
+ <!-- XXX: CurrentRank could quite possibly be a statistic -->
+ <property name="CurrentRank"
+ type="double"
+ optional="y"
+ desc="Slots' affinity for running the job it is
+ currently hosting, calculated as Rank expression
+ evaluated in context of the running job's ad"/>
+ <property name="Disk"
+ type="uint32" unit="KiB"
+ desc="Amount of disk space in KiB available in the slot"/>
+ <statistic name="EnteredCurrentActivity"
+ type="absTime" unit="nanosecond"
+ desc="Time at which current Activity was entered,
+ number of nanoseconds since Unix epoch"/>
+ <statistic name="EnteredCurrentState"
+ type="absTime" unit="nanosecond"
+ desc="Time at which current State was entered,
+ number of seconds since Unix epoch"/>
+ <property name="FileSystemDomain"
+ type="sstr"
+ desc="Configured namespace shared by slots with
+ uniformly mounted shared storage"/>
+ <property name="GlobalJobId"
+ type="sstr"
+ optional="y"
+ desc="The running job's GlobalJobId, only present when
+ a job is executing"/>
+ <!-- XXX: ImageSize could quite possibly be a statistic -->
+ <property name="ImageSize"
+ type="uint32" unit="KiB"
+ optional="y"
+ desc="Estimate of the memory image size, in KiB, of the
+ running job, only present when a job is
+ executing, pulled by STARTD_JOB_EXPRS"/>
+ <property name="IsValidCheckpointPlatform"
+ type="lstr"
+ desc="A configurable expression representing if a
+ checkpointed job can run on the slot, part of the
+ slot's Requirements along with the Start
+ expression"/>
+ <!-- XXX: JobId could quite possibly be a statistic, snapshots
+ would show use over time -->
+ <property name="JobId"
+ type="sstr"
+ optional="y"
+ desc="The running job's identifier,
+ i.e. ClusterId.ProcId, only present when a job is
+ executing"/>
+ <property name="JobStart"
+ type="absTime" unit="nanosecond"
+ optional="y"
+ desc="The number of nanosecond since epoch when the job
+ began executing, only present when a job is
+ executing"/>
+ <statistic name="KeyboardIdle"
+ type="uint32" unit="second"
+ desc="Number of seconds since any activity on any
+ keyboard or mouse associated with the machine,
+ including pseudo-terminals"/>
+ <property name="KFlops"
+ type="uint32"
+ desc="Relative floating point performance on a Linpack
+ benchmark"/>
+ <statistic name="LastBenchmark"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the last
+ benchmark was run"/>
+ <statistic name="LastFetchWorkCompleted"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the
+ FetchWork Hook returned"/>
+
+ <statistic name="LastFetchWorkSpawned"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the
+ FetchWork Hook was invoked"/>
+ <statistic name="LastPeriodicCheckpoint"
+ type="absTime" unit="nanosecond"
+ desc="The number of nanoseconds since epoch when the
+ job last performed a periodic checkpoint, only
+ present when a job is executing"/>
+<!--
+ <statistic name="LastHeardFrom"
+ type="absTime" unit="nanosecond"
+ desc="Time when the Collector received an update from
+ the slot, nanoseconds since epoch, inserted by
+ Collector"/>
+-->
+ <statistic name="LoadAvg"
+ type="double"
+ desc="Load average of CPUs hosting the slot"/>
+ <property name="Machine"
+ type="sstr"
+ desc="The fully qualified hostname of slot's host
+ machine"/>
+ <property name="MaxJobRetirementTime"
+ type="lstr" unit="second"
+ desc="Expression evaluated in context of job ad
+ producing the number of seconds a job is allowed
+ to finish before being killed, relevant when job
+ is being kicked out of the slot"/>
+ <property name="Memory"
+ type="uint32" unit="MiB"
+ desc="Amount of RAM available in the slot, in MiB"/>
+ <property name="Mips"
+ type="uint32"
+ desc="Relative integer performance on a Dhrystone
+ benchmark"/>
+ <property name="MyAddress"
+ type="sstr"
+ desc="IP:Port of StartD in charge of the slot"/>
+ <statistic name="MyCurrentTime"
+ type="absTime" unit="nanosecond"
+ desc="The number of nanoseconds since epoch that the
+ slot produced an updated ad"/>
+<!--
+ <property name="MyType"
+ type="sstr"
+ desc="Always 'Machine'"\>
+-->
+ <property name="Name"
+ type="sstr"
+ index="y"
+ desc="Name of the slot, either the same as Machine,
+ slot#@Machine, or a configured value"/>
+ <statistic name="NextFetchWorkDelay"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds until the next FetchWork
+ Hook will be invoked"/>
+ <property name="OpSys"
+ type="sstr"
+ desc="Slot's operating system, e.g.: HPUX10, HPUX
+ 10.20; HPUX11, HPUX B.11.00; LINUX, Linux
+ 2.[0,2,4,6].x kernels; OSF1, Diginal Unix 4.x;
+ OSX, Darwin; OSX10_2, Darwin 6.4; SOLARIS25,
+ Solaris 2.4 or 5.5; SOLARIS251, Solaris 2.5.1 or
+ 5.5.1; SOLARIS26, Solaris 2.6 or 5.6; SOLARIS27,
+ Solaris 2.7 or 5.7; SOLARIS28, Solaris 2.8 or
+ 5.8; SOLARIS29, Solaris 2.9 or 5.9; WINNT50,
+ Windows 2000; WINNT51, Windows XP; WINNT52,
+ Windows Server 2003; WINNT60, Windows Vista"/>
+ <property name="PreemptingConcurrencyLimits"
+ type="sstr"
+ optional="y"
+ desc="Set of concurrency limits associated with the
+ preempting job"/>
+ <property name="PreemptingOwner"
+ type="sstr"
+ optional="y"
+ desc="The name of the user originally preempting the
+ current job, i.e. the incoming user, only present
+ when slot is claimed"/>
+ <!-- XXX: PreemptingUser could quite possibly be a statistic -->
+ <property name="PreemptingUser"
+ type="sstr"
+ optional="y"
+ desc="The name of the user preempting the current job,
+ different from PreemptingOwner only if the claim
+ was given to another user who is using it to
+ preempt, only present when slot is claimed"/>
+ <!-- XXX: PreemptingRank could quite possibly be a statistic -->
+ <property name="PreemptingRank"
+ type="double"
+ optional="y"
+ desc="Slots' affinity for running the incoming,
+ preempting, job, calculated as Rank expression
+ evaluated in context of the incoming job's ad,
+ only present when slot is claimed"/>
+ <!-- XXX: RemoteOwner could quite possibly be a statistic, showing
+ use over time -->
+ <property name="RemoteOwner"
+ type="sstr"
+ optional="y"
+ desc="The name of the user who originally claimed the
+ slot, only present when slot is claimed"/>
+ <!-- XXX: RemoteUser could quite possibly be a statistic, showing
+ use over time -->
+ <property name="RemoteUser"
+ type="sstr"
+ optional="y"
+ desc="The name of the user who is currently using the
+ slot, different from RemoteOwner only if the
+ claim was given to another user who is using the
+ slot, only present when slot is claimed"/>
+ <property name="Requirements"
+ type="lstr"
+ desc="Expression evaluated in the context of a job ad
+ to determine if the slot will run a job"/>
+ <property name="PublicNetworkIpAddr"
+ type="sstr"
+ desc="IP:Port used to communicate with the slot"/>
+ <property name="Rank"
+ type="lstr"
+ desc="Configured expression representing how the slot
+ prefers jobs"/>
+ <property name="SlotID"
+ type="uint32"
+ desc="The # in the slot's Name, i.e. Name='slot#@Machine'"/>
+ <property name="Start"
+ type="lstr"
+ desc="Expression evaluated to determine if a slot is
+ willing to start running a job"/>
+ <property name="StarterAbilityList"
+ type="lstr"
+ desc="StringList, comma separated, set of abilities the
+ slot has, i.e. HasFileTransfer,HasJava,HasVM,
+ query with stringListMember('Element',
+ StarterAbilityList)"/>
+ <statistic name="State"
+ type="sstr"
+ desc="One of: Owner, unavailable to Condor; Unclaimed,
+ available to Condor, but no job match yet;
+ Matched, job found, but not yet claimed; Claimed,
+ claimed and job likely running (see Activity);
+ Preempting, running job is being kicked off the
+ slot"/>
+<!--
+ <statistic name="TargetType"
+ type="sstr"
+ desc="Always 'Job'"/>
+-->
+ <statistic name="TimeToLive"
+ type="uint32" unit="second"
+ desc="Number of second until StartD managing the slot
+ has until it will exit"/>
+ <!-- XXX: TotalClaimRunTime is a statistic -->
+ <property name="TotalClaimRunTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current claim has spent
+ running jobs, only present when slot is
+ claimed"/>
+ <!-- XXX: TotalClaimSuspendTime is a statistic -->
+ <property name="TotalClaimSuspendTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current claim has spent
+ with suspended jobs, only present when slot is
+ claimed"/>
+ <statistic name="TotalCondorLoadAvg"
+ type="double"
+ desc="Portion of TotalLoadAvg generated by Condor (jobs
+ or benchmarks)"/>
+ <property name="TotalCpus"
+ type="uint32"
+ desc="Total number of CPUs on slot's host machine, or
+ NUM_CPUS configuration option"/>
+ <property name="TotalDisk"
+ type="uint32" unit="KiB"
+ desc="Amount of disk space available on the slot's host
+ machine"/>
+ <!-- XXX: TotalJobRunTime is a statistic -->
+ <property name="TotalJobRunTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current job has spent
+ running, i.e. Claimed/Busy, only present when
+ slot is claimed"/>
+ <!-- XXX: TotalJobSuspendTime is a statistic -->
+ <property name="TotalJobSuspendTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current job has spent
+ suspended, i.e. Claimed/Suspended, only present
+ when slot is claimed"/>
+ <statistic name="TotalLoadAvg"
+ type="double"
+ desc="Total load average of the slot's host machine"/>
+ <property name="TotalMemory"
+ type="uint32" unit="MiB"
+ desc="Total RAM available on slot's machine, in MiB"/>
+ <property name="TotalSlots"
+ type="uint32"
+ desc="Total number of slots sharing the Machine"/>
+ <statistic name="TotalTimeBackfillBusy"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Busy since the
+ Startd started"/>
+ <statistic name="TotalTimeBackfillIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeBackfillKilling"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Killing since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedBusy"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Busy since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedRetiring"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Retiring since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedSuspended"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Suspended since the
+ Startd started"/>
+ <statistic name="TotalTimeMatchedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Matched and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeOwnerIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Owner and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimePreemptingKilling"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Preempting and Activity=Killing since the
+ Startd started"/>
+ <statistic name="TotalTimePreemptingVacating"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Preempting and Activity=Vacating since the
+ Startd started"/>
+ <statistic name="TotalTimeUnclaimedBenchmarking"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Unclaimed and Activity=Benchmarking since
+ the Startd started"/>
+ <statistic name="TotalTimeUnclaimedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Unclaimed and Activity=Idle since the
+ Startd started"/>
+ <property name="TotalVirtualMemory"
+ type="uint32" unit="KiB"
+ desc="Amount of swap space available on slot"/>
+ <property name="UidDomain"
+ type="sstr"
+ desc="Configured namespace shared by slots with
+ uniform uid/gid entries, i.e. same logins and
+ groups"/>
+ <property name="VirtualMemory"
+ type="uint32" unit="KiB"
+ desc="Amount of currently available virtual memory
+ (swap space) in KiB"/>
+ <property name="WindowsBuildNumber"
+ type="uint32"
+ desc="Integer extracted from the platform type,
+ representing a build number for a Windows
+ operating system, only present on Windows
+ slots"/>
+ <property name="WindowsMajorVersion"
+ type="uint32"
+ desc="Integer extracted from the platform type,
+ representing a major version number for a Windows
+ operating system, only present on Windows
+ slots, e.g. 5 for OpSys=WINNT50"/>
+ <property name="WindowsMinorVersion"
+ type="uint32"
+ desc="Integer extected from the platform type,
+ representing a minor version numer for a Windows
+ operating system, only present on Windows
+ slots, e.g. 2 for OpSys=WINNT52"/>
+
+<!--
+ <property name="AdditionalAttributes" type="map"/>
+-->
+ </class>
+
+<!--
+Exec Host, Order(Rank?), StartTime, TotalTime (Sys, User), Project, AccountingGroup
+-->
+ <class name="Job">
+ <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
+ <property name="submitterRef" type="objId" references="mrg.grid.Submitter"/>
+
+ <property name="AccountingGroup" type="sstr" optional="y" desc=""/>
+ <property name="Args" type="lstr" optional="y" desc=""/>
+ <property name="ClusterId"
+ type="uint32" index="y"
+ desc="The id of the cluster the job belongs
+ to. ClusterIds are unique within a SchedD."/>
+ <property name="Cmd" type="lstr" desc=""/>
+ <property name="ConcurrencyLimits" type="lstr" optional="y" desc=""/>
+ <property name="CustomGroup" type="sstr" optional="y" desc=""/>
+ <property name="CustomId" type="sstr" optional="y" desc=""/>
+ <property name="CustomPriority" type="uint32" optional="y" desc=""/>
+ <property name="GlobalJobId" type="sstr" desc=""/>
+ <property name="In"
+ type="lstr"
+ desc="The file where the job's standard input is read
+ from."/>
+ <property name="Iwd" type="lstr" desc=""/>
+ <property name="JobStatus"
+ type="uint32"
+ desc="One of: 0, unexpanded; 1, idle; 2, running; 3,
+ removed; 4, completed; 5, held; or, 6, submission
+ error"/>
+ <property name="Note"
+ type="lstr" optional="y"
+ desc="An arbitrary note attached to the job."/>
+ <property name="Out"
+ type="lstr"
+ desc="The file where the job's standard output is
+ written."/>
+ <property name="Owner"
+ type="sstr"
+ desc="The submitter of the job."/>
+ <property name="ProcId"
+ type="uint32" index="y"
+ desc="The id of the job within its cluster. ProcIds re
+ unique within a cluster."/>
+ <property name="QDate"
+ type="absTime" unit="nanoseconds"
+ desc="The number of nanoseconds since epoch when the
+ job was submitted."/>
+ <property name="Requirements" type="lstr" desc=""/>
+<!--
+ <property name="Scheduler" type="sstr" desc=""/>
+-->
+ <property name="Title" type="sstr" optional="y" desc=""/>
+ <property name="UserLog" type="lstr" optional="y" desc=""/>
+
+
+ <property name="HoldReason" type="lstr" optional="y" desc=""/>
+
+ <method name="GetAd">
+ <arg name="JobAd" dir="O" type="map"
+ desc="(name,value,type) tuples; Values are INTEGER, FLOAT,
+ STRING and EXPR. The EXPR value is not first class,
+ it is an unquoted, with double quotes, string"/>
+ </method>
+
+ <method name="SetAttribute">
+ <arg name="Name" dir="I" type="sstr"/>
+ <arg name="Value" dir="I" type="lstr"/>
+ </method>
+
+ <method name="Hold">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Release">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Remove">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Fetch">
+ <arg name="File" dir="I" type="sstr"/>
+ <arg name="Start" dir="I" type="uint32"/>
+ <arg name="End" dir="I" type="uint32"/>
+ <arg name="Data" dir="O" type="lstr"/>
+ </method>
+ </class>
+
+ <class name="Scheduler">
+ <group name="daemon-stats"/>
+
+ <property name="JobQueueBirthdate" type="absTime"/>
+ <property name="MaxJobsRunning" type="uint32" desc=""/>
+ <property name="Machine" type="sstr" desc=""/>
+ <property name="MyAddress" type="sstr" desc=""/>
+ <statistic name="NumUsers" type="uint32"/>
+ <property name="Name" type="sstr" index="y" desc=""/>
+ <property name="PublicNetworkIpAddr" type="sstr" desc=""/>
+ <statistic name="TotalHeldJobs" type="uint32"/>
+ <statistic name="TotalIdleJobs" type="uint32"/>
+ <statistic name="TotalJobAds" type="uint32"/>
+ <statistic name="TotalRemovedJobs" type="uint32"/>
+ <statistic name="TotalRunningJobs" type="uint32"/>
+ </class>
+
+ <class name="Submitter">
+ <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
+
+ <statistic name="HeldJobs" type="uint32"/>
+ <statistic name="IdleJobs" type="uint32"/>
+ <property name="JobQueueBirthdate" type="uint32"/>
+ <property name="Machine" type="sstr"/>
+ <property name="Name" type="sstr" index="y"/>
+ <statistic name="RunningJobs" type="uint32"/>
+ <property name="ScheddName" type="sstr"/>
+ </class>
+
+ <class name="Negotiator">
+ <property name="Name" type="sstr" index="y"/>
+ <property name="Machine" type="sstr"/>
+ <property name="MyAddress" type="sstr" desc=""/>
+
+ <!-- NOTE: MonitorSelf* statistics are currently missing in 7.0.0 -->
+ <group name="daemon-stats"/>
+
+ <method name="GetLimits">
+ <arg name="Limits" dir="O" type="map"/>
+ </method>
+
+ <method name="SetLimit">
+ <arg name="Name" dir="I" type="sstr"/>
+ <arg name="Max" dir="I" type="uint32"/>
+ </method>
+
+ <method name="Reconfig"/>
+ </class>
+</schema>
16 years, 3 months
rhmessaging commits: r2532 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-23 12:49:54 -0400 (Tue, 23 Sep 2008)
New Revision: 2532
Added:
mgmt/trunk/cumin/python/cumin/limits.py
mgmt/trunk/cumin/python/cumin/limits.strings
Modified:
mgmt/trunk/cumin/python/cumin/pool.py
Log:
1st pass at limits tab under Pool
Added: mgmt/trunk/cumin/python/cumin/limits.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/limits.py (rev 0)
+++ mgmt/trunk/cumin/python/cumin/limits.py 2008-09-23 16:49:54 UTC (rev 2532)
@@ -0,0 +1,193 @@
+import logging
+
+from wooly import *
+from wooly.widgets import *
+from wooly.forms import *
+from wooly.resources import *
+from wooly.tables import *
+
+from stat import *
+from widgets import *
+from parameters import *
+from formats import *
+from util import *
+from job import *
+
+strings = StringCatalog(__file__)
+log = logging.getLogger("cumin.Limits")
+
+class LimitsSet(ItemTable):
+ def __init__(self, app, name):
+ super(LimitsSet, self).__init__(app, name)
+
+ col = self.NameColumn(app, "name")
+ self.add_column(col)
+ self.set_default_column(col)
+
+ col = self.CurrentColumn(app, "curr")
+ self.add_column(col)
+
+ col = self.MaxColumn(app, "max")
+ self.add_column(col)
+
+ self.limits = self.Limits(self, "limits")
+ self.add_attribute(self.limits)
+
+ def do_get_items(self, session, *args):
+ limits = self.limits.get(session)
+ keys = limits.keys()
+ keys.sort()
+ return [{"name":x, "curr":limits[x]["CURRENT"], "max":limits[x]["MAX"]} for x in keys]
+
+ def render_title(self, session):
+ return "Concurrancy Limits %s" % fmt_count(self.limit_count(session))
+
+ def limit_count(self, session):
+#TODO: fix this
+ negotiator = Negotiator.get(1)
+ limits = self.limits.get(session)
+ if not limits:
+ limits = self.get_raw_limits(session, negotiator)
+ self.limits.set(session, limits)
+ return len(limits)
+
+ def get_raw_limits(self, session, negotiator):
+ self.lim = dict()
+ self.got_data = False
+
+ def completion(status, data):
+ self.lim = data["Limits"]
+ self.got_data = True
+
+ def predicate():
+ return self.got_data
+
+ model = self.app.model
+ negotiator.GetLimits(model.data, completion, self.lim)
+
+ # wait for up to 20 seconds for completion to be called
+ wait(predicate, timeout=20)
+ return self.lim
+
+ class NameColumn(ItemTableColumn):
+ def render_title(self, session, data):
+ return "Name"
+
+ class CurrentColumn(ItemTableColumn):
+ def render_title(self, session, data):
+ return "Current Usage"
+
+ class MaxColumn(ItemTableColumn):
+ def render_title(self, session, data):
+ return "Max Usage"
+
+ class Limits(Attribute):
+ def get_default(self, session):
+ return dict()
+
+#class LimitsFrame(CuminFrame):
+# def __init__(self, app, name):
+# super(LimitsFrame, self).__init__(app, name)
+#
+# self.object = LimitsParameter(app, "id")
+# self.add_parameter(self.object)
+#
+# view = LimitsView(app, "view")
+# self.add_mode(view)
+# self.set_view_mode(view)
+#
+# def show_scheduler(self, session, scheduler):
+# return self.frame.show_scheduler(session, scheduler)
+#
+# def show_job(self, session, job):
+# return self.frame.show_job(session, job)
+#
+# def show_job_group(self, session, job_group):
+# return self.frame.show_job_group(session, job_group)
+#
+# def show_jobs_hold(self, session):
+# return self.frame.show_jobs_hold(session)
+#
+# def show_jobs_release(self, session):
+# return self.frame.show_jobs_release(session)
+#
+# def show_jobs_remove(self, session):
+# return self.frame.show_jobs_remove(session)
+#
+#
+#class LimitsView(CuminView):
+# def __init__(self, app, name):
+# super(LimitsView, self).__init__(app, name)
+#
+# status = LimitsStatus(app, "status")
+# self.add_child(status)
+#
+# self.__tabs = TabbedModeSet(app, "tabs")
+# self.add_child(self.__tabs)
+#
+# stats = LimitsStats(app, "stats")
+# self.__tabs.add_tab(stats)
+#
+# jobs = LimitsJobSet(app, "jobs")
+# self.__tabs.add_tab(jobs)
+#
+# details = CuminDetails(app, "details")
+# self.__tabs.add_tab(details)
+#
+# def render_script(self, session, sched):
+# data = "model.xml?class=scheduler;id=%i" % sched.id
+# return "wooly.setIntervalUpdate('%s', updateLimits, 3000)" % data
+#
+#class LimitsStatus(CuminStatus):
+# pass
+#
+#class LimitsStats(Widget):
+# def __init__(self, app, name):
+# super(LimitsStats, self).__init__(app, name)
+#
+# stats = StatSet(app, "general", "general")
+# self.add_child(stats)
+#
+# chart = self.JobsChart(app, "jobs")
+# self.add_child(chart)
+#
+# def render_title(self, session):
+# return "Statistics"
+#
+# class JobsChart(StatValueChart):
+# def __init__(self, app, name):
+# super(LimitsStats.JobsChart, self).__init__ \
+# (app, name)
+#
+# self.stats = ("RunningJobs", "IdleJobs", "HeldJobs")
+#
+# def render_title(self, session, sched):
+# return "Jobs"
+#
+#class LimitsJobSet(JobSet, Form):
+# def __init__(self, app, name):
+# super(LimitsJobSet, self).__init__(app, name)
+#
+# self.set_default_column_name("global_job_id")
+#
+# self.__remove = JobRemoveButton(app, "remove", self)
+# self.add_child(self.__remove)
+#
+# self.__hold = JobHoldButton(app, "hold", self)
+# self.add_child(self.__hold)
+#
+# self.__release = JobReleaseButton(app, "release", self)
+# self.add_child(self.__release)
+#
+# def get_visible_columns(self, session):
+# return self.get_request_visible_columns(session, ["custom_group", "scheduler"])
+#
+# def render_sql_where(self, session, Limits):
+# phase_sql = self.get_phase_sql(session)
+# Limits_sql = "j.Limits_id = %i" % Limits.id
+# return "where %s" % " and ".join([phase_sql, Limits_sql])
+#
+# def render_title(self, session, Limits):
+# Limits_sql = "Limits_id = %i" % Limits.id
+# return "Jobs %s" % fmt_count(Job.select(Limits_sql).count())
+
Added: mgmt/trunk/cumin/python/cumin/limits.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/limits.strings (rev 0)
+++ mgmt/trunk/cumin/python/cumin/limits.strings 2008-09-23 16:49:54 UTC (rev 2532)
@@ -0,0 +1,12 @@
+[LimitsSet.html]
+<table class="mobjects">
+ <thead>
+ <tr>
+ <th class="setnav" colspan="{column_count}">
+ {count}
+ </th>
+ </tr>
+ <tr>{headers}</tr>
+ </thead>
+ <tbody>{items}</tbody>
+</table>
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2008-09-23 16:49:10 UTC (rev 2531)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2008-09-23 16:49:54 UTC (rev 2532)
@@ -14,6 +14,7 @@
from job import *
from scheduler import SchedulerSet, SchedulerFrame
from submitter import SubmitterSet, SubmitterFrame
+from limits import LimitsSet
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.pool")
@@ -170,12 +171,18 @@
subs = self.SubmittersTab(app, "subs")
self.__tabs.add_tab(subs)
+ limits = self.LimitsTab(app, "limits")
+ self.__tabs.add_tab(limits)
+
class SchedulersTab(SchedulerSet):
pass
class SubmittersTab(SubmitterSet):
pass
+ class LimitsTab(LimitsSet):
+ pass
+
class PoolStatus(CuminStatus):
def render_status(self, session, pool):
return "Active"
16 years, 3 months
rhmessaging commits: r2531 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-23 12:49:10 -0400 (Tue, 23 Sep 2008)
New Revision: 2531
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Show the Concurrancy Limits column in JobSet
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-23 16:48:12 UTC (rev 2530)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-23 16:49:10 UTC (rev 2531)
@@ -51,7 +51,7 @@
self.add_column(col)
col = self.ConcurrencyLimitsColumn(app, "concurrency_limits")
- col.visible = False
+ #col.visible = False
self.add_column(col)
col = self.CustomGroupColumn(app, "custom_group")
@@ -476,7 +476,7 @@
# wait for up to 20 seconds for completion to be called
succeeded = wait(predicate, timeout=20)
if not succeeded:
- self.job_ads = {"": ""}
+ self.job_ads = {"":{"VALUE": "", "TYPE": "expression"}}
return self.job_ads
16 years, 3 months
rhmessaging commits: r2530 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-23 12:48:12 -0400 (Tue, 23 Sep 2008)
New Revision: 2530
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Added Submitter to Job summary properties
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-09-22 19:50:13 UTC (rev 2529)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-09-23 16:48:12 UTC (rev 2530)
@@ -1699,9 +1699,10 @@
prop.summary = True
prop.escape = False
- #prop = self.SubmitterProperty(self, "Owner")
- #prop.title = "Submitter"
- #prop.summary = True
+ prop = self.SubmitterProperty(self, "submitter")
+ prop.title = "Submitter"
+ prop.summary = True
+ prop.escape = False
prop = CuminProperty(self, "Args")
prop.title = "Args"
@@ -1784,11 +1785,18 @@
class SubmitterProperty(CuminProperty):
def value(self, session, job):
- submitter = super(CuminJob.SubmitterProperty, self).value(session, job)
branch = session.branch()
frame = self.cumin_class.get_pool_frame(branch)
- frame.show_submitter(branch, submitter)
- return submitter and escape_amp(fmt_olink(branch, submitter, name=submitter.Name))
+ try:
+ submitter = job.submitter
+ frame.show_submitter(branch, submitter)
+ except:
+ submitter = job
+ submitter.Name = "Unavailable"
+ frame.show_job(branch, job)
+
+ return escape_amp(fmt_olink(branch, submitter, name=submitter.Name))
+
class SchedulerProperty(CuminProperty):
def value(self, session, job):
16 years, 3 months
rhmessaging commits: r2529 - store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2008-09-22 15:50:13 -0400 (Mon, 22 Sep 2008)
New Revision: 2529
Modified:
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/ArgsJournalExpand.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
Log:
Regenerated management code
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/ArgsJournalExpand.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/ArgsJournalExpand.h 2008-09-22 19:49:59 UTC (rev 2528)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/ArgsJournalExpand.h 2008-09-22 19:50:13 UTC (rev 2529)
@@ -25,6 +25,8 @@
// Please do not edit.
#include "qpid/management/Args.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
#include <string>
namespace qmf {
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2008-09-22 19:49:59 UTC (rev 2528)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2008-09-22 19:50:13 UTC (rev 2529)
@@ -46,6 +46,17 @@
ManagementObject(_agent, _core)
{
+ queueRef = ::qpid::management::ObjectId();
+ name = "";
+ directory = "";
+ baseFileName = "";
+ writePageSize = 0;
+ writePages = 0;
+ readPageSize = 0;
+ readPages = 0;
+ initialFileCount = 0;
+ dataFileSize = 0;
+ currentFileCount = 0;
recordDepth = 0;
recordDepthHigh = 0;
recordDepthLow = 0;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2008-09-22 19:49:59 UTC (rev 2528)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2008-09-22 19:50:13 UTC (rev 2529)
@@ -45,6 +45,16 @@
ManagementObject(_agent, _core)
{
brokerRef = _parent->GetManagementObject ()->getObjectId ();
+ location = "";
+ defaultInitialFileCount = 0;
+ defaultDataFileSize = 0;
+ tplIsInitialized = 0;
+ tplDirectory = "";
+ tplWritePageSize = 0;
+ tplWritePages = 0;
+ tplInitialFileCount = 0;
+ tplDataFileSize = 0;
+ tplCurrentFileCount = 0;
tplTransactionDepth = 0;
tplTransactionDepthHigh = 0;
tplTransactionDepthLow = 0;
16 years, 3 months
rhmessaging commits: r2528 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-22 15:49:59 -0400 (Mon, 22 Sep 2008)
New Revision: 2528
Modified:
mgmt/trunk/cumin/python/cumin/job.py
mgmt/trunk/cumin/python/cumin/job.strings
Log:
GetAd call now returns nested dictionaries with type info.
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-22 19:48:51 UTC (rev 2527)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-22 19:49:59 UTC (rev 2528)
@@ -24,46 +24,55 @@
self.add_column(self.ids)
col = self.GlobalJobIdColumn(app, "global_job_id")
- self.add_hidden_column(col)
+ self.add_column(col)
self.set_default_column(col)
col = self.CustomIdColumn(app, "custom_id")
- self.add_hidden_column(col)
+ self.add_column(col)
col = self.CommandColumn(app, "cmd")
- self.add_hidden_column(col)
+ self.add_column(col)
col = self.AccountingGroupColumn(app, "agroup")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.SchedulerColumn(app, "scheduler")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.SubmitterColumn(app, "submitter")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.ClusterIdColumn(app, "cluster_id")
col.alignment = "right"
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.ConcurrencyLimitsColumn(app, "concurrency_limits")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.CustomGroupColumn(app, "custom_group")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.CustomPriorityColumn(app, "custom_priority")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.StatusColumn(app, "job_status")
- self.add_hidden_column(col)
+ self.add_column(col)
col = self.TitleColumn(app, "title")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.ArgsColumn(app, "args")
col.alignment = "right"
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
self.phase = JobStatusSwitch(app, "phase")
self.add_child(self.phase)
@@ -136,6 +145,15 @@
def render_title(self, session, data):
return "Submitter"
+ def render_content(self, session, data):
+ submitter = Identifiable(data["submitter_id"])
+ if data["submitter"]:
+ branch = session.branch()
+ self.frame.show_submitter(branch, submitter).show_view(branch)
+ return fmt_olink(branch, submitter, name=data["submitter"])
+ else:
+ return data["scheduler"]
+
class SchedulerColumn(SqlTableColumn):
def render_title(self, session, data):
return "Scheduler"
@@ -182,6 +200,9 @@
def show_scheduler(self, session, sched):
return self.frame.show_scheduler(session, sched)
+ def show_submitter(self, session, submitter):
+ return self.frame.show_submitter(session, submitter)
+
def show_jobs_hold(self, session):
return self.frame.show_jobs_hold(session)
@@ -345,15 +366,9 @@
self.__release = JobReleaseButton(app, "release", self)
self.add_child(self.__release)
- def do_process(self, session, *args):
- self.show_column(session, "global_job_id")
- self.show_column(session, "custom_id")
- self.show_column(session, "cmd")
- self.show_column(session, "scheduler")
- self.show_column(session, "submitter")
- self.show_column(session, "job_status")
- super(JobGroupJobSet, self).do_process(session, *args)
-
+ def get_visible_columns(self, session):
+ return self.get_request_visible_columns(session, ["scheduler", "submitter"])
+
def render_title(self, session, group):
where_group = "custom_group = '%s'" % group.get_id()
return "Jobs %s" % fmt_count(Job.select(where_group).count())
@@ -428,6 +443,10 @@
def __init__(self, app, name):
super(JobAdsSet, self).__init__(app, name, )
+ self.types = {0: "expression",
+ 1: "integer",
+ 2: "float",
+ 3: "string"}
def get_args(self, session):
return self.frame.get_args(session)
@@ -465,10 +484,11 @@
job_ads = self.get_raw_ads(session, job)
cls = self.app.model.get_class_by_object(job)
+ return [self.gen_item(x, job_ads[x]["VALUE"], cls, dtype=self.types[job_ads[x]["TYPE"]]) for x in job_ads]
# list of dictionaries
# each disctionary has:
# name:, value:, type: [, error:] [, property:] [,path:]
- return [self.gen_item(x, job_ads[x], cls) for x in job_ads]
+ #return [self.gen_item(x, job_ads[x], cls) for x in job_ads]
#
def gen_item(self, name, value, cls, path=None, dtype=None, error=None, orig=None):
@@ -484,14 +504,9 @@
idict["name"] = name
idict["value"] = value
idict["orig"] = value
- if dtype:
- idict["type"] = dtype
- if dtype == "number":
- nval = convertStr(value)
- if nval:
- idict["value"] = nval
- else:
- idict["type"], idict["value"] = self.get_type(value)
+ idict["type"] = dtype
+ if dtype == "string":
+ idict["value"] = self.strip_string_quotes(value)
if orig:
idict["orig"] = orig
if error:
@@ -504,23 +519,11 @@
idict["path"] = path
return idict
- def get_type(self, value):
+ def strip_string_quotes(self, value):
dvalue = value
- dtype = "string"
- try:
- if isinstance(value, int) or isinstance(value, float) or isinstance(value, long):
- dtype = "number"
- elif isinstance(value, basestring):
- if value[:1] == "\"" and value[-1:] == "\"":
- dtype = "string"
- dvalue = value[1:-1]
- else:
- dtype = "expression"
- elif value is None:
- dvalue = ""
- except:
- pass
- return dtype, dvalue
+ if value[:1] == "\"" and value[-1:] == "\"":
+ dvalue = value[1:-1]
+ return dvalue
class JobPropertyRenderer(TemplateRenderer):
def render_title(self, session, item):
@@ -653,19 +656,28 @@
ads[field]["value"] = ""
fval = ""
ftype = ads[field]["type"]
- if ftype == "number":
- fval = convertStr(fval)
- if fval is None:
- ads[field]["error"] = "Numeric value expected"
+ if ftype == "integer":
+ try:
+ fval = int(fval)
+ except:
+ ads[field]["error"] = "Integer value expected"
errors = True
+ elif ftype == "float":
+ try:
+ fval = float(fval)
+ except:
+ ads[field]["error"] = "Floating point value expected"
+ errors = True
elif ftype == "string":
fval = "\"%s\"" % fval
else:
fval = unicode(fval)
if "orig" in ads[field]:
orig = ads[field]["orig"]
- if ftype == "number":
- orig = convertStr(orig)
+ if ftype == "integer":
+ orig = int(orig)
+ elif ftype == "float":
+ orig = float(orig)
if fval != orig:
just_ads[unicode(field)] = fval
@@ -721,16 +733,16 @@
items = self.ads.get_raw_ads(session, job)
out_file = err_file = user_file = None
if "Out" in items:
- out_file = items["Out"]
+ out_file = items["Out"]["VALUE"]
if "Err" in items:
- err_file = items["Err"]
+ err_file = items["Err"]["VALUE"]
if "UserLog" in items:
- user_file = items["UserLog"]
+ user_file = items["UserLog"]["VALUE"]
# strip any double quotes surrounding file names
- dtype, out_file = self.ads.get_type(out_file)
- dtype, err_file = self.ads.get_type(err_file)
- dtype, user_file = self.ads.get_type(user_file)
+ out_file = self.ads.strip_string_quotes(out_file)
+ err_file = self.ads.strip_string_quotes(err_file)
+ user_file = self.ads.strip_string_quotes(user_file)
# remember the file names so we don't need to reget them
self.out_file.set(session, out_file)
@@ -784,10 +796,8 @@
return raw[:-lindex]
first_last = self.first_last.get(session)
- start = 0
- end = 2048
- #start = first_last == "t" and -10240 or 0
- #end = first_last == "t" and 0 or 10240
+ start = first_last == "t" and -2048 or 0
+ end = first_last == "t" and 0 or 2048
file = self.which_file.get_current_file_name(session)
if file:
try:
@@ -1019,16 +1029,9 @@
self.__release = JobReleaseButton(app, "release", self)
self.add_child(self.__release)
- def do_process(self, session, *args):
- self.show_column(session, "global_job_id")
- self.show_column(session, "custom_id")
- self.show_column(session, "cmd")
- self.show_column(session, "custom_group")
- self.show_column(session, "scheduler")
- self.show_column(session, "submitter")
- self.show_column(session, "job_status")
- super(JobTab, self).do_process(session, *args)
-
+ def get_visible_columns(self, session):
+ return self.get_request_visible_columns(session, ["custom_group", "scheduler", "submitter"])
+
def render_sql_where(self, session, *args):
phase_sql = self.get_phase_sql(session)
return "where %s" % phase_sql
@@ -1131,7 +1134,7 @@
def get_reason(self, session, verb):
""" returns <verb> by username[: <user input reason>] """
reason = [self.reason.get(session)]
- verb_by = "%s by %s" % (verb, session.credentials.get("name"))
+ verb_by = "%s by %s" % (verb, session.user_session.subject.name)
reason.insert(0, verb_by)
return ": ".join(reason)
Modified: mgmt/trunk/cumin/python/cumin/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.strings 2008-09-22 19:48:51 UTC (rev 2527)
+++ mgmt/trunk/cumin/python/cumin/job.strings 2008-09-22 19:49:59 UTC (rev 2528)
@@ -10,16 +10,19 @@
j.custom_priority,
j.job_status,
j.global_job_id,
- j.owner as submitter,
j.title,
s.name as scheduler,
+ b.name as submitter,
j.scheduler_id,
+ j.submitter_id,
j.cmd
from job as j
left outer join job_stats as c on c.id = j.stats_curr_id
left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
+inner join submitter as b on b.id = j.submitter_id
{sql_where}
+{sql_orderby}
{sql_limit}
[JobSet.count_sql]
@@ -28,6 +31,7 @@
left outer join job_stats as c on c.id = j.stats_curr_id
left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
+inner join submitter as b on b.id = j.submitter_id
{sql_where}
[JobTab.html]
@@ -61,6 +65,7 @@
1 as jobs
from job as j
{sql_where}
+{sql_orderby}
{sql_limit}
[JobGroupSet.count_sql]
16 years, 3 months
rhmessaging commits: r2527 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-22 15:48:51 -0400 (Mon, 22 Sep 2008)
New Revision: 2527
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Added float type to Editable properties
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-09-22 19:48:09 UTC (rev 2526)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-09-22 19:48:51 UTC (rev 2527)
@@ -334,7 +334,7 @@
writer = Writer()
if not writable:
self.__readonly_template.render(writer, session, item)
- elif type == "number":
+ elif type == "float" or type == "integer":
self.__number_template.render(writer, session, item)
else:
uvalue = value.upper()
@@ -665,10 +665,12 @@
self.add_column(self.ids)
col = self.QNameColumn(app, "q_id")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.ENameColumn(app, "e_id")
- self.add_hidden_column(col)
+ col.visible = False
+ self.add_column(col)
col = self.KeyColumn(app, "key")
self.add_column(col)
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-09-22 19:48:09 UTC (rev 2526)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-09-22 19:48:51 UTC (rev 2527)
@@ -359,6 +359,7 @@
[EditablePropertyRenderer.readonly_html]
<span class="edit_readonly">{display_val}</span><input type="hidden" name="{ptype_name}" value="{ptype_value}"/><input type="hidden" name="{pname}" value="{val}"/>
+{orig_value}
[EditablePropertyRenderer.orig_html]
<input type="hidden" name="{porig_name}" value="{porig_value}"/>
16 years, 3 months