Created
February 10, 2012 14:38
-
-
Save autre/1789947 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Report the sum of read bytes from the users | |
# of tenant ntua every 10 minutes, if the reads | |
# have come from the object service and the #bytes | |
# read are larger than 1000. | |
# | |
# The aggregation result will be queued under topic 'foo' | |
rule 'sum-over-ntua' | |
topic 'foo' | |
when | |
e.tenant = 'ntua', | |
e.producer = 'object_service', | |
e.bytes >= 1000, | |
then | |
sum e.read every 10 min | |
# for each user in the cloud, report | |
# the amount of bytes read | |
rule 'read-per-user-consumption' | |
topic 'reads' | |
when | |
e.type = 'read-event', | |
e.producer = 'object-service' | |
then | |
forall user = e.user | |
send user, sum e.read every 10 min |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment