rhmessaging commits: r4287 - mgmt/newdata/cumin/python/cumin/messaging.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-09-14 16:43:08 -0400 (Tue, 14 Sep 2010)
New Revision: 4287
Modified:
mgmt/newdata/cumin/python/cumin/messaging/broker.py
Log:
Use the broker object's name, rather than the vhost's, for the broker view
Modified: mgmt/newdata/cumin/python/cumin/messaging/broker.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/broker.py 2010-09-14 18:05:44 UTC (rev 4286)
+++ mgmt/newdata/cumin/python/cumin/messaging/broker.py 2010-09-14 20:43:08 UTC (rev 4287)
@@ -70,7 +70,7 @@
self.group = SessionAttribute(self, "group")
frame = "main.messaging.broker"
- col = ObjectLinkColumn(app, "name", vhost.name, vhost._id, frame)
+ col = ObjectLinkColumn(app, "name", broker.name, vhost._id, frame)
self.add_column(col)
self.add_attribute_column(system.nodeName)
@@ -122,8 +122,8 @@
self.brokerlink = BrokerLinkFrame(app, "link", self.broker)
self.add_mode(self.brokerlink)
- # self.view = ObjectView(app, "view", self.broker)
- # self.replace_child(self.view)
+ self.view = ObjectView(app, "view", self.broker)
+ self.replace_child(self.view)
self.view.add_tab(QueueSelector(app, "queues", self.object))
self.view.add_tab(ExchangeSelector(app, "exchanges", self.object))
@@ -138,6 +138,9 @@
self.move_messages = MoveMessages(app, self)
self.engroup = BrokerEngroup(app, self)
+ def get_title(self, session):
+ return self.broker.get(session).name
+
def do_process(self, session):
super(BrokerFrame, self).do_process(session)
15 years, 7 months
rhmessaging commits: r4286 - mgmt/newdata/rosemary/python/rosemary.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-14 14:05:44 -0400 (Tue, 14 Sep 2010)
New Revision: 4286
Modified:
mgmt/newdata/rosemary/python/rosemary/model.py
Log:
Fix BZ 633946: Return None or 0 if that is the actual attribute. Only use a default attribute if the requested attribute is missing.
Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-14 14:43:58 UTC (rev 4285)
+++ mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-14 18:05:44 UTC (rev 4286)
@@ -769,10 +769,12 @@
return formatter and formatter(value) or value
def get_value(self, attr):
- value = getattr(self, attr, None)
- if not value:
+ try:
+ value = getattr(self, attr)
+ except AttributeError:
# there is no attr, return the value of the 1st property
value = getattr(self, self._class._properties[0].name)
+
return value
def __repr__(self):
15 years, 7 months
rhmessaging commits: r4285 - in store/branches/java/0.5.x-dev/src: tools/java/org/apache/qpid/server/store/berkeleydb and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-14 10:43:58 -0400 (Tue, 14 Sep 2010)
New Revision: 4285
Modified:
store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
Log:
Only clean the logs when closing the store if it is not read only, preventing UnsupportedOperationException being thrown when using BDB4 libraries.
(reverts change in r4284, instead fixes the overlooked issue in the store itself)
Modified: store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-09-14 14:23:36 UTC (rev 4284)
+++ store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-09-14 14:43:58 UTC (rev 4285)
@@ -157,6 +157,8 @@
private TransactionConfig _transactionConfig = new TransactionConfig();
+ private boolean _readOnly = false;
+
public BDBMessageStore()
{
this(DATABASE_FORMAT_VERSION);
@@ -224,6 +226,7 @@
public void configure(VirtualHost virtualHost, File environmentPath, boolean readonly) throws AMQException, DatabaseException
{
+ _readOnly = readonly;
stateTransition(State.INITIAL, State.CONFIGURING);
_log.info("Configuring BDB message store");
@@ -483,10 +486,13 @@
{
if (_environment != null)
{
- // Clean the log before closing. This makes sure it doesn't contain
- // redundant data. Closing without doing this means the cleaner may not
- // get a chance to finish.
- _environment.cleanLog();
+ if(!_readOnly)
+ {
+ // Clean the log before closing. This makes sure it doesn't contain
+ // redundant data. Closing without doing this means the cleaner may not
+ // get a chance to finish.
+ _environment.cleanLog();
+ }
_environment.close();
}
}
Modified: store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
===================================================================
--- store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2010-09-14 14:23:36 UTC (rev 4284)
+++ store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2010-09-14 14:43:58 UTC (rev 4285)
@@ -89,8 +89,6 @@
VirtualHost _oldVirtualHost;
/** The file ending that is used by BDB Store Files */
private static final String BDB_FILE_ENDING = ".jdb";
- /** Message of Exception thrown when closing down a read-only BDB3.3 store when using BDB4 */
- private static final String NO_CLEAN_READ_ONLY = "Log cleaning not allowed in a read-only or memory-only environment";
static final Options _options = new Options();
static CommandLine _commandLine;
@@ -370,25 +368,7 @@
_oldVirtualHost.close();
_newMessageStore.close();
- try
- {
- _oldMessageStore.close();
- }
- catch(UnsupportedOperationException e)
- {
- //When closing the old BDB3.3store, BDB4 will try to clean the logs
- //upgrade them and then throw an UnsupportedOperationException
- String msg = e.getMessage();
-
- if(e !=null && msg.endsWith(NO_CLEAN_READ_ONLY))
- {
- //ignore, expected
- }
- else
- {
- throw e;
- }
- }
+ _oldMessageStore.close();
//Shutdown the AR that the Vhosts will have created.
ApplicationRegistry.remove(1);
15 years, 7 months
rhmessaging commits: r4284 - store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-14 10:23:36 -0400 (Tue, 14 Sep 2010)
New Revision: 4284
Modified:
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
Log:
Allow the upgrade tool to ignore the exception raised (after the schema upgrade has been performed and new store created+closed) when closing the old read-only BDB3.3 store and BDB4 tries to clean it despite it being read-only
Modified: store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
===================================================================
--- store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2010-09-14 13:50:43 UTC (rev 4283)
+++ store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2010-09-14 14:23:36 UTC (rev 4284)
@@ -89,6 +89,8 @@
VirtualHost _oldVirtualHost;
/** The file ending that is used by BDB Store Files */
private static final String BDB_FILE_ENDING = ".jdb";
+ /** Message of Exception thrown when closing down a read-only BDB3.3 store when using BDB4 */
+ private static final String NO_CLEAN_READ_ONLY = "Log cleaning not allowed in a read-only or memory-only environment";
static final Options _options = new Options();
static CommandLine _commandLine;
@@ -368,7 +370,25 @@
_oldVirtualHost.close();
_newMessageStore.close();
- _oldMessageStore.close();
+ try
+ {
+ _oldMessageStore.close();
+ }
+ catch(UnsupportedOperationException e)
+ {
+ //When closing the old BDB3.3store, BDB4 will try to clean the logs
+ //upgrade them and then throw an UnsupportedOperationException
+ String msg = e.getMessage();
+
+ if(e !=null && msg.endsWith(NO_CLEAN_READ_ONLY))
+ {
+ //ignore, expected
+ }
+ else
+ {
+ throw e;
+ }
+ }
//Shutdown the AR that the Vhosts will have created.
ApplicationRegistry.remove(1);
15 years, 7 months
rhmessaging commits: r4283 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-14 09:50:43 -0400 (Tue, 14 Sep 2010)
New Revision: 4283
Modified:
mgmt/newdata/cumin/python/cumin/main.py
Log:
Fixed BZ 633455: Don't display top submissions records if they don't have a valid jobServerRef_id
Modified: mgmt/newdata/cumin/python/cumin/main.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/main.py 2010-09-14 13:18:00 UTC (rev 4282)
+++ mgmt/newdata/cumin/python/cumin/main.py 2010-09-14 13:50:43 UTC (rev 4283)
@@ -381,10 +381,25 @@
self.adapter.query.add_filter(filter)
filter = SqlComparisonFilter(table._qmf_update_time,
- "now() - interval '600000 seconds'", ">=")
+ "now() - interval '60 seconds'", ">=")
self.adapter.query.add_filter(filter)
+ def render_rows(self, session):
+ data = self.data.get(session)
+
+ writer = Writer()
+
+ for record in data:
+ # if we can't get the collector, don't render the row
+ submission_id = record[0]
+ collector = self.get_collector(session, submission_id)
+ if collector:
+ writer.write(self.row.render(session, record))
+
+ return writer.to_string()
+
def get_collector(self, session, submission_id):
+ try:
cls = self.cls
submission = cls.get_object_by_id(session.cursor, submission_id)
@@ -393,6 +408,8 @@
cls = self.app.model.com_redhat_grid.Collector
return cls.get_object(session.cursor, Pool=job_server.Pool)
+ except Exception, e:
+ log.exception(e)
class NameColumn(ObjectLinkColumn):
def render_cell_href(self, session, record):
15 years, 7 months
rhmessaging commits: r4282 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-14 09:18:00 -0400 (Tue, 14 Sep 2010)
New Revision: 4282
Modified:
mgmt/newdata/cumin/python/cumin/model.py
Log:
Fixed an exception that happened when we get an error status from a qmf call.
Modified: mgmt/newdata/cumin/python/cumin/model.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/model.py 2010-09-14 10:25:44 UTC (rev 4281)
+++ mgmt/newdata/cumin/python/cumin/model.py 2010-09-14 13:18:00 UTC (rev 4282)
@@ -1554,7 +1554,6 @@
class QmfException(Exception):
def __init__(self, value):
- super(QmfException, self).__init__(value)
self.message = value
def __str__(self):
@@ -1576,7 +1575,7 @@
self.data = data
self.got_data = True
else:
- self.error = QmfException(str(status))
+ self.error = QmfException(status)
return completion
def do_wait(self):
15 years, 7 months
rhmessaging commits: r4281 - store/branches/java/0.5.x-dev/bin.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-14 06:25:44 -0400 (Tue, 14 Sep 2010)
New Revision: 4281
Modified:
store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat
Log:
update bdb jar version for windows .bat startup file
Modified: store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat
===================================================================
--- store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat 2010-09-14 09:01:35 UTC (rev 4280)
+++ store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat 2010-09-14 10:25:44 UTC (rev 4281)
@@ -37,5 +37,5 @@
set BDBSTORE_HOME=%QPID_HOME%
-set QPID_MODULE_JARS=%BDBSTORE_HOME%\lib\qpid-bdbstore-%VERSION%.jar;%BDBSTORE_HOME%\lib\je-3.3.62.jar
+set QPID_MODULE_JARS=%BDBSTORE_HOME%\lib\qpid-bdbstore-%VERSION%.jar;%BDBSTORE_HOME%\lib\je-4.0.103.jar
.\qpid-server.bat %*
15 years, 7 months
rhmessaging commits: r4279 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-13 12:44:19 -0400 (Mon, 13 Sep 2010)
New Revision: 4279
Modified:
mgmt/newdata/cumin/python/cumin/grid/limit.py
mgmt/newdata/cumin/python/cumin/grid/negotiator.py
Log:
Call reconfig after a SetLimit call returns.
Modified: mgmt/newdata/cumin/python/cumin/grid/limit.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/limit.py 2010-09-13 16:32:26 UTC (rev 4278)
+++ mgmt/newdata/cumin/python/cumin/grid/limit.py 2010-09-13 16:44:19 UTC (rev 4279)
@@ -184,46 +184,6 @@
def render_title(self, session):
return "Max Allowance"
-class NegotiatorLimitSetForm(CuminForm):
- def __init__(self, app, name, task):
- super(LimitEdit, self).__init__(app, name)
-
- self.task = task
-
- self.negotiator = NegotiatorParameter(app, "negotiator")
- self.add_parameter(self.negotiator)
-
- self.limit_name = Parameter("name")
- self.add_parameter(self.limit_name)
-
- self.limit_max = Parameter(app, "max")
- self.add_parameter(self.max)
-
- def render_title(self, session):
- negotiator = self.negotiator.get(session)
- name = self.limit_name.get(session)
-
- return self.task.get_description(session, (negotiator, name))
-
- def xxx_render_inline_help(self, session):
- return "Set the maximum number of jobs that can run " + \
- "concurrently using this limiter."
-
- def process_submit(self, session):
- negotiator = self.negotiator.get(session)
- name = self.limit_name.get(session)
- max = self.limit_max.get(session)
-
- self.check()
-
- # XXX add errors
- # 1. max is float
- # 2. max > 1.0 and max < 99999.0
-
- if not self.errors.get(session):
- self.task.invoke(session, negotiator, name, max)
- self.task.exit_with_redirect(session)
-
class LimitView(CuminView):
def __init__(self, app, name, limit):
super(LimitView, self).__init__(app, name, None)
Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-09-13 16:32:26 UTC (rev 4278)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-09-13 16:44:19 UTC (rev 4279)
@@ -918,33 +918,6 @@
return params
-class NegotiatorLimitSet(ObjectFrameTask):
- def __init__(self, app, frame):
- super(NegotiatorLimitSet, self).__init__(app, frame)
-
- self.form = NegotiatorLimitSetForm(module.app, self.name, self)
-
- def do_enter(self, session, osession):
- pass
- #self.form.negotiator.set(session, limit[0])
- #self.form.limit_name.set(session, limit[1])
-
- def get_title(self, session):
- return "Set limit"
-
- def do_invoke(self, invoc, negotiator, name, max):
- action = SetLimit(self.app)
- result = action.execute(negotiator, name, max)
- if result.error:
- raise result.error
-
- invoc.status_code = invoc.status
-
- action = QmfCall(self.app)
- action.execute(negotiator, "Reconfig")
-
- invoc.end()
-
class NegotiatorGroupTask(ObjectFrameTask):
def do_exit(self, session):
self.app.main_page.main.grid.pool.view.show(session)
15 years, 7 months
rhmessaging commits: r4278 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-13 12:32:26 -0400 (Mon, 13 Sep 2010)
New Revision: 4278
Modified:
mgmt/newdata/cumin/python/cumin/main.py
Log:
Fix for BZ 623162: Don't show a "Deepest Messages" record if there is no vhost for the queue yet.
Modified: mgmt/newdata/cumin/python/cumin/main.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/main.py 2010-09-13 14:27:06 UTC (rev 4277)
+++ mgmt/newdata/cumin/python/cumin/main.py 2010-09-13 16:32:26 UTC (rev 4278)
@@ -310,6 +310,18 @@
"is not")
self.adapter.query.add_filter(filter)
+ def render_rows(self, session):
+ data = self.data.get(session)
+
+ writer = Writer()
+
+ for record in data:
+ # if there is no broker id, don't render the row
+ if record[self.adapter.vhost_id_field.index]:
+ writer.write(self.row.render(session, record))
+
+ return writer.to_string()
+
class NameColumn(ObjectLinkColumn):
def render_cell_href(self, session, record):
branch = session.branch()
15 years, 7 months
rhmessaging commits: r4277 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-13 10:27:06 -0400 (Mon, 13 Sep 2010)
New Revision: 4277
Modified:
mgmt/newdata/cumin/python/cumin/grid/limit.py
Log:
Call reconfig after a SetLimit call.
Modified: mgmt/newdata/cumin/python/cumin/grid/limit.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/limit.py 2010-09-11 21:02:19 UTC (rev 4276)
+++ mgmt/newdata/cumin/python/cumin/grid/limit.py 2010-09-13 14:27:06 UTC (rev 4277)
@@ -138,6 +138,10 @@
raise results.error
invoc.status_code = results.status
+
+ action = QmfCall(self.app)
+ action.execute(negotiator, "Reconfig")
+
invoc.end()
class NegotiatorLimitForm(ObjectFrameTaskForm):
15 years, 7 months