|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstreamcruncher.test.func.MultiStreamEventGenerator
streamcruncher.test.func.generic.ClusterHealthTest
public abstract class ClusterHealthTest
This Test demonstrates the use of the Extra parameters allowed in the
In-built Aggregation functions. The $diff parameter provided,
instructs the function to compute the difference between the New value and
the Old value, instead of outputting the New value directly had the extra
clause not been provided.
This example demonstrates a case where a Servers in a Datacenter keeps
pinging the ESP Kernel with Heartbeat Events every 5 seconds. With the use of
the pinned clause, the Partitions/Window remain in memory even
if the Window becomes empty - when the Server fails to ping within 5 seconds;
usually if the Server has gone down or the Network has partitioned. By using
the count(xxcolumn $diff) function definition, the Window and
hence the Aggregate remain in memory even if the Ping Event is not received
in time. The "count" dips to 0 and the "diff" (New value - Old value) turns
negative, which is when the Alarm is raised. The avg(..)
function can also be used to identify missed alerts when the avgrage value
becomes null.
count(.. ) functions defined for
levelb. One does not use the $diff clause and
so, it provides the absolute count of Events over the past 5 seconds. Two of
them use the $diff clause, out of which one uses a custom
ClusterHealthTest.CountDiffBaselineProvider, which always uses 0 as the baseline. The other
one, for which no custom Provider has been declared, uses the default
Provider.
Thus, Aggregates can be used to detect Trends in the Stream.
This test uses only one Stream. The other Streams are dormant.
| Nested Class Summary | |
|---|---|
static class |
ClusterHealthTest.CountDiffBaselineProvider
Custom Provider for the count function. |
static class |
ClusterHealthTest.StatsDiffBaselineProvider
Custom Provider for the Statistics functions ( avg,variance..). |
| Nested classes/interfaces inherited from class streamcruncher.test.func.MultiStreamEventGenerator |
|---|
MultiStreamEventGenerator.Event, MultiStreamEventGenerator.EventType |
| Constructor Summary | |
|---|---|
ClusterHealthTest()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterHealthTest()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||