...
- Receives events through the
buildStatisticsStream
. - Adds events that satisfy the condition
isBuildFailed == true
to a cron window. The cron window is configured to output at 1 am every day using the cron notation. - Selects the attributes
project
,productTeam,
lastCommitter
,count(timeStamp)
astotalBuildFailures
. - The group by clause causes the count() to be calculated per project.
- Outputs events to the
buildFailureStream
.
Prerequisites
See Prerequisites in CEP Samples Setup page.
...
- Points the default Axis2 repo to
<CEP_HOME>/samples/samplecep/artifacts/0115
(by default, the Axis2 repo is<CEP_HOME>/repository/deployment/server
).
...
Open another terminal, go to
<CEP_HOME>/samples/cep/producers/http
and run the following command:ant -Durl=http://localhost:9763/endpoints/buildStatisticsEventReceiver -Dsn=0115
It builds the http client and publishes the events at
<CEP_HOME>/samples/cep/artifacts/0115/buildStatisticsEvents.txt
to the buildStatisticsEventReceiver http endpoint.You can see the events getting received by CEP by the logs in its console.
Info | ||
---|---|---|
The above query will output the processed events at "1 am" as defined in the execurion plan. You can edit the query in "BuildFailureStatisticsPlan.siddhiql" file which is located in the
|