brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikezaccardo <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Add quorum check enricher and agg...
Date Tue, 17 Nov 2015 20:35:34 GMT
GitHub user mikezaccardo opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1037

    Add quorum check enricher and aggregator

    This addition enables the creation of a sensor, defined in YAML, to set its value based
on whether a quorum of entities has has the necessary source sensor value.
    
    Example:
    
    ```
    name: Quorum Check Test
    location: localhost
    services:
      - type: org.apache.brooklyn.entity.group.DynamicCluster
        name: Cluster
        
        brooklyn.config:
          initialSize: 5
        
        memberSpec:
            $brooklyn:entitySpec:
                type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
                name: Cluster Member
                
        brooklyn.enrichers:
        - type: org.apache.brooklyn.enricher.stock.Aggregator
          brooklyn.config:
            uniqueTag: service-all-is-up-aggregator
            enricher.transformation.untyped: "isQuorate"
            quorum.check.type: "allAndAtLeastOne"
            quorum.total.size: $brooklyn:config("cluster.initial.size")
            enricher.aggregator.excludeBlank: true
            enricher.aggregating.fromMembers: true
            enricher.sourceSensor: $brooklyn:sensor("service.isUp")
            enricher.targetSensor: $brooklyn:sensor("cluster.isQuorate")
    ```
    
    This creates a `cluster.isQuorate` sensor whose value depends on whether a quorum of cluster
members have `service.isUp` equal to true.  In this example, all members must have a true
value since `allAndAtLeastOne` is the specified `quorum.check.type`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mikezaccardo/incubator-brooklyn quorum-check-enricher-aggregator

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/1037.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1037
    
----
commit 2a7eb77ec44ae5ac83850fb4cbff729295806238
Author: Mike Zaccardo <mike.zaccardo@cloudsoftcorp.com>
Date:   2015-11-17T20:28:26Z

    Add quorum check enricher and aggregator

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message