[Hawkular-commits] [hawkular/hawkular-metrics] 9a4a5b: [HWKMETRICS-185] fix jboss-as plugin config and bl...

John Sanda jsanda at redhat.com
Mon Aug 10 22:41:40 EDT 2015


  Branch: refs/heads/HWKMETRICS-185
  Home:   https://github.com/hawkular/hawkular-metrics
  Commit: 9a4a5b5ad1ce1fe418ee7fed67c06bf32e162083
      https://github.com/hawkular/hawkular-metrics/commit/9a4a5b5ad1ce1fe418ee7fed67c06bf32e162083
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-10 (Mon, 10 Aug 2015)

  Changed paths:
    M api/metrics-api-common/src/main/java/org/hawkular/metrics/api/jaxrs/request/MetricDefinition.java
    M api/metrics-api-jaxrs-1.1/src/main/java/org/hawkular/metrics/api/jaxrs/handler/AvailabilityHandler.java
    M api/metrics-api-jaxrs-1.1/src/main/java/org/hawkular/metrics/api/jaxrs/handler/GaugeHandler.java
    M tests/rest-integration-tests-jaxrs-1.1/pom.xml

  Log Message:
  -----------
  [HWKMETRICS-185] fix jboss-as plugin config and blocking subscriber code

There are three changes with this commit. First, the jboss-as plugin seems to
ignore the <javaOpts> config property. It does recognize <jvmArgs>.

Secondly, there was a subtle JSON mapping issue. When creating a metric with no
tags, MetricDefinition.tags is null and not an empty map. This was leading to a
NPE. I guard against it in MetricDefinition.getTags().

Lastly, in both GaugeHandler.createGaugeMetric and
AvailabilityHandler.createAvailabilityMetric we had,

    observable.toBlocking().last();

The Observable does not emit any items so the last() call results in a
NoSuchElementException. Changing it to lastOrDefault(null) fixes it.




More information about the hawkular-commits mailing list