rhmessaging commits: r2475 - in store/trunk/cpp/lib: gen and 4 other directories.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2008-09-15 12:04:28 -0400 (Mon, 15 Sep 2008)
New Revision: 2475
Added:
store/trunk/cpp/lib/gen/com/
store/trunk/cpp/lib/gen/com/redhat/
store/trunk/cpp/lib/gen/com/redhat/rhm/
store/trunk/cpp/lib/gen/com/redhat/rhm/store/
store/trunk/cpp/lib/gen/com/redhat/rhm/store/ArgsJournalExpand.h
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.cpp
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.h
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.cpp
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.h
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.cpp
store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.h
Removed:
store/trunk/cpp/lib/gen/ArgsJournalExpand.h
store/trunk/cpp/lib/gen/Journal.cpp
store/trunk/cpp/lib/gen/Journal.h
store/trunk/cpp/lib/gen/PackageMrgstore.cpp
store/trunk/cpp/lib/gen/PackageMrgstore.h
store/trunk/cpp/lib/gen/Store.cpp
store/trunk/cpp/lib/gen/Store.h
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/Makefile.am
store/trunk/cpp/lib/MessageStoreImpl.cpp
store/trunk/cpp/lib/MessageStoreImpl.h
store/trunk/cpp/lib/qmf-schema.xml
Log:
Regenerated management code with new namespaces
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -28,13 +28,14 @@
#include "jrnl/slock.hpp"
#include "qpid/log/Statement.h"
#include "qpid/agent/ManagementAgent.h"
-#include "ArgsJournalExpand.h"
+#include "com/redhat/rhm/store/ArgsJournalExpand.h"
#include "qpid/sys/Monitor.h"
#include "StoreException.h"
using namespace mrg::msgstore;
using namespace mrg::journal;
using qpid::management::ManagementAgent;
+namespace _qmf = qmf::com::redhat::rhm::store;
qpid::broker::Timer* JournalImpl::journalTimerPtr = 0;
u_int32_t JournalImpl::cnt = 0;
@@ -75,7 +76,8 @@
ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
if (agent != 0)
{
- _mgmtObject = new qpid::management::Journal(agent, (qpid::management::Manageable*) this);
+ _mgmtObject = new _qmf::Journal
+ (agent, (qpid::management::Manageable*) this);
_mgmtObject->set_name(journalId);
_mgmtObject->set_directory(journalDirectory);
@@ -553,9 +555,8 @@
switch (methodId)
{
- case qpid::management::Journal::METHOD_EXPAND :
- //qpid::management::ArgsJournalExpand& eArgs =
- // dynamic_cast<qpid::management::ArgsJournalExpand&>(args);
+ case _qmf::Journal::METHOD_EXPAND :
+ //_qmf::ArgsJournalExpand& eArgs = (_qmf::ArgsJournalExpand&) args;
// Implement "expand" using eArgs.i_by (expand-by argument)
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/JournalImpl.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -34,7 +34,7 @@
#include <boost/ptr_container/ptr_list.hpp>
#include <boost/intrusive_ptr.hpp>
#include "qpid/management/Manageable.h"
-#include "Journal.h"
+#include "com/redhat/rhm/store/Journal.h"
namespace mrg {
namespace msgstore {
@@ -87,7 +87,7 @@
size_t _dlen;
journal::data_tok _dtok;
bool _external;
- qpid::management::Journal* _mgmtObject;
+ qmf::com::redhat::rhm::store::Journal* _mgmtObject;
public:
JournalImpl(const std::string& journalId,
Modified: store/trunk/cpp/lib/Makefile.am
===================================================================
--- store/trunk/cpp/lib/Makefile.am 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/Makefile.am 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,5 +1,5 @@
-AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) -I$(srcdir)/gen \
- -DRHM_CLEAN -pthread
+AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) \
+ -I$(srcdir)/gen -DRHM_CLEAN -pthread
# Definitions for client and daemon plugins
PLUGINLDFLAGS=-no-undefined -module -avoid-version
@@ -97,13 +97,13 @@
jrnl/txn_rec.hpp \
jrnl/wmgr.hpp \
jrnl/wrfc.hpp \
- gen/PackageMrgstore.cpp \
- gen/PackageMrgstore.h \
- gen/Journal.cpp \
- gen/Journal.h \
- gen/Store.cpp \
- gen/Store.h \
- gen/ArgsJournalExpand.h
+ gen/com/redhat/rhm/store/Package.cpp \
+ gen/com/redhat/rhm/store/Package.h \
+ gen/com/redhat/rhm/store/Journal.cpp \
+ gen/com/redhat/rhm/store/Journal.h \
+ gen/com/redhat/rhm/store/Store.cpp \
+ gen/com/redhat/rhm/store/Store.h \
+ gen/com/redhat/rhm/store/ArgsJournalExpand.h
BUILT_SOURCES = db-inc.h
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -28,7 +28,7 @@
#include "IdPairDbt.h"
#include "jrnl/txn_map.hpp"
#include "qpid/log/Statement.h"
-#include "PackageMrgstore.h"
+#include "com/redhat/rhm/store/Package.h"
#define MAX_AIO_SLEEPS 1000 // ~1 second
#define AIO_SLEEP_TIME 1000 // 1 milisecond
@@ -43,6 +43,7 @@
using qpid::framing::Buffer;
using qpid::framing::FieldTable;
using qpid::management::ManagementAgent;
+namespace _qmf = qmf::com::redhat::rhm::store;
static const u_int8_t MESSAGE_MESSAGE = 1;
static const u_int8_t BASIC_MESSAGE = 2;
@@ -170,8 +171,8 @@
if (broker != 0) {
ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
if (agent != 0) {
- qpid::management::PackageMrgstore packageInitializer(agent);
- mgmtObject = new qpid::management::Store(agent, this, broker);
+ _qmf::Package packageInitializer(agent);
+ mgmtObject = new _qmf::Store(agent, this, broker);
mgmtObject->set_location(storeDir);
mgmtObject->set_defaultInitialFileCount(numJrnlFiles);
Modified: store/trunk/cpp/lib/MessageStoreImpl.h
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/MessageStoreImpl.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -36,7 +36,7 @@
#include "qpid/broker/Broker.h"
#include "qpid/broker/MessageStore.h"
#include "qpid/management/Manageable.h"
-#include "Store.h"
+#include "com/redhat/rhm/store/Store.h"
#include "TxnCtxt.h"
// Assume DB_VERSION_MAJOR == 4
@@ -114,7 +114,7 @@
const char* envPath;
static qpid::sys::Duration defJournalGetEventsTimeout;
static qpid::sys::Duration defJournalFlushTimeout;
- qpid::management::Store* mgmtObject;
+ qmf::com::redhat::rhm::store::Store* mgmtObject;
qpid::sys::Mutex jrnlCreateLock;
// Parameter validation and calculation
Deleted: store/trunk/cpp/lib/gen/ArgsJournalExpand.h
===================================================================
--- store/trunk/cpp/lib/gen/ArgsJournalExpand.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/ArgsJournalExpand.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,42 +0,0 @@
-
-#ifndef _ARGS_JOURNALEXPAND_
-#define _ARGS_JOURNALEXPAND_
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/management/Args.h"
-#include <string>
-
-namespace qpid {
-namespace management {
-
-class ArgsJournalExpand : public Args
-{
- public:
- uint32_t i_by;
-
-};
-
-}}
-
-#endif /*!_ARGS_JOURNALEXPAND_*/
Deleted: store/trunk/cpp/lib/gen/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/Journal.cpp 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/Journal.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,573 +0,0 @@
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/log/Statement.h"
-#include "qpid/framing/FieldTable.h"
-#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
-#include "Journal.h"
-#include "ArgsJournalExpand.h"
-
-
-using namespace qpid::management;
-using namespace qpid::sys;
-using namespace qpid::framing;
-using std::string;
-
-string Journal::packageName = string ("mrgstore");
-string Journal::className = string ("journal");
-uint8_t Journal::md5Sum[16] =
- {0x1e,0x63,0xa4,0x3d,0xa3,0x1b,0xc0,0x1,0x1,0x70,0x5a,0x2a,0xb4,0xa,0x1b,0x4e};
-
-Journal::Journal (ManagementAgent* _agent, Manageable* _core) :
- ManagementObject(_agent, _core)
-{
-
- recordDepth = 0;
- recordDepthHigh = 0;
- recordDepthLow = 0;
- outstandingAIOs = 0;
- outstandingAIOsHigh = 0;
- outstandingAIOsLow = 0;
- freeFileCount = 0;
- freeFileCountHigh = 0;
- freeFileCountLow = 0;
- availableFileCount = 0;
- availableFileCountHigh = 0;
- availableFileCountLow = 0;
- writePageCacheDepth = 0;
- writePageCacheDepthHigh = 0;
- writePageCacheDepthLow = 0;
- readPageCacheDepth = 0;
- readPageCacheDepthHigh = 0;
- readPageCacheDepthLow = 0;
-
-
-
- maxThreads = agent->getMaxThreads();
- perThreadStatsArray = new struct PerThreadStats*[maxThreads];
- for (int idx = 0; idx < maxThreads; idx++)
- perThreadStatsArray[idx] = 0;
-
-}
-
-Journal::~Journal ()
-{
-
- for (int idx = 0; idx < maxThreads; idx++)
- if (perThreadStatsArray[idx] != 0)
- delete perThreadStatsArray[idx];
- delete[] perThreadStatsArray;
-
-}
-
-namespace {
- const string NAME("name");
- const string TYPE("type");
- const string ACCESS("access");
- const string INDEX("index");
- const string OPTIONAL("optional");
- const string UNIT("unit");
- const string MIN("min");
- const string MAX("max");
- const string MAXLEN("maxlen");
- const string DESC("desc");
- const string ARGCOUNT("argCount");
- const string ARGS("args");
- const string DIR("dir");
- const string DEFAULT("default");
-}
-
-void Journal::registerClass(ManagementAgent* agent)
-{
- agent->RegisterClass(packageName, className, md5Sum, writeSchema);
-}
-
-void Journal::writeSchema (Buffer& buf)
-{
- FieldTable ft;
-
- // Schema class header:
- buf.putShortString (packageName); // Package Name
- buf.putShortString (className); // Class Name
- buf.putBin128 (md5Sum); // Schema Hash
- buf.putShort (11); // Config Element Count
- buf.putShort (28); // Inst Element Count
- buf.putShort (1); // Method Count
- buf.putShort (0); // Event Count
-
- // Properties
- ft = FieldTable ();
- ft.setString (NAME, "queueRef");
- ft.setInt (TYPE, TYPE_REF);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "name");
- ft.setInt (TYPE, TYPE_SSTR);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 1);
- ft.setInt (OPTIONAL, 0);
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "directory");
- ft.setInt (TYPE, TYPE_SSTR);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (DESC, "Directory containing journal files");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "baseFileName");
- ft.setInt (TYPE, TYPE_SSTR);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (DESC, "Base filename prefix for journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writePageSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Page size in write-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writePages");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "wpage");
- ft.setString (DESC, "Number of pages in write-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readPageSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Page size in read-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readPages");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "rpage");
- ft.setString (DESC, "Number of pages in read-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "initialFileCount");
- ft.setInt (TYPE, TYPE_U16);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files initially allocated to this journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "dataFileSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Size of each journal data file");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "currentFileCount");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files currently allocated to this journal");
- buf.put (ft);
-
-
- // Statistics
- ft = FieldTable ();
- ft.setString (NAME, "recordDepth");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Number of currently enqueued records (durable messages)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "recordDepthHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Number of currently enqueued records (durable messages) (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "recordDepthLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Number of currently enqueued records (durable messages) (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "enqueues");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total enqueued records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "dequeues");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total dequeued records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "txnEnqueues");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transactional enqueued records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "txnDequeues");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transactional dequeued records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "txnCommits");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transactional commit records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "txnAborts");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transactional abort records on journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "outstandingAIOs");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "outstandingAIOsHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "outstandingAIOsLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "freeFileCount");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes.");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "freeFileCountHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes. (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "freeFileCountLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes. (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "availableFileCount");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files available to be written. Excluding holes");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "availableFileCountHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files available to be written. Excluding holes (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "availableFileCountLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files available to be written. Excluding holes (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writeWaitFailures");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "AIO Wait failures on write");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writeBusyFailures");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "AIO Busy failures on write");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readRecordCount");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Records read from the journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readBusyFailures");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "AIO Busy failures on read");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writePageCacheDepth");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "wpage");
- ft.setString (DESC, "Current depth of write-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writePageCacheDepthHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "wpage");
- ft.setString (DESC, "Current depth of write-page-cache (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "writePageCacheDepthLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "wpage");
- ft.setString (DESC, "Current depth of write-page-cache (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readPageCacheDepth");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "rpage");
- ft.setString (DESC, "Current depth of read-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readPageCacheDepthHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "rpage");
- ft.setString (DESC, "Current depth of read-page-cache (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "readPageCacheDepthLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "rpage");
- ft.setString (DESC, "Current depth of read-page-cache (Low)");
- buf.put (ft);
-
-
- // Methods
- ft = FieldTable ();
- ft.setString (NAME, "expand");
- ft.setInt (ARGCOUNT, 1);
- ft.setString (DESC, "Increase number of files allocated for this journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "by");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (DIR, "I");
- ft.setString (DESC, "Number of files to increase journal size by");
- buf.put (ft);
-
-
- // Events
-
-}
-
-
-void Journal::aggregatePerThreadStats(struct PerThreadStats* totals)
-{
- totals->enqueues = 0;
- totals->dequeues = 0;
- totals->txnEnqueues = 0;
- totals->txnDequeues = 0;
- totals->txnCommits = 0;
- totals->txnAborts = 0;
- totals->writeWaitFailures = 0;
- totals->writeBusyFailures = 0;
- totals->readRecordCount = 0;
- totals->readBusyFailures = 0;
-
- for (int idx = 0; idx < maxThreads; idx++) {
- struct PerThreadStats* threadStats = perThreadStatsArray[idx];
- if (threadStats != 0) {
- totals->enqueues += threadStats->enqueues;
- totals->dequeues += threadStats->dequeues;
- totals->txnEnqueues += threadStats->txnEnqueues;
- totals->txnDequeues += threadStats->txnDequeues;
- totals->txnCommits += threadStats->txnCommits;
- totals->txnAborts += threadStats->txnAborts;
- totals->writeWaitFailures += threadStats->writeWaitFailures;
- totals->writeBusyFailures += threadStats->writeBusyFailures;
- totals->readRecordCount += threadStats->readRecordCount;
- totals->readBusyFailures += threadStats->readBusyFailures;
-
- }
- }
-}
-
-
-void Journal::writeProperties (Buffer& buf)
-{
- sys::Mutex::ScopedLock mutex(accessLock);
- configChanged = false;
-
- writeTimestamps (buf);
-
- queueRef.encode(buf);
- buf.putShortString(name);
- buf.putShortString(directory);
- buf.putShortString(baseFileName);
- buf.putLong(writePageSize);
- buf.putLong(writePages);
- buf.putLong(readPageSize);
- buf.putLong(readPages);
- buf.putShort(initialFileCount);
- buf.putLong(dataFileSize);
- buf.putLong(currentFileCount);
-
-}
-
-void Journal::writeStatistics (Buffer& buf, bool skipHeaders)
-{
- sys::Mutex::ScopedLock mutex(accessLock);
- instChanged = false;
-
-
- struct PerThreadStats totals;
- aggregatePerThreadStats(&totals);
-
-
- if (!skipHeaders)
- writeTimestamps (buf);
- buf.putLong(recordDepth);
- buf.putLong(recordDepthHigh);
- buf.putLong(recordDepthLow);
- buf.putLongLong(totals.enqueues);
- buf.putLongLong(totals.dequeues);
- buf.putLongLong(totals.txnEnqueues);
- buf.putLongLong(totals.txnDequeues);
- buf.putLongLong(totals.txnCommits);
- buf.putLongLong(totals.txnAborts);
- buf.putLong(outstandingAIOs);
- buf.putLong(outstandingAIOsHigh);
- buf.putLong(outstandingAIOsLow);
- buf.putLong(freeFileCount);
- buf.putLong(freeFileCountHigh);
- buf.putLong(freeFileCountLow);
- buf.putLong(availableFileCount);
- buf.putLong(availableFileCountHigh);
- buf.putLong(availableFileCountLow);
- buf.putLongLong(totals.writeWaitFailures);
- buf.putLongLong(totals.writeBusyFailures);
- buf.putLongLong(totals.readRecordCount);
- buf.putLongLong(totals.readBusyFailures);
- buf.putLong(writePageCacheDepth);
- buf.putLong(writePageCacheDepthHigh);
- buf.putLong(writePageCacheDepthLow);
- buf.putLong(readPageCacheDepth);
- buf.putLong(readPageCacheDepthHigh);
- buf.putLong(readPageCacheDepthLow);
-
-
- // Maintenance of hi-lo statistics
- recordDepthHigh = recordDepth;
- recordDepthLow = recordDepth;
- outstandingAIOsHigh = outstandingAIOs;
- outstandingAIOsLow = outstandingAIOs;
- freeFileCountHigh = freeFileCount;
- freeFileCountLow = freeFileCount;
- availableFileCountHigh = availableFileCount;
- availableFileCountLow = availableFileCount;
- writePageCacheDepthHigh = writePageCacheDepth;
- writePageCacheDepthLow = writePageCacheDepth;
- readPageCacheDepthHigh = readPageCacheDepth;
- readPageCacheDepthLow = readPageCacheDepth;
-
-
-}
-
-void Journal::doMethod (string methodName, Buffer& inBuf, Buffer& outBuf)
-{
- Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
- std::string text;
-
- if (methodName == "expand") {
- ArgsJournalExpand ioArgs;
- ioArgs.i_by = inBuf.getLong();
- status = coreObject->ManagementMethod (METHOD_EXPAND, ioArgs, text);
- outBuf.putLong (status);
- outBuf.putShortString (Manageable::StatusText (status, text));
- return;
- }
-
- outBuf.putLong(status);
- outBuf.putShortString(Manageable::StatusText(status, text));
-}
-
-
Deleted: store/trunk/cpp/lib/gen/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/Journal.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/Journal.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,415 +0,0 @@
-
-#ifndef _MANAGEMENT_JOURNAL_
-#define _MANAGEMENT_JOURNAL_
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/management/ManagementObject.h"
-#include "qpid/framing/FieldTable.h"
-#include "qpid/framing/Uuid.h"
-
-namespace qpid {
-namespace management {
-
-class Journal : public ManagementObject
-{
- private:
-
- static std::string packageName;
- static std::string className;
- static uint8_t md5Sum[16];
-
-
- // Properties
- ObjectId queueRef;
- std::string name;
- std::string directory;
- std::string baseFileName;
- uint32_t writePageSize;
- uint32_t writePages;
- uint32_t readPageSize;
- uint32_t readPages;
- uint16_t initialFileCount;
- uint32_t dataFileSize;
- uint32_t currentFileCount;
-
- // Statistics
- uint32_t recordDepth;
- uint32_t recordDepthHigh;
- uint32_t recordDepthLow;
- uint32_t outstandingAIOs;
- uint32_t outstandingAIOsHigh;
- uint32_t outstandingAIOsLow;
- uint32_t freeFileCount;
- uint32_t freeFileCountHigh;
- uint32_t freeFileCountLow;
- uint32_t availableFileCount;
- uint32_t availableFileCountHigh;
- uint32_t availableFileCountLow;
- uint32_t writePageCacheDepth;
- uint32_t writePageCacheDepthHigh;
- uint32_t writePageCacheDepthLow;
- uint32_t readPageCacheDepth;
- uint32_t readPageCacheDepthHigh;
- uint32_t readPageCacheDepthLow;
-
-
- // Per-Thread Statistics
- struct PerThreadStats {
- uint64_t enqueues;
- uint64_t dequeues;
- uint64_t txnEnqueues;
- uint64_t txnDequeues;
- uint64_t txnCommits;
- uint64_t txnAborts;
- uint64_t writeWaitFailures;
- uint64_t writeBusyFailures;
- uint64_t readRecordCount;
- uint64_t readBusyFailures;
-
- };
-
- struct PerThreadStats** perThreadStatsArray;
-
- inline struct PerThreadStats* getThreadStats() {
- int index = getThreadIndex();
- struct PerThreadStats* threadStats = perThreadStatsArray[index];
- if (threadStats == 0) {
- threadStats = new(PerThreadStats);
- perThreadStatsArray[index] = threadStats;
- threadStats->enqueues = 0;
- threadStats->dequeues = 0;
- threadStats->txnEnqueues = 0;
- threadStats->txnDequeues = 0;
- threadStats->txnCommits = 0;
- threadStats->txnAborts = 0;
- threadStats->writeWaitFailures = 0;
- threadStats->writeBusyFailures = 0;
- threadStats->readRecordCount = 0;
- threadStats->readBusyFailures = 0;
-
- }
- return threadStats;
- }
-
- void aggregatePerThreadStats(struct PerThreadStats*);
-
- // Private Methods
- static void writeSchema (qpid::framing::Buffer& buf);
- void writeProperties (qpid::framing::Buffer& buf);
- void writeStatistics (qpid::framing::Buffer& buf,
- bool skipHeaders = false);
- void doMethod (std::string methodName,
- qpid::framing::Buffer& inBuf,
- qpid::framing::Buffer& outBuf);
- writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
-
- public:
-
- Journal (ManagementAgent* agent,
- Manageable* coreObject);
- ~Journal (void);
-
- void setReference(ObjectId objectId) { queueRef = objectId; }
-
-
- static void registerClass (ManagementAgent* agent);
- std::string& getPackageName (void) { return packageName; }
- std::string& getClassName (void) { return className; }
- uint8_t* getMd5Sum (void) { return md5Sum; }
-
- // Method IDs
- static const uint32_t METHOD_EXPAND = 1;
-
- // Accessor Methods
- inline void set_queueRef (ObjectId val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- queueRef = val;
- configChanged = true;
- }
- inline ObjectId& get_queueRef() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return queueRef;
- }
- inline void set_name (std::string val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- name = val;
- configChanged = true;
- }
- inline std::string& get_name() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return name;
- }
- inline void set_directory (std::string val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- directory = val;
- configChanged = true;
- }
- inline std::string& get_directory() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return directory;
- }
- inline void set_baseFileName (std::string val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- baseFileName = val;
- configChanged = true;
- }
- inline std::string& get_baseFileName() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return baseFileName;
- }
- inline void set_writePageSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- writePageSize = val;
- configChanged = true;
- }
- inline uint32_t& get_writePageSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return writePageSize;
- }
- inline void set_writePages (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- writePages = val;
- configChanged = true;
- }
- inline uint32_t& get_writePages() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return writePages;
- }
- inline void set_readPageSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- readPageSize = val;
- configChanged = true;
- }
- inline uint32_t& get_readPageSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return readPageSize;
- }
- inline void set_readPages (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- readPages = val;
- configChanged = true;
- }
- inline uint32_t& get_readPages() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return readPages;
- }
- inline void set_initialFileCount (uint16_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- initialFileCount = val;
- configChanged = true;
- }
- inline uint16_t& get_initialFileCount() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return initialFileCount;
- }
- inline void set_dataFileSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- dataFileSize = val;
- configChanged = true;
- }
- inline uint32_t& get_dataFileSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return dataFileSize;
- }
- inline void set_currentFileCount (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- currentFileCount = val;
- configChanged = true;
- }
- inline uint32_t& get_currentFileCount() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return currentFileCount;
- }
- inline void inc_recordDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- recordDepth += by;
- if (recordDepthHigh < recordDepth)
- recordDepthHigh = recordDepth;
- instChanged = true;
- }
- inline void dec_recordDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- recordDepth -= by;
- if (recordDepthLow > recordDepth)
- recordDepthLow = recordDepth;
- instChanged = true;
- }
- inline void inc_enqueues (uint64_t by = 1) {
- getThreadStats()->enqueues += by;
- instChanged = true;
- }
- inline void dec_enqueues (uint64_t by = 1) {
- getThreadStats()->enqueues -= by;
- instChanged = true;
- }
- inline void inc_dequeues (uint64_t by = 1) {
- getThreadStats()->dequeues += by;
- instChanged = true;
- }
- inline void dec_dequeues (uint64_t by = 1) {
- getThreadStats()->dequeues -= by;
- instChanged = true;
- }
- inline void inc_txnEnqueues (uint64_t by = 1) {
- getThreadStats()->txnEnqueues += by;
- instChanged = true;
- }
- inline void dec_txnEnqueues (uint64_t by = 1) {
- getThreadStats()->txnEnqueues -= by;
- instChanged = true;
- }
- inline void inc_txnDequeues (uint64_t by = 1) {
- getThreadStats()->txnDequeues += by;
- instChanged = true;
- }
- inline void dec_txnDequeues (uint64_t by = 1) {
- getThreadStats()->txnDequeues -= by;
- instChanged = true;
- }
- inline void inc_txnCommits (uint64_t by = 1) {
- getThreadStats()->txnCommits += by;
- instChanged = true;
- }
- inline void dec_txnCommits (uint64_t by = 1) {
- getThreadStats()->txnCommits -= by;
- instChanged = true;
- }
- inline void inc_txnAborts (uint64_t by = 1) {
- getThreadStats()->txnAborts += by;
- instChanged = true;
- }
- inline void dec_txnAborts (uint64_t by = 1) {
- getThreadStats()->txnAborts -= by;
- instChanged = true;
- }
- inline void inc_outstandingAIOs (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- outstandingAIOs += by;
- if (outstandingAIOsHigh < outstandingAIOs)
- outstandingAIOsHigh = outstandingAIOs;
- instChanged = true;
- }
- inline void dec_outstandingAIOs (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- outstandingAIOs -= by;
- if (outstandingAIOsLow > outstandingAIOs)
- outstandingAIOsLow = outstandingAIOs;
- instChanged = true;
- }
- inline void inc_freeFileCount (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- freeFileCount += by;
- if (freeFileCountHigh < freeFileCount)
- freeFileCountHigh = freeFileCount;
- instChanged = true;
- }
- inline void dec_freeFileCount (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- freeFileCount -= by;
- if (freeFileCountLow > freeFileCount)
- freeFileCountLow = freeFileCount;
- instChanged = true;
- }
- inline void inc_availableFileCount (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- availableFileCount += by;
- if (availableFileCountHigh < availableFileCount)
- availableFileCountHigh = availableFileCount;
- instChanged = true;
- }
- inline void dec_availableFileCount (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- availableFileCount -= by;
- if (availableFileCountLow > availableFileCount)
- availableFileCountLow = availableFileCount;
- instChanged = true;
- }
- inline void inc_writeWaitFailures (uint64_t by = 1) {
- getThreadStats()->writeWaitFailures += by;
- instChanged = true;
- }
- inline void dec_writeWaitFailures (uint64_t by = 1) {
- getThreadStats()->writeWaitFailures -= by;
- instChanged = true;
- }
- inline void inc_writeBusyFailures (uint64_t by = 1) {
- getThreadStats()->writeBusyFailures += by;
- instChanged = true;
- }
- inline void dec_writeBusyFailures (uint64_t by = 1) {
- getThreadStats()->writeBusyFailures -= by;
- instChanged = true;
- }
- inline void inc_readRecordCount (uint64_t by = 1) {
- getThreadStats()->readRecordCount += by;
- instChanged = true;
- }
- inline void dec_readRecordCount (uint64_t by = 1) {
- getThreadStats()->readRecordCount -= by;
- instChanged = true;
- }
- inline void inc_readBusyFailures (uint64_t by = 1) {
- getThreadStats()->readBusyFailures += by;
- instChanged = true;
- }
- inline void dec_readBusyFailures (uint64_t by = 1) {
- getThreadStats()->readBusyFailures -= by;
- instChanged = true;
- }
- inline void inc_writePageCacheDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- writePageCacheDepth += by;
- if (writePageCacheDepthHigh < writePageCacheDepth)
- writePageCacheDepthHigh = writePageCacheDepth;
- instChanged = true;
- }
- inline void dec_writePageCacheDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- writePageCacheDepth -= by;
- if (writePageCacheDepthLow > writePageCacheDepth)
- writePageCacheDepthLow = writePageCacheDepth;
- instChanged = true;
- }
- inline void inc_readPageCacheDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- readPageCacheDepth += by;
- if (readPageCacheDepthHigh < readPageCacheDepth)
- readPageCacheDepthHigh = readPageCacheDepth;
- instChanged = true;
- }
- inline void dec_readPageCacheDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- readPageCacheDepth -= by;
- if (readPageCacheDepthLow > readPageCacheDepth)
- readPageCacheDepthLow = readPageCacheDepth;
- instChanged = true;
- }
-
- // Event Methods
-
-};
-
-}}
-
-#endif /*!_MANAGEMENT_JOURNAL_*/
Deleted: store/trunk/cpp/lib/gen/PackageMrgstore.cpp
===================================================================
--- store/trunk/cpp/lib/gen/PackageMrgstore.cpp 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/PackageMrgstore.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,37 +0,0 @@
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "PackageMrgstore.h"
-#include "Store.h"
-#include "Journal.h"
-
-
-using namespace qpid::management;
-
-PackageMrgstore::PackageMrgstore (ManagementAgent* agent)
-{
- Store::registerClass(agent);
- Journal::registerClass(agent);
-
-}
-
Deleted: store/trunk/cpp/lib/gen/PackageMrgstore.h
===================================================================
--- store/trunk/cpp/lib/gen/PackageMrgstore.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/PackageMrgstore.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,42 +0,0 @@
-
-#ifndef _MANAGEMENT_PACKAGE_MRGSTORE_
-#define _MANAGEMENT_PACKAGE_MRGSTORE_
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/agent/ManagementAgent.h"
-
-namespace qpid {
-namespace management {
-
-class PackageMrgstore
-{
- public:
- PackageMrgstore (ManagementAgent* agent);
- ~PackageMrgstore () {}
-};
-
-}}
-
-
-#endif /*!_MANAGEMENT_PACKAGE_MRGSTORE_*/
Deleted: store/trunk/cpp/lib/gen/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/Store.cpp 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/Store.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,365 +0,0 @@
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/log/Statement.h"
-#include "qpid/framing/FieldTable.h"
-#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
-#include "Store.h"
-
-
-using namespace qpid::management;
-using namespace qpid::sys;
-using namespace qpid::framing;
-using std::string;
-
-string Store::packageName = string ("mrgstore");
-string Store::className = string ("store");
-uint8_t Store::md5Sum[16] =
- {0x18,0xd,0xd4,0x15,0xd3,0x9a,0xf,0xbe,0x3a,0x40,0xe1,0x1b,0x9e,0x5b,0x7e,0x86};
-
-Store::Store (ManagementAgent* _agent, Manageable* _core, Manageable* _parent) :
- ManagementObject(_agent, _core)
-{
- brokerRef = _parent->GetManagementObject ()->getObjectId ();
- tplTransactionDepth = 0;
- tplTransactionDepthHigh = 0;
- tplTransactionDepthLow = 0;
- tplOutstandingAIOs = 0;
- tplOutstandingAIOsHigh = 0;
- tplOutstandingAIOsLow = 0;
-
-
-
- maxThreads = agent->getMaxThreads();
- perThreadStatsArray = new struct PerThreadStats*[maxThreads];
- for (int idx = 0; idx < maxThreads; idx++)
- perThreadStatsArray[idx] = 0;
-
-}
-
-Store::~Store ()
-{
-
- for (int idx = 0; idx < maxThreads; idx++)
- if (perThreadStatsArray[idx] != 0)
- delete perThreadStatsArray[idx];
- delete[] perThreadStatsArray;
-
-}
-
-namespace {
- const string NAME("name");
- const string TYPE("type");
- const string ACCESS("access");
- const string INDEX("index");
- const string OPTIONAL("optional");
- const string UNIT("unit");
- const string MIN("min");
- const string MAX("max");
- const string MAXLEN("maxlen");
- const string DESC("desc");
- const string ARGCOUNT("argCount");
- const string ARGS("args");
- const string DIR("dir");
- const string DEFAULT("default");
-}
-
-void Store::registerClass(ManagementAgent* agent)
-{
- agent->RegisterClass(packageName, className, md5Sum, writeSchema);
-}
-
-void Store::writeSchema (Buffer& buf)
-{
- FieldTable ft;
-
- // Schema class header:
- buf.putShortString (packageName); // Package Name
- buf.putShortString (className); // Class Name
- buf.putBin128 (md5Sum); // Schema Hash
- buf.putShort (11); // Config Element Count
- buf.putShort (9); // Inst Element Count
- buf.putShort (0); // Method Count
- buf.putShort (0); // Event Count
-
- // Properties
- ft = FieldTable ();
- ft.setString (NAME, "brokerRef");
- ft.setInt (TYPE, TYPE_REF);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 1);
- ft.setInt (OPTIONAL, 0);
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "location");
- ft.setInt (TYPE, TYPE_SSTR);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (DESC, "Logical directory on disk");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "defaultInitialFileCount");
- ft.setInt (TYPE, TYPE_U16);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Default number of files initially allocated to each journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "defaultDataFileSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "RdPg");
- ft.setString (DESC, "Default size of each journal data file");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplIsInitialized");
- ft.setInt (TYPE, TYPE_BOOL);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (DESC, "Transaction prepared list has been initialized by a transactional prepare");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplDirectory");
- ft.setInt (TYPE, TYPE_SSTR);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (DESC, "Transaction prepared list directory");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplWritePageSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Page size in transaction prepared list write-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplWritePages");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "wpage");
- ft.setString (DESC, "Number of pages in transaction prepared list write-page-cache");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplInitialFileCount");
- ft.setInt (TYPE, TYPE_U16);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files initially allocated to transaction prepared list journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplDataFileSize");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Size of each journal data file in transaction prepared list journal");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplCurrentFileCount");
- ft.setInt (TYPE, TYPE_U32);
- ft.setInt (ACCESS, ACCESS_RO);
- ft.setInt (INDEX, 0);
- ft.setInt (OPTIONAL, 0);
- ft.setString (UNIT, "file");
- ft.setString (DESC, "Number of files currently allocated to transaction prepared list journal");
- buf.put (ft);
-
-
- // Statistics
- ft = FieldTable ();
- ft.setString (NAME, "tplTransactionDepth");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "txn");
- ft.setString (DESC, "Number of currently enqueued prepared transactions");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplTransactionDepthHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "txn");
- ft.setString (DESC, "Number of currently enqueued prepared transactions (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplTransactionDepthLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "txn");
- ft.setString (DESC, "Number of currently enqueued prepared transactions (Low)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplTxnPrepares");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transaction prepares on transaction prepared list");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplTxnCommits");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transaction commits on transaction prepared list");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplTxnAborts");
- ft.setInt (TYPE, TYPE_U64);
- ft.setString (UNIT, "record");
- ft.setString (DESC, "Total transaction aborts on transaction prepared list");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplOutstandingAIOs");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplOutstandingAIOsHigh");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (High)");
- buf.put (ft);
-
- ft = FieldTable ();
- ft.setString (NAME, "tplOutstandingAIOsLow");
- ft.setInt (TYPE, TYPE_U32);
- ft.setString (UNIT, "aio_op");
- ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (Low)");
- buf.put (ft);
-
-
- // Methods
-
- // Events
-
-}
-
-
-void Store::aggregatePerThreadStats(struct PerThreadStats* totals)
-{
- totals->tplTxnPrepares = 0;
- totals->tplTxnCommits = 0;
- totals->tplTxnAborts = 0;
-
- for (int idx = 0; idx < maxThreads; idx++) {
- struct PerThreadStats* threadStats = perThreadStatsArray[idx];
- if (threadStats != 0) {
- totals->tplTxnPrepares += threadStats->tplTxnPrepares;
- totals->tplTxnCommits += threadStats->tplTxnCommits;
- totals->tplTxnAborts += threadStats->tplTxnAborts;
-
- }
- }
-}
-
-
-void Store::writeProperties (Buffer& buf)
-{
- sys::Mutex::ScopedLock mutex(accessLock);
- configChanged = false;
-
- writeTimestamps (buf);
-
- brokerRef.encode(buf);
- buf.putShortString(location);
- buf.putShort(defaultInitialFileCount);
- buf.putLong(defaultDataFileSize);
- buf.putOctet(tplIsInitialized?1:0);
- buf.putShortString(tplDirectory);
- buf.putLong(tplWritePageSize);
- buf.putLong(tplWritePages);
- buf.putShort(tplInitialFileCount);
- buf.putLong(tplDataFileSize);
- buf.putLong(tplCurrentFileCount);
-
-}
-
-void Store::writeStatistics (Buffer& buf, bool skipHeaders)
-{
- sys::Mutex::ScopedLock mutex(accessLock);
- instChanged = false;
-
-
- struct PerThreadStats totals;
- aggregatePerThreadStats(&totals);
-
-
- if (!skipHeaders)
- writeTimestamps (buf);
- buf.putLong(tplTransactionDepth);
- buf.putLong(tplTransactionDepthHigh);
- buf.putLong(tplTransactionDepthLow);
- buf.putLongLong(totals.tplTxnPrepares);
- buf.putLongLong(totals.tplTxnCommits);
- buf.putLongLong(totals.tplTxnAborts);
- buf.putLong(tplOutstandingAIOs);
- buf.putLong(tplOutstandingAIOsHigh);
- buf.putLong(tplOutstandingAIOsLow);
-
-
- // Maintenance of hi-lo statistics
- tplTransactionDepthHigh = tplTransactionDepth;
- tplTransactionDepthLow = tplTransactionDepth;
- tplOutstandingAIOsHigh = tplOutstandingAIOs;
- tplOutstandingAIOsLow = tplOutstandingAIOs;
-
-
-}
-
-void Store::doMethod (string, Buffer&, Buffer& outBuf)
-{
- Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
- std::string text;
-
- outBuf.putLong(status);
- outBuf.putShortString(Manageable::StatusText(status, text));
-}
-
-
Deleted: store/trunk/cpp/lib/gen/Store.h
===================================================================
--- store/trunk/cpp/lib/gen/Store.h 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/gen/Store.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,275 +0,0 @@
-
-#ifndef _MANAGEMENT_STORE_
-#define _MANAGEMENT_STORE_
-
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
-// This source file was created by a code generator.
-// Please do not edit.
-
-#include "qpid/management/ManagementObject.h"
-#include "qpid/framing/FieldTable.h"
-#include "qpid/framing/Uuid.h"
-
-namespace qpid {
-namespace management {
-
-class Store : public ManagementObject
-{
- private:
-
- static std::string packageName;
- static std::string className;
- static uint8_t md5Sum[16];
-
-
- // Properties
- ObjectId brokerRef;
- std::string location;
- uint16_t defaultInitialFileCount;
- uint32_t defaultDataFileSize;
- uint8_t tplIsInitialized;
- std::string tplDirectory;
- uint32_t tplWritePageSize;
- uint32_t tplWritePages;
- uint16_t tplInitialFileCount;
- uint32_t tplDataFileSize;
- uint32_t tplCurrentFileCount;
-
- // Statistics
- uint32_t tplTransactionDepth;
- uint32_t tplTransactionDepthHigh;
- uint32_t tplTransactionDepthLow;
- uint32_t tplOutstandingAIOs;
- uint32_t tplOutstandingAIOsHigh;
- uint32_t tplOutstandingAIOsLow;
-
-
- // Per-Thread Statistics
- struct PerThreadStats {
- uint64_t tplTxnPrepares;
- uint64_t tplTxnCommits;
- uint64_t tplTxnAborts;
-
- };
-
- struct PerThreadStats** perThreadStatsArray;
-
- inline struct PerThreadStats* getThreadStats() {
- int index = getThreadIndex();
- struct PerThreadStats* threadStats = perThreadStatsArray[index];
- if (threadStats == 0) {
- threadStats = new(PerThreadStats);
- perThreadStatsArray[index] = threadStats;
- threadStats->tplTxnPrepares = 0;
- threadStats->tplTxnCommits = 0;
- threadStats->tplTxnAborts = 0;
-
- }
- return threadStats;
- }
-
- void aggregatePerThreadStats(struct PerThreadStats*);
-
- // Private Methods
- static void writeSchema (qpid::framing::Buffer& buf);
- void writeProperties (qpid::framing::Buffer& buf);
- void writeStatistics (qpid::framing::Buffer& buf,
- bool skipHeaders = false);
- void doMethod (std::string methodName,
- qpid::framing::Buffer& inBuf,
- qpid::framing::Buffer& outBuf);
- writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
-
- public:
-
- Store (ManagementAgent* agent,
- Manageable* coreObject, Manageable* _parent);
- ~Store (void);
-
-
-
- static void registerClass (ManagementAgent* agent);
- std::string& getPackageName (void) { return packageName; }
- std::string& getClassName (void) { return className; }
- uint8_t* getMd5Sum (void) { return md5Sum; }
-
- // Method IDs
-
- // Accessor Methods
- inline void set_brokerRef (ObjectId val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- brokerRef = val;
- configChanged = true;
- }
- inline ObjectId& get_brokerRef() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return brokerRef;
- }
- inline void set_location (std::string val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- location = val;
- configChanged = true;
- }
- inline std::string& get_location() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return location;
- }
- inline void set_defaultInitialFileCount (uint16_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- defaultInitialFileCount = val;
- configChanged = true;
- }
- inline uint16_t& get_defaultInitialFileCount() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return defaultInitialFileCount;
- }
- inline void set_defaultDataFileSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- defaultDataFileSize = val;
- configChanged = true;
- }
- inline uint32_t& get_defaultDataFileSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return defaultDataFileSize;
- }
- inline void set_tplIsInitialized (uint8_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplIsInitialized = val;
- configChanged = true;
- }
- inline uint8_t& get_tplIsInitialized() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplIsInitialized;
- }
- inline void set_tplDirectory (std::string val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplDirectory = val;
- configChanged = true;
- }
- inline std::string& get_tplDirectory() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplDirectory;
- }
- inline void set_tplWritePageSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplWritePageSize = val;
- configChanged = true;
- }
- inline uint32_t& get_tplWritePageSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplWritePageSize;
- }
- inline void set_tplWritePages (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplWritePages = val;
- configChanged = true;
- }
- inline uint32_t& get_tplWritePages() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplWritePages;
- }
- inline void set_tplInitialFileCount (uint16_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplInitialFileCount = val;
- configChanged = true;
- }
- inline uint16_t& get_tplInitialFileCount() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplInitialFileCount;
- }
- inline void set_tplDataFileSize (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplDataFileSize = val;
- configChanged = true;
- }
- inline uint32_t& get_tplDataFileSize() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplDataFileSize;
- }
- inline void set_tplCurrentFileCount (uint32_t val) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplCurrentFileCount = val;
- configChanged = true;
- }
- inline uint32_t& get_tplCurrentFileCount() {
- sys::Mutex::ScopedLock mutex(accessLock);
- return tplCurrentFileCount;
- }
- inline void inc_tplTransactionDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplTransactionDepth += by;
- if (tplTransactionDepthHigh < tplTransactionDepth)
- tplTransactionDepthHigh = tplTransactionDepth;
- instChanged = true;
- }
- inline void dec_tplTransactionDepth (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplTransactionDepth -= by;
- if (tplTransactionDepthLow > tplTransactionDepth)
- tplTransactionDepthLow = tplTransactionDepth;
- instChanged = true;
- }
- inline void inc_tplTxnPrepares (uint64_t by = 1) {
- getThreadStats()->tplTxnPrepares += by;
- instChanged = true;
- }
- inline void dec_tplTxnPrepares (uint64_t by = 1) {
- getThreadStats()->tplTxnPrepares -= by;
- instChanged = true;
- }
- inline void inc_tplTxnCommits (uint64_t by = 1) {
- getThreadStats()->tplTxnCommits += by;
- instChanged = true;
- }
- inline void dec_tplTxnCommits (uint64_t by = 1) {
- getThreadStats()->tplTxnCommits -= by;
- instChanged = true;
- }
- inline void inc_tplTxnAborts (uint64_t by = 1) {
- getThreadStats()->tplTxnAborts += by;
- instChanged = true;
- }
- inline void dec_tplTxnAborts (uint64_t by = 1) {
- getThreadStats()->tplTxnAborts -= by;
- instChanged = true;
- }
- inline void inc_tplOutstandingAIOs (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplOutstandingAIOs += by;
- if (tplOutstandingAIOsHigh < tplOutstandingAIOs)
- tplOutstandingAIOsHigh = tplOutstandingAIOs;
- instChanged = true;
- }
- inline void dec_tplOutstandingAIOs (uint32_t by = 1) {
- sys::Mutex::ScopedLock mutex(accessLock);
- tplOutstandingAIOs -= by;
- if (tplOutstandingAIOsLow > tplOutstandingAIOs)
- tplOutstandingAIOsLow = tplOutstandingAIOs;
- instChanged = true;
- }
-
- // Event Methods
-
-};
-
-}}
-
-#endif /*!_MANAGEMENT_STORE_*/
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/ArgsJournalExpand.h
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/ArgsJournalExpand.h (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/ArgsJournalExpand.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,46 @@
+
+#ifndef _ARGS_JOURNALEXPAND_
+#define _ARGS_JOURNALEXPAND_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/Args.h"
+#include <string>
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+ class ArgsJournalExpand : public ::qpid::management::Args
+{
+ public:
+ uint32_t i_by;
+
+};
+
+}}}}}
+
+#endif /*!_ARGS_JOURNALEXPAND_*/
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,576 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/log/Statement.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/management/Manageable.h"
+#include "qpid/agent/ManagementAgent.h"
+#include "Journal.h"
+#include "ArgsJournalExpand.h"
+
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string Journal::packageName = string ("com.redhat.rhm.store");
+string Journal::className = string ("journal");
+uint8_t Journal::md5Sum[16] =
+ {0x1e,0x63,0xa4,0x3d,0xa3,0x1b,0xc0,0x1,0x1,0x70,0x5a,0x2a,0xb4,0xa,0x1b,0x4e};
+
+Journal::Journal (ManagementAgent* _agent, Manageable* _core) :
+ ManagementObject(_agent, _core)
+{
+
+ recordDepth = 0;
+ recordDepthHigh = 0;
+ recordDepthLow = 0;
+ outstandingAIOs = 0;
+ outstandingAIOsHigh = 0;
+ outstandingAIOsLow = 0;
+ freeFileCount = 0;
+ freeFileCountHigh = 0;
+ freeFileCountLow = 0;
+ availableFileCount = 0;
+ availableFileCountHigh = 0;
+ availableFileCountLow = 0;
+ writePageCacheDepth = 0;
+ writePageCacheDepthHigh = 0;
+ writePageCacheDepthLow = 0;
+ readPageCacheDepth = 0;
+ readPageCacheDepthHigh = 0;
+ readPageCacheDepthLow = 0;
+
+
+
+ maxThreads = agent->getMaxThreads();
+ perThreadStatsArray = new struct PerThreadStats*[maxThreads];
+ for (int idx = 0; idx < maxThreads; idx++)
+ perThreadStatsArray[idx] = 0;
+
+}
+
+Journal::~Journal ()
+{
+
+ for (int idx = 0; idx < maxThreads; idx++)
+ if (perThreadStatsArray[idx] != 0)
+ delete perThreadStatsArray[idx];
+ delete[] perThreadStatsArray;
+
+}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string ACCESS("access");
+ const string INDEX("index");
+ const string OPTIONAL("optional");
+ const string UNIT("unit");
+ const string MIN("min");
+ const string MAX("max");
+ const string MAXLEN("maxlen");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+ const string DIR("dir");
+ const string DEFAULT("default");
+}
+
+void Journal::registerClass(ManagementAgent* agent)
+{
+ agent->RegisterClass(packageName, className, md5Sum, writeSchema);
+}
+
+void Journal::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (className); // Class Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (11); // Config Element Count
+ buf.putShort (28); // Inst Element Count
+ buf.putShort (1); // Method Count
+ buf.putShort (0); // Event Count
+
+ // Properties
+ ft = FieldTable ();
+ ft.setString (NAME, "queueRef");
+ ft.setInt (TYPE, TYPE_REF);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "name");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 1);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "directory");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Directory containing journal files");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "baseFileName");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Base filename prefix for journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Number of pages in write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Number of pages in read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "initialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files initially allocated to this journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "dataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Size of each journal data file");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "currentFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files currently allocated to this journal");
+ buf.put (ft);
+
+
+ // Statistics
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable messages)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable messages) (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable messages) (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "enqueues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total enqueued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "dequeues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total dequeued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnEnqueues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional enqueued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnDequeues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional dequeued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnCommits");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional commit records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnAborts");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional abort records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOs");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOsHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOsLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes.");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCountHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes. (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCountLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files trapped in holes. (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding holes");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCountHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding holes (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCountLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding holes (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writeWaitFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Wait failures on write");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writeBusyFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Busy failures on write");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readRecordCount");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Records read from the journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readBusyFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Busy failures on read");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache (Low)");
+ buf.put (ft);
+
+
+ // Methods
+ ft = FieldTable ();
+ ft.setString (NAME, "expand");
+ ft.setInt (ARGCOUNT, 1);
+ ft.setString (DESC, "Increase number of files allocated for this journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "by");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DIR, "I");
+ ft.setString (DESC, "Number of files to increase journal size by");
+ buf.put (ft);
+
+
+ // Events
+
+}
+
+
+void Journal::aggregatePerThreadStats(struct PerThreadStats* totals)
+{
+ totals->enqueues = 0;
+ totals->dequeues = 0;
+ totals->txnEnqueues = 0;
+ totals->txnDequeues = 0;
+ totals->txnCommits = 0;
+ totals->txnAborts = 0;
+ totals->writeWaitFailures = 0;
+ totals->writeBusyFailures = 0;
+ totals->readRecordCount = 0;
+ totals->readBusyFailures = 0;
+
+ for (int idx = 0; idx < maxThreads; idx++) {
+ struct PerThreadStats* threadStats = perThreadStatsArray[idx];
+ if (threadStats != 0) {
+ totals->enqueues += threadStats->enqueues;
+ totals->dequeues += threadStats->dequeues;
+ totals->txnEnqueues += threadStats->txnEnqueues;
+ totals->txnDequeues += threadStats->txnDequeues;
+ totals->txnCommits += threadStats->txnCommits;
+ totals->txnAborts += threadStats->txnAborts;
+ totals->writeWaitFailures += threadStats->writeWaitFailures;
+ totals->writeBusyFailures += threadStats->writeBusyFailures;
+ totals->readRecordCount += threadStats->readRecordCount;
+ totals->readBusyFailures += threadStats->readBusyFailures;
+
+ }
+ }
+}
+
+
+void Journal::writeProperties (Buffer& buf)
+{
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ configChanged = false;
+
+ writeTimestamps (buf);
+
+ queueRef.encode(buf);
+ buf.putShortString(name);
+ buf.putShortString(directory);
+ buf.putShortString(baseFileName);
+ buf.putLong(writePageSize);
+ buf.putLong(writePages);
+ buf.putLong(readPageSize);
+ buf.putLong(readPages);
+ buf.putShort(initialFileCount);
+ buf.putLong(dataFileSize);
+ buf.putLong(currentFileCount);
+
+}
+
+void Journal::writeStatistics (Buffer& buf, bool skipHeaders)
+{
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ instChanged = false;
+
+
+ struct PerThreadStats totals;
+ aggregatePerThreadStats(&totals);
+
+
+ if (!skipHeaders)
+ writeTimestamps (buf);
+ buf.putLong(recordDepth);
+ buf.putLong(recordDepthHigh);
+ buf.putLong(recordDepthLow);
+ buf.putLongLong(totals.enqueues);
+ buf.putLongLong(totals.dequeues);
+ buf.putLongLong(totals.txnEnqueues);
+ buf.putLongLong(totals.txnDequeues);
+ buf.putLongLong(totals.txnCommits);
+ buf.putLongLong(totals.txnAborts);
+ buf.putLong(outstandingAIOs);
+ buf.putLong(outstandingAIOsHigh);
+ buf.putLong(outstandingAIOsLow);
+ buf.putLong(freeFileCount);
+ buf.putLong(freeFileCountHigh);
+ buf.putLong(freeFileCountLow);
+ buf.putLong(availableFileCount);
+ buf.putLong(availableFileCountHigh);
+ buf.putLong(availableFileCountLow);
+ buf.putLongLong(totals.writeWaitFailures);
+ buf.putLongLong(totals.writeBusyFailures);
+ buf.putLongLong(totals.readRecordCount);
+ buf.putLongLong(totals.readBusyFailures);
+ buf.putLong(writePageCacheDepth);
+ buf.putLong(writePageCacheDepthHigh);
+ buf.putLong(writePageCacheDepthLow);
+ buf.putLong(readPageCacheDepth);
+ buf.putLong(readPageCacheDepthHigh);
+ buf.putLong(readPageCacheDepthLow);
+
+
+ // Maintenance of hi-lo statistics
+ recordDepthHigh = recordDepth;
+ recordDepthLow = recordDepth;
+ outstandingAIOsHigh = outstandingAIOs;
+ outstandingAIOsLow = outstandingAIOs;
+ freeFileCountHigh = freeFileCount;
+ freeFileCountLow = freeFileCount;
+ availableFileCountHigh = availableFileCount;
+ availableFileCountLow = availableFileCount;
+ writePageCacheDepthHigh = writePageCacheDepth;
+ writePageCacheDepthLow = writePageCacheDepth;
+ readPageCacheDepthHigh = readPageCacheDepth;
+ readPageCacheDepthLow = readPageCacheDepth;
+
+
+}
+
+void Journal::doMethod (string methodName, Buffer& inBuf, Buffer& outBuf)
+{
+ Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
+ std::string text;
+
+ if (methodName == "expand") {
+ ArgsJournalExpand ioArgs;
+ ioArgs.i_by = inBuf.getLong();
+ status = coreObject->ManagementMethod (METHOD_EXPAND, ioArgs, text);
+ outBuf.putLong (status);
+ outBuf.putShortString (::qpid::management::Manageable::StatusText (status, text));
+ return;
+ }
+
+ outBuf.putLong(status);
+ outBuf.putShortString(Manageable::StatusText(status, text));
+}
+
+
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.h (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Journal.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,419 @@
+
+#ifndef _MANAGEMENT_JOURNAL_
+#define _MANAGEMENT_JOURNAL_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/ManagementObject.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class Journal : public ::qpid::management::ManagementObject
+{
+ private:
+
+ static std::string packageName;
+ static std::string className;
+ static uint8_t md5Sum[16];
+
+
+ // Properties
+ ::qpid::management::ObjectId queueRef;
+ std::string name;
+ std::string directory;
+ std::string baseFileName;
+ uint32_t writePageSize;
+ uint32_t writePages;
+ uint32_t readPageSize;
+ uint32_t readPages;
+ uint16_t initialFileCount;
+ uint32_t dataFileSize;
+ uint32_t currentFileCount;
+
+ // Statistics
+ uint32_t recordDepth;
+ uint32_t recordDepthHigh;
+ uint32_t recordDepthLow;
+ uint32_t outstandingAIOs;
+ uint32_t outstandingAIOsHigh;
+ uint32_t outstandingAIOsLow;
+ uint32_t freeFileCount;
+ uint32_t freeFileCountHigh;
+ uint32_t freeFileCountLow;
+ uint32_t availableFileCount;
+ uint32_t availableFileCountHigh;
+ uint32_t availableFileCountLow;
+ uint32_t writePageCacheDepth;
+ uint32_t writePageCacheDepthHigh;
+ uint32_t writePageCacheDepthLow;
+ uint32_t readPageCacheDepth;
+ uint32_t readPageCacheDepthHigh;
+ uint32_t readPageCacheDepthLow;
+
+
+ // Per-Thread Statistics
+ struct PerThreadStats {
+ uint64_t enqueues;
+ uint64_t dequeues;
+ uint64_t txnEnqueues;
+ uint64_t txnDequeues;
+ uint64_t txnCommits;
+ uint64_t txnAborts;
+ uint64_t writeWaitFailures;
+ uint64_t writeBusyFailures;
+ uint64_t readRecordCount;
+ uint64_t readBusyFailures;
+
+ };
+
+ struct PerThreadStats** perThreadStatsArray;
+
+ inline struct PerThreadStats* getThreadStats() {
+ int index = getThreadIndex();
+ struct PerThreadStats* threadStats = perThreadStatsArray[index];
+ if (threadStats == 0) {
+ threadStats = new(PerThreadStats);
+ perThreadStatsArray[index] = threadStats;
+ threadStats->enqueues = 0;
+ threadStats->dequeues = 0;
+ threadStats->txnEnqueues = 0;
+ threadStats->txnDequeues = 0;
+ threadStats->txnCommits = 0;
+ threadStats->txnAborts = 0;
+ threadStats->writeWaitFailures = 0;
+ threadStats->writeBusyFailures = 0;
+ threadStats->readRecordCount = 0;
+ threadStats->readBusyFailures = 0;
+
+ }
+ return threadStats;
+ }
+
+ void aggregatePerThreadStats(struct PerThreadStats*);
+
+ // Private Methods
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ void writeProperties (::qpid::framing::Buffer& buf);
+ void writeStatistics (::qpid::framing::Buffer& buf,
+ bool skipHeaders = false);
+ void doMethod (std::string methodName,
+ ::qpid::framing::Buffer& inBuf,
+ ::qpid::framing::Buffer& outBuf);
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ public:
+
+ Journal (::qpid::management::ManagementAgent* agent,
+ ::qpid::management::Manageable* coreObject);
+ ~Journal (void);
+
+ void setReference(::qpid::management::ObjectId objectId) { queueRef = objectId; }
+
+
+ static void registerClass (::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName (void) { return packageName; }
+ std::string& getClassName (void) { return className; }
+ uint8_t* getMd5Sum (void) { return md5Sum; }
+
+ // Method IDs
+ static const uint32_t METHOD_EXPAND = 1;
+
+ // Accessor Methods
+ inline void set_queueRef (const ::qpid::management::ObjectId& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ queueRef = val;
+ configChanged = true;
+ }
+ inline const ::qpid::management::ObjectId& get_queueRef() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return queueRef;
+ }
+ inline void set_name (const std::string& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ name = val;
+ configChanged = true;
+ }
+ inline const std::string& get_name() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return name;
+ }
+ inline void set_directory (const std::string& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ directory = val;
+ configChanged = true;
+ }
+ inline const std::string& get_directory() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return directory;
+ }
+ inline void set_baseFileName (const std::string& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ baseFileName = val;
+ configChanged = true;
+ }
+ inline const std::string& get_baseFileName() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return baseFileName;
+ }
+ inline void set_writePageSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ writePageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_writePageSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return writePageSize;
+ }
+ inline void set_writePages (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ writePages = val;
+ configChanged = true;
+ }
+ inline uint32_t get_writePages() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return writePages;
+ }
+ inline void set_readPageSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ readPageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_readPageSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return readPageSize;
+ }
+ inline void set_readPages (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ readPages = val;
+ configChanged = true;
+ }
+ inline uint32_t get_readPages() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return readPages;
+ }
+ inline void set_initialFileCount (uint16_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ initialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t get_initialFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return initialFileCount;
+ }
+ inline void set_dataFileSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ dataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_dataFileSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return dataFileSize;
+ }
+ inline void set_currentFileCount (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ currentFileCount = val;
+ configChanged = true;
+ }
+ inline uint32_t get_currentFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return currentFileCount;
+ }
+ inline void inc_recordDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ recordDepth += by;
+ if (recordDepthHigh < recordDepth)
+ recordDepthHigh = recordDepth;
+ instChanged = true;
+ }
+ inline void dec_recordDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ recordDepth -= by;
+ if (recordDepthLow > recordDepth)
+ recordDepthLow = recordDepth;
+ instChanged = true;
+ }
+ inline void inc_enqueues (uint64_t by = 1) {
+ getThreadStats()->enqueues += by;
+ instChanged = true;
+ }
+ inline void dec_enqueues (uint64_t by = 1) {
+ getThreadStats()->enqueues -= by;
+ instChanged = true;
+ }
+ inline void inc_dequeues (uint64_t by = 1) {
+ getThreadStats()->dequeues += by;
+ instChanged = true;
+ }
+ inline void dec_dequeues (uint64_t by = 1) {
+ getThreadStats()->dequeues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnEnqueues (uint64_t by = 1) {
+ getThreadStats()->txnEnqueues += by;
+ instChanged = true;
+ }
+ inline void dec_txnEnqueues (uint64_t by = 1) {
+ getThreadStats()->txnEnqueues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnDequeues (uint64_t by = 1) {
+ getThreadStats()->txnDequeues += by;
+ instChanged = true;
+ }
+ inline void dec_txnDequeues (uint64_t by = 1) {
+ getThreadStats()->txnDequeues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnCommits (uint64_t by = 1) {
+ getThreadStats()->txnCommits += by;
+ instChanged = true;
+ }
+ inline void dec_txnCommits (uint64_t by = 1) {
+ getThreadStats()->txnCommits -= by;
+ instChanged = true;
+ }
+ inline void inc_txnAborts (uint64_t by = 1) {
+ getThreadStats()->txnAborts += by;
+ instChanged = true;
+ }
+ inline void dec_txnAborts (uint64_t by = 1) {
+ getThreadStats()->txnAborts -= by;
+ instChanged = true;
+ }
+ inline void inc_outstandingAIOs (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ outstandingAIOs += by;
+ if (outstandingAIOsHigh < outstandingAIOs)
+ outstandingAIOsHigh = outstandingAIOs;
+ instChanged = true;
+ }
+ inline void dec_outstandingAIOs (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ outstandingAIOs -= by;
+ if (outstandingAIOsLow > outstandingAIOs)
+ outstandingAIOsLow = outstandingAIOs;
+ instChanged = true;
+ }
+ inline void inc_freeFileCount (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ freeFileCount += by;
+ if (freeFileCountHigh < freeFileCount)
+ freeFileCountHigh = freeFileCount;
+ instChanged = true;
+ }
+ inline void dec_freeFileCount (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ freeFileCount -= by;
+ if (freeFileCountLow > freeFileCount)
+ freeFileCountLow = freeFileCount;
+ instChanged = true;
+ }
+ inline void inc_availableFileCount (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ availableFileCount += by;
+ if (availableFileCountHigh < availableFileCount)
+ availableFileCountHigh = availableFileCount;
+ instChanged = true;
+ }
+ inline void dec_availableFileCount (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ availableFileCount -= by;
+ if (availableFileCountLow > availableFileCount)
+ availableFileCountLow = availableFileCount;
+ instChanged = true;
+ }
+ inline void inc_writeWaitFailures (uint64_t by = 1) {
+ getThreadStats()->writeWaitFailures += by;
+ instChanged = true;
+ }
+ inline void dec_writeWaitFailures (uint64_t by = 1) {
+ getThreadStats()->writeWaitFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_writeBusyFailures (uint64_t by = 1) {
+ getThreadStats()->writeBusyFailures += by;
+ instChanged = true;
+ }
+ inline void dec_writeBusyFailures (uint64_t by = 1) {
+ getThreadStats()->writeBusyFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_readRecordCount (uint64_t by = 1) {
+ getThreadStats()->readRecordCount += by;
+ instChanged = true;
+ }
+ inline void dec_readRecordCount (uint64_t by = 1) {
+ getThreadStats()->readRecordCount -= by;
+ instChanged = true;
+ }
+ inline void inc_readBusyFailures (uint64_t by = 1) {
+ getThreadStats()->readBusyFailures += by;
+ instChanged = true;
+ }
+ inline void dec_readBusyFailures (uint64_t by = 1) {
+ getThreadStats()->readBusyFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_writePageCacheDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ writePageCacheDepth += by;
+ if (writePageCacheDepthHigh < writePageCacheDepth)
+ writePageCacheDepthHigh = writePageCacheDepth;
+ instChanged = true;
+ }
+ inline void dec_writePageCacheDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ writePageCacheDepth -= by;
+ if (writePageCacheDepthLow > writePageCacheDepth)
+ writePageCacheDepthLow = writePageCacheDepth;
+ instChanged = true;
+ }
+ inline void inc_readPageCacheDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ readPageCacheDepth += by;
+ if (readPageCacheDepthHigh < readPageCacheDepth)
+ readPageCacheDepthHigh = readPageCacheDepth;
+ instChanged = true;
+ }
+ inline void dec_readPageCacheDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ readPageCacheDepth -= by;
+ if (readPageCacheDepthLow > readPageCacheDepth)
+ readPageCacheDepthLow = readPageCacheDepth;
+ instChanged = true;
+ }
+
+ // Event Methods
+
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_JOURNAL_*/
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.cpp
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,37 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "Package.h"
+#include "Store.h"
+#include "Journal.h"
+
+
+using namespace qmf::com::redhat::rhm::store;
+
+Package::Package (::qpid::management::ManagementAgent* agent)
+{
+ Store::registerClass(agent);
+ Journal::registerClass(agent);
+
+}
+
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.h
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.h (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Package.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,46 @@
+
+#ifndef _MANAGEMENT_PACKAGE_COM_REDHAT_RHM_STORE_
+#define _MANAGEMENT_PACKAGE_COM_REDHAT_RHM_STORE_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/agent/ManagementAgent.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class Package
+{
+ public:
+ Package (::qpid::management::ManagementAgent* agent);
+ ~Package () {}
+};
+
+}}}}}
+
+
+#endif /*!_MANAGEMENT_PACKAGE_COM_REDHAT_RHM_STORE_*/
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.cpp 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,368 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/log/Statement.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/management/Manageable.h"
+#include "qpid/agent/ManagementAgent.h"
+#include "Store.h"
+
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string Store::packageName = string ("com.redhat.rhm.store");
+string Store::className = string ("store");
+uint8_t Store::md5Sum[16] =
+ {0x18,0xd,0xd4,0x15,0xd3,0x9a,0xf,0xbe,0x3a,0x40,0xe1,0x1b,0x9e,0x5b,0x7e,0x86};
+
+Store::Store (ManagementAgent* _agent, Manageable* _core, ::qpid::management::Manageable* _parent) :
+ ManagementObject(_agent, _core)
+{
+ brokerRef = _parent->GetManagementObject ()->getObjectId ();
+ tplTransactionDepth = 0;
+ tplTransactionDepthHigh = 0;
+ tplTransactionDepthLow = 0;
+ tplOutstandingAIOs = 0;
+ tplOutstandingAIOsHigh = 0;
+ tplOutstandingAIOsLow = 0;
+
+
+
+ maxThreads = agent->getMaxThreads();
+ perThreadStatsArray = new struct PerThreadStats*[maxThreads];
+ for (int idx = 0; idx < maxThreads; idx++)
+ perThreadStatsArray[idx] = 0;
+
+}
+
+Store::~Store ()
+{
+
+ for (int idx = 0; idx < maxThreads; idx++)
+ if (perThreadStatsArray[idx] != 0)
+ delete perThreadStatsArray[idx];
+ delete[] perThreadStatsArray;
+
+}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string ACCESS("access");
+ const string INDEX("index");
+ const string OPTIONAL("optional");
+ const string UNIT("unit");
+ const string MIN("min");
+ const string MAX("max");
+ const string MAXLEN("maxlen");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+ const string DIR("dir");
+ const string DEFAULT("default");
+}
+
+void Store::registerClass(ManagementAgent* agent)
+{
+ agent->RegisterClass(packageName, className, md5Sum, writeSchema);
+}
+
+void Store::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (className); // Class Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (11); // Config Element Count
+ buf.putShort (9); // Inst Element Count
+ buf.putShort (0); // Method Count
+ buf.putShort (0); // Event Count
+
+ // Properties
+ ft = FieldTable ();
+ ft.setString (NAME, "brokerRef");
+ ft.setInt (TYPE, TYPE_REF);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 1);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "location");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Logical directory on disk");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "defaultInitialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Default number of files initially allocated to each journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "defaultDataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "RdPg");
+ ft.setString (DESC, "Default size of each journal data file");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplIsInitialized");
+ ft.setInt (TYPE, TYPE_BOOL);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Transaction prepared list has been initialized by a transactional prepare");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplDirectory");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Transaction prepared list directory");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplWritePageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in transaction prepared list write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplWritePages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Number of pages in transaction prepared list write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplInitialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files initially allocated to transaction prepared list journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplDataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Size of each journal data file in transaction prepared list journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplCurrentFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files currently allocated to transaction prepared list journal");
+ buf.put (ft);
+
+
+ // Statistics
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared transactions");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared transactions (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared transactions (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnPrepares");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction prepares on transaction prepared list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnCommits");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction commits on transaction prepared list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnAborts");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction aborts on transaction prepared list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOs");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOsHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOsLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO system (Low)");
+ buf.put (ft);
+
+
+ // Methods
+
+ // Events
+
+}
+
+
+void Store::aggregatePerThreadStats(struct PerThreadStats* totals)
+{
+ totals->tplTxnPrepares = 0;
+ totals->tplTxnCommits = 0;
+ totals->tplTxnAborts = 0;
+
+ for (int idx = 0; idx < maxThreads; idx++) {
+ struct PerThreadStats* threadStats = perThreadStatsArray[idx];
+ if (threadStats != 0) {
+ totals->tplTxnPrepares += threadStats->tplTxnPrepares;
+ totals->tplTxnCommits += threadStats->tplTxnCommits;
+ totals->tplTxnAborts += threadStats->tplTxnAborts;
+
+ }
+ }
+}
+
+
+void Store::writeProperties (Buffer& buf)
+{
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ configChanged = false;
+
+ writeTimestamps (buf);
+
+ brokerRef.encode(buf);
+ buf.putShortString(location);
+ buf.putShort(defaultInitialFileCount);
+ buf.putLong(defaultDataFileSize);
+ buf.putOctet(tplIsInitialized?1:0);
+ buf.putShortString(tplDirectory);
+ buf.putLong(tplWritePageSize);
+ buf.putLong(tplWritePages);
+ buf.putShort(tplInitialFileCount);
+ buf.putLong(tplDataFileSize);
+ buf.putLong(tplCurrentFileCount);
+
+}
+
+void Store::writeStatistics (Buffer& buf, bool skipHeaders)
+{
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ instChanged = false;
+
+
+ struct PerThreadStats totals;
+ aggregatePerThreadStats(&totals);
+
+
+ if (!skipHeaders)
+ writeTimestamps (buf);
+ buf.putLong(tplTransactionDepth);
+ buf.putLong(tplTransactionDepthHigh);
+ buf.putLong(tplTransactionDepthLow);
+ buf.putLongLong(totals.tplTxnPrepares);
+ buf.putLongLong(totals.tplTxnCommits);
+ buf.putLongLong(totals.tplTxnAborts);
+ buf.putLong(tplOutstandingAIOs);
+ buf.putLong(tplOutstandingAIOsHigh);
+ buf.putLong(tplOutstandingAIOsLow);
+
+
+ // Maintenance of hi-lo statistics
+ tplTransactionDepthHigh = tplTransactionDepth;
+ tplTransactionDepthLow = tplTransactionDepth;
+ tplOutstandingAIOsHigh = tplOutstandingAIOs;
+ tplOutstandingAIOsLow = tplOutstandingAIOs;
+
+
+}
+
+void Store::doMethod (string, Buffer&, Buffer& outBuf)
+{
+ Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
+ std::string text;
+
+ outBuf.putLong(status);
+ outBuf.putShortString(Manageable::StatusText(status, text));
+}
+
+
Added: store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.h
===================================================================
--- store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.h (rev 0)
+++ store/trunk/cpp/lib/gen/com/redhat/rhm/store/Store.h 2008-09-15 16:04:28 UTC (rev 2475)
@@ -0,0 +1,279 @@
+
+#ifndef _MANAGEMENT_STORE_
+#define _MANAGEMENT_STORE_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/ManagementObject.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class Store : public ::qpid::management::ManagementObject
+{
+ private:
+
+ static std::string packageName;
+ static std::string className;
+ static uint8_t md5Sum[16];
+
+
+ // Properties
+ ::qpid::management::ObjectId brokerRef;
+ std::string location;
+ uint16_t defaultInitialFileCount;
+ uint32_t defaultDataFileSize;
+ uint8_t tplIsInitialized;
+ std::string tplDirectory;
+ uint32_t tplWritePageSize;
+ uint32_t tplWritePages;
+ uint16_t tplInitialFileCount;
+ uint32_t tplDataFileSize;
+ uint32_t tplCurrentFileCount;
+
+ // Statistics
+ uint32_t tplTransactionDepth;
+ uint32_t tplTransactionDepthHigh;
+ uint32_t tplTransactionDepthLow;
+ uint32_t tplOutstandingAIOs;
+ uint32_t tplOutstandingAIOsHigh;
+ uint32_t tplOutstandingAIOsLow;
+
+
+ // Per-Thread Statistics
+ struct PerThreadStats {
+ uint64_t tplTxnPrepares;
+ uint64_t tplTxnCommits;
+ uint64_t tplTxnAborts;
+
+ };
+
+ struct PerThreadStats** perThreadStatsArray;
+
+ inline struct PerThreadStats* getThreadStats() {
+ int index = getThreadIndex();
+ struct PerThreadStats* threadStats = perThreadStatsArray[index];
+ if (threadStats == 0) {
+ threadStats = new(PerThreadStats);
+ perThreadStatsArray[index] = threadStats;
+ threadStats->tplTxnPrepares = 0;
+ threadStats->tplTxnCommits = 0;
+ threadStats->tplTxnAborts = 0;
+
+ }
+ return threadStats;
+ }
+
+ void aggregatePerThreadStats(struct PerThreadStats*);
+
+ // Private Methods
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ void writeProperties (::qpid::framing::Buffer& buf);
+ void writeStatistics (::qpid::framing::Buffer& buf,
+ bool skipHeaders = false);
+ void doMethod (std::string methodName,
+ ::qpid::framing::Buffer& inBuf,
+ ::qpid::framing::Buffer& outBuf);
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ public:
+
+ Store (::qpid::management::ManagementAgent* agent,
+ ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent);
+ ~Store (void);
+
+
+
+ static void registerClass (::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName (void) { return packageName; }
+ std::string& getClassName (void) { return className; }
+ uint8_t* getMd5Sum (void) { return md5Sum; }
+
+ // Method IDs
+
+ // Accessor Methods
+ inline void set_brokerRef (const ::qpid::management::ObjectId& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ brokerRef = val;
+ configChanged = true;
+ }
+ inline const ::qpid::management::ObjectId& get_brokerRef() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return brokerRef;
+ }
+ inline void set_location (const std::string& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ location = val;
+ configChanged = true;
+ }
+ inline const std::string& get_location() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return location;
+ }
+ inline void set_defaultInitialFileCount (uint16_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ defaultInitialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t get_defaultInitialFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return defaultInitialFileCount;
+ }
+ inline void set_defaultDataFileSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ defaultDataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_defaultDataFileSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return defaultDataFileSize;
+ }
+ inline void set_tplIsInitialized (uint8_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplIsInitialized = val;
+ configChanged = true;
+ }
+ inline uint8_t get_tplIsInitialized() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplIsInitialized;
+ }
+ inline void set_tplDirectory (const std::string& val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplDirectory = val;
+ configChanged = true;
+ }
+ inline const std::string& get_tplDirectory() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplDirectory;
+ }
+ inline void set_tplWritePageSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplWritePageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_tplWritePageSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplWritePageSize;
+ }
+ inline void set_tplWritePages (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplWritePages = val;
+ configChanged = true;
+ }
+ inline uint32_t get_tplWritePages() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplWritePages;
+ }
+ inline void set_tplInitialFileCount (uint16_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplInitialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t get_tplInitialFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplInitialFileCount;
+ }
+ inline void set_tplDataFileSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplDataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_tplDataFileSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplDataFileSize;
+ }
+ inline void set_tplCurrentFileCount (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplCurrentFileCount = val;
+ configChanged = true;
+ }
+ inline uint32_t get_tplCurrentFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return tplCurrentFileCount;
+ }
+ inline void inc_tplTransactionDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplTransactionDepth += by;
+ if (tplTransactionDepthHigh < tplTransactionDepth)
+ tplTransactionDepthHigh = tplTransactionDepth;
+ instChanged = true;
+ }
+ inline void dec_tplTransactionDepth (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplTransactionDepth -= by;
+ if (tplTransactionDepthLow > tplTransactionDepth)
+ tplTransactionDepthLow = tplTransactionDepth;
+ instChanged = true;
+ }
+ inline void inc_tplTxnPrepares (uint64_t by = 1) {
+ getThreadStats()->tplTxnPrepares += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnPrepares (uint64_t by = 1) {
+ getThreadStats()->tplTxnPrepares -= by;
+ instChanged = true;
+ }
+ inline void inc_tplTxnCommits (uint64_t by = 1) {
+ getThreadStats()->tplTxnCommits += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnCommits (uint64_t by = 1) {
+ getThreadStats()->tplTxnCommits -= by;
+ instChanged = true;
+ }
+ inline void inc_tplTxnAborts (uint64_t by = 1) {
+ getThreadStats()->tplTxnAborts += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnAborts (uint64_t by = 1) {
+ getThreadStats()->tplTxnAborts -= by;
+ instChanged = true;
+ }
+ inline void inc_tplOutstandingAIOs (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplOutstandingAIOs += by;
+ if (tplOutstandingAIOsHigh < tplOutstandingAIOs)
+ tplOutstandingAIOsHigh = tplOutstandingAIOs;
+ instChanged = true;
+ }
+ inline void dec_tplOutstandingAIOs (uint32_t by = 1) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ tplOutstandingAIOs -= by;
+ if (tplOutstandingAIOsLow > tplOutstandingAIOs)
+ tplOutstandingAIOsLow = tplOutstandingAIOs;
+ instChanged = true;
+ }
+
+ // Event Methods
+
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_STORE_*/
Modified: store/trunk/cpp/lib/qmf-schema.xml
===================================================================
--- store/trunk/cpp/lib/qmf-schema.xml 2008-09-15 15:58:02 UTC (rev 2474)
+++ store/trunk/cpp/lib/qmf-schema.xml 2008-09-15 16:04:28 UTC (rev 2475)
@@ -1,4 +1,4 @@
-<schema package="mrgstore">
+<schema package="com.redhat.rhm.store">
<!--
License Text
17 years, 7 months
rhmessaging commits: r2474 - in mgmt/trunk/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-15 11:58:02 -0400 (Mon, 15 Sep 2008)
New Revision: 2474
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/cumin/brokerlink.py
mgmt/trunk/cumin/python/wooly/__init__.py
mgmt/trunk/cumin/python/wooly/forms.py
Log:
Generalize and replace get_parent_named on FormField with
get_ancestor(name) on Widget
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-09-15 14:44:23 UTC (rev 2473)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-09-15 15:58:02 UTC (rev 2474)
@@ -284,8 +284,7 @@
return self.phase.path
def get_args(self, session):
- broker = self.get_parent_named("broker")
- reg = broker.get_object(session)
+ reg = self.frame.get_ancestor("broker").get_object(session)
return (reg.getDefaultVhost(),)
class Errors(Attribute):
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-09-15 14:44:23 UTC (rev 2473)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-09-15 15:58:02 UTC (rev 2474)
@@ -378,10 +378,7 @@
return self.phase.path
def render_exchanges(self, session, *args):
-
- #reg = self.frame.frame.frame.get_object(session)
- broker = self.get_parent_named("broker")
- reg = broker.get_object(session)
+ reg = self.frame.get_ancestor("broker").get_object(session)
vhost = reg.getDefaultVhost()
sortedExchanges = sorted_by(vhost.exchanges)
@@ -665,4 +662,4 @@
bridge = Bridge.get(id)
return "<td>%s</td><td>%s</td>" % (bridge.dest, bridge.key)
-
\ No newline at end of file
+
Modified: mgmt/trunk/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/__init__.py 2008-09-15 14:44:23 UTC (rev 2473)
+++ mgmt/trunk/cumin/python/wooly/__init__.py 2008-09-15 15:58:02 UTC (rev 2474)
@@ -164,6 +164,11 @@
self.parameters.append(parameter)
parameter.widget = self
+ def get_ancestor(self, name):
+ for anc in reversed(self.ancestors):
+ if anc.name == name:
+ return anc
+
@classmethod
def get_module_strings(cls):
module = sys.modules[cls.__module__]
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-09-15 14:44:23 UTC (rev 2473)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-09-15 15:58:02 UTC (rev 2474)
@@ -295,13 +295,6 @@
if self.__errors.attr.get(session):
return self.__errors.render(session)
- def get_parent_named(self, name):
- progenitor = self.parent
- while progenitor:
- if progenitor.path.endswith(name):
- return progenitor
- progenitor = progenitor.parent
-
class FormFieldErrors(ItemSet):
def __init__(self, app, name):
super(FormFieldErrors, self).__init__(app, name)
17 years, 7 months
rhmessaging commits: r2473 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-15 10:44:23 -0400 (Mon, 15 Sep 2008)
New Revision: 2473
Modified:
mgmt/trunk/cumin/python/wooly/forms.strings
Log:
Add missing hidden inputs to field form html
Modified: mgmt/trunk/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.strings 2008-09-15 11:41:48 UTC (rev 2472)
+++ mgmt/trunk/cumin/python/wooly/forms.strings 2008-09-15 14:44:23 UTC (rev 2473)
@@ -48,6 +48,7 @@
div.field div.title {
font-weight: bold;
+ font-size: 0.9em;
margin: 0 0 1em 0;
}
@@ -78,4 +79,5 @@
[FieldForm.html]
<form id="{id}">
{fields}
+ <div>{hidden_inputs}</div>
</form>
17 years, 7 months
rhmessaging commits: r2472 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-09-15 07:41:48 -0400 (Mon, 15 Sep 2008)
New Revision: 2472
Modified:
store/trunk/cpp/lib/jrnl/deq_rec.cpp
store/trunk/cpp/lib/jrnl/enq_rec.cpp
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/txn_rec.cpp
Log:
Corrected some too-strict asserts that resulted in false positives during tests
Modified: store/trunk/cpp/lib/jrnl/deq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
+++ store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-09-15 11:41:48 UTC (rev 2472)
@@ -377,7 +377,7 @@
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
if (_deq_hdr._xidsize)
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
Modified: store/trunk/cpp/lib/jrnl/enq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
+++ store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-09-15 11:41:48 UTC (rev 2472)
@@ -515,7 +515,7 @@
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-09-15 11:41:35 UTC (rev 2471)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-09-15 11:41:48 UTC (rev 2472)
@@ -819,7 +819,7 @@
{
u_int32_t rec_dblks = jrec::size_dblks(sizeof(rec_hdr));
ifsp->ignore(rec_dblks * JRNL_DBLK_SIZE - sizeof(rec_hdr));
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
if (!jfile_cycle(fid, ifsp, lowi, rd, false))
return false;
}
Modified: store/trunk/cpp/lib/jrnl/txn_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
+++ store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-09-15 11:41:48 UTC (rev 2472)
@@ -363,7 +363,7 @@
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
17 years, 7 months
rhmessaging commits: r2471 - store/branches/mrg-1.0/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-09-15 07:41:35 -0400 (Mon, 15 Sep 2008)
New Revision: 2471
Modified:
store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp
Log:
Corrected some too-strict asserts that resulted in false positives during tests
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
@@ -377,7 +377,7 @@
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
if (_deq_hdr._xidsize)
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
@@ -515,7 +515,7 @@
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-09-12 20:18:12 UTC (rev 2470)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-09-15 11:41:35 UTC (rev 2471)
@@ -824,7 +824,7 @@
{
u_int32_t rec_dblks = jrec::size_dblks(sizeof(rec_hdr));
ifsp->ignore(rec_dblks * JRNL_DBLK_SIZE - sizeof(rec_hdr));
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
if (!jfile_cycle(fid, ifsp, lowi, rd, false))
return false;
}
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp 2008-09-15 11:41:35 UTC (rev 2471)
@@ -363,7 +363,7 @@
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
- assert(ifsp->good());
+ assert(!ifsp->fail() && !ifsp->bad());
return true;
}
17 years, 7 months
rhmessaging commits: r2470 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-09-12 16:18:12 -0400 (Fri, 12 Sep 2008)
New Revision: 2470
Modified:
store/trunk/cpp/lib/jrnl/deq_rec.cpp
store/trunk/cpp/lib/jrnl/enq_rec.cpp
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/txn_rec.cpp
Log:
Backport of fix for BZ462121 "assert during journal recovery (intermittent)".
Modified: store/trunk/cpp/lib/jrnl/deq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
+++ store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
@@ -353,6 +353,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -369,12 +370,14 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
if (_deq_hdr._xidsize)
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
Modified: store/trunk/cpp/lib/jrnl/enq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
+++ store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
@@ -471,6 +471,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -488,6 +489,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -507,11 +509,13 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-09-12 20:17:38 UTC (rev 2469)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-09-12 20:18:12 UTC (rev 2470)
@@ -677,8 +677,13 @@
ifsp->read((char*)&h, sizeof(rec_hdr));
if (ifsp->gcount() == sizeof(rec_hdr))
hdr_ok = true;
- else if (!jfile_cycle(fid, ifsp, lowi, rd, true))
- return false;
+ else
+ {
+ ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
+ if (!jfile_cycle(fid, ifsp, lowi, rd, true))
+ return false;
+ }
}
switch(h._magic)
@@ -814,6 +819,7 @@
{
u_int32_t rec_dblks = jrec::size_dblks(sizeof(rec_hdr));
ifsp->ignore(rec_dblks * JRNL_DBLK_SIZE - sizeof(rec_hdr));
+ assert(ifsp->good());
if (!jfile_cycle(fid, ifsp, lowi, rd, false))
return false;
}
@@ -892,6 +898,7 @@
// Read file header
file_hdr fhdr;
ifsp->read((char*)&fhdr, sizeof(fhdr));
+ assert(ifsp->good());
if (fhdr._magic == RHM_JDAT_FILE_MAGIC)
{
assert(fhdr._fid == fid);
Modified: store/trunk/cpp/lib/jrnl/txn_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
+++ store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-09-12 20:18:12 UTC (rev 2470)
@@ -341,6 +341,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -356,11 +357,13 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
17 years, 7 months
rhmessaging commits: r2469 - store/branches/mrg-1.0/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-09-12 16:17:38 -0400 (Fri, 12 Sep 2008)
New Revision: 2469
Modified:
store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp
Log:
Fix for BZ462121 "assert during journal recovery (intermittent)".
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp 2008-09-12 20:13:25 UTC (rev 2468)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/deq_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
@@ -353,6 +353,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -369,12 +370,14 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
if (_deq_hdr._xidsize)
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp 2008-09-12 20:13:25 UTC (rev 2468)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/enq_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
@@ -471,6 +471,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -488,6 +489,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -507,11 +509,13 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-09-12 20:13:25 UTC (rev 2468)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-09-12 20:17:38 UTC (rev 2469)
@@ -682,8 +682,13 @@
ifsp->read((char*)&h, sizeof(rec_hdr));
if (ifsp->gcount() == sizeof(rec_hdr))
hdr_ok = true;
- else if (!jfile_cycle(fid, ifsp, lowi, rd, true))
- return false;
+ else
+ {
+ ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
+ if (!jfile_cycle(fid, ifsp, lowi, rd, true))
+ return false;
+ }
}
switch(h._magic)
@@ -819,6 +824,7 @@
{
u_int32_t rec_dblks = jrec::size_dblks(sizeof(rec_hdr));
ifsp->ignore(rec_dblks * JRNL_DBLK_SIZE - sizeof(rec_hdr));
+ assert(ifsp->good());
if (!jfile_cycle(fid, ifsp, lowi, rd, false))
return false;
}
@@ -897,6 +903,7 @@
// Read file header
file_hdr fhdr;
ifsp->read((char*)&fhdr, sizeof(fhdr));
+ assert(ifsp->good());
if (fhdr._magic == RHM_JDAT_FILE_MAGIC)
{
assert(fhdr._fid == fid);
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp 2008-09-12 20:13:25 UTC (rev 2468)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/txn_rec.cpp 2008-09-12 20:17:38 UTC (rev 2469)
@@ -341,6 +341,7 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
@@ -356,11 +357,13 @@
assert(ifsp->eof());
// As we may have read past eof, turn off fail bit
ifsp->clear(ifsp->rdstate()&(~std::ifstream::failbit));
+ assert(!ifsp->fail() && !ifsp->bad());
return false;
}
}
ifsp->ignore(rec_size_dblks() * JRNL_DBLK_SIZE - rec_size());
chk_tail(); // Throws if tail invalid or record incomplete
+ assert(ifsp->good());
return true;
}
17 years, 7 months
rhmessaging commits: r2468 - in mgmt/trunk: cumin/python/wooly and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-12 16:13:25 -0400 (Fri, 12 Sep 2008)
New Revision: 2468
Modified:
mgmt/trunk/cumin/python/cumin/brokercluster.py
mgmt/trunk/cumin/python/cumin/brokerprofile.py
mgmt/trunk/cumin/python/wooly/__init__.py
mgmt/trunk/cumin/python/wooly/forms.py
mgmt/trunk/cumin/python/wooly/forms.strings
mgmt/trunk/misc/boneyard.py
Log:
Replace TextInput with ScalarInput, and fix up some duplicate logic. An old todo item.
Modified: mgmt/trunk/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokercluster.py 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/cumin/python/cumin/brokercluster.py 2008-09-12 20:13:25 UTC (rev 2468)
@@ -103,7 +103,7 @@
def __init__(self, app, name):
super(BrokerClusterForm, self).__init__(app, name)
- self.cluster_name = TextInput(app, "name", self)
+ self.cluster_name = StringInput(app, "name", self)
self.add_child(self.cluster_name)
def process_cluster(self, session, cluster):
Modified: mgmt/trunk/cumin/python/cumin/brokerprofile.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerprofile.py 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/cumin/python/cumin/brokerprofile.py 2008-09-12 20:13:25 UTC (rev 2468)
@@ -104,7 +104,7 @@
def __init__(self, app, name):
super(BrokerProfileForm, self).__init__(app, name)
- self.profile_name = TextInput(app, "name", self)
+ self.profile_name = StringInput(app, "name", self)
self.add_child(self.profile_name)
def process_profile(self, session, profile):
Modified: mgmt/trunk/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/__init__.py 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/cumin/python/wooly/__init__.py 2008-09-12 20:13:25 UTC (rev 2468)
@@ -149,6 +149,7 @@
def add_child(self, child):
assert not self.sealed
+ assert child is not self
self.children.append(child)
self.children_by_name[child.name] = child
child.parent = self
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-09-12 20:13:25 UTC (rev 2468)
@@ -130,16 +130,10 @@
super(EmptyInputError, self).__init__(message)
-# XXX rename to ScalarInput. it's less confusing v-a-v StringInput
-class TextInput(FormInput):
+class ScalarInput(FormInput):
def __init__(self, app, name, form):
- super(TextInput, self).__init__(app, name, form)
+ super(ScalarInput, self).__init__(app, name, form)
- # XXX remove this once we move clients of this class to
- # StringInput
- self.set_parameter(Parameter(app, "param"))
- self.add_parameter(self.get_parameter())
-
self.size = 32
def set_size(self, size):
@@ -148,7 +142,7 @@
def render_size(self, session, *args):
return self.size
-class StringInput(TextInput):
+class StringInput(ScalarInput):
def __init__(self, app, name, form):
super(StringInput, self).__init__(app, name, form)
@@ -157,7 +151,7 @@
self.set_size(30)
-class IntegerInput(TextInput):
+class IntegerInput(ScalarInput):
def __init__(self, app, name, form):
super(IntegerInput, self).__init__(app, name, form)
@@ -348,7 +342,7 @@
def __init__(self, app, name, form):
super(StringField, self).__init__(app, name, form)
- input = TextInput(app, "input", form)
+ input = StringInput(app, "input", form)
self.add_child(input)
self.set_input(input)
Modified: mgmt/trunk/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.strings 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/cumin/python/wooly/forms.strings 2008-09-12 20:13:25 UTC (rev 2468)
@@ -1,7 +1,7 @@
[FormButton.html]
<button class="{class}" id="{id}" type="submit" name="{name}" value="{value}" tabindex="{tab_index}" {disabled_attr}>{content}</button>
-[TextInput.html]
+[ScalarInput.html]
<input type="text" name="{name}" value="{value}" tabindex="{tab_index}" {disabled_attr} size="{size}"/>
[CheckboxInput.html]
Modified: mgmt/trunk/misc/boneyard.py
===================================================================
--- mgmt/trunk/misc/boneyard.py 2008-09-12 19:52:46 UTC (rev 2467)
+++ mgmt/trunk/misc/boneyard.py 2008-09-12 20:13:25 UTC (rev 2468)
@@ -158,7 +158,7 @@
self.profile.set_value("profile")
self.add_child(self.profile)
- self.pvalue = TextInput(app, "profile_value", self)
+ self.pvalue = StringInput(app, "profile_value", self)
self.pvalue.set_disabled(True)
self.add_child(self.pvalue)
@@ -167,7 +167,7 @@
self.broker.set_value("broker")
self.add_child(self.broker)
- self.svalue = TextInput(app, "broker_value", self)
+ self.svalue = StringInput(app, "broker_value", self)
self.svalue.set_disabled(True)
self.add_child(self.svalue)
@@ -176,7 +176,7 @@
self.local.set_value("local")
self.add_child(self.local)
- self.lvalue = TextInput(app, "local_value", self)
+ self.lvalue = StringInput(app, "local_value", self)
self.add_child(self.lvalue)
def render_title(self, session, prop):
17 years, 7 months
rhmessaging commits: r2467 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-12 15:52:46 -0400 (Fri, 12 Sep 2008)
New Revision: 2467
Modified:
mgmt/trunk/cumin/python/cumin/page.strings
Log:
Clean up
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2008-09-12 19:33:44 UTC (rev 2466)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2008-09-12 19:52:46 UTC (rev 2467)
@@ -503,9 +503,8 @@
<title>{title}</title>
<link rel="stylesheet" type="text/css" href="cumin.css"/>
<link rel="shortcut icon" href="resource?name=favicon.ico" type="image/x-icon"/>
- <!-- XXX import this via cumin.js instead -->
- <script src="resource?name=wooly.js" type="text/javascript"> </script>
- <script src="cumin.js" type="text/javascript"> </script>
+ <script src="resource?name=wooly.js" type="text/javascript"> </script>
+ <script src="cumin.js" type="text/javascript"> </script>
</head>
<body class="{class}">
{mode}
17 years, 7 months
rhmessaging commits: r2466 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-12 15:33:44 -0400 (Fri, 12 Sep 2008)
New Revision: 2466
Modified:
mgmt/trunk/cumin/python/cumin/scheduler.py
Log:
Fixing minor sql problem
Modified: mgmt/trunk/cumin/python/cumin/scheduler.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/scheduler.py 2008-09-12 19:33:21 UTC (rev 2465)
+++ mgmt/trunk/cumin/python/cumin/scheduler.py 2008-09-12 19:33:44 UTC (rev 2466)
@@ -145,13 +145,13 @@
self.show_column(session, "global_job_id")
self.show_column(session, "custom_id")
self.show_column(session, "cmd")
- #self.show_column(session, "submitter")
+ self.show_column(session, "submitter")
self.show_column(session, "custom_group")
self.show_column(session, "job_status")
def render_sql_where(self, session, scheduler):
phase_sql = self.get_phase_sql(session)
- scheduler_sql = "scheduler_id = '%i'" % scheduler.id
+ scheduler_sql = "scheduler_id = %i" % scheduler.id
return "where %s" % " and ".join([phase_sql, scheduler_sql])
def render_title(self, session, scheduler):
17 years, 7 months