Author: nunofsantos
Date: 2008-06-02 12:05:18 -0400 (Mon, 02 Jun 2008)
New Revision: 2103
Modified:
mgmt/mint/python/mint/schema.py
mgmt/mint/python/mint/schemaparser.py
mgmt/mint/sql/indexes.sql
mgmt/mint/sql/schema.sql
Log:
changes to the model to reflect QPID-1113 - Management cleanup and performance
enhancements
Modified: mgmt/mint/python/mint/schema.py
===================================================================
--- mgmt/mint/python/mint/schema.py 2008-06-02 16:02:23 UTC (rev 2102)
+++ mgmt/mint/python/mint/schema.py 2008-06-02 16:05:18 UTC (rev 2103)
@@ -13,7 +13,7 @@
managedBroker = StringCol(length=1000, default=None)
statsCurr = ForeignKey('SystemStats', cascade='null', default=None)
statsPrev = ForeignKey('SystemStats', cascade='null', default=None)
- sysId = BLOBCol(default=None)
+ systemId = BLOBCol(default=None)
osName = StringCol(length=1000, default=None)
nodeName = StringCol(length=1000, default=None)
release = StringCol(length=1000, default=None)
@@ -130,7 +130,7 @@
sessionId = BLOBCol(default=None)
label = StringCol(length=1000, default=None)
registeredTo = BigIntCol(default=None)
- sysId = BLOBCol(default=None)
+ systemId = BLOBCol(default=None)
classInfos = dict() # brokerId => classInfo
@@ -224,17 +224,12 @@
msgPersistEnqueues = BigIntCol(default=None)
msgPersistDequeues = BigIntCol(default=None)
msgDepth = IntCol(default=None)
- msgDepthLow = IntCol(default=None)
- msgDepthHigh = IntCol(default=None)
byteTotalEnqueues = BigIntCol(default=None)
byteTotalDequeues = BigIntCol(default=None)
byteTxnEnqueues = BigIntCol(default=None)
byteTxnDequeues = BigIntCol(default=None)
bytePersistEnqueues = BigIntCol(default=None)
bytePersistDequeues = BigIntCol(default=None)
- byteDepth = IntCol(default=None)
- byteDepthLow = IntCol(default=None)
- byteDepthHigh = IntCol(default=None)
enqueueTxnStarts = BigIntCol(default=None)
enqueueTxnCommits = BigIntCol(default=None)
enqueueTxnRejects = BigIntCol(default=None)
@@ -247,12 +242,12 @@
dequeueTxnCount = IntCol(default=None)
dequeueTxnCountLow = IntCol(default=None)
dequeueTxnCountHigh = IntCol(default=None)
- consumers = IntCol(default=None)
- consumersLow = IntCol(default=None)
- consumersHigh = IntCol(default=None)
- bindings = IntCol(default=None)
- bindingsLow = IntCol(default=None)
- bindingsHigh = IntCol(default=None)
+ consumerCount = IntCol(default=None)
+ consumerCountLow = IntCol(default=None)
+ consumerCountHigh = IntCol(default=None)
+ bindingCount = IntCol(default=None)
+ bindingCountLow = IntCol(default=None)
+ bindingCountHigh = IntCol(default=None)
unackedMessages = IntCol(default=None)
unackedMessagesLow = IntCol(default=None)
unackedMessagesHigh = IntCol(default=None)
@@ -294,12 +289,12 @@
idOriginal = BigIntCol(default=None)
recTime = TimestampCol(default=None)
exchange = ForeignKey('Exchange', cascade='null', default=None)
- producers = IntCol(default=None)
- producersLow = IntCol(default=None)
- producersHigh = IntCol(default=None)
- bindings = IntCol(default=None)
- bindingsLow = IntCol(default=None)
- bindingsHigh = IntCol(default=None)
+ producerCount = IntCol(default=None)
+ producerCountLow = IntCol(default=None)
+ producerCountHigh = IntCol(default=None)
+ bindingCount = IntCol(default=None)
+ bindingCountLow = IntCol(default=None)
+ bindingCountHigh = IntCol(default=None)
msgReceives = BigIntCol(default=None)
msgDrops = BigIntCol(default=None)
msgRoutes = BigIntCol(default=None)
@@ -349,7 +344,7 @@
Binding.sqlmeta.addJoin(SQLMultipleJoin('BindingStats',
joinMethodName='stats'))
-class Client(SQLObject):
+class Connection(SQLObject):
class sqlmeta:
lazyUpdate = True
@@ -358,8 +353,8 @@
creationTime = TimestampCol(default=None)
deletionTime = TimestampCol(default=None)
managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('ClientStats', cascade='null', default=None)
- statsPrev = ForeignKey('ClientStats', cascade='null', default=None)
+ statsCurr = ForeignKey('ConnectionStats', cascade='null',
default=None)
+ statsPrev = ForeignKey('ConnectionStats', cascade='null',
default=None)
vhost = ForeignKey('Vhost', cascade='null', default=None)
address = StringCol(length=1000, default=None)
incoming = BoolCol(default=None)
@@ -373,16 +368,16 @@
conn.callMethod(self.idOriginal, classInfo, "close",
callback, args=actualArgs)
-Vhost.sqlmeta.addJoin(SQLMultipleJoin('Client',
joinMethodName='clients'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('Connection',
joinMethodName='connections'))
-class ClientStats(SQLObject):
+class ConnectionStats(SQLObject):
class sqlmeta:
lazyUpdate = True
idOriginal = BigIntCol(default=None)
recTime = TimestampCol(default=None)
- client = ForeignKey('Client', cascade='null', default=None)
+ clientConnection = ForeignKey('Connection', cascade='null',
default=None)
closing = BoolCol(default=None)
authIdentity = StringCol(length=1000, default=None)
framesFromClient = BigIntCol(default=None)
@@ -392,7 +387,7 @@
classInfos = dict() # brokerId => classInfo
-Client.sqlmeta.addJoin(SQLMultipleJoin('ClientStats',
joinMethodName='stats'))
+Connection.sqlmeta.addJoin(SQLMultipleJoin('ConnectionStats',
joinMethodName='stats'))
class Link(SQLObject):
@@ -421,7 +416,7 @@
conn.callMethod(self.idOriginal, classInfo, "close",
callback, args=actualArgs)
- def bridge(self, model, callback, durable, src, dest, key, tag, excludes, src_is_queue,
src_is_local):
+ def bridge(self, model, callback, durable, src, dest, key, tag, excludes, srcIsQueue,
srcIsLocal):
"""Bridge messages over the link"""
actualArgs = dict()
actualArgs["durable"] = durable
@@ -430,8 +425,8 @@
actualArgs["key"] = key
actualArgs["tag"] = tag
actualArgs["excludes"] = excludes
- actualArgs["src_is_queue"] = src_is_queue
- actualArgs["src_is_local"] = src_is_local
+ actualArgs["srcIsQueue"] = srcIsQueue
+ actualArgs["srcIsLocal"] = srcIsLocal
conn = model.connections[self.managedBroker]
classInfo = self.classInfos[self.managedBroker]
conn.callMethod(self.idOriginal, classInfo, "bridge",
@@ -516,7 +511,7 @@
vhost = ForeignKey('Vhost', cascade='null', default=None)
name = StringCol(length=1000, default=None)
channelId = SmallIntCol(default=None)
- client = ForeignKey('Client', cascade='null', default=None)
+ clientConnection = ForeignKey('Connection', cascade='null',
default=None)
detachedLifespan = IntCol(default=None)
classInfos = dict() # brokerId => classInfo
@@ -551,7 +546,7 @@
Vhost.sqlmeta.addJoin(SQLMultipleJoin('Session',
joinMethodName='sessions'))
-Client.sqlmeta.addJoin(SQLMultipleJoin('Session',
joinMethodName='sessions'))
+Connection.sqlmeta.addJoin(SQLMultipleJoin('Session',
joinMethodName='sessions'))
class SessionStats(SQLObject):
@@ -570,175 +565,27 @@
Session.sqlmeta.addJoin(SQLMultipleJoin('SessionStats',
joinMethodName='stats'))
-class Destination(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('DestinationStats', cascade='null',
default=None)
- statsPrev = ForeignKey('DestinationStats', cascade='null',
default=None)
- session = ForeignKey('Session', cascade='null', default=None)
- name = StringCol(length=1000, default=None)
-
- classInfos = dict() # brokerId => classInfo
-
- def throttle(self, model, callback, strength):
- """Apply extra rate limiting to destination: 0 = Normal, 10 =
Maximum"""
- actualArgs = dict()
- actualArgs["strength"] = strength
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- conn.callMethod(self.idOriginal, classInfo, "throttle",
- callback, args=actualArgs)
-
- def stop(self, model, callback):
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- conn.callMethod(self.idOriginal, classInfo, "stop",
- callback, args=actualArgs)
-
- def start(self, model, callback):
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- conn.callMethod(self.idOriginal, classInfo, "start",
- callback, args=actualArgs)
-
-Session.sqlmeta.addJoin(SQLMultipleJoin('Destination',
joinMethodName='destinations'))
-
-
-class DestinationStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- destination = ForeignKey('Destination', cascade='null', default=None)
- flowMode = SmallIntCol(default=None)
- maxMsgCredits = IntCol(default=None)
- maxByteCredits = IntCol(default=None)
- msgCredits = IntCol(default=None)
- byteCredits = IntCol(default=None)
-
- classInfos = dict() # brokerId => classInfo
-
-Destination.sqlmeta.addJoin(SQLMultipleJoin('DestinationStats',
joinMethodName='stats'))
-
-
-class Producer(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('ProducerStats', cascade='null', default=None)
- statsPrev = ForeignKey('ProducerStats', cascade='null', default=None)
- destination = ForeignKey('Destination', cascade='null', default=None)
- exchange = ForeignKey('Exchange', cascade='null', default=None)
-
- classInfos = dict() # brokerId => classInfo
-
-Destination.sqlmeta.addJoin(SQLMultipleJoin('Producer',
joinMethodName='producers'))
-
-Exchange.sqlmeta.addJoin(SQLMultipleJoin('Producer',
joinMethodName='producers'))
-
-
-class ProducerStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- producer = ForeignKey('Producer', cascade='null', default=None)
- msgsProduced = BigIntCol(default=None)
- bytesProduced = BigIntCol(default=None)
-
- classInfos = dict() # brokerId => classInfo
-
-Producer.sqlmeta.addJoin(SQLMultipleJoin('ProducerStats',
joinMethodName='stats'))
-
-
-class Consumer(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- creationTime = TimestampCol(default=None)
- deletionTime = TimestampCol(default=None)
- managedBroker = StringCol(length=1000, default=None)
- statsCurr = ForeignKey('ConsumerStats', cascade='null', default=None)
- statsPrev = ForeignKey('ConsumerStats', cascade='null', default=None)
- destination = ForeignKey('Destination', cascade='null', default=None)
- queue = ForeignKey('Queue', cascade='null', default=None)
-
- classInfos = dict() # brokerId => classInfo
-
- def close(self, model, callback):
- actualArgs = dict()
- conn = model.connections[self.managedBroker]
- classInfo = self.classInfos[self.managedBroker]
- conn.callMethod(self.idOriginal, classInfo, "close",
- callback, args=actualArgs)
-
-Destination.sqlmeta.addJoin(SQLMultipleJoin('Consumer',
joinMethodName='consumers'))
-
-Queue.sqlmeta.addJoin(SQLMultipleJoin('Consumer',
joinMethodName='consumers'))
-
-
-class ConsumerStats(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- idOriginal = BigIntCol(default=None)
- recTime = TimestampCol(default=None)
- consumer = ForeignKey('Consumer', cascade='null', default=None)
- msgsConsumed = BigIntCol(default=None)
- bytesConsumed = BigIntCol(default=None)
- unackedMessages = IntCol(default=None)
- unackedMessagesLow = IntCol(default=None)
- unackedMessagesHigh = IntCol(default=None)
-
- classInfos = dict() # brokerId => classInfo
-
-Consumer.sqlmeta.addJoin(SQLMultipleJoin('ConsumerStats',
joinMethodName='stats'))
-
-
classToSchemaNameMap = dict()
schemaNameToClassMap = dict()
-classToSchemaNameMap['System'] = 'system'
-schemaNameToClassMap['system'] = System
-classToSchemaNameMap['Broker'] = 'broker'
-schemaNameToClassMap['broker'] = Broker
-classToSchemaNameMap['Agent'] = 'agent'
-schemaNameToClassMap['agent'] = Agent
-classToSchemaNameMap['Vhost'] = 'vhost'
-schemaNameToClassMap['vhost'] = Vhost
-classToSchemaNameMap['Queue'] = 'queue'
-schemaNameToClassMap['queue'] = Queue
-classToSchemaNameMap['Exchange'] = 'exchange'
-schemaNameToClassMap['exchange'] = Exchange
-classToSchemaNameMap['Binding'] = 'binding'
-schemaNameToClassMap['binding'] = Binding
-classToSchemaNameMap['Client'] = 'client'
-schemaNameToClassMap['client'] = Client
-classToSchemaNameMap['Link'] = 'link'
-schemaNameToClassMap['link'] = Link
-classToSchemaNameMap['Bridge'] = 'bridge'
-schemaNameToClassMap['bridge'] = Bridge
-classToSchemaNameMap['Session'] = 'session'
-schemaNameToClassMap['session'] = Session
-classToSchemaNameMap['Destination'] = 'destination'
-schemaNameToClassMap['destination'] = Destination
-classToSchemaNameMap['Producer'] = 'producer'
-schemaNameToClassMap['producer'] = Producer
-classToSchemaNameMap['Consumer'] = 'consumer'
-schemaNameToClassMap['consumer'] = Consumer
+classToSchemaNameMap['System'] = 'System'
+schemaNameToClassMap['System'] = System
+classToSchemaNameMap['Broker'] = 'Broker'
+schemaNameToClassMap['Broker'] = Broker
+classToSchemaNameMap['Agent'] = 'Agent'
+schemaNameToClassMap['Agent'] = Agent
+classToSchemaNameMap['Vhost'] = 'Vhost'
+schemaNameToClassMap['Vhost'] = Vhost
+classToSchemaNameMap['Queue'] = 'Queue'
+schemaNameToClassMap['Queue'] = Queue
+classToSchemaNameMap['Exchange'] = 'Exchange'
+schemaNameToClassMap['Exchange'] = Exchange
+classToSchemaNameMap['Binding'] = 'Binding'
+schemaNameToClassMap['Binding'] = Binding
+classToSchemaNameMap['Connection'] = 'Connection'
+schemaNameToClassMap['Connection'] = Connection
+classToSchemaNameMap['Link'] = 'Link'
+schemaNameToClassMap['Link'] = Link
+classToSchemaNameMap['Bridge'] = 'Bridge'
+schemaNameToClassMap['Bridge'] = Bridge
+classToSchemaNameMap['Session'] = 'Session'
+schemaNameToClassMap['Session'] = Session
Modified: mgmt/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/mint/python/mint/schemaparser.py 2008-06-02 16:02:23 UTC (rev 2102)
+++ mgmt/mint/python/mint/schemaparser.py 2008-06-02 16:05:18 UTC (rev 2103)
@@ -23,7 +23,7 @@
self.dataTypesMap["uuid"] = "BLOBCol"
self.dataTypesMap["uint8"] = self.dataTypesMap["hilo8"] =
self.dataTypesMap["count8"] = self.dataTypesMap["mma8"] =
"SmallIntCol"
self.dataTypesMap["uint16"] = self.dataTypesMap["hilo16"] =
self.dataTypesMap["count16"] = self.dataTypesMap["mma16"] =
"SmallIntCol"
- self.dataTypesMap["uint32"] = self.dataTypesMap["hilo32"] =
self.dataTypesMap["count32"] = self.dataTypesMap["mma32"] =
"IntCol"
+ self.dataTypesMap["uint32"] = self.dataTypesMap["hilo32"] =
self.dataTypesMap["count32"] = self.dataTypesMap["mma32"] =
self.dataTypesMap["atomic32"] = "IntCol"
self.dataTypesMap["uint64"] = self.dataTypesMap["hilo64"] =
self.dataTypesMap["count64"] = self.dataTypesMap["mma64"] =
self.dataTypesMap["mmaTime"] = "BigIntCol"
self.dataTypesMap["absTime"] = self.dataTypesMap["deltaTime"] =
"BigIntCol"
self.dataTypesMap["bool"] = "BoolCol"
@@ -48,6 +48,8 @@
def generateForeignKeyAttrib(self, name, reference):
params = "'%s', cascade='null'" % (reference)
+ if (name == "connection"):
+ name = "clientConnection"
self.generateAttrib(name, "ForeignKey", params)
def generateHiLoAttrib(self, name, type):
@@ -72,13 +74,12 @@
def generateClassAttribs(self, schemaName, elements):
for elem in elements:
- # XXX FIX: properly handle a store ref
- if (elem["@name"] == "storeRef"):
- continue
- # XXX FIX: properly handle a store ref
+ # special handling due to name conflict with SqlObject.connection
+ if (elem["@name"] == "connection"):
+ elem["@name"] = "clientConnection"
if (elem["@type"] == "objId"):
if (elem["(a)name"].endswith("Ref")):
- reference =
self.style.dbTableToPythonClass(elem["(a)name"]).replace("Ref",
"")
+ reference = self.style.dbTableToPythonClass(elem["@references"])
attrib = reference[0].lower() + reference[1:]
self.generateForeignKeyAttrib(attrib, reference)
self.generateMultipleJoin(reference, self.currentClass)
@@ -115,7 +116,7 @@
self.generateAttrib("idOriginal", "BigIntCol")
self.generateTimestampAttrib("rec")
if (stats):
- self.generateForeignKeyAttrib(colPythonName, keyPythonName)
+ self.generateForeignKeyAttrib(colPythonName[0].lower() + colPythonName[1:],
keyPythonName)
self.generateMultipleJoin(origPythonName, pythonName, "stats")
else:
self.generateTimestampAttrib("creation")
@@ -162,12 +163,12 @@
classes = schema.query["schema/class"]
for cls in classes:
self.startClass(cls["@name"])
- self.generateClassAttribs(cls["@name"],
cls.query["configElement"])
+ self.generateClassAttribs(cls["@name"], cls.query["property"])
for elem in cls.query["method"]:
self.generateMethod(elem)
self.endClass()
self.startClass(cls["@name"], stats=True)
- self.generateClassAttribs(cls["@name"],
cls.query["instElement"])
+ self.generateClassAttribs(cls["@name"],
cls.query["statistic"])
self.endClass()
outputFile.write(self.pythonOutput + self.finalPythonOutput)
outputFile.close()
Modified: mgmt/mint/sql/indexes.sql
===================================================================
--- mgmt/mint/sql/indexes.sql 2008-06-02 16:02:23 UTC (rev 2102)
+++ mgmt/mint/sql/indexes.sql 2008-06-02 16:05:18 UTC (rev 2103)
@@ -1,7 +0,0 @@
-create index queue_vhost_id_idx on queue (vhost_id);
-create index exchange_vhost_id_idx on exchange (vhost_id);
-create index client_vhost_id_idx on client (vhost_id);
-
-create index queue_stats_queue_id_idx on queue_stats (queue_id);
-create index exchange_stats_exchange_id_idx on exchange_stats (exchange_id);
-create index client_stats_client_id_idx on client_stats (client_id);
Modified: mgmt/mint/sql/schema.sql
===================================================================
--- mgmt/mint/sql/schema.sql 2008-06-02 16:02:23 UTC (rev 2102)
+++ mgmt/mint/sql/schema.sql 2008-06-02 16:05:18 UTC (rev 2103)
@@ -63,7 +63,7 @@
session_id BYTEA,
label VARCHAR(1000),
registered_to BIGINT,
- sys_id BYTEA
+ system_id BYTEA
);
CREATE TABLE agent_stats (
@@ -154,7 +154,7 @@
broker_id INT
);
-CREATE TABLE client (
+CREATE TABLE connection (
id SERIAL PRIMARY KEY,
id_original BIGINT,
rec_time TIMESTAMP,
@@ -168,11 +168,11 @@
incoming BOOL
);
-CREATE TABLE client_stats (
+CREATE TABLE connection_stats (
id SERIAL PRIMARY KEY,
id_original BIGINT,
rec_time TIMESTAMP,
- client_id INT,
+ client_connection_id INT,
closing BOOL,
auth_identity VARCHAR(1000),
frames_from_client BIGINT,
@@ -181,56 +181,6 @@
bytes_to_client 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_curr_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_curr_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,
@@ -251,12 +201,12 @@
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,
+ producer_count INT,
+ producer_count_low INT,
+ producer_count_high INT,
+ binding_count INT,
+ binding_count_low INT,
+ binding_count_high INT,
msg_receives BIGINT,
msg_drops BIGINT,
msg_routes BIGINT,
@@ -290,28 +240,6 @@
last_error VARCHAR(1000)
);
-CREATE TABLE producer (
- id SERIAL PRIMARY KEY,
- id_original BIGINT,
- rec_time TIMESTAMP,
- creation_time TIMESTAMP,
- deletion_time TIMESTAMP,
- managed_broker VARCHAR(1000),
- stats_curr_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,
@@ -341,17 +269,12 @@
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,
@@ -364,12 +287,12 @@
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,
+ consumer_count INT,
+ consumer_count_low INT,
+ consumer_count_high INT,
+ binding_count INT,
+ binding_count_low INT,
+ binding_count_high INT,
unacked_messages INT,
unacked_messages_low INT,
unacked_messages_high INT,
@@ -391,7 +314,7 @@
vhost_id INT,
name VARCHAR(1000),
channel_id SMALLINT,
- client_id INT,
+ client_connection_id INT,
detached_lifespan INT
);
@@ -414,7 +337,7 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
- sys_id BYTEA,
+ system_id BYTEA,
os_name VARCHAR(1000),
node_name VARCHAR(1000),
release VARCHAR(1000),
@@ -493,32 +416,14 @@
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_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES client_stats (id) ON DELETE SET NULL;
+ALTER TABLE connection ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES connection_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 connection ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES connection_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 connection 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 connection_stats ADD CONSTRAINT client_connection_id_exists FOREIGN KEY
(client_connection_id) REFERENCES connection (id) ON DELETE SET NULL;
-ALTER TABLE consumer ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_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_curr_id_exists FOREIGN KEY (stats_curr_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_curr_id_exists FOREIGN KEY (stats_curr_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;
@@ -535,16 +440,6 @@
ALTER TABLE link_stats ADD CONSTRAINT link_id_exists FOREIGN KEY (link_id) REFERENCES
link (id) ON DELETE SET NULL;
-ALTER TABLE producer ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_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_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES queue_stats (id) ON DELETE SET NULL;
ALTER TABLE queue ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES queue_stats (id) ON DELETE SET NULL;
@@ -559,7 +454,7 @@
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 ADD CONSTRAINT client_connection_id_exists FOREIGN KEY
(client_connection_id) REFERENCES connection (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;