Changes to the third parties libraries
Esper runtime dependencies have been upgraded to more recent versions. You will need to update your classpath accordingly.
| library | Esper 2.0 requires | Esper 1.12 required | Notes |
|---|---|---|---|
| cglib | 2.1.3 | 2.0.2 | The ASM explicit dependency that was included in 2.0.2 in the org.objectweb.asm package is now hidden |
| ANTLR | 3.0.1 | 2.7.5 | Only the antlr-runtime jar is needed at runtime which removes 500KB of dependencies |
| commons logging | 1.1.1 | 1.0.1 | |
| log4J | 1.2.14 | 1.2.8 | You can use an older or newer log4J dependency (or no log4J) as we abstract it with commons logging |
Changes to the API
The global package name for release 1.x was : net.esper
The package name for release 2.0 is: com.espertech.esper and com.espertech.esperio
Other Major API Changes:
- all method that include the word EQL have been renamed to EPL instead: EPAdministrator.createEQL is now EPAdministrator.createEPL
- the esperio packages have been changed from "net.esper.adapter" to "com.espertech.esperio"
Other Minor API Changes:
- Moved ExpiryTimeCacheDesc, LRUCacheDesc, DataCacheDesc, CacheReferenceType out inner classes of ConfigurationDBRef to ConfigurationExpiryTimeCache, ConfigurationLRUCache, ConfigurationDataCache, ConfigurationCacheReferenceType since the classes were applicable elsewhere
- Renamed method addJavaSqlTypesBinding on ConfigurationDBRef to addSqlTypesBinding
- The SODA API of the select-clause changed: class com.espertech.esper.client.soda.SelectClause now considers the order in which a wildcard element and stream wildcard selectors appear within the select-clause among all other expressions. A few public API methods changed slightly to use a single collection for wildcard, stream wildcard and select-clause expressions.
- ConfigurationAdapterLoader renamed to ConfigurationPluginLoader including related API, and XSD element adapter-loader renamed to plugin-loader
- Following ESPER-145 the start, stop and destroy operations on EPStatement no longer throw IllegalStateException if a statement is alreday started, stopped or destroyed
Changes to Engine Output
In release 2.0 we have made changes to engine output. The changes are designed to make the output more useful and consistent between different types of queries, and to make the engine more performant.
Please read through the changes if you use remove stream events in your application, or use output-rate limiting in your application.
Insert Stream-Only Output is the default
The release 2.0 engine, by default, does no longer output remove stream events. The reason is that many (most) queries do not require remove stream events. The release 1.x engine always generated remove stream events.
A new keyword "irstream" has been added to the existing "istream" and "rstream" keywords for use in the select-clause to generate remove stream events. For example, the following query generates both insert and remove stream events:
select irstream symbol, sum(price) from OrderEvent.win:time(30 min)
Release 2.0 adds an engine-wide configuration parameter that can be set such that all queries, without the need for the "irstream" keyword, generate insert and remove stream events. See release 2.0 documentation for this configuration item.
Remove stream events for Aggregated Queries
The change affects remove stream events posted by queries that have aggregation functions, and in which not all event properties are under aggregation function or group-by. This is the aggregated and grouped, or aggregated and un-grouped query type as described in the doc at http://esper.codehaus.org/esper-1.12.0/doc/reference/en/html_single/index.html#processingmodel_aggregation_batch_event_agg
The remove stream events for such queries now contain the aggregation value after an event leaves the data window(s). In release 1.12, the aggregation value posted by the engine is the value before an event leaves the data window(s).
See release 2.0 output appendix AND Esper 1.x Output Sample
Output Rate Limiting and Fully-aggregated Queries
In fully-aggregated queries that specify an output-clause, the default output (no keyword) for the release 2.0 engine is one row per event in the output batch, while the 1.12 version output one row per group. For version 2.0, the ALL and the LAST keyword provide output of one row per group. Fully-aggregated queries are queries in which all properties are under aggregation functions, except for grouped-by properties, see http://esper.codehaus.org/esper-1.12.0/doc/reference/en/html_single/index.html#processingmodel_aggregation_batch_group_agg
See release 2.0 output appendix AND Esper 1.x Output Sample
Output Rate Limiting and Aggregated Queries : Aggregation Value Granularity
When using output rate limiting and aggregation functions, Esper release 2.0 computes and posts to listeners the aggregation state for each event in the output batch. Release 1.x posted aggregation state for the complete batch.
See release 2.0 output appendix AND Esper 1.x Output Sample
Field name change for univariate stats "stat:uni" view and "stat:cube" OLAP view
The fields "sum" and "count" that were published by view "stat:uni" in release 1.x engine overlapped with the same-name aggregation functions and could therefore not appear by itself in the select-clause.
Release 2.0 renames these two fields to "total" and "datapoints" respectively. The change also affects the "stat:cube" view as its parameters use the same property names to determine the values to derive.