rhmessaging commits: r1367 - in mgmt/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 22:20:12 -0500 (Mon, 26 Nov 2007)
New Revision: 1367
Added:
mgmt/cumin/resources/group-20.png
mgmt/cumin/resources/group-36.png
mgmt/cumin/resources/rh_messaging_logo.png
Modified:
mgmt/cumin/python/cumin/brokergroup.strings
mgmt/cumin/resources/profile-20.png
mgmt/cumin/resources/profile-36.png
mgmt/cumin/resources/queue-20.png
Log:
Installs the finished icons.
Modified: mgmt/cumin/python/cumin/brokergroup.strings
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.strings 2007-11-27 03:07:49 UTC (rev 1366)
+++ mgmt/cumin/python/cumin/brokergroup.strings 2007-11-27 03:20:12 UTC (rev 1367)
@@ -31,7 +31,7 @@
[BrokerGroupView.html]
{status}
-<h1>{title}</h1>
+<h1><img src="resource?name=group-36.png"/>{title}</h1>
<table class="props">
<tr><th>Name</th><td>{name}</td></tr>
Added: mgmt/cumin/resources/group-20.png
===================================================================
(Binary files differ)
Property changes on: mgmt/cumin/resources/group-20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/cumin/resources/group-36.png
===================================================================
(Binary files differ)
Property changes on: mgmt/cumin/resources/group-36.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: mgmt/cumin/resources/profile-20.png
===================================================================
(Binary files differ)
Modified: mgmt/cumin/resources/profile-36.png
===================================================================
(Binary files differ)
Modified: mgmt/cumin/resources/queue-20.png
===================================================================
(Binary files differ)
Added: mgmt/cumin/resources/rh_messaging_logo.png
===================================================================
(Binary files differ)
Property changes on: mgmt/cumin/resources/rh_messaging_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 1 month
rhmessaging commits: r1366 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 22:07:49 -0500 (Mon, 26 Nov 2007)
New Revision: 1366
Modified:
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/model.py
Log:
Adds a write_xml method to CuminExchange and makes the exchange ajax
work correctly.
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-27 02:53:27 UTC (rev 1365)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-27 03:07:49 UTC (rev 1366)
@@ -87,17 +87,17 @@
function updateExchangeStatus(id, exchange) {
updateStatus(id, exchange);
- var m = exchange.measurement;
- var mdata = {
+ var s = exchange.stat;
+ var sdata = {
"tr": [
null,
- {"td": [m.msgReceives.rate, m.byteReceives.rate]},
- {"td": [m.msgRoutes.rate, m.byteRoutes.rate]},
- {"td": [m.msgDrops.value, m.byteDrops.value]}
+ {"td": [s.msgReceives.rate, s.byteReceives.rate]},
+ {"td": [s.msgRoutes.rate, s.byteRoutes.rate]},
+ {"td": [s.msgDrops.value, s.byteDrops.value]}
]
};
- wooly.doc().elembyid(id).descendant("table.tbody").update(mdata);
+ wooly.doc().elembyid(id).descendant("table.tbody").update(sdata);
}
[ExchangeStatus.html]
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-11-27 02:53:27 UTC (rev 1365)
+++ mgmt/cumin/python/cumin/model.py 2007-11-27 03:07:49 UTC (rev 1366)
@@ -311,6 +311,15 @@
stat.unit = "message"
stat.categories = ("general")
+ def write_xml(self, exchange, writer):
+ writer.write("<exchange id=\"%i\">" % exchange.id)
+ writer.write("<name>%s</name>" % exchange.name)
+
+ self.write_error_xml(exchange, writer)
+ self.write_stat_xml(exchange, writer)
+
+ writer.write("</exchange>")
+
class DummyModel(Model):
def __init__(self):
super(DummyModel, self).__init__()
17 years, 1 month
rhmessaging commits: r1365 - mgmt/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 21:53:27 -0500 (Mon, 26 Nov 2007)
New Revision: 1365
Removed:
mgmt/mint/xml/
Modified:
mgmt/mint/Makefile
Log:
Changes the mint Makefile such that it requires the user set a variable,
MINT_XML_SCHEMA, pointing to the file to use to generate the schema.
Removes the copy of the schema files.
Modified: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile 2007-11-26 23:16:11 UTC (rev 1364)
+++ mgmt/mint/Makefile 2007-11-27 02:53:27 UTC (rev 1365)
@@ -3,17 +3,17 @@
dsn := "postgresql://localhost/"
ifndef MINT_XML_SCHEMA
- MINT_XML_SCHEMA := "xml/MgmtSchema.xml"
+ $(error "MINT_XML_SCHEMA is not set")
endif
message:
- @echo "Run 'make schema' to regenerate the schema from MINT_XML_SCHEMA"
- @echo "MINT_XML_SCHEMA is currently set to '${MINT_XML_SCHEMA}'"
+ @echo "Run 'make schema' to regenerate the schema from the file indicated in the"
+ @echo "variable MINT_XML_SCHEMA."
schema: schema-python schema-sql
schema-python:
python python/mint/schemaparser.py ${MINT_XML_SCHEMA} python/mint/schema.py ${dsn}
-schema-sql:
+schema-sql: python/mint/schema.py
sqlobject-admin sql -m mint.schema -c ${dsn} | sed -e '1,2d' > python/mint/schema.sql
17 years, 1 month
rhmessaging commits: r1364 - mgmt/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 18:16:11 -0500 (Mon, 26 Nov 2007)
New Revision: 1364
Modified:
mgmt/mint/Makefile
Log:
Make the makefile pay attention to MINT_XML_SCHEMA, the path to the schema
file to use in schema generation.
Also, it's .PHONY, not .phony.
Modified: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile 2007-11-26 23:15:56 UTC (rev 1363)
+++ mgmt/mint/Makefile 2007-11-26 23:16:11 UTC (rev 1364)
@@ -1,14 +1,19 @@
-.phony: message schema schema-sql schema-python
+.PHONY: message schema schema-sql schema-python
dsn := "postgresql://localhost/"
+ifndef MINT_XML_SCHEMA
+ MINT_XML_SCHEMA := "xml/MgmtSchema.xml"
+endif
+
message:
- @echo "Run \"make schema\" to regenerate the schema from xml/MgmtSchema.xml"
+ @echo "Run 'make schema' to regenerate the schema from MINT_XML_SCHEMA"
+ @echo "MINT_XML_SCHEMA is currently set to '${MINT_XML_SCHEMA}'"
schema: schema-python schema-sql
schema-python:
- python python/mint/schemaparser.py xml/MgmtSchema.xml python/mint/schema.py ${dsn}
+ python python/mint/schemaparser.py ${MINT_XML_SCHEMA} python/mint/schema.py ${dsn}
schema-sql:
sqlobject-admin sql -m mint.schema -c ${dsn} | sed -e '1,2d' > python/mint/schema.sql
17 years, 1 month
rhmessaging commits: r1363 - in store/trunk/cpp: etc and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2007-11-26 18:15:56 -0500 (Mon, 26 Nov 2007)
New Revision: 1363
Added:
store/trunk/cpp/etc/rhmd.sh
Modified:
store/trunk/cpp/rhm.spec.in
Log:
add startup script
Added: store/trunk/cpp/etc/rhmd.sh
===================================================================
--- store/trunk/cpp/etc/rhmd.sh (rev 0)
+++ store/trunk/cpp/etc/rhmd.sh 2007-11-26 23:15:56 UTC (rev 1363)
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/sbin/qpidd --config=/etc/rhmd.conf $*
Modified: store/trunk/cpp/rhm.spec.in
===================================================================
--- store/trunk/cpp/rhm.spec.in 2007-11-26 22:43:50 UTC (rev 1362)
+++ store/trunk/cpp/rhm.spec.in 2007-11-26 23:15:56 UTC (rev 1363)
@@ -39,6 +39,7 @@
make install DESTDIR=%{buildroot}
install -Dp -m0755 etc/rhmd %{buildroot}%{_initrddir}/rhmd
install -Dp -m0755 etc/rhmd.sh %{buildroot}%{_sbindir}/rhmd
+install -d -m0775 %{buildroot}%{_localstatedir}/rhm
rm -f %{buildroot}%_libdir/*.a
rm -f %{buildroot}%_libdir/*.la
rm -f %{buildroot}%_libdir/*.so
@@ -56,6 +57,7 @@
%_libdir/libbdbstore.so.0.1.0
%_initrddir/rhmd
%_sbindir/rhmd
+%attr(0775,root,root) %dir %_localstatedir/rhm
%config(noreplace) %_sysconfdir/rhmd.conf
%post
17 years, 1 month
rhmessaging commits: r1362 - in mgmt/mint: python/mint and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 17:43:50 -0500 (Mon, 26 Nov 2007)
New Revision: 1362
Added:
mgmt/mint/Makefile
Removed:
mgmt/mint/python/mint/config.xml
Modified:
mgmt/mint/python/mint/schema.sql
mgmt/mint/python/mint/schemaparser.py
Log:
Changes schemaparser.py and SchemaParser to to take arguments.
Adds a Makefile to generate schema.py and schema.sql. Run "make schema"
inside the mint dir to regenerate everything.
Regenerates schema.sql, as I think I messed it up earlier.
Added: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile (rev 0)
+++ mgmt/mint/Makefile 2007-11-26 22:43:50 UTC (rev 1362)
@@ -0,0 +1,14 @@
+.phony: message schema schema-sql schema-python
+
+dsn := "postgresql://localhost/"
+
+message:
+ @echo "Run \"make schema\" to regenerate the schema from xml/MgmtSchema.xml"
+
+schema: schema-python schema-sql
+
+schema-python:
+ python python/mint/schemaparser.py xml/MgmtSchema.xml python/mint/schema.py ${dsn}
+
+schema-sql:
+ sqlobject-admin sql -m mint.schema -c ${dsn} | sed -e '1,2d' > python/mint/schema.sql
Deleted: mgmt/mint/python/mint/config.xml
===================================================================
--- mgmt/mint/python/mint/config.xml 2007-11-26 21:50:03 UTC (rev 1361)
+++ mgmt/mint/python/mint/config.xml 2007-11-26 22:43:50 UTC (rev 1362)
@@ -1,5 +0,0 @@
-<config>
- <configOption name="dsn" value="postgresql://localhost/" />
- <configOption name="pythonOutput" value="schema.py" />
- <configOption name="schemaXML" value="xml/MgmtSchema.xml" />
-</config>
Modified: mgmt/mint/python/mint/schema.sql
===================================================================
--- mgmt/mint/python/mint/schema.sql 2007-11-26 21:50:03 UTC (rev 1361)
+++ mgmt/mint/python/mint/schema.sql 2007-11-26 22:43:50 UTC (rev 1362)
@@ -1,24 +1,433 @@
-These classes do not have connections set:
- * Binding
- * BindingStats
- * Broker
- * BrokerStats
- * Client
- * ClientStats
- * Consumer
- * ConsumerStats
- * Destination
- * DestinationStats
- * Exchange
- * ExchangeStats
- * Producer
- * ProducerStats
- * Queue
- * QueueStats
- * Session
- * SessionStats
- * System
- * SystemStats
- * Vhost
- * VhostStats
-You must indicate --connection=URI
+CREATE TABLE binding (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ queue_id INT,
+ exchange_id INT,
+ binding_key VARCHAR(1000)
+);
+
+CREATE TABLE binding_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ binding_id INT,
+ msg_matched BIGINT
+);
+
+CREATE TABLE broker (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ system_id INT,
+ port SMALLINT,
+ worker_threads SMALLINT,
+ max_conns SMALLINT,
+ conn_backlog SMALLINT,
+ staging_threshold INT,
+ store_lib VARCHAR(1000),
+ async_store BOOL,
+ mgmt_pub_interval SMALLINT,
+ initial_disk_page_size INT,
+ initial_pages_per_queue INT,
+ cluster_name VARCHAR(1000),
+ version VARCHAR(1000)
+);
+
+CREATE TABLE broker_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ broker_id INT
+);
+
+CREATE TABLE client (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ vhost_id INT,
+ ip_addr INT,
+ port SMALLINT
+);
+
+CREATE TABLE client_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ client_id INT,
+ auth_identity VARCHAR(1000),
+ msgs_produced BIGINT,
+ msgs_consumed BIGINT,
+ bytes_produced BIGINT,
+ bytes_consumed BIGINT
+);
+
+CREATE TABLE consumer (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ destination_id INT,
+ queue_id INT
+);
+
+CREATE TABLE consumer_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ consumer_id INT,
+ msgs_consumed BIGINT,
+ bytes_consumed BIGINT,
+ unacked_messages INT,
+ unacked_messages_low INT,
+ unacked_messages_high INT
+);
+
+CREATE TABLE destination (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ session_id INT,
+ name VARCHAR(1000)
+);
+
+CREATE TABLE destination_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ destination_id INT,
+ flow_mode SMALLINT,
+ max_msg_credits INT,
+ max_byte_credits INT,
+ msg_credits INT,
+ byte_credits INT
+);
+
+CREATE TABLE exchange (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ vhost_id INT,
+ name VARCHAR(1000),
+ type VARCHAR(1000)
+);
+
+CREATE TABLE exchange_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ exchange_id INT,
+ producers INT,
+ producers_low INT,
+ producers_high INT,
+ bindings INT,
+ bindings_low INT,
+ bindings_high INT,
+ msg_receives BIGINT,
+ msg_drops BIGINT,
+ msg_routes BIGINT,
+ byte_receives BIGINT,
+ byte_drops BIGINT,
+ byte_routes BIGINT
+);
+
+CREATE TABLE producer (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ destination_id INT,
+ exchange_id INT
+);
+
+CREATE TABLE producer_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ producer_id INT,
+ msgs_produced BIGINT,
+ bytes_produced BIGINT
+);
+
+CREATE TABLE queue (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ vhost_id INT,
+ name VARCHAR(1000),
+ durable BOOL,
+ auto_delete BOOL,
+ exclusive BOOL,
+ page_memory_limit INT
+);
+
+CREATE TABLE queue_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ queue_id INT,
+ journal_location VARCHAR(1000),
+ journal_base_file_name VARCHAR(1000),
+ journal_initial_file_count INT,
+ journal_current_file_count INT,
+ journal_data_file_size INT,
+ journal_free_file_count INT,
+ journal_free_file_count_low INT,
+ journal_free_file_count_high INT,
+ journal_available_file_count INT,
+ journal_available_file_count_low INT,
+ journal_available_file_count_high INT,
+ journal_record_depth INT,
+ journal_record_depth_low INT,
+ journal_record_depth_high INT,
+ journal_record_enqueues BIGINT,
+ journal_record_dequeues BIGINT,
+ journal_write_wait_failures BIGINT,
+ journal_write_busy_failures BIGINT,
+ journal_read_record_count BIGINT,
+ journal_read_busy_failures BIGINT,
+ journal_write_page_cache_depth INT,
+ journal_write_page_cache_depth_low INT,
+ journal_write_page_cache_depth_high INT,
+ journal_write_page_size INT,
+ journal_read_page_cache_depth INT,
+ journal_read_page_cache_depth_low INT,
+ journal_read_page_cache_depth_high INT,
+ journal_read_page_size INT,
+ msg_total_enqueues BIGINT,
+ msg_total_dequeues BIGINT,
+ msg_txn_enqueues BIGINT,
+ msg_txn_dequeues BIGINT,
+ msg_persist_enqueues BIGINT,
+ msg_persist_dequeues BIGINT,
+ msg_depth INT,
+ msg_depth_low INT,
+ msg_depth_high INT,
+ byte_total_enqueues BIGINT,
+ byte_total_dequeues BIGINT,
+ byte_txn_enqueues BIGINT,
+ byte_txn_dequeues BIGINT,
+ byte_persist_enqueues BIGINT,
+ byte_persist_dequeues BIGINT,
+ byte_depth INT,
+ byte_depth_low INT,
+ byte_depth_high INT,
+ enqueue_txn_starts BIGINT,
+ enqueue_txn_commits BIGINT,
+ enqueue_txn_rejects BIGINT,
+ enqueue_txn_count INT,
+ enqueue_txn_count_low INT,
+ enqueue_txn_count_high INT,
+ dequeue_txn_starts BIGINT,
+ dequeue_txn_commits BIGINT,
+ dequeue_txn_rejects BIGINT,
+ dequeue_txn_count INT,
+ dequeue_txn_count_low INT,
+ dequeue_txn_count_high INT,
+ consumers INT,
+ consumers_low INT,
+ consumers_high INT,
+ bindings INT,
+ bindings_low INT,
+ bindings_high INT,
+ unacked_messages INT,
+ unacked_messages_low INT,
+ unacked_messages_high INT
+);
+
+CREATE TABLE session (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ vhost_id INT,
+ name VARCHAR(1000),
+ client_id INT,
+ detached_lifespan INT
+);
+
+CREATE TABLE session_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ session_id INT,
+ attached BOOL,
+ remaining_lifespan INT,
+ frames_outstanding INT
+);
+
+CREATE TABLE system (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ sys_id VARCHAR(1000)
+);
+
+CREATE TABLE system_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ system_id INT
+);
+
+CREATE TABLE vhost (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ creation_time TIMESTAMP,
+ deletion_time TIMESTAMP,
+ managed_broker VARCHAR(1000),
+ stats_id INT,
+ stats_prev_id INT,
+ broker_id INT,
+ name VARCHAR(1000)
+);
+
+CREATE TABLE vhost_stats (
+ id SERIAL PRIMARY KEY,
+ id_original BIGINT,
+ rec_time TIMESTAMP,
+ vhost_id INT
+);
+
+ALTER TABLE binding ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES binding_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE binding ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES binding_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE binding ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
+
+ALTER TABLE binding ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
+
+ALTER TABLE binding_stats ADD CONSTRAINT binding_id_exists FOREIGN KEY (binding_id) REFERENCES binding (id) ON DELETE SET NULL;
+
+ALTER TABLE broker ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES broker_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE broker ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES broker_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE broker ADD CONSTRAINT system_id_exists FOREIGN KEY (system_id) REFERENCES system (id) ON DELETE SET NULL;
+
+ALTER TABLE broker_stats ADD CONSTRAINT broker_id_exists FOREIGN KEY (broker_id) REFERENCES broker (id) ON DELETE SET NULL;
+
+ALTER TABLE client ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES client_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE client ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES client_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE client ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
+
+ALTER TABLE client_stats ADD CONSTRAINT client_id_exists FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL;
+
+ALTER TABLE consumer ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES consumer_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE consumer ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES consumer_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE consumer ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
+
+ALTER TABLE consumer ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
+
+ALTER TABLE consumer_stats ADD CONSTRAINT consumer_id_exists FOREIGN KEY (consumer_id) REFERENCES consumer (id) ON DELETE SET NULL;
+
+ALTER TABLE destination ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES destination_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE destination ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES destination_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE destination ADD CONSTRAINT session_id_exists FOREIGN KEY (session_id) REFERENCES session (id) ON DELETE SET NULL;
+
+ALTER TABLE destination_stats ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
+
+ALTER TABLE exchange ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES exchange_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE exchange ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES exchange_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE exchange ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
+
+ALTER TABLE exchange_stats ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
+
+ALTER TABLE producer ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES producer_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE producer ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES producer_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE producer ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
+
+ALTER TABLE producer ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
+
+ALTER TABLE producer_stats ADD CONSTRAINT producer_id_exists FOREIGN KEY (producer_id) REFERENCES producer (id) ON DELETE SET NULL;
+
+ALTER TABLE queue ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_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;
+
+ALTER TABLE queue ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
+
+ALTER TABLE queue_stats ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
+
+ALTER TABLE session ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES session_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE session ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES session_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE session ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
+
+ALTER TABLE session ADD CONSTRAINT client_id_exists FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL;
+
+ALTER TABLE session_stats ADD CONSTRAINT session_id_exists FOREIGN KEY (session_id) REFERENCES session (id) ON DELETE SET NULL;
+
+ALTER TABLE system ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES system_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE system ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES system_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE system_stats ADD CONSTRAINT system_id_exists FOREIGN KEY (system_id) REFERENCES system (id) ON DELETE SET NULL;
+
+ALTER TABLE vhost ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES vhost_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE vhost ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES vhost_stats (id) ON DELETE SET NULL;
+
+ALTER TABLE vhost ADD CONSTRAINT broker_id_exists FOREIGN KEY (broker_id) REFERENCES broker (id) ON DELETE SET NULL;
+
+ALTER TABLE vhost_stats ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
+
Modified: mgmt/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/mint/python/mint/schemaparser.py 2007-11-26 21:50:03 UTC (rev 1361)
+++ mgmt/mint/python/mint/schemaparser.py 2007-11-26 22:43:50 UTC (rev 1362)
@@ -4,9 +4,10 @@
class SchemaParser:
"""parses broker XML schema"""
- def __init__(self):
- self.options = dict()
- self.parseConfigFile()
+ def __init__(self, xmlSchemaPath, pythonFilePath, dsn):
+ self.xmlSchemaPath = xmlSchemaPath
+ self.pythonFilePath = pythonFilePath
+ self.dsn = dsn
self.style = MixedCaseUnderscoreStyle()
self.pythonOutput = "from sqlobject import *\n"
self.pythonOutput += "from datetime import datetime\n"
@@ -14,8 +15,8 @@
self.currentClass = ""
self.finalPythonOutput = "\nclassToSchemaNameMap = dict()\n"
self.finalPythonOutput += "schemaNameToClassMap = dict()\n"
- self.pythonOutput += "conn = connectionForURI(\"%s\")\n" % (self.options["dsn"])
- self.pythonOutput += "sqlhub.processConnection = conn\n\n"
+ #self.pythonOutput += "conn = connectionForURI(\"%s\")\n" % (self.dsn)
+ #self.pythonOutput += "sqlhub.processConnection = conn\n\n"
# mapping between xml schema types and database column types
# see xml/MintTypes.xml
self.dataTypesMap = dict()
@@ -124,15 +125,9 @@
self.pythonOutput += " pass\n"
self.currentClass = ""
- def parseConfigFile(self):
- config = mllib.xml_parse("config.xml")
- configOptions = config.query["config/configOption"]
- for opt in configOptions:
- self.options[opt["@name"]] = opt["@value"]
-
def generateCode(self):
- outputFile = open(self.options["pythonOutput"], "w")
- schema = mllib.xml_parse(self.options["schemaXML"])
+ outputFile = open(self.pythonFilePath, "w")
+ schema = mllib.xml_parse(self.xmlSchemaPath)
classes = schema.query["schema/class"]
for cls in classes:
self.startClass(cls["@name"])
@@ -146,6 +141,12 @@
outputFile.write(self.pythonOutput + self.finalPythonOutput)
outputFile.close()
+if __name__ == "__main__":
+ import sys
-parser = SchemaParser()
-parser.generateCode()
+ if len(sys.argv) != 4:
+ print "Usage: schemaparser.py INPUT-XML-SCHEMA OUTPUT-PYTHON-FILE DSN"
+ sys.exit(1)
+ else:
+ parser = SchemaParser(*sys.argv[1:])
+ parser.generateCode()
17 years, 1 month
rhmessaging commits: r1361 - in store/trunk/cpp: lib/jrnl and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2007-11-26 16:50:03 -0500 (Mon, 26 Nov 2007)
New Revision: 1361
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/BdbMessageStore.h
store/trunk/cpp/lib/jrnl/nlfh.cpp
store/trunk/cpp/tests/SimpleTest.cpp
Log:
Switched all regular PersistentMessage* and PersistentMessage& to intrusive_ptr<PersistentMessage>, so as to hook into the refcount for a message while it is in the store. Matches changes made in qpid.
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2007-11-26 21:09:41 UTC (rev 1360)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2007-11-26 21:50:03 UTC (rev 1361)
@@ -35,6 +35,7 @@
using namespace rhm::bdbstore;
using namespace qpid::broker;
using boost::static_pointer_cast;
+using boost::intrusive_ptr;
using std::auto_ptr;
using std::max;
@@ -719,19 +720,19 @@
readXids(prepareXidDb, xids);
}
-void BdbMessageStore::stage( PersistableMessage& msg)
+void BdbMessageStore::stage( intrusive_ptr<PersistableMessage>& msg)
{
checkInit();
TxnCtxt txn;
txn.begin(env);
- u_int64_t messageId (msg.getPersistenceId());
- if (messageId == 0 || !msg.isContentReleased()) {
+ u_int64_t messageId (msg->getPersistenceId());
+ if (messageId == 0 || !msg->isContentReleased()) {
try {
Dbt key (&messageId, sizeof(messageId));
messageId = messageIdSequence.next();
store(NULL, &txn, key, msg, true);
- msg.setPersistenceId(messageId);
+ msg->setPersistenceId(messageId);
txn.commit();
} catch (std::exception& e) {
txn.abort();
@@ -739,10 +740,10 @@
}
}
}
-void BdbMessageStore::destroy(PersistableMessage& msg)
+void BdbMessageStore::destroy(intrusive_ptr<PersistableMessage>& msg)
{
checkInit();
- u_int64_t messageId (msg.getPersistenceId());
+ u_int64_t messageId (msg->getPersistenceId());
if (messageId) {
Dbt key (&messageId, sizeof(messageId));
TxnCtxt txn;
@@ -773,10 +774,10 @@
return peek.get_size();
}
-void BdbMessageStore::appendContent(const PersistableMessage& msg, const std::string& data)
+void BdbMessageStore::appendContent(intrusive_ptr<const PersistableMessage>& msg, const std::string& data)
{
checkInit();
- u_int64_t messageId (msg.getPersistenceId());
+ u_int64_t messageId (msg->getPersistenceId());
if (messageId != 0) {
try {
Dbt key (&messageId, sizeof(messageId));
@@ -803,11 +804,11 @@
}
void BdbMessageStore::loadContent(const qpid::broker::PersistableQueue& queue,
- const PersistableMessage& msg, std::string& data, u_int64_t offset, u_int32_t length)
+ intrusive_ptr<const PersistableMessage>& msg, std::string& data, u_int64_t offset, u_int32_t length)
{
checkInit();
- u_int64_t realOffset = offset + sizeof(u_int32_t)/*header length*/+ msg.encodedHeaderSize();
- u_int64_t messageId (msg.getPersistenceId());
+ u_int64_t realOffset = offset + sizeof(u_int32_t)/*header length*/+ msg->encodedHeaderSize();
+ u_int64_t messageId (msg->getPersistenceId());
if (messageId != 0) {
try {
@@ -857,11 +858,12 @@
}
}
-void BdbMessageStore::enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue)
+void BdbMessageStore::enqueue(TransactionContext* ctxt, intrusive_ptr<PersistableMessage>& msg,
+ const PersistableQueue& queue)
{
checkInit();
u_int64_t queueId (queue.getPersistenceId());
- u_int64_t messageId (msg.getPersistenceId());
+ u_int64_t messageId (msg->getPersistenceId());
if (queueId == 0) {
THROW_STORE_EXCEPTION("Queue not created: " + queue.getName());
}
@@ -882,7 +884,7 @@
bool newId = false;
if (messageId == 0) {
messageId = messageIdSequence.next();
- msg.setPersistenceId(messageId);
+ msg->setPersistenceId(messageId);
newId = true;
}
store(&queue, txn, key, msg, newId);
@@ -890,9 +892,9 @@
if (usingJrnl()){
// add queue* to the txn map..
if (ctxt) txn->addXidRecord(queue.getExternalQueueStore());
- if (msg.isContentReleased()) put(mappingDb, txn->get(), key, value); // TODO - remove once jrnl is used for transient policy see **
+ if (msg->isContentReleased()) put(mappingDb, txn->get(), key, value); // TODO - remove once jrnl is used for transient policy see **
}else{
- msg.enqueueComplete(); // set enqueued for ack
+ msg->enqueueComplete(); // set enqueued for ack
put(mappingDb, txn->get(), key, value);
// cct if using Journal do we need to wait for IO to complete before calling thus???
@@ -911,27 +913,28 @@
void BdbMessageStore::store(const PersistableQueue* queue,
TxnCtxt* txn, Dbt& messageId,
- PersistableMessage& message,
+ intrusive_ptr<PersistableMessage>& message,
bool newId)
{
- u_int32_t headerSize = message.encodedHeaderSize();
- u_int64_t size = message.encodedSize() + sizeof(u_int32_t);
+ u_int32_t headerSize = message->encodedHeaderSize();
+ u_int64_t size = message->encodedSize() + sizeof(u_int32_t);
char* buff= 0;
- if (!message.isContentReleased() )
+ if (!message->isContentReleased() )
{
buff = static_cast<char*>(::alloca(size)); // long + headers + content
Buffer buffer(buff,size);
buffer.putLong(headerSize);
- message.encode(buffer);
+ message->encode(buffer);
}
try {
if ( queue && usingJrnl()){
+//std::cout << "E" << std::flush;
boost::intrusive_ptr<DataTokenImpl> dtokp(new DataTokenImpl);
dtokp->ref();
- dtokp->setSourceMessage (&message);
- dtokp->set_rid(message.getPersistenceId()); // set the messageID into the Journal header (record-id)
+ dtokp->setSourceMessage (message.get());
+ dtokp->set_rid(message->getPersistenceId()); // set the messageID into the Journal header (record-id)
bool written = false;
unsigned aio_sleep_cnt = 0;
@@ -941,13 +944,13 @@
JournalImpl* jc = static_cast<JournalImpl*>(queue->getExternalQueueStore());
rhm::journal::iores eres;
if (txn->getXid().empty()){
- if (message.isContentReleased()){
+ if (message->isContentReleased()){
eres = jc->enqueue_extern_data_record(size, dtokp.get(), false);
}else {
eres = jc->enqueue_data_record(buff, size, size, dtokp.get(), false);
}
}else {
- if (message.isContentReleased()){
+ if (message->isContentReleased()){
eres = jc->enqueue_extern_txn_data_record(size, dtokp.get(), txn->getXid(), false);
} else {
eres = jc->enqueue_txn_data_record(buff, size, size, dtokp.get(), txn->getXid(), false);
@@ -956,18 +959,21 @@
switch (eres)
{
case rhm::journal::RHM_IORES_SUCCESS:
+//std::cout << "." << std::flush;
if (dtokp.get()->wstate() >= DataTokenImpl::ENQ_SUBM)
written = true;
aio_sleep_cnt = 0;
busy_sleep_cnt = 0;
break;
case rhm::journal::RHM_IORES_AIO_WAIT:
+//std::cout << "w" << std::flush;
if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for AIO: RHM_IORES_AIO_WAIT");
usleep(AIO_SLEEP_TIME); // TODO move sleep to wait for IO in get events
jc->get_wr_events();
break;
case rhm::journal::RHM_IORES_BUSY:
+//std::cout << "b" << std::flush;
if (++busy_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for mutex: RHM_IORES_BUSY");
usleep(AIO_SLEEP_TIME); // TODO add sleep time to get events call as option
@@ -997,11 +1003,12 @@
}
}
-void BdbMessageStore::dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue)
+void BdbMessageStore::dequeue(TransactionContext* ctxt, intrusive_ptr<PersistableMessage>& msg,
+ const PersistableQueue& queue)
{
checkInit();
u_int64_t queueId (queue.getPersistenceId());
- u_int64_t messageId (msg.getPersistenceId());
+ u_int64_t messageId (msg->getPersistenceId());
if (messageId == 0) {
THROW_STORE_EXCEPTION("Error dequeing message, persistence id not set");
}
@@ -1025,16 +1032,16 @@
if (ctxt) txn->addXidRecord(queue.getExternalQueueStore());
async_dequeue(ctxt, msg, queue);
// added here as we are not doing it async on call back
- if (msg.isContentReleased()) // TODO remove this code once jrnl is used for transient policy see **
+ if (msg->isContentReleased()) // TODO remove this code once jrnl is used for transient policy see **
{
Dbt key (&messageId, sizeof(messageId));
Dbt value (&queueId, sizeof(queueId));
dequeue(txn->get(), key, value);
}
- msg.dequeueComplete();
- if ( msg.isDequeueComplete() ) // clear id after last dequeue
- msg.setPersistenceId(0);
+ msg->dequeueComplete();
+ if ( msg->isDequeueComplete() ) // clear id after last dequeue
+ msg->setPersistenceId(0);
} else if (txn->isTPC()) {
//if this is part of a 2pc transaction, then only record the dequeue now,
@@ -1044,8 +1051,8 @@
Dbt key (&messageId, sizeof(messageId));
Dbt value (&queueId, sizeof(queueId));
if (dequeue(txn->get(), key, value)) {
- msg.setPersistenceId(0);//clear id as we have now removed the message from the store
- msg.dequeueComplete(); // set dequeued for ack
+ msg->setPersistenceId(0);//clear id as we have now removed the message from the store
+ msg->dequeueComplete(); // set dequeued for ack
}
}
if (!ctxt) txn->commit();
@@ -1059,14 +1066,16 @@
}
}
-void BdbMessageStore::async_dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue)
+void BdbMessageStore::async_dequeue(TransactionContext* ctxt, intrusive_ptr<PersistableMessage>& msg,
+ const PersistableQueue& queue)
{
+//std::cout << "D" << std::flush;
bool written = false;
boost::intrusive_ptr<DataTokenImpl> ddtokp(new DataTokenImpl);
ddtokp->ref();
- ddtokp->setSourceMessage (&msg);
+ ddtokp->setSourceMessage (msg.get());
ddtokp->set_rid(messageIdSequence.next());
- ddtokp->set_dequeue_rid(msg.getPersistenceId());
+ ddtokp->set_dequeue_rid(msg->getPersistenceId());
ddtokp->set_wstate(DataTokenImpl::ENQ);
JournalImpl* jc = static_cast<JournalImpl*>(queue.getExternalQueueStore());
string tid;
@@ -1092,17 +1101,20 @@
switch (dres)
{
case rhm::journal::RHM_IORES_SUCCESS:
+//std::cout << "." << std::flush;
aio_sleep_cnt = 0;
busy_sleep_cnt = 0;
written = true;
break;
case rhm::journal::RHM_IORES_AIO_WAIT:
+//std::cout << "w" << std::flush;
if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for AIO: RHM_IORES_AIO_WAIT");
usleep(AIO_SLEEP_TIME); // TODO add sleep time to get events call as option
jc->get_wr_events();
break;
case rhm::journal::RHM_IORES_BUSY:
+//std::cout << "b" << std::flush;
if (++busy_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for mutex: RHM_IORES_BUSY");
usleep(AIO_SLEEP_TIME); // TODO add sleep time to get events call as option
Modified: store/trunk/cpp/lib/BdbMessageStore.h
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.h 2007-11-26 21:09:41 UTC (rev 1360)
+++ store/trunk/cpp/lib/BdbMessageStore.h 2007-11-26 21:50:03 UTC (rev 1361)
@@ -39,6 +39,7 @@
#include <set>
#include <iostream>
#include <boost/format.hpp>
+#include <boost/intrusive_ptr.hpp>
#include <boost/ptr_container/ptr_list.hpp>
#include "JournalImpl.h"
#include "DataTokenImpl.h"
@@ -82,31 +83,31 @@
bool mode(const bool mode, const bool force);
void recoverQueues(TxnCtxt& txn, qpid::broker::RecoveryManager& recovery, queue_index& index,
- txn_list& locked, message_index& messages);
+ txn_list& locked, message_index& messages);
void recoverMessages(TxnCtxt& txn, qpid::broker::RecoveryManager& recovery, queue_index& index,
- txn_list& locked, message_index& prepared);
+ txn_list& locked, message_index& prepared);
void recoverMessages(TxnCtxt& txn, qpid::broker::RecoveryManager& recovery,
- qpid::broker::RecoverableQueue::shared_ptr& queue,
- txn_list& locked, message_index& prepared);
+ qpid::broker::RecoverableQueue::shared_ptr& queue,
+ txn_list& locked, message_index& prepared);
qpid::broker::RecoverableMessage::shared_ptr getExternMessage(qpid::broker::RecoveryManager& recovery,
- uint64_t mId, unsigned& headerSize);
+ uint64_t mId, unsigned& headerSize);
void recoverExchanges(TxnCtxt& txn, qpid::broker::RecoveryManager& recovery, exchange_index& index);
void recoverBindings(TxnCtxt& txn, exchange_index& exchanges, queue_index& queues);
int enqueueMessage(TxnCtxt& txn, IdDbt& msgId, qpid::broker::RecoverableMessage::shared_ptr& msg,
- queue_index& index, txn_list& locked, message_index& prepared);
+ queue_index& index, txn_list& locked, message_index& prepared);
void recoverXids(txn_list& txns);
void readXids(Db& db, std::set<string>& xids);
void readLockedMappings(Db& db, txn_lock_map& mappings);
TxnCtxt* check(qpid::broker::TransactionContext* ctxt);
void store(const qpid::broker::PersistableQueue* queue, TxnCtxt* txn,
- Dbt& messageId,
- qpid::broker::PersistableMessage& message,
- bool newId);
+ Dbt& messageId,
+ boost::intrusive_ptr<qpid::broker::PersistableMessage>& message,
+ bool newId);
void enqueue(DbTxn* txn, Dbt& messageId, Dbt& queueId);
bool dequeue(DbTxn* txn, Dbt& messageId, Dbt& queueId);
void async_dequeue(qpid::broker::TransactionContext* ctxt,
- qpid::broker::PersistableMessage& msg,
- const qpid::broker::PersistableQueue& queue);
+ boost::intrusive_ptr<qpid::broker::PersistableMessage>& msg,
+ const qpid::broker::PersistableQueue& queue);
bool deleteIfUnused(Cursor& cursor, DbTxn* txn, Dbt& messageId);
bool deleteIfUnused(DbTxn* txn, Dbt& messageId);
void destroy(Db& db, const qpid::broker::Persistable& p);
@@ -142,26 +143,27 @@
void destroy(const qpid::broker::PersistableExchange& queue);
void bind(const qpid::broker::PersistableExchange& exchange,
- const qpid::broker::PersistableQueue& queue,
- const std::string& key, const qpid::framing::FieldTable& args);
+ const qpid::broker::PersistableQueue& queue,
+ const std::string& key, const qpid::framing::FieldTable& args);
void unbind(const qpid::broker::PersistableExchange& exchange,
- const qpid::broker::PersistableQueue& queue,
- const std::string& key, const qpid::framing::FieldTable& args);
+ const qpid::broker::PersistableQueue& queue,
+ const std::string& key, const qpid::framing::FieldTable& args);
void recover(qpid::broker::RecoveryManager& queues);
- void stage(qpid::broker::PersistableMessage& msg);
- void destroy(qpid::broker::PersistableMessage& msg);
- void appendContent(const qpid::broker::PersistableMessage& msg, const std::string& data);
- void loadContent(const qpid::broker::PersistableQueue& queue, const qpid::broker::PersistableMessage& msg,
- std::string& data, u_int64_t offset, u_int32_t length);
+ void stage(boost::intrusive_ptr<qpid::broker::PersistableMessage>& msg);
+ void destroy(boost::intrusive_ptr<qpid::broker::PersistableMessage>& msg);
+ void appendContent(boost::intrusive_ptr<const qpid::broker::PersistableMessage>& msg, const std::string& data);
+ void loadContent(const qpid::broker::PersistableQueue& queue,
+ boost::intrusive_ptr<const qpid::broker::PersistableMessage>& msg,
+ std::string& data, u_int64_t offset, u_int32_t length);
void enqueue(qpid::broker::TransactionContext* ctxt,
- qpid::broker::PersistableMessage& msg,
- const qpid::broker::PersistableQueue& queue);
+ boost::intrusive_ptr<qpid::broker::PersistableMessage>& msg,
+ const qpid::broker::PersistableQueue& queue);
void dequeue(qpid::broker::TransactionContext* ctxt,
- qpid::broker::PersistableMessage& msg,
- const qpid::broker::PersistableQueue& queue);
+ boost::intrusive_ptr<qpid::broker::PersistableMessage>& msg,
+ const qpid::broker::PersistableQueue& queue);
void flush(const qpid::broker::PersistableQueue& queue);
u_int32_t outstandingQueueAIO(const qpid::broker::PersistableQueue& queue);
Modified: store/trunk/cpp/lib/jrnl/nlfh.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.cpp 2007-11-26 21:09:41 UTC (rev 1360)
+++ store/trunk/cpp/lib/jrnl/nlfh.cpp 2007-11-26 21:50:03 UTC (rev 1361)
@@ -209,6 +209,7 @@
}
_rec_enqcnt = ro->_enq_cnt_list[_fid];
return true;
+ //return _fid == ro->_ffid ? ro->_full : true;
}
}
#ifndef RHM_WRONLY
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2007-11-26 21:09:41 UTC (rev 1360)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2007-11-26 21:50:03 UTC (rev 1361)
@@ -40,6 +40,8 @@
using boost::static_pointer_cast;
using boost::dynamic_pointer_cast;
+using boost::intrusive_ptr;
+using boost::static_pointer_cast;
using namespace qpid;
using namespace rhm::bdbstore;
using namespace qpid::broker;
@@ -332,16 +334,18 @@
//create & stage a message
Message::shared_ptr msg = MessageUtils::createMessage(exchange, routingKey, messageId, (data1.size() + data2.size()));
+ intrusive_ptr<PersistableMessage> pmsg = static_pointer_cast<PersistableMessage>(msg);
+ intrusive_ptr<const PersistableMessage> cpmsg = static_pointer_cast<const PersistableMessage>(msg);
msg->getProperties<DeliveryProperties>()->setDeliveryMode(PERSISTENT);
FieldTable table;
table.setString("abc", "xyz");
msg->getProperties<MessageProperties>()->setApplicationHeaders(table);
- store.stage(*msg);
+ store.stage(pmsg);
//append to it
msg->releaseContent(&store);//ensure that data is not held in memory but is appended to disk when added
- store.appendContent(*msg, data1);
- store.appendContent(*msg, data2);
+ store.appendContent(cpmsg, data1);
+ store.appendContent(cpmsg, data2);
//AMQContentBody part1(data1);
//msg->addContent(&part1);FIXME
@@ -424,15 +428,17 @@
const string data("abcdefg");
Message::shared_ptr msg(MessageUtils::createMessage("my_exchange", "my_routing_key", "my_message", data.length()));
+ intrusive_ptr<PersistableMessage> pmsg = static_pointer_cast<PersistableMessage>(msg);
+ intrusive_ptr<const PersistableMessage> cpmsg = static_pointer_cast<const PersistableMessage>(msg);
MessageUtils::addContent(msg, data);
- store.stage(*msg);
- store.destroy(*msg);
+ store.stage(pmsg);
+ store.destroy(pmsg);
try {
string loaded;
Queue queue("dummy", 0, &store, 0);
- store.loadContent(queue, *msg, loaded, 0, data.length());
+ store.loadContent(queue, cpmsg, loaded, 0, data.length());
CPPUNIT_ASSERT(false);
} catch (StoreException& e) {
}
@@ -448,19 +454,21 @@
const string data("abcdefg");
Message::shared_ptr msg(MessageUtils::createMessage("my_exchange", "my_routing_key", "my_message", data.length()));
+ intrusive_ptr<PersistableMessage> pmsg = static_pointer_cast<PersistableMessage>(msg);
+ intrusive_ptr<const PersistableMessage> cpmsg = static_pointer_cast<const PersistableMessage>(msg);
MessageUtils::addContent(msg, data);
Queue queue("my_queue", 0, &store, 0);
store.create(queue);
- store.enqueue(0, *msg, queue);
- store.destroy(*msg);
+ store.enqueue(0, pmsg, queue);
+ store.destroy(pmsg);
string loaded;
- store.loadContent(queue, *msg, loaded, 0, data.length());
+ store.loadContent(queue, cpmsg, loaded, 0, data.length());
CPPUNIT_ASSERT_EQUAL(data, loaded);
- store.dequeue(0, *msg, queue);
+ store.dequeue(0, pmsg, queue);
store.destroy(queue);
}
17 years, 1 month
rhmessaging commits: r1360 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 16:09:41 -0500 (Mon, 26 Nov 2007)
New Revision: 1360
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
Log:
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-26 19:21:17 UTC (rev 1359)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-26 21:09:41 UTC (rev 1360)
@@ -68,19 +68,19 @@
def render_item_received(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteReceives" or "msgReceives"
- value = getattr(exchange.stats, key)
+ value = self.app.cmodel.exchange.get_stat(key).rate(exchange)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_routed(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteRoutes" or "msgRoutes"
- value = getattr(exchange.stats, key)
+ value = self.app.cmodel.exchange.get_stat(key).rate(exchange)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_dropped(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteDrops" or "msgDrops"
- return getattr(exchange.stats, key)
+ return self.app.cmodel.exchange.get_stat(key).value(exchange)
def render_item_status(self, session, exchange):
return fmt_ostatus(exchange)
@@ -121,26 +121,26 @@
return "exchange.xml?id=%i" % exchange.id
def render_messages_received(self, session, exchange):
- value = exchange.stats.msgReceives # XXX rate me
+ value = self.app.cmodel.exchange.get_stat("msgReceives").rate(exchange)
return fmt_rate(value, "msg", "sec")
def render_messages_routed(self, session, exchange):
- value = exchange.stats.msgRoutes # XXX rate me
+ value = self.app.cmodel.exchange.get_stat("msgRoutes").rate(exchange)
return fmt_rate(value, "msg", "sec")
def render_messages_dropped(self, session, exchange):
- return exchange.stats.msgDrops
+ return self.app.cmodel.exchange.get_stat("msgDrops").value(exchange)
def render_bytes_received(self, session, exchange):
- value = exchange.stats.byteReceives # XXX rate me
+ value = self.app.cmodel.exchange.get_stat("byteReceives").rate(exchange)
return fmt_rate(value, "byte", "sec")
def render_bytes_routed(self, session, exchange):
- value = exchange.stats.byteRoutes # XXX rate me
+ value = self.app.cmodel.exchange.get_stat("byteRoutes").rate(exchange)
return fmt_rate(value, "byte", "sec")
def render_bytes_dropped(self, session, exchange):
- return exchange.stats.byteDrops
+ return self.app.cmodel.exchange.get_stat("byteDrops").value(exchange)
class ExchangeView(Widget):
def __init__(self, app, name):
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-11-26 19:21:17 UTC (rev 1359)
+++ mgmt/cumin/python/cumin/model.py 2007-11-26 21:09:41 UTC (rev 1360)
@@ -20,9 +20,6 @@
def get_class(self, mint_object):
return self.classes[mint_object.__class__]
- def get_stat(self, mint_object, name):
- return self.get_class(mint_object).get_stat(name)
-
class CuminClass(object):
def __init__(self, model, mint_class):
self.model = model
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-11-26 19:21:17 UTC (rev 1359)
+++ mgmt/cumin/python/cumin/queue.py 2007-11-26 21:09:41 UTC (rev 1360)
@@ -57,23 +57,23 @@
def render_item_enqueued(self, session, queue):
unit = self.unit.get(session)
key = unit == "b" and "byteTotalEnqueues" or "msgTotalEnqueues"
- value = getattr(queue.stats, key)
+ value = self.app.cmodel.queue.get_stat(key).rate(queue)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_dequeued(self, session, queue):
unit = self.unit.get(session)
key = unit == "b" and "byteTotalDequeues" or "msgTotalDequeues"
- value = getattr(queue.stats, key)
+ value = self.app.cmodel.queue.get_stat(key).rate(queue)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_depth(self, session, queue):
key = self.unit.get(session) == "b" and "byteDepth" or "msgDepth"
- return getattr(queue.stats, key)
+ return self.app.cmodel.queue.get_stat(key).value(queue)
def render_item_depth_accel(self, session, queue):
unit = self.unit.get(session)
key = unit == "b" and "byteDepth" or "msgDepth"
- value = getattr(queue.stats, key)
+ value = self.app.cmodel.queue.get_stat(key).rate(queue)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_status(self, session, queue):
17 years, 1 month
rhmessaging commits: r1359 - in mgmt: cumin/python/wooly and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-26 14:21:17 -0500 (Mon, 26 Nov 2007)
New Revision: 1359
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/wooly/__init__.py
mgmt/mint/python/mint/schema.py
mgmt/mint/python/mint/schema.sql
Log:
Ted's more detailed exchange data exposed leftover model-migration
problems. This change fixes those. It also introduces some exchange
metadata for displaying exchange stats.
Updates the schema.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-26 16:33:58 UTC (rev 1358)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-26 19:21:17 UTC (rev 1359)
@@ -68,19 +68,19 @@
def render_item_received(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteReceives" or "msgReceives"
- value = getattr(exchange.mintExchangeStats, key)
+ value = getattr(exchange.stats, key)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_routed(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteRoutes" or "msgRoutes"
- value = getattr(exchange.mintExchangeStats, key)
+ value = getattr(exchange.stats, key)
return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
def render_item_dropped(self, session, exchange):
unit = self.unit.get(session)
key = unit == "b" and "byteDrops" or "msgDrops"
- return getattr(exchange.mintExchangeStats, key)
+ return getattr(exchange.stats, key)
def render_item_status(self, session, exchange):
return fmt_ostatus(exchange)
@@ -108,8 +108,9 @@
# XXX not awesome
def get_object(self, session, object):
exchange = self.param.get(session)
- exchange.get_measurement("producers").link_cb = show_producers
- exchange.get_measurement("bindings").link_cb = show_bindings
+ # XXX
+ #self.app.cmodel.get_stat(exchange, "producers").link_cb = show_producers
+ #self.app.cmodel.get_stat(exchange, "bindings").link_cb = show_bindings
return exchange
def get_title(self, session, exchange):
@@ -120,26 +121,26 @@
return "exchange.xml?id=%i" % exchange.id
def render_messages_received(self, session, exchange):
- value = exchange.get_measurement("msgReceives").get_rate()
+ value = exchange.stats.msgReceives # XXX rate me
return fmt_rate(value, "msg", "sec")
def render_messages_routed(self, session, exchange):
- value = exchange.get_measurement("msgRoutes").get_rate()
+ value = exchange.stats.msgRoutes # XXX rate me
return fmt_rate(value, "msg", "sec")
def render_messages_dropped(self, session, exchange):
- return exchange.get_measurement("msgDrops").get_value()
+ return exchange.stats.msgDrops
def render_bytes_received(self, session, exchange):
- value = exchange.get_measurement("byteReceives").get_rate()
+ value = exchange.stats.byteReceives # XXX rate me
return fmt_rate(value, "byte", "sec")
def render_bytes_routed(self, session, exchange):
- value = exchange.get_measurement("byteRoutes").get_rate()
+ value = exchange.stats.byteRoutes # XXX rate me
return fmt_rate(value, "byte", "sec")
def render_bytes_dropped(self, session, exchange):
- return exchange.get_measurement("byteDrops").get_value()
+ return exchange.stats.byteDrops
class ExchangeView(Widget):
def __init__(self, app, name):
@@ -199,20 +200,20 @@
def render_item_href(self, session, binding):
branch = session.branch()
- self.page().show_queue(branch, binding.mintQueue)
+ self.page().show_queue(branch, binding.queue)
return branch.marshal()
def render_item_name(self, session, binding):
- return binding.mintQueue.name
+ return binding.queue.name
def render_item_binding_key(self, session, binding):
return binding.bindingKey
def render_item_messages_matched(self, session, binding):
- return binding.mintBindingStats.msgMatched
+ return binding.stats.msgMatched
def render_item_messages_matched_rate(self, session, binding):
- value = binding.mintBindingStats.msgMatched
+ value = binding.stats.msgMatched
return fmt_rate(value, "msg", "sec")
class ExchangeForm(CuminForm):
@@ -376,17 +377,17 @@
return producer.name
def render_item_messages_produced(self, session, producer):
- return producer.mintProducerStats.msgsProduced
+ return producer.stats.msgsProduced
def render_item_messages_produced_rate(self, session, producer):
- value = producer.mintProducerStats.msgsProduced
+ value = producer.stats.msgsProduced
return fmt_rate(value, "msg", "sec")
def render_item_bytes_produced(self, session, producer):
- return producer.mintProducerStats.bytesProduced
+ return producer.stats.bytesProduced
def render_item_bytes_produced_rate(self, session, producer):
- value = producer.mintProducerStats.bytesProduced
+ value = producer.stats.bytesProduced
return fmt_rate(value, "byte", "sec")
class ExchangeXmlPage(CuminXmlPage):
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-11-26 16:33:58 UTC (rev 1358)
+++ mgmt/cumin/python/cumin/model.py 2007-11-26 19:21:17 UTC (rev 1359)
@@ -11,12 +11,18 @@
self.queue = CuminQueue(self)
self.add_class(self.queue)
+ self.exchange = CuminExchange(self)
+ self.add_class(self.exchange)
+
def add_class(self, cls):
self.classes[cls.mint_class] = cls
def get_class(self, mint_object):
return self.classes[mint_object.__class__]
+ def get_stat(self, mint_object, name):
+ return self.get_class(mint_object).get_stat(name)
+
class CuminClass(object):
def __init__(self, model, mint_class):
self.model = model
@@ -156,10 +162,10 @@
#stat.title = "Page size"
#stat.categories = ("disk")
- stat = CuminStat(self, "diskPages", "int")
- stat.title = "Disk Pages"
- stat.unit = "page"
- stat.categories = ("general")
+ #stat = CuminStat(self, "diskPages", "int")
+ #stat.title = "Disk Pages"
+ #stat.unit = "page"
+ #stat.categories = ("general")
#stat = CuminStat(self, "diskAvailableSize", "int")
#stat.title = "Available size"
@@ -260,6 +266,54 @@
writer.write("</queue>")
+class CuminExchange(CuminClass):
+ def __init__(self, model):
+ super(CuminExchange, self).__init__(model, mint.Exchange)
+
+ self.mint_stats_class = mint.ExchangeStats
+
+ stat = CuminStat(self, "producers", "int")
+ stat.title = "Producers"
+ stat.unit = "producer"
+ stat.categories = ("general")
+ stat.highlow = True
+
+ stat = CuminStat(self, "bindings", "int")
+ stat.title = "Bindings"
+ stat.unit = "binding"
+ stat.categories = ("general")
+ stat.highlow = True
+
+ stat = CuminStat(self, "msgReceives", "int")
+ stat.title = "Msgs. Received"
+ stat.unit = "message"
+ stat.categories = ("general")
+
+ stat = CuminStat(self, "msgRoutes", "int")
+ stat.title = "Msgs. Routed"
+ stat.unit = "message"
+ stat.categories = ("general")
+
+ stat = CuminStat(self, "msgDrops", "int")
+ stat.title = "Msgs. Dropped"
+ stat.unit = "message"
+ stat.categories = ("general")
+
+ stat = CuminStat(self, "byteReceives", "int")
+ stat.title = "Bytes Received"
+ stat.unit = "message"
+ stat.categories = ("general")
+
+ stat = CuminStat(self, "byteRoutes", "int")
+ stat.title = "Bytes Routed"
+ stat.unit = "message"
+ stat.categories = ("general")
+
+ stat = CuminStat(self, "byteDrops", "int")
+ stat.title = "Bytes Dropped"
+ stat.unit = "message"
+ stat.categories = ("general")
+
class DummyModel(Model):
def __init__(self):
super(DummyModel, self).__init__()
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-11-26 16:33:58 UTC (rev 1358)
+++ mgmt/cumin/python/wooly/__init__.py 2007-11-26 19:21:17 UTC (rev 1359)
@@ -482,7 +482,7 @@
self.trunk = trunk
self.page = None
self.values = dict()
- self.errors = dict() # widget => list of str
+ self.errors = dict() # widget => list of str # XXX remove this
if self.app.debug:
self.debug = self.Debug(self)
@@ -519,7 +519,7 @@
def set_page(self, page):
self.page = page
- def get(self, key):
+ def get(self, key): # XXX we can make this a little faster, no?
if key in self.values:
value = self.values[key]
elif self.trunk:
@@ -561,7 +561,7 @@
def marshal_url_vars(self, separator=";"):
params = self.get_page().get_saved_parameters(self)
- if params:
+ if params: # XXX removing this may make sense; it's an uncommon case
vars = list()
for param in params:
Modified: mgmt/mint/python/mint/schema.py
===================================================================
--- mgmt/mint/python/mint/schema.py 2007-11-26 16:33:58 UTC (rev 1358)
+++ mgmt/mint/python/mint/schema.py 2007-11-26 19:21:17 UTC (rev 1359)
@@ -115,13 +115,13 @@
model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
classToSchemaNameMap[self.__class__.__name__], "purge", args=actualArgs, packageName="qpid")
- def increaseDiskSize(self, model, managedBrokerLabel, callbackMethod, pages):
+ def increaseJournalSize(self, model, managedBrokerLabel, callbackMethod, pages):
"""Increase number of disk pages allocated for this queue"""
actualArgs = dict()
actualArgs["pages"] = pages
methodId = model.registerCallback(callbackMethod)
model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
- classToSchemaNameMap[self.__class__.__name__], "increaseDiskSize", args=actualArgs, packageName="qpid")
+ classToSchemaNameMap[self.__class__.__name__], "increaseJournalSize", args=actualArgs, packageName="qpid")
Vhost.sqlmeta.addJoin(MultipleJoin('Queue', joinMethodName='queues'))
@@ -130,9 +130,34 @@
idOriginal = BigIntCol(default=None)
recTime = TimestampCol(default=None)
queue = ForeignKey('Queue', cascade='null', default=None)
- diskPageSize = IntCol(default=None)
- diskPages = IntCol(default=None)
- diskAvailableSize = IntCol(default=None)
+ journalLocation = StringCol(length=1000, default=None)
+ journalBaseFileName = StringCol(length=1000, default=None)
+ journalInitialFileCount = IntCol(default=None)
+ journalCurrentFileCount = IntCol(default=None)
+ journalDataFileSize = IntCol(default=None)
+ journalFreeFileCount = IntCol(default=None)
+ journalFreeFileCountLow = IntCol(default=None)
+ journalFreeFileCountHigh = IntCol(default=None)
+ journalAvailableFileCount = IntCol(default=None)
+ journalAvailableFileCountLow = IntCol(default=None)
+ journalAvailableFileCountHigh = IntCol(default=None)
+ journalRecordDepth = IntCol(default=None)
+ journalRecordDepthLow = IntCol(default=None)
+ journalRecordDepthHigh = IntCol(default=None)
+ journalRecordEnqueues = BigIntCol(default=None)
+ journalRecordDequeues = BigIntCol(default=None)
+ journalWriteWaitFailures = BigIntCol(default=None)
+ journalWriteBusyFailures = BigIntCol(default=None)
+ journalReadRecordCount = BigIntCol(default=None)
+ journalReadBusyFailures = BigIntCol(default=None)
+ journalWritePageCacheDepth = IntCol(default=None)
+ journalWritePageCacheDepthLow = IntCol(default=None)
+ journalWritePageCacheDepthHigh = IntCol(default=None)
+ journalWritePageSize = IntCol(default=None)
+ journalReadPageCacheDepth = IntCol(default=None)
+ journalReadPageCacheDepthLow = IntCol(default=None)
+ journalReadPageCacheDepthHigh = IntCol(default=None)
+ journalReadPageSize = IntCol(default=None)
msgTotalEnqueues = BigIntCol(default=None)
msgTotalDequeues = BigIntCol(default=None)
msgTxnEnqueues = BigIntCol(default=None)
Modified: mgmt/mint/python/mint/schema.sql
===================================================================
--- mgmt/mint/python/mint/schema.sql 2007-11-26 16:33:58 UTC (rev 1358)
+++ mgmt/mint/python/mint/schema.sql 2007-11-26 19:21:17 UTC (rev 1359)
@@ -1,408 +1,24 @@
-CREATE TABLE binding (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- queue_id INT,
- exchange_id INT,
- binding_key VARCHAR(1000)
-);
-
-CREATE TABLE binding_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- binding_id INT,
- msg_matched BIGINT
-);
-
-CREATE TABLE broker (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- system_id INT,
- port SMALLINT,
- worker_threads SMALLINT,
- max_conns SMALLINT,
- conn_backlog SMALLINT,
- staging_threshold INT,
- store_lib VARCHAR(1000),
- async_store BOOL,
- mgmt_pub_interval SMALLINT,
- initial_disk_page_size INT,
- initial_pages_per_queue INT,
- cluster_name VARCHAR(1000),
- version VARCHAR(1000)
-);
-
-CREATE TABLE broker_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- broker_id INT
-);
-
-CREATE TABLE client (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- vhost_id INT,
- ip_addr INT,
- port SMALLINT
-);
-
-CREATE TABLE client_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- client_id INT,
- auth_identity VARCHAR(1000),
- msgs_produced BIGINT,
- msgs_consumed BIGINT,
- bytes_produced BIGINT,
- bytes_consumed BIGINT
-);
-
-CREATE TABLE consumer (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- destination_id INT,
- queue_id INT
-);
-
-CREATE TABLE consumer_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- consumer_id INT,
- msgs_consumed BIGINT,
- bytes_consumed BIGINT,
- unacked_messages INT,
- unacked_messages_low INT,
- unacked_messages_high INT
-);
-
-CREATE TABLE destination (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- session_id INT,
- name VARCHAR(1000)
-);
-
-CREATE TABLE destination_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- destination_id INT,
- flow_mode SMALLINT,
- max_msg_credits INT,
- max_byte_credits INT,
- msg_credits INT,
- byte_credits INT
-);
-
-CREATE TABLE exchange (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- vhost_id INT,
- name VARCHAR(1000),
- type VARCHAR(1000)
-);
-
-CREATE TABLE exchange_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- exchange_id INT,
- producers INT,
- producers_low INT,
- producers_high INT,
- bindings INT,
- bindings_low INT,
- bindings_high INT,
- msg_receives BIGINT,
- msg_drops BIGINT,
- msg_routes BIGINT,
- byte_receives BIGINT,
- byte_drops BIGINT,
- byte_routes BIGINT
-);
-
-CREATE TABLE producer (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- destination_id INT,
- exchange_id INT
-);
-
-CREATE TABLE producer_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- producer_id INT,
- msgs_produced BIGINT,
- bytes_produced BIGINT
-);
-
-CREATE TABLE queue (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- vhost_id INT,
- name VARCHAR(1000),
- durable BOOL,
- auto_delete BOOL,
- exclusive BOOL,
- page_memory_limit INT
-);
-
-CREATE TABLE queue_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- queue_id INT,
- disk_page_size INT,
- disk_pages INT,
- disk_available_size INT,
- msg_total_enqueues BIGINT,
- msg_total_dequeues BIGINT,
- msg_txn_enqueues BIGINT,
- msg_txn_dequeues BIGINT,
- msg_persist_enqueues BIGINT,
- msg_persist_dequeues BIGINT,
- msg_depth INT,
- msg_depth_low INT,
- msg_depth_high INT,
- byte_total_enqueues BIGINT,
- byte_total_dequeues BIGINT,
- byte_txn_enqueues BIGINT,
- byte_txn_dequeues BIGINT,
- byte_persist_enqueues BIGINT,
- byte_persist_dequeues BIGINT,
- byte_depth INT,
- byte_depth_low INT,
- byte_depth_high INT,
- enqueue_txn_starts BIGINT,
- enqueue_txn_commits BIGINT,
- enqueue_txn_rejects BIGINT,
- enqueue_txn_count INT,
- enqueue_txn_count_low INT,
- enqueue_txn_count_high INT,
- dequeue_txn_starts BIGINT,
- dequeue_txn_commits BIGINT,
- dequeue_txn_rejects BIGINT,
- dequeue_txn_count INT,
- dequeue_txn_count_low INT,
- dequeue_txn_count_high INT,
- consumers INT,
- consumers_low INT,
- consumers_high INT,
- bindings INT,
- bindings_low INT,
- bindings_high INT,
- unacked_messages INT,
- unacked_messages_low INT,
- unacked_messages_high INT
-);
-
-CREATE TABLE session (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- vhost_id INT,
- name VARCHAR(1000),
- client_id INT,
- detached_lifespan INT
-);
-
-CREATE TABLE session_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- session_id INT,
- attached BOOL,
- remaining_lifespan INT,
- frames_outstanding INT
-);
-
-CREATE TABLE system (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- sys_id VARCHAR(1000)
-);
-
-CREATE TABLE system_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- system_id INT
-);
-
-CREATE TABLE vhost (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_id INT,
- stats_prev_id INT,
- broker_id INT,
- name VARCHAR(1000)
-);
-
-CREATE TABLE vhost_stats (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- vhost_id INT
-);
-
-ALTER TABLE binding ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES binding_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE binding ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES binding_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE binding ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
-
-ALTER TABLE binding ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
-
-ALTER TABLE binding_stats ADD CONSTRAINT binding_id_exists FOREIGN KEY (binding_id) REFERENCES binding (id) ON DELETE SET NULL;
-
-ALTER TABLE broker ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES broker_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE broker ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES broker_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE broker ADD CONSTRAINT system_id_exists FOREIGN KEY (system_id) REFERENCES system (id) ON DELETE SET NULL;
-
-ALTER TABLE broker_stats ADD CONSTRAINT broker_id_exists FOREIGN KEY (broker_id) REFERENCES broker (id) ON DELETE SET NULL;
-
-ALTER TABLE client ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES client_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE client ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES client_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE client ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
-
-ALTER TABLE client_stats ADD CONSTRAINT client_id_exists FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL;
-
-ALTER TABLE consumer ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES consumer_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE consumer ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES consumer_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE consumer ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
-
-ALTER TABLE consumer ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
-
-ALTER TABLE consumer_stats ADD CONSTRAINT consumer_id_exists FOREIGN KEY (consumer_id) REFERENCES consumer (id) ON DELETE SET NULL;
-
-ALTER TABLE destination ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES destination_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE destination ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES destination_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE destination ADD CONSTRAINT session_id_exists FOREIGN KEY (session_id) REFERENCES session (id) ON DELETE SET NULL;
-
-ALTER TABLE destination_stats ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
-
-ALTER TABLE exchange ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES exchange_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE exchange ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES exchange_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE exchange ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
-
-ALTER TABLE exchange_stats ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
-
-ALTER TABLE producer ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES producer_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE producer ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES producer_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE producer ADD CONSTRAINT destination_id_exists FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE SET NULL;
-
-ALTER TABLE producer ADD CONSTRAINT exchange_id_exists FOREIGN KEY (exchange_id) REFERENCES exchange (id) ON DELETE SET NULL;
-
-ALTER TABLE producer_stats ADD CONSTRAINT producer_id_exists FOREIGN KEY (producer_id) REFERENCES producer (id) ON DELETE SET NULL;
-
-ALTER TABLE queue ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_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;
-
-ALTER TABLE queue ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
-
-ALTER TABLE queue_stats ADD CONSTRAINT queue_id_exists FOREIGN KEY (queue_id) REFERENCES queue (id) ON DELETE SET NULL;
-
-ALTER TABLE session ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES session_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE session ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES session_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE session ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
-
-ALTER TABLE session ADD CONSTRAINT client_id_exists FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL;
-
-ALTER TABLE session_stats ADD CONSTRAINT session_id_exists FOREIGN KEY (session_id) REFERENCES session (id) ON DELETE SET NULL;
-
-ALTER TABLE system ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES system_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE system ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES system_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE system_stats ADD CONSTRAINT system_id_exists FOREIGN KEY (system_id) REFERENCES system (id) ON DELETE SET NULL;
-
-ALTER TABLE vhost ADD CONSTRAINT stats_id_exists FOREIGN KEY (stats_id) REFERENCES vhost_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE vhost ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id) REFERENCES vhost_stats (id) ON DELETE SET NULL;
-
-ALTER TABLE vhost ADD CONSTRAINT broker_id_exists FOREIGN KEY (broker_id) REFERENCES broker (id) ON DELETE SET NULL;
-
-ALTER TABLE vhost_stats ADD CONSTRAINT vhost_id_exists FOREIGN KEY (vhost_id) REFERENCES vhost (id) ON DELETE SET NULL;
-
+These classes do not have connections set:
+ * Binding
+ * BindingStats
+ * Broker
+ * BrokerStats
+ * Client
+ * ClientStats
+ * Consumer
+ * ConsumerStats
+ * Destination
+ * DestinationStats
+ * Exchange
+ * ExchangeStats
+ * Producer
+ * ProducerStats
+ * Queue
+ * QueueStats
+ * Session
+ * SessionStats
+ * System
+ * SystemStats
+ * Vhost
+ * VhostStats
+You must indicate --connection=URI
17 years, 1 month
rhmessaging commits: r1358 - in mgmt/mint: python/mint and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2007-11-26 11:33:58 -0500 (Mon, 26 Nov 2007)
New Revision: 1358
Added:
mgmt/mint/python/mint/config.xml
Removed:
mgmt/mint/config.xml
Log:
moving config.xml to python/mint
Deleted: mgmt/mint/config.xml
===================================================================
--- mgmt/mint/config.xml 2007-11-26 16:30:24 UTC (rev 1357)
+++ mgmt/mint/config.xml 2007-11-26 16:33:58 UTC (rev 1358)
@@ -1,5 +0,0 @@
-<config>
- <configOption name="dsn" value="postgresql://localhost/" />
- <configOption name="pythonOutput" value="schema.py" />
- <configOption name="schemaXML" value="xml/MgmtSchema.xml" />
-</config>
Copied: mgmt/mint/python/mint/config.xml (from rev 1355, mgmt/mint/config.xml)
===================================================================
--- mgmt/mint/python/mint/config.xml (rev 0)
+++ mgmt/mint/python/mint/config.xml 2007-11-26 16:33:58 UTC (rev 1358)
@@ -0,0 +1,5 @@
+<config>
+ <configOption name="dsn" value="postgresql://localhost/" />
+ <configOption name="pythonOutput" value="schema.py" />
+ <configOption name="schemaXML" value="xml/MgmtSchema.xml" />
+</config>
17 years, 1 month