[rhq] Branch 'jsanda/metrics-rhq' - modules/core
by John Sanda
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8f515fc51eb2191fc2dca40527946318fa1e61e0
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jun 27 01:10:30 2012 -0400
fixing bug where I was returning group id filter instead of resource id filter.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
index b4b44b2..fa8c597 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
@@ -115,7 +115,7 @@ public class MeasurementDataTraitCriteria extends Criteria implements TraitMeasu
@Override
public Integer getFilterResourceId() {
- return filterGroupId;
+ return filterResourceId;
}
public void addFilterDefinitionId(Integer filterDefinitionId) {
11 years, 10 months
[rhq] modules/plugins
by snegrea
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebservicesComponent.java | 55 ----------
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 10 -
2 files changed, 5 insertions(+), 60 deletions(-)
New commits:
commit 2d2ae3923fdaa1d94561f3995b4e59521e9267db
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 26 23:03:56 2012 -0500
[BZ 835710] Removed WebservicesComoponent class and moved the two resources using it to the generic BaseComponent.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebservicesComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebservicesComponent.java
deleted file mode 100644
index 0dea886..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebservicesComponent.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.rhq.modules.plugins.jbossas7;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.modules.plugins.jbossas7.json.Operation;
-import org.rhq.modules.plugins.jbossas7.json.Result;
-
-/**
- * Support for Webservices subsystem.
- *
- * @author Simeon Pinder
- */
-public class WebservicesComponent extends BaseComponent implements OperationFacet, ConfigurationFacet {
-
- @Override
- public Configuration loadResourceConfiguration() throws Exception {
- Configuration config = super.loadResourceConfiguration();
-
- return config;
- }
-
- @Override
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
-
- super.updateResourceConfiguration(report);
- }
-
- @Override
- public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- Operation op = new Operation(name, getAddress());
- OperationResult operationResult = new OperationResult();
- Result result = null;
-
- if ("list-proxies".equals(name)) {
-
- } else {
- /*
- * This is a catch all for operations that are not explicitly treated above.
- */
- result = getASConnection().execute(op);
- if (result.isSuccess()) {
- operationResult.setSimpleResult("Success");
- }
- }
-
- if (!result.isSuccess()) {
- operationResult.setErrorMessage(result.getFailureDescription());
- }
-
- return operationResult;
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index ecbaea2..e096c0e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -1745,7 +1745,7 @@
<service name="Webservices (Managed Server)"
discovery="SubsystemDiscovery"
- class="WebservicesComponent"
+ class="BaseComponent"
singleton="true">
<plugin-configuration>
@@ -3228,7 +3228,7 @@
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="login-modules" />
</plugin-configuration>
-
+
&loginModuleResourceConfig;
<service name="Module Options (Classic - Managed Server)" discovery="ModuleOptionsDiscoveryComponent"
@@ -6062,7 +6062,7 @@
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="login-modules" />
</plugin-configuration>
-
+
&loginModuleResourceConfig;
<service name="Module Options (Classic - Profile)" discovery="ModuleOptionsDiscoveryComponent" class="ModuleOptionsComponent"
@@ -8143,7 +8143,7 @@
<service name="Webservices"
discovery="SubsystemDiscovery"
- class="WebservicesComponent"
+ class="BaseComponent"
singleton="true">
<runs-inside>
@@ -10631,7 +10631,7 @@
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="policy-modules" />
</plugin-configuration>
-
+
&flagModuleResourceConfig;
<service name="Module Options (Authorization)" discovery="ModuleOptionsDiscoveryComponent" class="ModuleOptionsComponent"
11 years, 10 months
[rhq] Changes to 'bug/667896'
by John Sanda
New branch 'bug/667896' available with the following commits:
commit 8f28b9aca0756a8d267c71140dd16bf5672cf645
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jun 26 17:04:29 2012 -0400
[BZ 667896] Adding more tests to verify we do not allow multiple expressions of the same type
commit a046f836d3ec2417b1393dcd865e407f6c00e4d4
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jun 22 21:33:59 2012 -0400
[BZ 667896] Throw exception if multiple trait expressions specified
11 years, 10 months
[rhq] Branch 'bug/783603' - modules/core
by mazz
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementReport.java | 52 +++
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java | 2
modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java | 139 +++++++++-
3 files changed, 185 insertions(+), 8 deletions(-)
New commits:
commit a1c3d0e458a74756a4ec6954bf39cd01fa406560
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jun 26 17:37:49 2012 -0400
[BZ 783603] only return the metrics we asked for in the getLastValues() call
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementReport.java
index 50b2d23..f812575 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementReport.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementReport.java
@@ -23,6 +23,7 @@
package org.rhq.core.domain.measurement;
import java.io.Serializable;
+import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -141,12 +142,53 @@ public class MeasurementReport implements Serializable {
* Adds measurement data from the given report and updates the collection time.
* The assumption is the given report is newer than this instance.
*
- * @param report measurements to add
+ * @param report the report that contains the measurements to add
+ * @param metrics the metrics whose measurement data (if found in the given report) should be added to this report.
+ * If null or empty, then all of the data in the given report will be added to this report.
*/
- public synchronized void add(MeasurementReport report) {
- measurementNumericData.addAll(report.measurementNumericData);
- measurementTraitData.addAll(report.measurementTraitData);
- callTimeData.addAll(report.callTimeData);
+ public synchronized void add(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) {
+ if (metrics == null || metrics.isEmpty()) {
+ measurementNumericData.addAll(report.measurementNumericData);
+ measurementTraitData.addAll(report.measurementTraitData);
+ callTimeData.addAll(report.callTimeData);
+ } else {
+ // note that usually the metric set is very small (typically not more than around 5, probably normally around 1 or 2)
+ // so this loop isn't going to be performed with lots of iterations.
+ for (MeasurementScheduleRequest metric : metrics) {
+ switch (metric.getDataType()) {
+ case MEASUREMENT: {
+ Iterator<MeasurementDataNumeric> i = report.measurementNumericData.iterator();
+ while (i.hasNext()) {
+ MeasurementDataNumeric data = i.next();
+ if (data.getName().equals(metric.getName())) {
+ measurementNumericData.add(data);
+ }
+ }
+ break;
+ }
+ case TRAIT: {
+ Iterator<MeasurementDataTrait> i = report.measurementTraitData.iterator();
+ while (i.hasNext()) {
+ MeasurementDataTrait data = i.next();
+ if (data.getName().equals(metric.getName())) {
+ measurementTraitData.add(data);
+ }
+ }
+ break;
+ }
+ case CALLTIME: {
+ // There is only ever one calltime metric per resource so if we are being asked to
+ // add the calltime data, we can avoid doing any iterations and just use addAll API.
+ callTimeData.addAll(report.callTimeData);
+ break;
+ }
+ default: {
+ // ignore any others, we only care about measurement type data
+ }
+ }
+ }
+ }
+
setCollectionTime(report.collectionTime);
}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
index 19bcc9c..94c024b 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
@@ -145,7 +145,7 @@ public class MeasurementCollectorRunnable implements Runnable {
*/
public void getLastValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
this.requestedMetrics.addAll(metrics);
- report.add(this.lastReport);
+ report.add(this.lastReport, metrics);
}
/**
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
index dc00bee..f3a6310 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
@@ -22,6 +22,7 @@
*/
package org.rhq.core.pc;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
@@ -33,9 +34,11 @@ import org.testng.annotations.Test;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementDataTrait;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.domain.measurement.calltime.CallTimeData;
import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
import org.rhq.core.pluginapi.availability.AvailabilityFacet;
import org.rhq.core.pluginapi.measurement.MeasurementCollectorRunnable;
@@ -94,7 +97,7 @@ public class CollectorThreadPoolTest {
// 0L means do the initial collection immediately with no delay - so our test can run fast
MeasurementCollectorRunnable runnable = new MeasurementCollectorRunnable(component, 0L, 500L, null,
this.threadPool.getExecutor());
- Set<MeasurementScheduleRequest> metrics = new HashSet();
+ Set<MeasurementScheduleRequest> metrics = new HashSet<MeasurementScheduleRequest>();
metrics.add(new MeasurementScheduleRequest(0, "name", 0, true, DataType.TRAIT));
MeasurementReport report = new MeasurementReport();
runnable.getLastValues(report, metrics);
@@ -110,6 +113,96 @@ public class CollectorThreadPoolTest {
runnable.getLastValues(report, metrics);
assert 42 == report.getCollectionTime();
assert !report.getTraitData().isEmpty();
+
+ runnable.stop();
+ }
+
+ public void testMultipleMeasurements() throws Exception {
+ log("testMultipleMeasurements");
+
+ TestMultipleMeasumentFacet component = new TestMultipleMeasumentFacet();
+
+ Set<MeasurementScheduleRequest> onlyNumericMetric = new HashSet<MeasurementScheduleRequest>();
+ onlyNumericMetric.add(component.getNumericMetricSchedule());
+
+ Set<MeasurementScheduleRequest> onlyTraitMetric = new HashSet<MeasurementScheduleRequest>();
+ onlyTraitMetric.add(component.getTraitMetricSchedule());
+
+ Set<MeasurementScheduleRequest> onlyCalltimeMetric = new HashSet<MeasurementScheduleRequest>();
+ onlyCalltimeMetric.add(component.getCalltimeMetricSchedule());
+
+ Set<MeasurementScheduleRequest> allMetrics = new HashSet<MeasurementScheduleRequest>();
+ allMetrics.addAll(onlyNumericMetric);
+ allMetrics.addAll(onlyTraitMetric);
+ allMetrics.addAll(onlyCalltimeMetric);
+
+ MeasurementCollectorRunnable runnable = new MeasurementCollectorRunnable(component, 0L, 123L, null,
+ this.threadPool.getExecutor());
+
+ MeasurementReport report = new MeasurementReport();
+ runnable.getLastValues(report, onlyNumericMetric); // we only ask for the numeric metric, not all
+ // we haven't started the runnable yet, so nothing is collected yet
+ assert 0 == report.getCollectionTime();
+ assert report.getNumericData().isEmpty();
+ assert report.getTraitData().isEmpty();
+ assert report.getCallTimeData().isEmpty();
+
+ runnable.start();
+ Thread.sleep(1000L);
+
+ report = new MeasurementReport();
+ runnable.getLastValues(report, allMetrics); // even though we are asking for all, last time we only collected the numeric metric
+ assert 1000 == report.getCollectionTime();
+ assert !report.getNumericData().isEmpty();
+ assert report.getTraitData().isEmpty() : "should not have collected the trait data yet";
+ assert report.getCallTimeData().isEmpty() : "should not have collected the calltime data yet";
+
+ // let's create another runnable so we can speed up the test (using a 0 initial delay)
+ runnable.stop();
+ component = new TestMultipleMeasumentFacet();
+ runnable = new MeasurementCollectorRunnable(component, 0L, 123L, null, this.threadPool.getExecutor());
+
+ report = new MeasurementReport();
+ runnable.getLastValues(report, allMetrics); // prime the pump by asking for all metrics
+ // we haven't started the runnable yet, so nothing is collected yet
+ assert 0 == report.getCollectionTime();
+ assert report.getNumericData().isEmpty();
+ assert report.getTraitData().isEmpty();
+ assert report.getCallTimeData().isEmpty();
+
+ runnable.start();
+ Thread.sleep(1000L);
+
+ report = new MeasurementReport();
+ runnable.getLastValues(report, allMetrics); // we are asking for all metrics, and we should have collected them all
+ assert 1000 == report.getCollectionTime();
+ assert !report.getNumericData().isEmpty();
+ assert !report.getTraitData().isEmpty();
+ assert !report.getCallTimeData().isEmpty();
+
+ // now we only ask for individual metrics, not all of them at once
+ report = new MeasurementReport();
+ runnable.getLastValues(report, onlyNumericMetric);
+ assert 1000 == report.getCollectionTime();
+ assert !report.getNumericData().isEmpty();
+ assert report.getTraitData().isEmpty() : "we didn't ask for the trait data";
+ assert report.getCallTimeData().isEmpty() : "we didn't ask for the calltime data";
+
+ report = new MeasurementReport();
+ runnable.getLastValues(report, onlyTraitMetric);
+ assert 1000 == report.getCollectionTime();
+ assert report.getNumericData().isEmpty() : "we didn't ask for the numeric data";
+ assert !report.getTraitData().isEmpty();
+ assert report.getCallTimeData().isEmpty() : "we didn't ask for the calltime data";
+
+ report = new MeasurementReport();
+ runnable.getLastValues(report, onlyCalltimeMetric);
+ assert 1000 == report.getCollectionTime();
+ assert report.getNumericData().isEmpty() : "we didn't ask for the numeric data";
+ assert report.getTraitData().isEmpty() : "we didn't ask for the trait data";
+ assert !report.getCallTimeData().isEmpty();
+
+ runnable.stop();
}
protected class TestAvailabilityFacet implements AvailabilityFacet {
@@ -130,7 +223,7 @@ public class CollectorThreadPoolTest {
@Override
public void getValues(MeasurementReport report,
Set<MeasurementScheduleRequest> metrics) throws Exception {
- log("getValues " + metrics);
+ log("TestMeasumentFacet.getValues " + metrics);
report.setCollectionTime(42L);
for (MeasurementScheduleRequest request : metrics) {
report.addData(new MeasurementDataTrait(0, request, "good times"));
@@ -138,4 +231,46 @@ public class CollectorThreadPoolTest {
}
}
+
+ protected class TestMultipleMeasumentFacet implements MeasurementFacet {
+ public static final String NUMERIC_METRIC_NAME = "numericMetric";
+ public static final String TRAIT_METRIC_NAME = "traitMetric";
+
+ public MeasurementScheduleRequest getNumericMetricSchedule() {
+ return new MeasurementScheduleRequest(1, NUMERIC_METRIC_NAME, 30000L, true, DataType.MEASUREMENT);
+ }
+
+ public MeasurementScheduleRequest getTraitMetricSchedule() {
+ return new MeasurementScheduleRequest(2, TRAIT_METRIC_NAME, 30000L, true, DataType.TRAIT);
+ }
+
+ public MeasurementScheduleRequest getCalltimeMetricSchedule() {
+ return new MeasurementScheduleRequest(3, "calltime", 30000L, true, DataType.CALLTIME);
+ }
+
+ private long collectionTime = 1000;
+ private int counter = 0;
+
+ @Override
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
+ counter++;
+ log("TestMultipleMeasumentFacet.getValues [" + counter + "]: " + metrics);
+ report.setCollectionTime(collectionTime++);
+ for (MeasurementScheduleRequest request : metrics) {
+ if (request.getDataType() == DataType.CALLTIME) {
+ CallTimeData data = new CallTimeData(request);
+ data.addCallData("dest1", new Date(collectionTime), (long) counter);
+ report.addData(data);
+ } else if (request.getName().equals(NUMERIC_METRIC_NAME)) {
+ report.addData(new MeasurementDataNumeric(collectionTime, request, (double) counter));
+ } else if (request.getName().equals(TRAIT_METRIC_NAME)) {
+ report.addData(new MeasurementDataTrait(collectionTime, request, "" + counter));
+ } else {
+ log.info("bad test - unknown metric: " + request);
+ throw new IllegalStateException("bad test - unknown metric: " + request);
+ }
+ }
+ }
+
+ }
}
11 years, 10 months
[rhq] Changes to 'jsanda/metrics-rhq'
by John Sanda
New branch 'jsanda/metrics-rhq' available with the following commits:
commit bb4228e9b53bf5cc3565455c912ac8a047e469d3
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jun 26 10:22:32 2012 -0400
build xml-schemas with metrics profile to pick up metrics plugin schema changes
commit bb798aa90165736e6d3af3c4acacf92d1474bce0
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jun 24 07:58:55 2012 -0400
Updating call to findDataForContext to measurement schedule
commit afeee4125ec0e198f64f3e51ce930117e02c862f
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jun 23 07:13:37 2012 -0400
fixing tests to pass schedule instead of definition id
commit 4f5e46fae153509f0a817b0b90cc4a3d11f74551
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jun 22 22:35:05 2012 -0400
Changing signature of findDataForContext to take a MeasurementSchedule
The existing, legacy implementation takes a definition id and performs a
join to get the schedule. For the Cassandra implementation I am
working on metric data is keyed off of schedule id. By changing
findDataForContext to take a MeasurementSchedule instead of the
definition id, both the schedule id and definition id can be obtained
and passed to respective implementations.
commit dd0be007806990f5aa73022b0c9ce762bdf187f7
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jun 21 22:23:14 2012 -0400
Adding test to verify that 1 hr data is rolled up into 6 hr table
This is also the initial commit for DateTimeService which is nothing
more than a wrapper around getting the current time to facilitate
testing. It is used in MeasurementCompressionManagerBean and in tests so
that I can more easily test across different time boundaries and
intervals.
commit 2c4dcf23d4e7e87deb73a74e7dae28c9f891dd2d
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jun 21 14:49:51 2012 -0400
Adding/updating more tests
Adding a test for fetching data points for 1 hour data and refactoring a
test to verify raw data is aggregated.
commit 084b3cc72936bbf0c161aece47acea2ecc7937e9
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jun 20 21:41:59 2012 -0400
Getting rid of MeasurementAggregate interface
I introduced the MeausrementAggregate interface to facilitate populating
the numeric, roll up tables for testing. There is already a class in
server/jar of the same name, and this creating some confusion. Since the
class I introduced is needed for testing, I renamed the impl to
AggregateTestData to better reflect that. I also moved it to the package
where the other metrics plugin classes are. I do not want to the
MeasurementAggregate in server/jar or classes that consume it to avoid
changes that can otherwise be avoided.
commit 2e46d04a1ce8251792737f0d95d166ae3f1c0c99
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jun 20 20:26:17 2012 -0400
Refactoring to make MetricsServerPluginTest more plugin driven
Several changes are included in this commit to make the metrics tests
more plugin driven. In other words, testing will be black box through
the plugin interface so that the tests can be run again different plugin
implementations.
The metrics plugin descriptor schema has been extended such that
descriptors are now required to specifya <plugin-test-delegate> element.
plugin-test-delegate declares a class that should implement
MetricsServerPluginTestDelegate interface. This class is used during
test runs to assist with set up/tear down work. It encapsulates plugin
implementation specific details for testing.
The following method from MeasurementDataManagerBean,
List<MeasurementDataNumericHighLowComposite> findDataForContext
has been added to the plugin interface. This method provides the data
points for the graphs. A couple tests have been added for this method so
far, one for accessing raw data and one for accessing 1 hour data.
commit 56ca87b006119d35ce72896d021f2315dbcc9b14
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jun 20 01:10:50 2012 -0400
Adding a test for fetching raw data points
commit d6cec4fb21cdf47893a55fb063fb58014e55efc1
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jun 20 00:26:41 2012 -0400
Moving findDataForContext method into metrics server plugin API
commit 8312a25a3c91e7ed9cdec8abda98b45bc3e73d64
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Jun 18 09:44:17 2012 -0400
[BZ 786614] Add some error logging if we cannot find a resource container
We should not be in state where the method getAbsoluteBaseDirectory is
passed a resource id that does not have a corresponding resource
container in the local inventory. If that does happen, we will now log
an error message that includes the resource id and drift definition to
facilitate further debugging. Then an IllegalArgumentException is
thrown.
commit 272f2918a0a764f8c61b5fadec9e5afc23f4d96a
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jun 15 07:03:15 2012 -0400
Initial commit for TraitMeasurementCriteria
Extrating out TraitMeasurementCriteria inteface and providing a non-JPA
specific impl in GenericTraitMeasurementCriteria.
commit 3c3ddaf22ad41f2adfaabf7c5cb1d9cc0740e150
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jun 14 07:12:22 2012 -0400
[BZ 831603] Do not allow plugin defined templates to be deleted
DriftTemplateManagerBean now throws an IllegalArgumentException if you
try to delete a plugin defined template. The delete action in the
templates ui is now disabled for plugin defined templates.
commit 0d1c9b5ba59769e81b011dd3e601d0b611dce9b2
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jun 12 15:56:19 2012 -0400
[BZ 823691] parameterize properties in agent config files
commit bd7f77da94be7464ec63dd4287923159eac219f3
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jun 12 15:44:20 2012 -0400
[BZ 823691] Parameterize hard coded ports
commit aac611cbd375aa88e6633a3c535740b0a93e0a5e
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Jun 11 14:46:20 2012 -0400
Adding support for switching active metrics server plugin at runtime
commit dda7a63a407df4a77385df79716f5c25c522d534
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jun 10 21:25:49 2012 -0400
Adding resourceId property to TraitMeasurement inteface
A prior commit introduced some changes to better support
denormalization in the data model. This is a continuation of that
effort. The resource id is needed in addition to the schedule and
measurement def ids.
commit 87d28f93563a46a937bda29f498b35ad1217102a
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jun 10 17:48:48 2012 -0400
Adding impl for findTraitsByCriteria
commit cf757ec67f39e24d239ba8cec8dcafd46526a053
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jun 10 15:17:21 2012 -0400
Initial commit for TraitMeasurement and updating TraitsView to use it
MeasurementDataTrait implements TraitMeasurement and TraitsView (for an
individual resource) has been refactored to use TraitMeasurement instead
of the JPA specific MeasurementDataTrait. Most of the refactoring was
done in the data source classes. As part of this prototype effort, I
want to first focus on resource level view/operations, so the
refactoring was done in such a way to leave TraitsView and
TraitsDataSource for the group UI intact. It still directly uses
MeasurementDataTrait.
This is also the initial commit for MetricsGWTService which is a wrapper
for MetricsManagerBean.
commit cf526b326a5ebc275dbf15d4192be5bb811367f4
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jun 8 21:10:57 2012 -0400
Making changes to better support denormalization in the data model
This commit is primarily focused on the data model for
MeasurementDataTrait, though the changes likely will apply to other
types of MeasurementData as well. In the resource traits view in the UI
we perform a join to fetch fields from the measurement def with
which the trait is associated. A lot of NoSQL databases do not have any
support for joins; so, this commit introduces some changes that will
prevent having to query both the metrics (presumably nosql) database as
well as the rhq database to get the data to display in the traits view.
I saw two ways to go about persisting the measurement def data along
with the trait when the server receives the measurement report. The
first way would be to load the measurement defs when persisting the
report data. I elected not to go that route because that could
potentially be a lot of reads on what is already a performance intensive
operation.
I instead decided to add the necessary data to
MeasurementScheduleRequest. When a plugin receives a schedule request to
obtain a metric value, the plugin component creates the MeasurementDataTrait
object passing the request as an argument. The request is now persisted
as a field in the trait object. When the report is sent to the server,
all the data needed for denormalization is already there which allows us
to avoid any extra database hits.
commit 0a96ac51b81e6eb44f6fed7b44915e53e75ffe3a
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue May 22 00:57:33 2012 -0400
Adding test for data compression
This commit has a couple changes. It add a new method to the server
plugin interface, calculateAggregates which correspsonds roughly to
MeasurementCompressionManagerBean.compressPurgeAndTruncate. And this
commit also adds an initial test for generating aggregates in the 1 hour
table.
commit 5eb9b2e6766bb495f6bf93cd9130bd93ede960d1
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu May 17 15:31:51 2012 -0400
putting some initial test infrastructure in place
This commit adds support for writing tests against the rhq metrics
plugin. It sets up the necessary, minimal inventory and also includes
and initial test to verify that merging a measurement report adds
numeric data to the database.
commit 7afd08eb279a60635449b54c0e5bab69ce831432
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri May 11 07:52:02 2012 -0400
Initial commit for metrics server plugin
This initial commit is the first stab at encapsulating existing metrics
functionality in a server plugin. The ultimate goal is to be able
encapsulate functionality in a server plugin such that the
implementation can be seamlessly switched out for something like a
Cassandra or MongoDB backed plugin.
11 years, 10 months
[rhq] pom.xml
by ips
pom.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit aa77d7ee32f40ee646fec469cac8211bada3abd1
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Jun 26 16:35:36 2012 -0400
[BZ 835687] upgrade Postgres driver from 9.1-901.jdbc4 to 9.1-902.jdbc4 (https://bugzilla.redhat.com/show_bug.cgi?id=835687)
diff --git a/pom.xml b/pom.xml
index 210b697..603b89d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
<log4j.version>1.2.16</log4j.version>
<ojdbc6.version>11.2.0.3.0</ojdbc6.version>
<ems.version>1.3</ems.version>
- <postgresql.version>9.1-901.jdbc4</postgresql.version>
+ <postgresql.version>9.1-902.jdbc4</postgresql.version>
<h2.version>1.2.139</h2.version>
<jtds.version>1.2.2</jtds.version>
<richfaces.version>3.3.3.Final</richfaces.version>
@@ -179,7 +179,8 @@
<!-- NOTE: The below line is a workaround for a Maven bug, where it does not expand settings.* properties
used in the distributionManagement section of the POM. -->
<localRepository>${user.home}/.m2/repository</localRepository>
- <project.json.version>20080701</project.json.version>
+
+ <project.json.version>20080701</project.json.version>
</properties>
11 years, 10 months
[rhq] Branch 'bug/783603' - modules/core
by mazz
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java | 7 +++-
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java | 15 ++++++++--
modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java | 13 ++++----
3 files changed, 24 insertions(+), 11 deletions(-)
New commits:
commit 5f142aeb194d9c2f4c7a3a7313a01aa6105d9876
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jun 26 15:42:25 2012 -0400
[BZ 783603] fix the test that was failing. also add an additional configurable "initialDelay" setting so you can tell the runnable if it should delay performing the initial collection and if so how long that delay should be
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
index dfc9b06..7af868d 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
@@ -524,11 +524,14 @@ public class ResourceContext<T extends ResourceComponent<?>> {
/**
* Under certain circumstances, a resource component may want to perform asynchronous measurement reporting.
+ * Call this to obtain a runnable object that can be used to collect measurements asynchronously.
*
* @see #createAvailabilityCollectorRunnable(AvailabilityFacet, long)
*/
- public MeasurementCollectorRunnable createMeasurementCollectorRunnable(MeasurementFacet facet, long interval) {
- return new MeasurementCollectorRunnable(facet, interval, Thread.currentThread().getContextClassLoader(), this.collectionThreadPool);
+ public MeasurementCollectorRunnable createMeasurementCollectorRunnable(MeasurementFacet facet, long initialDelay,
+ long interval) {
+ return new MeasurementCollectorRunnable(facet, initialDelay, interval, Thread.currentThread()
+ .getContextClassLoader(), this.collectionThreadPool);
}
/**
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
index 79a8531..19bcc9c 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/measurement/MeasurementCollectorRunnable.java
@@ -74,6 +74,13 @@ public class MeasurementCollectorRunnable implements Runnable {
private final long interval;
/**
+ * The time, in milliseconds, that this collector wait before performing the first, initial collection.
+ * Once this initial delay expires, and the initial collection is performed, the {@link #interval} period
+ * must then expire before the next collection is performed.
+ */
+ private final long initialDelay;
+
+ /**
* The last known measurements for the resource that this collector is monitoring.
*/
private MeasurementReport lastReport = new MeasurementReport();
@@ -93,14 +100,15 @@ public class MeasurementCollectorRunnable implements Runnable {
* Creates a collector instance that will perform measurement reporting for a particular managed resource.
*
* The interval is the time, in milliseconds, this collector will wait between reports.
- * A typically value should be something around 30 minutes.
+ * A typically value should be something around 30 minutes, but its minium allowed value is 60 seconds.
*
* @param measured the object that is used to periodically check the managed resource (must not be <code>null</code>)
+ * @param interval the initial delay, in millis, before the first collection is performed.
* @param interval the interval, in millis, between measurement collections
* @param contextClassloader the context classloader that will be used when collection measurements
* @param threadPool the thread pool to be used to submit this runnable when it needs to start
*/
- public MeasurementCollectorRunnable(MeasurementFacet measured, long interval,
+ public MeasurementCollectorRunnable(MeasurementFacet measured, long initialDelay, long interval,
ClassLoader contextClassloader, ScheduledExecutorService threadPool) {
if (measured == null) {
@@ -122,6 +130,7 @@ public class MeasurementCollectorRunnable implements Runnable {
this.measured = measured;
this.contextClassloader = contextClassloader;
+ this.initialDelay = initialDelay;
this.interval = interval;
this.threadPool = threadPool;
this.lastReport = new MeasurementReport();
@@ -148,7 +157,7 @@ public class MeasurementCollectorRunnable implements Runnable {
boolean isStarted = this.started.getAndSet(true);
if (!isStarted) {
task.cancel(true);
- task = threadPool.scheduleWithFixedDelay(this, 0, interval, TimeUnit.MILLISECONDS);
+ task = threadPool.scheduleWithFixedDelay(this, initialDelay, interval, TimeUnit.MILLISECONDS);
log.debug("measurement collector started: " + this.facetId);
}
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
index 91e699e..dc00bee 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/CollectorThreadPoolTest.java
@@ -25,18 +25,17 @@ package org.rhq.core.pc;
import java.util.HashSet;
import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDataTrait;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pc.CollectorThreadPool;
import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
import org.rhq.core.pluginapi.availability.AvailabilityFacet;
import org.rhq.core.pluginapi.measurement.MeasurementCollectorRunnable;
@@ -92,9 +91,9 @@ public class CollectorThreadPoolTest {
public void testMeasurement() throws Exception {
log("testMeasurement");
TestMeasumentFacet component = new TestMeasumentFacet();
- MeasurementCollectorRunnable runnable = new MeasurementCollectorRunnable(component, 500L, null,
+ // 0L means do the initial collection immediately with no delay - so our test can run fast
+ MeasurementCollectorRunnable runnable = new MeasurementCollectorRunnable(component, 0L, 500L, null,
this.threadPool.getExecutor());
- runnable.start();
Set<MeasurementScheduleRequest> metrics = new HashSet();
metrics.add(new MeasurementScheduleRequest(0, "name", 0, true, DataType.TRAIT));
MeasurementReport report = new MeasurementReport();
@@ -102,8 +101,10 @@ public class CollectorThreadPoolTest {
assert 0 == report.getCollectionTime();
assert report.getTraitData().isEmpty();
+ runnable.start();
+
log("sleeping");
- Thread.sleep(1000L);
+ Thread.sleep(1000L); // just give it some time to do its thing
report = new MeasurementReport();
runnable.getLastValues(report, metrics);
11 years, 10 months
[rhq] Branch 'bug/783603' - 3 commits - modules/core modules/enterprise modules/plugins
by mazz
modules/core/client-api/pom.xml | 19 ++++++++++
modules/enterprise/gui/coregui/pom.xml | 19 ++++++++++
modules/enterprise/server/jar/pom.xml | 12 ++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 4 +-
modules/enterprise/server/xml-schemas/pom.xml | 19 ++++++++++
modules/plugins/perftest/pom.xml | 19 ++++++++++
6 files changed, 90 insertions(+), 2 deletions(-)
New commits:
commit c7e3556170eb697243dad8ea24dc891e646b99f5
Merge: a889e82 2dc5e65
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jun 26 15:14:03 2012 -0400
Merge remote-tracking branch 'origin/master' into bug/783603
commit 2dc5e65abef4476d0b2a6247d258488688232888
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Jun 26 18:02:25 2012 +0200
[BZ 835574 - When setting up workspace, the dynamically generated classes are not added to classpath] Solved using the org.codehaus.mojo:build-helper-maven-plugin. It adds the generated sources. NOTE: the mvn "process-resources" should be checked in the IDE Maven settings
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index b5f049f..834ad85 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -120,6 +120,25 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index aac9b9c..29662c8 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -345,6 +345,25 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-gwt-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/gwt</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<!--
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 2ad20a2..bf10fc1 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -775,6 +775,18 @@ Build-OS-Version=${os.version}
</sources>
</configuration>
</execution>
+ <execution>
+ <id>add-antlr-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/antlr3</source>
+ </sources>
+ </configuration>
+ </execution>
</executions>
</plugin>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index d14f05d..6923a7a 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -129,6 +129,25 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 739505b..e045081 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -77,6 +77,25 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
commit 9ee338547c8d09cb716b6982c74a11d22af212ec
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Jun 26 11:04:45 2012 -0400
Provide more verbose Exception information in DEBUG mode.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index f7ae643..dce2e23 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -380,8 +380,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// The most likely reason for a failure, although unlikely in itself, is that newly discovered resources
// are currently being merged into the platform, and associated with the doomed agent. In this case
// the user must wait until the merge is complete. Make sure the caller knows about this possibility.
- throw new IllegalStateException(
- "Failed to uninventory platform. This can happen if new resources were actively being imported. Please wait and try again shortly.");
+ String msg = "Failed to uninventory platform. This can happen if new resources were actively being imported. Please wait and try again shortly.";
+ throw new IllegalStateException(msg, (log.isDebugEnabled() ? e : null));
}
throw e;
11 years, 10 months
[rhq] modules/core modules/enterprise modules/plugins
by Jiri Kremser
modules/core/client-api/pom.xml | 19 +++++++++++++++++++
modules/enterprise/gui/coregui/pom.xml | 19 +++++++++++++++++++
modules/enterprise/server/jar/pom.xml | 12 ++++++++++++
modules/enterprise/server/xml-schemas/pom.xml | 19 +++++++++++++++++++
modules/plugins/perftest/pom.xml | 19 +++++++++++++++++++
5 files changed, 88 insertions(+)
New commits:
commit 2dc5e65abef4476d0b2a6247d258488688232888
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Jun 26 18:02:25 2012 +0200
[BZ 835574 - When setting up workspace, the dynamically generated classes are not added to classpath] Solved using the org.codehaus.mojo:build-helper-maven-plugin. It adds the generated sources. NOTE: the mvn "process-resources" should be checked in the IDE Maven settings
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index b5f049f..834ad85 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -120,6 +120,25 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index aac9b9c..29662c8 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -345,6 +345,25 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-gwt-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/gwt</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<!--
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 2ad20a2..bf10fc1 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -775,6 +775,18 @@ Build-OS-Version=${os.version}
</sources>
</configuration>
</execution>
+ <execution>
+ <id>add-antlr-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/antlr3</source>
+ </sources>
+ </configuration>
+ </execution>
</executions>
</plugin>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index d14f05d..6923a7a 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -129,6 +129,25 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 739505b..e045081 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -77,6 +77,25 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-xjc-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/target/generated-sources/xjc</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
11 years, 10 months
[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9ee338547c8d09cb716b6982c74a11d22af212ec
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Jun 26 11:04:45 2012 -0400
Provide more verbose Exception information in DEBUG mode.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index f7ae643..dce2e23 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -380,8 +380,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// The most likely reason for a failure, although unlikely in itself, is that newly discovered resources
// are currently being merged into the platform, and associated with the doomed agent. In this case
// the user must wait until the merge is complete. Make sure the caller knows about this possibility.
- throw new IllegalStateException(
- "Failed to uninventory platform. This can happen if new resources were actively being imported. Please wait and try again shortly.");
+ String msg = "Failed to uninventory platform. This can happen if new resources were actively being imported. Please wait and try again shortly.";
+ throw new IllegalStateException(msg, (log.isDebugEnabled() ? e : null));
}
throw e;
11 years, 10 months