[Hawkular-commits] [hawkular/hawkular-alerts] fa42fc: Simplify Data subclasses

Jay Shaughnessy jshaughn at redhat.com
Fri Feb 6 15:57:43 EST 2015


  Branch: refs/heads/jshaughn/data-insert
  Home:   https://github.com/hawkular/hawkular-alerts
  Commit: fa42fc79c4ec60ff4de00232c5a96ed5993898f2
      https://github.com/hawkular/hawkular-alerts/commit/fa42fc79c4ec60ff4de00232c5a96ed5993898f2
  Author: Jay Shaughnessy <jshaughn at redhat.com>
  Date:   2015-02-06 (Fri, 06 Feb 2015)

  Changed paths:
    M hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/data/Availability.java
    M hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/data/Data.java
    M hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/data/NumericData.java
    M hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/data/StringData.java
    M hawkular-alerts-engine/src/main/java/org/hawkular/alerts/engine/impl/BasicAlertsServiceImpl.java
    M hawkular-alerts-engine/src/main/java/org/hawkular/alerts/engine/impl/DroolsRulesEngineImpl.java
    M hawkular-alerts-engine/src/main/java/org/hawkular/alerts/engine/rules/RulesEngine.java
    M hawkular-alerts-engine/src/test/java/org/hawkular/alerts/engine/RulesEngineTest.java

  Log Message:
  -----------
  Simplify Data subclasses
- push 'value' field down to Data so it can provide full equals/hashcode impls
- make Data Comparable so we can easily order Data being fed into rules engine
  - also allows us to protect against sending multiple datums for the same
    dataId into one rules execution.

Update RulesEngine API to make explicit the addition of Data and non-data Facts.
- Non-data facts are inserted immediately into the session
- Data is accumulated and ordered, and held until the next rule firing.
  - data facts are now inserted in time order, ascending
  - added logic to limit a rules execution to only one Data Fact for the same
    dataId (oldest first).


  Commit: 2d185dcc464cecd30e5c1b0220a7a5550006f1fc
      https://github.com/hawkular/hawkular-alerts/commit/2d185dcc464cecd30e5c1b0220a7a5550006f1fc
  Author: Jay Shaughnessy <jshaughn at redhat.com>
  Date:   2015-02-06 (Fri, 06 Feb 2015)

  Changed paths:
    M pom.xml

  Log Message:
  -----------
  remove Java 1.6 maven compiler directives and defer to the hawkular parent
pom (which uses java 1.8)


  Commit: b704bf61b2ffaf4eb9fee59bfdb2460cd4b0ac62
      https://github.com/hawkular/hawkular-alerts/commit/b704bf61b2ffaf4eb9fee59bfdb2460cd4b0ac62
  Author: Jay Shaughnessy <jshaughn at redhat.com>
  Date:   2015-02-06 (Fri, 06 Feb 2015)

  Changed paths:
    M hawkular-alerts-engine/pom.xml
    A hawkular-alerts-engine/src/test/resources/log4j.xml
    M pom.xml

  Log Message:
  -----------
  After a long investigation understood why debug logging was not happy
when we ran junit tests.  Because we were outside of WFly jboss logging
could not find log4j, and so defaulted to jdk logging.  To get the
log4j.xml to have any effect you need to be logging with log4j :)  So,
added WFly bom to parent pom dep mgmt, and a separate test scope dep on
log4j to the engine module.  This way the version of log4j is the same
no matter how we run things.


Compare: https://github.com/hawkular/hawkular-alerts/compare/fa42fc79c4ec^...b704bf61b2ff


More information about the hawkular-commits mailing list