rhmessaging commits: r2940 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-12-05 16:23:42 -0500 (Fri, 05 Dec 2008)
New Revision: 2940
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Add the grid icon to the pool view
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 20:50:04 UTC (rev 2939)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 21:23:42 UTC (rev 2940)
@@ -1921,6 +1921,9 @@
return title
+ def get_icon_href(self, session):
+ return "resource?name=cluster-36.png"
+
class OtherPools(CuminProperty):
def get_title(self, session):
return ""
16 years, 1 month
rhmessaging commits: r2939 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-12-05 15:50:04 -0500 (Fri, 05 Dec 2008)
New Revision: 2939
Modified:
store/trunk/cpp/lib/jrnl/jcntl.cpp
Log:
Fix for BZ 474371 - "qpidd+store exits on journal recovery because of 'Timeout waiting for AIO in MessageStoreImpl::recoverMessages()'".
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-12-05 20:40:28 UTC (rev 2938)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-12-05 20:50:04 UTC (rev 2939)
@@ -798,10 +798,12 @@
}
break;
case 0:
+ check_journal_alignment(fid, file_pos);
rd._eo = file_pos;
return false;
default:
// Stop as this is the overwrite boundary.
+ check_journal_alignment(fid, file_pos);
rd._eo = file_pos;
return false;
}
16 years, 1 month
rhmessaging commits: r2938 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-12-05 15:40:28 -0500 (Fri, 05 Dec 2008)
New Revision: 2938
Modified:
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Left align property names in summary boxes
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-12-05 20:36:36 UTC (rev 2937)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-12-05 20:40:28 UTC (rev 2938)
@@ -840,6 +840,7 @@
color: #444;
font-weight: normal;
padding: 0 0.5em 0 0;
+ text-align: left;
}
[SummaryProperties.html]
16 years, 1 month
rhmessaging commits: r2937 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-12-05 15:36:36 -0500 (Fri, 05 Dec 2008)
New Revision: 2937
Modified:
mgmt/trunk/cumin/python/cumin/page.py
Log:
Add icons to the top-level views
Modified: mgmt/trunk/cumin/python/cumin/page.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.py 2008-12-05 19:09:53 UTC (rev 2936)
+++ mgmt/trunk/cumin/python/cumin/page.py 2008-12-05 20:36:36 UTC (rev 2937)
@@ -312,6 +312,9 @@
def render_title(self, session):
return "Messaging"
+ def render_icon_href(self, session):
+ return "resource?name=broker-36.png"
+
class GridView(TabbedModeSet):
def __init__(self, app, name):
super(GridView, self).__init__(app, name)
@@ -328,6 +331,9 @@
def render_title(self, session):
return "Grid"
+ def render_icon_href(self, session):
+ return "resource?name=cluster-36.png"
+
class SystemsView(TabbedModeSet):
def __init__(self, app, name):
super(SystemsView, self).__init__(app, name)
@@ -343,3 +349,6 @@
class Heading(CuminHeading):
def render_title(self, session):
return "Systems"
+
+ def render_icon_href(self, session):
+ return "resource?name=system-36.png"
16 years, 1 month
rhmessaging commits: r2936 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-12-05 14:09:53 -0500 (Fri, 05 Dec 2008)
New Revision: 2936
Modified:
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/pool.py
mgmt/trunk/cumin/python/cumin/pool.strings
Log:
Consolidated pool job stats into a single query.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 17:53:11 UTC (rev 2935)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 19:09:53 UTC (rev 2936)
@@ -3,7 +3,7 @@
from job import *
from mint.schema import *
from parameters import *
-from pool import PoolSlotSet, PoolMachineSet
+from pool import PoolSlotSet, PoolMachineSet, PoolJobStats
from struct import unpack, calcsize
from system import SystemSlotSet
from time import *
@@ -106,7 +106,7 @@
return count
- def write_xml(self, writer, objects):
+ def write_xml(self, session, writer, objects):
writer.write("<model>")
pcount = self.count_invocations("pending")
@@ -119,7 +119,7 @@
for object in objects:
cls = self.get_class_by_object(object)
- cls.write_xml(writer, object)
+ cls.write_xml(session, writer, object)
writer.write("</model>")
@@ -495,17 +495,17 @@
def write_event_xml(self, writer, object):
writer.write("<events errors=\"%i\" warnings=\"%i\"/>" % (0, 0))
- def write_stat_xml(self, writer, object):
+ def write_stat_xml(self, session, writer, object):
for stat in self.stats:
stat.write_xml(writer, object)
- def write_xml(self, writer, object):
+ def write_xml(self, session, writer, object):
writer.write("<%s id=\"%s\" name=\"%s\">" % \
(self.cumin_name, str(object.id),
self.get_object_name(object)))
self.write_event_xml(writer, object)
- self.write_stat_xml(writer, object)
+ self.write_stat_xml(session, writer, object)
writer.write("</%s>" % self.cumin_name)
@@ -1880,22 +1880,22 @@
prop.title = "Collector ID"
prop.summary = True
- stat = self.PercentStat(self, "Running")
+ stat = self.PercentStat(self, "running")
stat.title = "Running Jobs"
- stat = self.PercentStat(self, "Completed")
+ stat = self.PercentStat(self, "completed")
stat.title = "Completed Jobs"
- stat = self.IdlePercentStat(self, "Idle")
+ stat = self.PercentStat(self, "idle")
stat.title = "Idle Jobs"
- stat = self.PercentStat(self, "Held")
+ stat = self.PercentStat(self, "held")
stat.title = "Held Jobs"
- stat = self.RemovedPercentStat(self, "Removed")
+ stat = self.PercentStat(self, "removed")
stat.title = "Removed Jobs"
- stat = self.JobsPercentStat(self, "Jobs")
+ stat = self.PercentStat(self, "total")
stat.title = "Total Jobs"
action = self.PoolSlotVisualization(self, "slots")
@@ -1904,6 +1904,9 @@
action = self.VisMachine(self, "machines")
action.navigable = False
+ self.fake_stats = self.FakeJobStats(self, "fakestats")
+ self.fake_stats.navigable = False
+
def init(self):
self.frame = self.model.frame.pool
@@ -1933,78 +1936,26 @@
</ul>"""
return html % (href, self.title)
+
+ def write_stat_xml(self, session, writer, object):
+ record = self.fake_stats.get_stat_record(session, object)
+ for stat in self.stats:
+ stat.write_xml(writer, record)
+
class PercentStat(CuminStat):
- def value_text(self, pool):
+ def value_text(self, record):
state = self.name
- value = self.get_value(pool, state)
+ value = record[state]
return str(value)
- def get_sql_and_elem(self):
- pass
-
- def get_sql_or_elem(self):
- pass
-
- def get_status_elem(self, state):
- istate = JobStatusInfo.get_status_int(state)
- return "job_status = %i" % istate
-
- def get_value(self, pool, state):
- elems = list()
- status_elem = self.get_status_elem(state)
- if status_elem:
- elems.append(status_elem)
-
- and_elem = self.get_sql_and_elem()
- if and_elem:
- elems.append(and_elem)
-
- or_elem = self.get_sql_or_elem()
-
- return self.do_select(pool, elems, or_elem)
-
- def do_select(self, pool, and_elems, or_elem):
- and_elems.append("s.pool = '%s'" % pool.id)
- where = " and ".join(and_elems)
-
- if or_elem:
- where = " or ".join((where, or_elem))
-
- jn = "inner join scheduler as s on s.id = scheduler_id"
- return Job.select(where, join=jn).count()
-
- def rate_text(self, pool):
+ def rate_text(self, record):
state = self.name
- return self.get_item_rate(pool, state)
+ value = record[state]
+ total = record["total"]
+ if total:
+ percent = float(value) / float(total) * 100.0
+ return total and "%2.2f" % percent or "-"
- def get_item_rate(self, pool, state):
- jobs = self.do_select(pool, list(), None)
-
- value = self.get_value(pool, state)
- if jobs:
- percent = float(value) / float(jobs) * 100.0
- return jobs and "%2.2f" % percent or "-"
-
-
- class JobsPercentStat(PercentStat):
- def get_status_elem(self, state):
- return None
-
- def rate_text(self, pool):
- return "100.00"
-
- class IdlePercentStat(PercentStat):
- def get_sql_and_elem(self):
- # manually removed jobs will have a state of Idle
- # with a qmf_delete_time
- return "job.qmf_delete_time is null"
-
- class RemovedPercentStat(PercentStat):
- def get_sql_or_elem(self):
- # if a job is idle, but has a qmf_delete_time, it's actually Removed
- return "(job.qmf_delete_time is not null and job_status = %i)" % \
- JobStatusInfo.get_status_int("Idle")
-
class PoolSlotVisualization(SlotVisualization):
def __init__(self, cls, name):
super(CuminPool.PoolSlotVisualization, self).__init__(cls, name)
@@ -2057,7 +2008,16 @@
def render_sql_orderby(self, session, *args):
return "order by machine, name asc"
+ class FakeJobStats(CuminAction):
+ def __init__(self, cls, name):
+ super(CuminPool.FakeJobStats, self).__init__(cls, name)
+ self.itemset = PoolJobStats(cls.model.app, "stats")
+
+ def get_stat_record(self, session, pool):
+ cursor = self.itemset.get_items(session, pool)
+ return self.itemset.cursor_to_rows(cursor)[0]
+
class VisMachine(Visualization):
load_colors = [("Idle", "clear"),
("> 0%", "green"),
@@ -2855,7 +2815,7 @@
for id in self.__ids.get(session):
objects.append(cls.mint_class.get(id))
- self.app.model.write_xml(writer, objects)
+ self.app.model.write_xml(session, writer, objects)
return writer.to_string()
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2008-12-05 17:53:11 UTC (rev 2935)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2008-12-05 19:09:53 UTC (rev 2936)
@@ -194,7 +194,7 @@
def render_script(self, session, pool):
data = "model.xml?class=pool;id=%s" % pool.id
- return "wooly.setIntervalUpdate('%s', updatePool, 3000)" % data
+ return "wooly.setIntervalUpdate('%s', updatePool, 6000)" % data
def set_collector_tab(self, session):
self.__tabs.set_selected_mode(session, self.colls)
@@ -468,7 +468,29 @@
class PoolStatSet(StatSet):
def render_rate_text(self, session, args):
return "Percentage"
+
+ def do_get_items(self, session, pool):
+ stats = super(PoolStatSet, self).do_get_items(session, pool)
+ action = self.app.model.pool.fakestats
+ record = action.get_stat_record(session, pool)
+
+ fake_stats = list()
+ for stat in stats:
+ fake_stats.append((stat[0], record))
+
+ return fake_stats
+
+class PoolJobStats(CuminTable):
+ def render_sql_where(self, session, pool):
+ elems = list()
+ elems.append("s.pool = %(pool)s")
+ return "where %s" % " and ".join(elems)
+
+ def get_sql_values(self, session, pool):
+ values = {"pool": pool.id}
+ return values
+
class PoolStatus(CuminStatus):
def __init__(self, app, name):
super(PoolStatus, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.strings 2008-12-05 17:53:11 UTC (rev 2935)
+++ mgmt/trunk/cumin/python/cumin/pool.strings 2008-12-05 19:09:53 UTC (rev 2936)
@@ -16,6 +16,24 @@
from
(select 1 from collector group by pool) as l
+[PoolJobStats.sql]
+select
+ sum( case when job_status=2 then 1 else 0 end) as running,
+ sum( case when job_status=4 then 1 else 0 end) as completed,
+ sum( case when job_status=5 then 1 else 0 end) as held,
+ sum( case when job_status=1 and j.qmf_delete_time is null then 1 else 0 end) as idle,
+ sum( case when job_status=3 or (job_status=1 and j.qmf_delete_time is not null) then 1 else 0 end) as removed,
+ sum( 1 ) as total,
+ s.pool
+from job as j
+left outer join scheduler as s on s.id = j.scheduler_id
+{sql_where}
+group by s.pool
+
+[PoolJobStats.count_sql]
+1
+
+
[PoolView.javascript]
function updatePool(data) {
var model = data.objectify();
16 years, 1 month
rhmessaging commits: r2935 - in mgmt/trunk/sesame/cpp: src and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2008-12-05 12:53:11 -0500 (Fri, 05 Dec 2008)
New Revision: 2935
Modified:
mgmt/trunk/sesame/cpp/configure.ac
mgmt/trunk/sesame/cpp/src/Makefile.am
Log:
Fixed configure and make to use correct boost headers
Modified: mgmt/trunk/sesame/cpp/configure.ac
===================================================================
--- mgmt/trunk/sesame/cpp/configure.ac 2008-12-05 17:24:34 UTC (rev 2934)
+++ mgmt/trunk/sesame/cpp/configure.ac 2008-12-05 17:53:11 UTC (rev 2935)
@@ -94,11 +94,12 @@
test $QMF_GEN = no &&
AC_MSG_ERROR([Missing required qmf-gen. Install package qmf-devel or use --with-qpid-checkout])
- AC_CHECK_HEADERS([qpid/agent/ManagementAgent.h], , [fail=1])
+ AC_CHECK_HEADERS(qpid/agent/ManagementAgent.h, , [fail=1])
# Give any/all diagnostics before failing.
test $fail = 1 &&
AC_MSG_ERROR([Missing required qpid libraries/headers. Install package qmf-devel or use --with-qpid-checkout])
QPID_LIBS="-lqmfagent"
+ QPID_CXXFLAGS="-I$includedir/qpid-boost"
fi
AC_SUBST([QMF_GEN])
AC_SUBST([QPID_DIR])
Modified: mgmt/trunk/sesame/cpp/src/Makefile.am
===================================================================
--- mgmt/trunk/sesame/cpp/src/Makefile.am 2008-12-05 17:24:34 UTC (rev 2934)
+++ mgmt/trunk/sesame/cpp/src/Makefile.am 2008-12-05 17:53:11 UTC (rev 2935)
@@ -1,5 +1,5 @@
SUBDIRS = qmfgen
-sesame_CXXFLAGS = -I$(QPID_DIR)/cpp/src -I$(QPID_DIR)/cpp/src/gen -Iqmfgen \
+sesame_CXXFLAGS = $(QPID_CXXFLAGS) -Iqmfgen \
-DCONF_FILE=\"$(sysconfdir)/sesame/sesame.conf\" \
-DLOCSTATE_DIR=\"$(localstatedir)/lib/sesame\"
16 years, 1 month
rhmessaging commits: r2934 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-12-05 12:24:34 -0500 (Fri, 05 Dec 2008)
New Revision: 2934
Modified:
mgmt/trunk/cumin/python/cumin/tools.py
Log:
enable use of triggers to update current/previous statistics
Modified: mgmt/trunk/cumin/python/cumin/tools.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/tools.py 2008-12-05 16:29:49 UTC (rev 2933)
+++ mgmt/trunk/cumin/python/cumin/tools.py 2008-12-05 17:24:34 UTC (rev 2934)
@@ -189,8 +189,9 @@
def run(self, opts, args):
main = os.path.join(self.parent.config.home, "sql", "schema.sql")
indexes = os.path.join(self.parent.config.home, "sql", "indexes.sql")
+ triggers = os.path.join(self.parent.config.home, "sql", "triggers.sql")
- self.parent.database.createSchema((main, indexes))
+ self.parent.database.createSchema((main, indexes, triggers))
class DropSchema(Command):
def run(self, opts, args):
16 years, 1 month
rhmessaging commits: r2933 - in mgmt/trunk/mint: python/mint and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-12-05 11:29:49 -0500 (Fri, 05 Dec 2008)
New Revision: 2933
Modified:
mgmt/trunk/mint/bin/mint-bench
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/tools.py
Log:
Use a config var to determine whether to start the registration-polling thread.
Modified: mgmt/trunk/mint/bin/mint-bench
===================================================================
--- mgmt/trunk/mint/bin/mint-bench 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/bin/mint-bench 2008-12-05 16:29:49 UTC (rev 2933)
@@ -9,10 +9,10 @@
def main():
root = logging.getLogger("mint")
- root.setLevel(logging.INFO)
+ root.setLevel(logging.WARN)
h = logging.StreamHandler()
- h.setLevel(logging.INFO)
+ h.setLevel(logging.WARN)
root.addHandler(h)
if "--profile" in sys.argv:
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-12-05 16:29:49 UTC (rev 2933)
@@ -324,7 +324,7 @@
self.dataUri = dataUri
self.debug = debug
self.updateObjects = True
- self.pollRegistrations = False # XXX
+ self.pollRegistrations = True
assert MintModel.staticInstance is None
MintModel.staticInstance = self
@@ -376,13 +376,17 @@
def start(self):
self.updateThread.start()
self.dbExpireThread.start()
- self.registrationThread.start()
+ if self.pollRegistrations:
+ self.registrationThread.start()
+
def stop(self):
self.updateThread.stop()
self.dbExpireThread.stop()
- self.registrationThread.stop()
+ if self.pollRegistrations:
+ self.registrationThread.stop()
+
def callMethod(self, brokerId, objId, classKey, methodName, callback, args):
self.lock()
try:
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2008-12-05 15:05:52 UTC (rev 2932)
+++ mgmt/trunk/mint/python/mint/tools.py 2008-12-05 16:29:49 UTC (rev 2933)
@@ -113,6 +113,7 @@
int(opts.get("expire-frequency", freqDefault)),
int(opts.get("expire-threshold", thresholdDefault)),
debug=True)
+ model.pollRegistrations = False
model.check()
model.init()
16 years, 1 month
rhmessaging commits: r2932 - store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2008-12-05 10:05:52 -0500 (Fri, 05 Dec 2008)
New Revision: 2932
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
Log:
Updated usage text.
Modified: store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
===================================================================
--- store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2008-12-05 14:50:13 UTC (rev 2931)
+++ store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2008-12-05 15:05:52 UTC (rev 2932)
@@ -499,7 +499,7 @@
private static void usage()
{
System.out.println("usage: BDBStoreUpgrade:\n [-h|--help] [-q|--quiet] [-f|--force] [-b|--backup <Path to backup-db>] " +
- "-i|--input <Path to input-db> -o|--output <Path to upgraded-db>");
+ "-i|--input <Path to input-db> [-o|--output <Path to upgraded-db>]");
}
private static void help()
16 years, 1 month
rhmessaging commits: r2931 - mgmt/trunk/sesame/cpp/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-12-05 09:50:13 -0500 (Fri, 05 Dec 2008)
New Revision: 2931
Modified:
mgmt/trunk/sesame/cpp/etc/sysvinit-sesame
Log:
Add chkconfig metadata to the init script
Modified: mgmt/trunk/sesame/cpp/etc/sysvinit-sesame
===================================================================
--- mgmt/trunk/sesame/cpp/etc/sysvinit-sesame 2008-12-04 23:52:51 UTC (rev 2930)
+++ mgmt/trunk/sesame/cpp/etc/sysvinit-sesame 2008-12-05 14:50:13 UTC (rev 2931)
@@ -1,5 +1,6 @@
#!/bin/sh
#
+# chkconfig: 2345 80 30
# sesame: Sesame daemon
# processname: sesame
# pidfile: /var/run/sesame.pid
16 years, 1 month