Bug 1031200
Summary: | Error rendering metrics chart; Attempt to compare null values in queryResourceMetrics | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> |
Component: | Core UI | Assignee: | Lukas Krejci <lkrejci> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.9 | CC: | hrupp, jshaughn, lkrejci |
Target Milestone: | GA | ||
Target Release: | RHQ 4.10 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-04-23 12:31:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Elias Ross
2013-11-15 21:23:10 UTC
This is caused by a bad plugin: How to reproduce: 1. Create two metrics with the same display name: <metric property="decr_misses" displayType="detail" displayName="Decr misses" description="Number of decr reqs against missing keys" ... <metric property="cas_misses" displayType="detail" displayName="Decr misses" description="Number of CAS reqs against missing keys" units="none" measurementType="trendsup"/> The assumption in MetricsViewDataSource.java is that the number of definitions will match the number of unique display names. //build id mapping for measurementDefinition instances Ex. Free Memory -> MeasurementDefinition[100071] final HashMap<String, MeasurementDefinition> measurementDefMap = new HashMap<String, MeasurementDefinition>(); for (MeasurementDefinition definition : definitions) { measurementDefMap.put(definition.getDisplayName(), definition); } //bundle definition ids for asynch call. definitionArrayIds = new int[definitions.size()]; -> change to -> definitionArrayIds = new int[measurementDefMap.size()]; Thanks for the BZ Elias. commit 3cbe934a3b7f986ca816744bb2578bdfbad23e56 Author: Lukas Krejci <lkrejci> Date: Thu Jan 30 18:04:52 2014 +0100 [BZ 1031200] - Don't assume unique display names of metrics While having unique names generally is true and even desirable, we were throwing NPE's in the UI due to that assumption. Now the UI will just correctly show 2 metrics with the same name which will hint the user correctly that there's something wrong with the plugin, not with RHQ itself. Note that the display name should never be empty. If it is not defined explicitly, it should be deduced from the name of the metric. The fix therefore doesn't account for null display names. Bulk closing of 4.10 issues. If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10. |