modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
| 17
modules/plugins/cassandra/src/main/java/org/rhq/plugins/cassandra/FailureDetectorComponent.java
| 43 +
modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
| 355 +++++++---
3 files changed, 318 insertions(+), 97 deletions(-)
New commits:
commit 8c214b8754b319b0549f28703d38335625528cd7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Oct 30 17:18:14 2012 -0500
Add the last set of exposed management interfaces to the resource descriptor.
Also, moved all the resources to groups based on management function.
diff --git
a/modules/plugins/cassandra/src/main/java/org/rhq/plugins/cassandra/FailureDetectorComponent.java
b/modules/plugins/cassandra/src/main/java/org/rhq/plugins/cassandra/FailureDetectorComponent.java
new file mode 100644
index 0000000..38d0149
--- /dev/null
+++
b/modules/plugins/cassandra/src/main/java/org/rhq/plugins/cassandra/FailureDetectorComponent.java
@@ -0,0 +1,43 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.plugins.cassandra;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class FailureDetectorComponent extends
MBeanResourceComponent<JMXComponent<?>> {
+
+ @Override
+ public Configuration loadResourceConfiguration() {
+ return super.loadResourceConfiguration();
+ }
+
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ super.updateResourceConfiguration(report);
+ }
+}
diff --git a/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
index bc115d3..73ed5a6 100644
--- a/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
@@ -29,7 +29,9 @@
<subcategories>
<subcategory name="Client Request Metrics" description="Client
Request Metrics"/>
<subcategory name="Server Request Metrics" description="Server
Request Metrics"/>
- <subcategory name="Internal Server Metrics" description="Server
Request Metrics"/>
+ <subcategory name="Internal Server Metrics" description="Internal
Server Metrics"/>
+ <subcategory name="Database Management Services"
description="Database Management Services"/>
+ <subcategory name="Network Services" description="Network
Services"/>
</subcategories>
<plugin-configuration>
@@ -82,7 +84,8 @@
<service name="StorageProxy"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true">
+ singleton="true"
+ subCategory="Database Management Services">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true"
default="org.apache.cassandra.db:type=StorageProxy"/>
@@ -112,7 +115,8 @@
<service name="StorageService"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.cassandra.StorageServiceComponent"
- singleton="true">
+ singleton="true"
+ subCategory="Database Management Services">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true"
default="org.apache.cassandra.db:type=StorageService"/>
@@ -175,7 +179,8 @@
<service name="CommitLog"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true">
+ singleton="true"
+ subCategory="Database Management Services">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true"
type="string" default="org.apache.cassandra.db:type=Commitlog"/>
@@ -240,7 +245,8 @@
<service name="CompactionManager"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true">
+ singleton="true"
+ subCategory="Database Management Services">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true"
type="string"
default="org.apache.cassandra.db:type=CompactionManager"/>
@@ -271,7 +277,8 @@
<service name="CacheService"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true">
+ singleton="true"
+ subCategory="Database Management Services">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true"
type="string" default="org.apache.cassandra.db:type=Caches"/>
@@ -307,6 +314,255 @@
</service>
+ <service name="ConfigurableStages"
+ discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Server Request Metrics">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
+
default="org.apache.cassandra.request:type=MutationStage|org.apache.cassandra.request:type=ReadStage|org.apache.cassandra.request:type=ReplicateOnWriteStage"/>
+ <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
+ </plugin-configuration>
+
+ <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
+ <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
+ <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
+ <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
+ <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
+
+ <resource-configuration>
+ <c:simple-property name="CorePoolSize" type="integer"
required="true" description="Core Pool Size."/>
+ </resource-configuration>
+ </service>
+
+ <service name="EnabledStages"
+ discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Server Request Metrics">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
+
default="org.apache.cassandra.request:type=ReadRepairStage|org.apache.cassandra.request:type=RequestResponseStage"/>
+ <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
+ </plugin-configuration>
+
+ <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
+ <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
+ <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
+ <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
+ <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
+ </service>
+
+ <service name="ConfigurableInternalServerMetrics"
+ discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Internal Server Metrics">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
+
default="org.apache.cassandra.internal:type=AntiEntropySessions"/>
+ <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
+ </plugin-configuration>
+
+ <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
+ <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
+ <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
+ <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
+ <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
+
+ <resource-configuration>
+ <c:simple-property name="CorePoolSize" type="integer"
required="true" description="Core Pool Size."/>
+ </resource-configuration>
+ </service>
+
+ <service name="EnabledInternalServerMetrics"
+ discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Internal Server Metrics">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
+
default="org.apache.cassandra.internal:type=AntiEntropyStage|org.apache.cassandra.internal:type=FlushWriter|org.apache.cassandra.internal:type=GossipStage|org.apache.cassandra.internal:type=HintedHandoff|org.apache.cassandra.internal:type=InternalResponseStage|org.apache.cassandra.internal:type=MemtablePostFlusher|org.apache.cassandra.internal:type=MigrationStage|org.apache.cassandra.internal:type=MiscStage|org.apache.cassandra.internal:type=StreamStage|org.apache.cassandra.internal:type=commitlog_archiver"/>
+ <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
+ </plugin-configuration>
+
+ <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
+ <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
+ <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
+ <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
+ <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
+ </service>
+
+
+ <service name="FailureDetector"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="org.rhq.plugins.cassandra.FailureDetectorComponent"
+ singleton="true"
+ subCategory="Network Services">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
default="org.apache.cassandra.net:type=FailureDetector"/>
+ <c:simple-property name="nameTemplate" readOnly="true"
type="string" default="Failure Detector" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="PhiConvictThreshold"
type="integer" required="true" description="Phi-convict threshold
sets the sensitivity of the failure detector. Lower values increase the likelihood that an
unresponsive node will be marked as down, while higher values decrease the
likelihood."/>
+ <c:simple-property name="AllEndpointStates"
type="integer" required="false" readOnly="true"
description="States of all the end-points."/>
+ <c:list-property name="SimpleStates"
readOnly="true">
+ <c:map-property name="SimpleState"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ </resource-configuration>
+ </service>
+
+
+ <service name="Gossiper"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Network Services">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string" default="org.apache.cassandra.net:type=Gossiper"/>
+ <c:simple-property name="nameTemplate" readOnly="true"
type="string" default="Gossiper" />
+ </plugin-configuration>
+
+ <operation name="getVersion" description="Get version">
+ <parameters>
+ <c:simple-property name="p1" displayName="Address"
required="true" type="string" description="Address"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult"
description="Version"/>
+ </results>
+ </operation>
+ <operation name="getCurrentGenerationNumber" description="Get
current generation number">
+ <parameters>
+ <c:simple-property name="p1" displayName="Address"
required="true" type="string" description="Address"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult"
description="Current Generation Number"/>
+ </results>
+ </operation>
+ <operation name="getEndpointDowntime" description="Get endpoint
downtime">
+ <parameters>
+ <c:simple-property name="p1" displayName="Address"
required="true" type="string" description="Address"/>
+ </parameters>
+ <results>
+ <c:simple-property name="operationResult"
description="Endpoint Downtime"/>
+ </results>
+ </operation>
+ <operation name="unsafeAssassinateEndpoint" description="Unsafe
assassinate endpoint">
+ <parameters>
+ <c:simple-property name="p1" displayName="Address"
required="true" type="string" description="Address"/>
+ </parameters>
+ </operation>
+ </service>
+
+ <service name="StreamingService"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Network Services">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
type="string"
default="org.apache.cassandra.net:type=StreamingService"/>
+ <c:simple-property name="nameTemplate" readOnly="true"
type="string" default="Streaming Service" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="Status" type="string"
required="false" readOnly="true" description="Status"/>
+ <c:list-property name="StreamDestinations"
readOnly="true">
+ <c:map-property name="StreamDestination"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="StreamSources"
readOnly="true">
+ <c:map-property name="StreamSource"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ </resource-configuration>
+ </service>
+
+ <service name="MessagingService"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="org.rhq.plugins.jmx.MBeanResourceComponent"
+ singleton="true"
+ subCategory="Network Services">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true"
default="org.apache.cassandra.net:type=MessagingService"/>
+ <c:simple-property name="nameTemplate" readOnly="true"
type="string" default="Messaging Service"/>
+ </plugin-configuration>
+
+ <metric property="TotalTimeouts" measurementType="trendsup"
displayType="detail" description="Total timeouts."/>
+ <metric property="RecentTotalTimeouts"
measurementType="trendsup" displayType="detail"
description="Recent total timeouts."/>
+
+ <resource-configuration>
+ <c:list-property name="CommandPendingTasks"
readOnly="true">
+ <c:map-property name="CommandPendingTask"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="CommandCompletedTasks"
readOnly="true">
+ <c:map-property name="CommandCompletedTask"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+
+ <c:list-property name="ResponsePendingTasks"
readOnly="true">
+ <c:map-property name="ResponsePendingTask"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="ResponseCompletedTasks"
readOnly="true">
+ <c:map-property name="ResponseCompletedTask"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+
+ <c:list-property name="DroppedMessages"
readOnly="true">
+ <c:map-property name="DroppedMessage"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="RecentlyDroppedMessages"
readOnly="true">
+ <c:map-property name="RecentlyDroppedMessage"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+
+ <c:list-property name="TimeoutsPerHost"
readOnly="true">
+ <c:map-property name="TimeoutPerHost"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="RecentTimeoutsPerHost"
readOnly="true">
+ <c:map-property name="RecentTimeoutPerHost"
readOnly="true">
+ <c:simple-property name="name" type="string"
readOnly="true"/>
+ <c:simple-property name="value" type="string"
readOnly="true"/>
+ </c:map-property>
+ </c:list-property>
+ </resource-configuration>
+ </service>
+
+
<service name="Keyspace"
discovery="org.rhq.plugins.cassandra.KeyspaceDiscoveryComponent"
class="org.rhq.plugins.cassandra.KeyspaceComponent">
@@ -447,90 +703,5 @@
</service>
</service>
-
- <service name="ConfigurableStages"
- discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
- class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true"
- subCategory="Server Request Metrics">
-
- <plugin-configuration>
- <c:simple-property name="objectName" readOnly="true"
type="string"
-
default="org.apache.cassandra.request:type=MutationStage|org.apache.cassandra.request:type=ReadStage|org.apache.cassandra.request:type=ReplicateOnWriteStage"/>
- <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
- </plugin-configuration>
-
- <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
- <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
- <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
- <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
- <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
-
- <resource-configuration>
- <c:simple-property name="CorePoolSize" type="integer"
required="true" description="Core Pool Size."/>
- </resource-configuration>
- </service>
-
- <service name="EnabledStages"
- discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
- class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true"
- subCategory="Server Request Metrics">
-
- <plugin-configuration>
- <c:simple-property name="objectName" readOnly="true"
type="string"
-
default="org.apache.cassandra.request:type=ReadRepairStage|org.apache.cassandra.request:type=RequestResponseStage"/>
- <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
- </plugin-configuration>
-
- <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
- <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
- <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
- <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
- <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
- </service>
-
- <service name="ConfigurableInternalServerMetrics"
- discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
- class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true"
- subCategory="Internal Server Metrics">
-
- <plugin-configuration>
- <c:simple-property name="objectName" readOnly="true"
type="string"
-
default="org.apache.cassandra.internal:type=AntiEntropySessions"/>
- <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
- </plugin-configuration>
-
- <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
- <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
- <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
- <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
- <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
-
- <resource-configuration>
- <c:simple-property name="CorePoolSize" type="integer"
required="true" description="Core Pool Size."/>
- </resource-configuration>
- </service>
-
- <service name="EnabledInternalServerMetrics"
- discovery="org.rhq.plugins.cassandra.MetricsDiscoveryComponent"
- class="org.rhq.plugins.jmx.MBeanResourceComponent"
- singleton="true"
- subCategory="Internal Server Metrics">
-
- <plugin-configuration>
- <c:simple-property name="objectName" readOnly="true"
type="string"
-
default="org.apache.cassandra.internal:type=AntiEntropyStage|org.apache.cassandra.internal:type=FlushWriter|org.apache.cassandra.internal:type=GossipStage|org.apache.cassandra.internal:type=HintedHandoff|org.apache.cassandra.internal:type=InternalResponseStage|org.apache.cassandra.internal:type=MemtablePostFlusher|org.apache.cassandra.internal:type=MigrationStage|org.apache.cassandra.internal:type=MiscStage|org.apache.cassandra.internal:type=StreamStage|org.apache.cassandra.internal:type=commitlog_archiver"/>
- <c:simple-property name="nameMarker" readOnly="true"
type="string" default="type=" />
- </plugin-configuration>
-
- <metric property="ActiveCount" measurementType="dynamic"
displayType="summary" description="Active Count"/>
- <metric property="CurrentlyBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Currently Blocked Tasks"/>
- <metric property="CompletedTasks" measurementType="dynamic"
displayType="summary" description="Completed Tasks"/>
- <metric property="PendingTasks" measurementType="dynamic"
displayType="summary" description="Pending Tasks"/>
- <metric property="TotalBlockedTasks"
measurementType="dynamic" displayType="summary"
description="Total Blocked Tasks"/>
- </service>
-
</server>
</plugin>
\ No newline at end of file
commit 21a228322645c1a8a2ee90f3343a917d138afb3e
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Oct 30 12:18:26 2012 -0500
Update self-referencing option sources to use explicit keyword 'self'. This
reduces the confusion that an implicit self reference would pose for plugin writers.
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index b252022..bc8fff2 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -2529,11 +2529,18 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
String expr = expression;
if (expr.contains(":")) {
expr = expr.substring(expr.indexOf(':') + 1);
- criteria.setSearchExpression(expr);
- resources = resourceManager.findResourcesByCriteria(subject,
criteria);
- } else if (resourceId >= 0) {
- resources = new ArrayList<Resource>();
- resources.add(resourceManager.getResourceById(subject,
resourceId));
+
+ if (!"self".equals(expr)) {
+ criteria.setSearchExpression(expr);
+ resources = resourceManager.findResourcesByCriteria(subject,
criteria);
+ } else if (resourceId >= 0) {
+ resources = new ArrayList<Resource>();
+ resources.add(resourceManager.getResourceById(subject,
resourceId));
+ } else {
+ log.warn("Self reference requested but resource id is
not valid."
+ + "Option source expression:" + expression);
+ return;
+ }
} else {
log.warn("Option source expression for property " +
pds.getName()
+ " and target configuration contains no
':'");
diff --git a/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
index 1966ea3..bc115d3 100644
--- a/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/cassandra/src/main/resources/META-INF/rhq-plugin.xml
@@ -401,7 +401,7 @@
<operation name="restoreSnapshot" description="Restore the
column family from a previously taken snapshot.">
<parameters>
<c:simple-property name="snapshotName" required="true"
type="string" description="Snapshot Name">
- <c:option-source target="configuration"
expression="snapshots/snapshot=name"/>
+ <c:option-source target="configuration"
expression="snapshots/snapshot=name:self"/>
</c:simple-property>
</parameters>
<results>
Show replies by date