Branch: refs/heads/jsanda/metrics-schema Home: https://github.com/rhq-project/rhq Commit: b79e53c48488d2690150296d27971cb35edfedef https://github.com/rhq-project/rhq/commit/b79e53c48488d2690150296d27971cb35e... Author: John Sanda jsanda@redhat.com Date: 2014-04-20 (Sun, 20 Apr 2014)
Changed paths: M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/MetricsServer.java
Log Message: ----------- use the same insert time slice for each raw data
There is no need to recompute the insert time slice for each raw data. It is sufficient to use insert time slice timestamp as the starting point at which we beging inserting raw data.
Commit: 9763b6bc2b90e9be7d2ef4aa8537fdb434c3965e https://github.com/rhq-project/rhq/commit/9763b6bc2b90e9be7d2ef4aa8537fdb434... Author: John Sanda jsanda@redhat.com Date: 2014-04-21 (Mon, 21 Apr 2014)
Changed paths: M modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/storage/StorageClientManagerBean.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/aggregation/BaseAggregator.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/aggregation/CacheAggregator.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/aggregation/CombinedMetricsIterator.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/aggregation/PastDataAggregator.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/domain/AggregateNumericMetricMapper.java M modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/domain/CacheIndexEntry.java M modules/enterprise/server/server-metrics/src/test/java/org/rhq/server/metrics/MetricsPerfTests.java
Log Message: ----------- do not schedule aggregation tasks on I/O thread
I had previously and inadvertently perfoming the scheduling of aggregation tasks on an I/O thread. Long running tasks should never run on an I/O thread. I discovered this mistake in a test environment where I was generating NoHostAvailableExceptions because of this mistake.
This commit also makes a subtle yet significant change in AggregateNumericMetricMapper. It now checks for nulls which it should have been doing all along since we use weak consistency for reads and writes. The change was needed because I was hitting occassional NPEs with past data aggregation when 1 hr and/or 6 hr aggregates have to be computed. It is easiest to explain with an example.
Suppose we are aggregating some past data and we also need to aggregate the 1 hour data into 6 hour data. Almost immediately after computing and storing the 1 hour data for the given time slice, we then fetch all of the 1 hour data for the 6 hour time slice. Unless the query is against the same node to which the preceding write went, the query results might not include all of the data. We do not have to worry about the missing data in the result sets though because we already have the data in memory.
Compare: https://github.com/rhq-project/rhq/compare/69566bf95e44...9763b6bc2b90
rhq-commits@lists.fedorahosted.org