[ESPER-810] Context partitioned by key throws NPE with partition key property in pattern filter expression Created: 03/Mar/15  Updated: 03/Mar/15  Resolved: 03/Mar/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.1
Fix Version/s: 5.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Could someone kindly comment on the below?

Is it allowed (and ok) to use single row functions in the stream definition while using a context partition? (Highlighted in yellow in the EPL below.)

@Name('OutputEvent') create schema OutputEvent as (registration String, status String, ruleName String);

@Name('PerVehicleStream') create context IndividualVehicle partition by registration from VehicleStream;

@Name('FreeParkingSpot') context IndividualVehicle insert into OutputEvent select event2.registration as registration, event2.status as status, "FreeParkingSpot" as ruleName from pattern [every (event1=VehicleStream(hasExited(registration) = false) -> event2=VehicleStream(hasExited(registration) = true))];

I am asking because I get a Null pointer exception while doing the same.

java.lang.NullPointerException

at com.espertech.esper.epl.expression.core.ExprIdentNodeEvaluatorContext.evaluate(ExprIdentNodeEvaluatorContext.java:38)

at com.espertech.esper.epl.expression.dot.ExprDotEvalStaticMethod.get(ExprDotEvalStaticMethod.java:128)

at com.espertech.esper.filter.FilterParamIndexEquals.matchEvent(FilterParamIndexEquals.java:29)

at com.espertech.esper.filter.FilterHandleSetNode.matchEvent(FilterHandleSetNode.java:99)






[ESPER-809] ExprBetweenCompBigDecimal.isLowIncluded/isHighIncluded shouldn't use equals Created: 19/Feb/15  Updated: 03/Mar/15  Resolved: 19/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 5.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi Esper Dev,

I have a problem where using the between clause with BigDecimals when
selecting from a window.

ExprBetweenCompBigDecimal is doing BigDecimal.equals comparison to test if
the value is equal to the upper or lower bound. BigDecimal.equals checks if
the scale of the two values is equal which we don't want in this case.

Interesting this is not failing when selecting directly from a stream rather
than a window.

The test below should output:

10
15
20
10.000
20.000

But is outputting:

10
15
20

Can't the ExprBetweenComp implementations use the previous result of the
calls to value.compareTo(...) to do the isHighIncluded and isLowIncluded
checks. That would be more efficient too.

Thanks,
From Richard.

package espertest;

import com.espertech.esper.client.*;
import com.tradingscreen.toolbelt.config.ConfigException;

import java.math.BigDecimal;

public class EsperTestBetweenBigDecimal {

public static class Bean {
public BigDecimal decimal;

public Bean(BigDecimal decimal)

{ this.decimal = decimal; }

public BigDecimal getDecimal()

{ return decimal; }

}

public static void main(String[] args) throws ConfigException

{ EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(); EPAdministrator epAdministrator = epService.getEPAdministrator(); epAdministrator.getConfiguration().addEventType(Bean.class); epAdministrator.createEPL("create window BeanWindow.std:unique(decimal) as Bean"); epAdministrator.createEPL("insert into BeanWindow select * from Bean"); epAdministrator.createEPL("select decimal from BeanWindow where decimal between 10.0 and 20.0").addListener(new EsperTestListener()); // Interesting this works: // epAdministrator.createEPL("select decimal from Bean where decimal between 10.0 and 20.0").addListener(new EsperTestListener()); EPRuntime epRuntime = epService.getEPRuntime(); epRuntime.sendEvent(new Bean(BigDecimal.valueOf(5))); epRuntime.sendEvent(new Bean(BigDecimal.valueOf(10))); epRuntime.sendEvent(new Bean(BigDecimal.valueOf(15))); epRuntime.sendEvent(new Bean(BigDecimal.valueOf(20))); epRuntime.sendEvent(new Bean(new BigDecimal("10.000"))); epRuntime.sendEvent(new Bean(new BigDecimal("20.000"))); }

public static class EsperTestListener implements UpdateListener {

@Override
public void update(EventBean[] newEvents, EventBean[] oldEvents) {
if (newEvents != null) {
for (EventBean eventBean : newEvents)

{ System.out.println(eventBean.get("decimal")); }

}
}
}
}






[ESPER-808] Accessing Data via Method Invocation on injected Objects Created: 05/Feb/15  Updated: 03/Mar/15  Resolved: 18/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 5.2

Type: New Feature Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperVariableMethodInvocationTest.java    
Number of attachments : 1

 Description   

In the current version Esper allows access to Non-Relational Data via Method Invocation, see: Polling Method Invocation Results via Iterator

Currently it is only possible to invoke static methods.

This is unfortunately a blocking point for any system using dependency-injection (e.g. Spring and Guice).

I would be great, if method invocations would also be possible on injected objects, e.g.:

select * from AssetMoveEvent, method:myLookupObject.lookupAsset(assetId);

These objects would probably also need to be configured, e.g.:

<lookupObject name="myLookupObject" type="com.espertech.Lookup" />

Then an object could be injected into the EPRuntime, e.g.

runtime.setLookupObject("myLookupObject", obj);

I believe this would be a great enhancement to Esper, finally allowing it to be fully integrated into a dependency injection environment.



 Comments   
Comment by Thomas Bernhardt [ 05/Feb/15 ]

EPL already has variables that can be injected and called. Variables are just not part of the method invocation syntax but that could be changed.

Comment by Andy Flury [ 05/Feb/15 ]

Yes, that might be a solution.

Would be good to also have a way to invoke methods on non-serializable / potentially immutable objects like Spring Beans (If I'm not mistaken variables need to implement Serializable at present)

Comment by Thomas Bernhardt [ 17/Feb/15 ]

Variables do not need to implement Serializable.

Comment by Andy Flury [ 18/Feb/15 ]

Are you sure? http://esper.codehaus.org/esper-5.1.0/doc/reference/en-US/html_single/index.html#variable_eventtype states that variables need to implement Serializable.

Comment by Thomas Bernhardt [ 18/Feb/15 ]

In respect to setting properties of event-typed variables yes, since events are immutable.

Comment by Andy Flury [ 18/Feb/15 ]

So yes, back to the original comment, variables might be a solution for this JIRA. But it would be great to also have a way to invoke methods on non-serializable objects (e.g. Spring Beans)

Comment by Thomas Bernhardt [ 18/Feb/15 ]

Invoking methods on for example Spring beans is done via variables.

When using non-constant class or event-type variables and when your EPL intends to set property values on the variable itself (i.e. "set varPageHitZero.userId"), only then must the class be Serializable.

Comment by Thomas Bernhardt [ 18/Feb/15 ]

changes are in "enhancements520" branch

Comment by Andy Flury [ 19/Feb/15 ]

Thanks Tom!

I have compiled "enhancements520" and have been able to invoke a method on an injected object.

However I still get below exception when trying to inject a non-serializable object, even though it is declared as constant. Please see attached test class:

Exception in thread "main" com.espertech.esper.client.ConfigurationException: Failed to snapshot configuration instance through serialization : ch.algotrader.test.esper.EsperVariableMethodInvocationTest$A
	at com.espertech.esper.core.service.EPServiceProviderImpl.takeSnapshot(EPServiceProviderImpl.java:789)
	at com.espertech.esper.core.service.EPServiceProviderImpl.<init>(EPServiceProviderImpl.java:88)
	at com.espertech.esper.client.EPServiceProviderManager.getProviderInternal(EPServiceProviderManager.java:132)
	at com.espertech.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:88)
	at com.espertech.esper.client.EPServiceProviderManager.getDefaultProvider(EPServiceProviderManager.java:45)
	at ch.algotrader.test.esper.EsperVariableMethodInvocationTest.main(EsperVariableMethodInvocationTest.java:19)
Caused by: java.io.NotSerializableException: ch.algotrader.test.esper.EsperVariableMethodInvocationTest$A
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
	at java.util.HashMap.writeObject(HashMap.java:1133)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
	at com.espertech.esper.util.SerializableObjectCopier.copy(SerializableObjectCopier.java:32)
	at com.espertech.esper.core.service.EPServiceProviderImpl.takeSnapshot(EPServiceProviderImpl.java:785)
	... 5 more
Comment by Thomas Bernhardt [ 19/Feb/15 ]

There are two ways, as per doc in "5.17.5. Class and Event-Type Variables":
create constant variable StateCheckerService stateChecker = StateCheckerServiceFactory.makeService()
or
admin.getConfiguration().addVariable("stateChecker", StateCheckerService.class, StateCheckerServiceFactory.makeService(), true);

I think you are trying to use "Configuration" and that does not allow non-serializable.

Comment by Andy Flury [ 19/Feb/15 ]

Hi Tom

I did not know that there was a difference between:

Configuration config = new Configuration();
config.addVariable("myObject", MyObject.class, new MyObject(), true);

and

admin.getConfiguration().addVariable("myObject", MyObject.class.getName(), new MyObject(), true);

Using the second approach I was able to invoke a method (even inside a join) on an injected non-serializable object.

Thanks
Andy

Comment by Thomas Bernhardt [ 19/Feb/15 ]

The "Configuration" represents only what can be put into the XML file. Its in fact a one-to-one mapping to the config XML.





[ESPER-807] Outer join with context partitions thread safety issue Created: 04/Feb/15  Updated: 03/Mar/15  Resolved: 17/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.1
Fix Version/s: 5.2

Type: Bug Priority: Major
Reporter: Nick Ward Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive esper-test-case.zip    
Testcase included: yes
Number of attachments : 1

 Description   

As mentioned on the esper-user mailing list, we are regularly getting exceptions from esper. I have managed to get this down to a test case that indicates it is related to a n-ary join.

Notes:
  • The test case uses high cpu to provoke the exceptions. Actually running this normally, we don't see high cpu (~5%)
  • There are tables mentioned in the join clauses that don't appear in the select clause. In reality we are pulling information out of each of the events but this would just muddy the test case.
  • Although it is a complex join, I would expect it to be doing it all inside the context lock for the windows so I wouldn't expect anything else to be modifying the indices at the same time
  • It doesn't produce the same exceptions every time but it is generally a mixture of:
    • ConcurrentModificationException
    • ArrayIndexOutOfBoundsException
    • NullPointerException


 Comments   
Comment by Nick Ward [ 10/Feb/15 ]

Any luck running this and seeing the issue?
Cheers,

Comment by Rainer Guessner [ 10/Feb/15 ]

I was able to reproduce an issue. Thanks for the case. Most likely this is a lock assignment problem with the contexts and named windows.

Comment by Thomas Bernhardt [ 10/Feb/15 ]

The problem is that assembly nodes for outer joins are shared between context partitions however should be created for each context partition separately. You could change code to fix this issue by looking at BaseAssemblyNode and making all subclasses use threadlocals instead. The plan would be that the next release correctly uses factories for these objects.

Comment by Thomas Bernhardt [ 11/Feb/15 ]

The next release is in the JIRA roadmap, at the beginning or middle of March.

Comment by Thomas Bernhardt [ 17/Feb/15 ]

changes are in branch bugfix510





[ESPER-806] The type checking rejects the child types for non-bean types and insert Created: 04/Feb/15  Updated: 03/Mar/15  Resolved: 17/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.1
Fix Version/s: 5.2

Type: Bug Priority: Major
Reporter: Ivan Rychagov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File test.epl    
Number of attachments : 1

 Description   

Validation of EPL (in attach) fails with error below:

Error starting statement: Validation failed in when-not-matched (clause 1): Event type named 'IncidentWindow' has already been declared with differing column name or type information: Type by name 'IncidentWindow' in property 'event' expected event type 'Event' but receives event type 'ChildEvent'






[ESPER-805] toEPL() generates badly formatted EPL for contained event selections Created: 03/Jan/15  Updated: 03/Mar/15  Resolved: 17/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jonathan Heusser Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX, java version "1.7.0_45"


Number of attachments : 0

 Description   

Compiling a contained event selection statement as below generates wrongly formatted EPL code when converting it back to EPL using toEPL() on its EPStatementObjectModel. E.g.:

Module m = engine.getEPAdministrator().getDeploymentAdmin().parse("module some.name; select * from AccountEvent[select * from wallets where currency = 'USD'];");

then iterating through the ModuleItems and compiling them

EPStatementObjectModel compiled = admin.compileEPL(item.getExpression());

then compiled.toEPL() generates the string where the where keyword is missing and a where clauses have no white spaces to the from clause:

"select * from AccountEvent[select * from walletscurrency="USD"]"



 Comments   
Comment by Jonathan Heusser [ 05/Jan/15 ]

snippet above assumes AccountEvent is an available schema





[ESPER-804] Allow Subscriber methods other than "update" Created: 22/Dec/14  Updated: 03/Mar/15  Resolved: 18/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 5.2

Type: Improvement Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File esper-subscriber-method.patch    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

Would you consider attached patch that allows Subscribers methods to be named other than "update"?

In projects using dependency injection (e.g. Spring) individual objects (i.e. beans) are often singletons. Up until now it is only possible to use such objects as subscribers if they provide a method named "update".

Attached patch allows to define an arbitrary update method name.






[ESPER-803] outer join with historical stream and on-clause in addition to where-clause causes incorrect result Created: 24/Nov/14  Updated: 03/Mar/15  Resolved: 17/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.1
Fix Version/s: 5.2

Type: Bug Priority: Major
Reporter: Nikolay Klendar Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows 7


Attachments: File testdb.sql     Java Source File test.java    
Number of attachments : 2

 Description   

I use following expression to detect address scanning:
and it works well

select src_ip,dst_ip,dst_port,ip from firewall.win:time(30 sec) as fw
group by fw.src_ip "
having count(distinct fw.dst_ip) > 50"
output first every 1 hour"

I decided to use external mysql table scanAllowed consists of ip addresses which is allowd to scan and modified my EPL to use external data
select src_ip,dst_ip,dst_port,ip from firewall.win:time(30 sec) as fw
left outer join sql:mysql ['select ip from scanAllowed'] as allowed on fw.src_ip=allowed.ip
where ip is null
group by fw.src_ip
having count(distinct fw.dst_ip) > 50
output first every 1 hour

I filled table scanAllowed with values 10.0.0.1, 10.0.0.2.
I created test and decided to use caching for sql datasource:

String[] firewallPropsNames =

{"src_ip", "src_port","dst_ip","dst_port","action"};
Object[] firewallpropsTypes =
{String.class,int.class,String.class,int.class,String.class};

Configuration engineConfig = new Configuration();
engineConfig.addEventType("firewall",firewallPropsNames,firewallpropsTypes);
ConfigurationDBRef mysql = new ConfigurationDBRef();
mysql.setDriverManagerConnection("com.mysql.jdbc.Driver",
"jdbc:mysql://localhost/testDB", "user", "password");
mysql.setExpiryTimeCache(60, 120);
engineConfig.addDatabaseReference("mysql", mysql);

for (int i=0; i<100;i++){
Object [] fwEvent={"192.168.0.1",32000,"10.0.0."+i,22,"permit"};
String[] firewallPropsNames =
{"src_ip", "src_port","dst_ip","dst_port","action"}

;
runtime.sendEvent(fwEvent,"firewall");
}
for (int i=0; i<100;i++){
Object [] fwEvent=

{"10.0.0.1",32000,"10.0.0."+i,22,"permit"}

;
String[] firewallPropsNames =

{"src_ip", "src_port","dst_ip","dst_port","action"}

;
runtime.sendEvent(fwEvent,"firewall");
}

and results wer

Event received com.espertech.esper.event.map.MapEventType@110ff2b

{dst_port=22, dst_ip=10.0.0.50, src_ip=192.168.0.1, ip=null}
Event received com.espertech.esper.event.map.MapEventType@110ff2b {dst_port=22, dst_ip=10.0.0.50, src_ip=10.0.0.1, ip=null}

the last row should not be shown because src_ip is 10.0.0.1 and this value is there in allowdScan table
but if I disable caching by removing mysql.setExpiryTimeCache(60, 120); I see correct result:
Event received com.espertech.esper.event.map.MapEventType@14f686d {dst_port=22, dst_ip=10.0.0.50, src_ip=192.168.0.1, ip=null}

 Comments   
Comment by Thomas Bernhardt [ 25/Nov/14 ]

Can you please create a very simply test class and SQL that reproduces this issue.

Comment by Nikolay Klendar [ 25/Nov/14 ]

testClass with main method

Comment by Nikolay Klendar [ 25/Nov/14 ]

sql script to create table

Comment by Nikolay Klendar [ 25/Nov/14 ]

first run with false then with true, boolean parameter is responsible for turning on
mysql.setExpiryTimeCache(60, 120); statement
next rut with the parameter set to false





[ESPER-802] EsperIO CSV and CurrentTimeEvent issue Created: 24/Nov/14  Updated: 03/Mar/15  Resolved: 19/Feb/15

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 5.2

Type: Bug Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File AbstractCoordinatedAdapter.patch     Java Source File EsperCsvTest.java     Text File prices.txt    
Testcase included: yes
Patch Submitted:
Yes
Number of attachments : 3

 Description   

there is an issue with CurrentTimeEvents when using EsperIO CSV

Please have a look at attached example class and CSV file

The class basically outputs the timestamp associated with each event (CurrentTimeEvent and PriceEvent), in addition the CurrentEPTime is printed.

The result looks like this:
TimeEvent: 0 ep time: 0
Event: 2 ep time: 0
TimeEvent: 2 ep time: 2
Event: 3 ep time: 2
Event: 3 ep time: 2
TimeEvent: 3 ep time: 3
Event: 8 ep time: 3
TimeEvent: 8 ep time: 8

So as one can see the CurrentTimeEvent belonging to the first Event (with timestamp=2) only arrives after the first event. For that reason
CurrentEPTime is still at 2 while the first Event arrives.

I my believe the correct output should look like this:

TimeEvent: 0 ep time: 0
TimeEvent: 2 ep time: 2
Event: 2 ep time: 2
TimeEvent: 3 ep time: 3
Event: 3 ep time: 3
Event: 3 ep time: 3
TimeEvent: 8 ep time: 8
Event: 8 ep time: 8

This time the TimeEvent arrives before the Event and therefore the CurrentEPTime is correct.

I believe attached patch might solve the issue.






[ESPER-801] Json renderer escape in a wrong way Created: 08/Oct/14  Updated: 16/Oct/14  Resolved: 13/Oct/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Emanuele Paterna Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

OutputValueRenderJSONString.

Characher '>' is escaped using '\>'.
Every json parser fail to render output correctly.

The method is:
com.espertech.esper.event.util.OutputValueRenderJSONString#enquote(String,StringBuilder)






[ESPER-800] Custom aggregation function with multiple parameters receives WildcardParameter instead of event Created: 22/Sep/14  Updated: 16/Oct/14  Resolved: 13/Oct/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Kaz Gwozdz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Custom aggregation function with multiple parameters that receives wildcard as one of arguments - for example: foo(*, 100) - receives instance of WildcardParameter class instead of event. This is similar issue to ESPER-662, which was already fixed for single-parameter aggregation functions.






[ESPER-799] Escaping comma character error while using socket adapter Created: 05/Sep/14  Updated: 16/Oct/14  Resolved: 14/Oct/14

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1

Type: Bug Priority: Major
Reporter: Pavel Kakhutin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File OTCTradeEvent.java     PNG File screen.png     Zip Archive test_script.zip    
Number of attachments : 3

 Description   

I'm using socket adapter with CSV data format to send events from external system.

I tried to use format:
stream=MyEvent,field1=value without comma,field2="value with, comma",field3=other

but it doesn't work

When I start statement "select * from MyEvent" I see only "value with in field2.






[ESPER-798] Esper concurrency and queueing Created: 31/Jul/14  Updated: 01/Aug/14  Resolved: 31/Jul/14

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Lawrence Mount Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Often under high load the implementation of a collapsing queue (eg: com.lma=
x.collections.coalescing.ring.buffer.CoalescingBuffer) is very useful.
Currently this can be achieved if one disables inbound threading and implements collapsing before submitting to esper (working nicely if external input threads align to context partitions).
However if one wishes to use say hash-segmented contexting then input threading needs to be enabled. This causes all inbound events to placed on a queue and removes the ability to collapse.
Is there anything currently I am unaware of that can help with this (if not I will ponder and raise a feature request).
Raised in jira as my mails to the user group do not succeed.



 Comments   
Comment by Lawrence Mount [ 01/Aug/14 ]

I am interpreting this as . No there is no facility/interest in collapsing currently





[ESPER-797] Please add javadoc jar for Esper in Maven repository Created: 15/Jul/14  Updated: 13/Oct/14  Resolved: 13/Oct/14

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 5.0
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Dmitry Kholodilov Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Recent version of Esper (http://repository.codehaus.org/com/espertech/esper/5.0.0/) has sources.jar attached, but no javadoc.jar. It is needed by documentation tools, such as Dash.

Attaching javadocs is as simple as adding plugin execution into pom.xml:

<plugin>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.9</version>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>


 Comments   
Comment by Dmitry Kholodilov [ 15/Jul/14 ]

Related issue (already resolved) - https://jira.codehaus.org/browse/ESPER-413

Comment by Thomas Bernhardt [ 13/Oct/14 ]

Javadoc jar is too large (22MB)





[ESPER-796] EventType Configuration Exception compiling Pojo with Collections Created: 10/Jul/14  Updated: 16/Oct/14  Resolved: 31/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Aram Openden Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java 7 runtime


Attachments: Text File esper.question.example.PojoEventTest.txt     Zip Archive esper-test-2.zip     Zip Archive mailing-list-example.zip    
Testcase included: yes
Number of attachments : 3

 Description   

On 7/8/2014, I submitted a question to the Epser_user Mailing list ( user@esper.codehaus.org) with the subject: " Fwd: EventType Configuration Exception compiling Pojo with Collections." I received no response.

Hence, I am submitting the issue as a bug to the Esper JIRA.

I am seeing an exception I get trying to compile an Esper event Configuration using a Java POJO object. This POJO contains a collection that uses the Java "bounded wildcard" syntax, making it "generic".

I am attaching three sample .java files that illustrate the exception: Document.java, Note.java and PojoEventTest.java (the unit test that drives the scenario).

I am using a POJO event Object in my Esper configuration. The structure of the object hierarchy is a Document may contain many Note(s). Please see the attached .mailing-list-example.zip file (and extract) to refer to the java code that generates the exception.

My EPL statement is:
SELECT d.* FROM document d WHERE d.docNotes.anyOf(x => x.noteId = 7)

The result is the NullPointerException shown in this stack trace:
java.lang.NullPointerException:null [SELECT d.* FROM document d WHERE d.docNotes.anyOf(x => x.noteId = 7)]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:1068)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:254)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStoppedAssignName(StatementLifecycleSvcImpl.java:182)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:137)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:81)
at esper.question.example.PojoEventTest.pojoWithCollectionsEventTest(PojoEventTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at.....

One of the main reasons our team chose Esper as the engine for our Event-processing application was that we could leverage use of existing Java POJO's from our application model. So, we prefer to leverage those existing Java POJOs, if possible.

I do not know if this is expected behavior or a bug. Hoping to get some clarification, direction or get the issue fixed.



 Comments   
Comment by Thomas Bernhardt [ 11/Jul/14 ]

can you please test against the latest version?

Comment by Aram Openden [ 11/Jul/14 ]

Thomas: Tested again against latest release version: 5.0.0. Same result. Please see new attachments: esper.question.example.PojoEventTest.txt and esper-test-2.zip. The .zip file contains the pom with the updated dependencies.





[ESPER-795] Multidrectional join between two unique-window named windows join throws errors and returns spurious results. Created: 01/Jul/14  Updated: 16/Oct/14  Resolved: 13/Oct/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Major
Reporter: Lawrence Mount Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperUniqueIndexViolationTest.java     File MultidirectionalJoin.epl     Java Source File MultidirectionalJoinTest.java    
Testcase included: yes
Number of attachments : 3

 Description   

The following epl and junit test illustrate issues we are having with queries that join two unique windows receiving high update volumes.
The behaviour only arises when multiple threads are operating, either by sending events in multiple threads with default threading. Or by sending events in a single thread and enabling engine input threading.

Symptoms are:
1.Exceptions of the form.
com.espertech.esper.client.EPException: Unique index violation, index is a unique index and key 'key2' already exists (not sure why this would ocurr on a unique window)
2. Corruptions and incorrect results.

Attached test.
1.Feeds through some events to establish a base state.
2.Fires through many events
3.Feeds through the original events and tests the state.

The unthreaded test case passes and never throws exceptions (this can be broken by enabled engine threading).
The threaded test case throws exceptions and intermittently fails.
Please let me know if anything is unclear.



 Comments   
Comment by Lawrence Mount [ 03/Jul/14 ]

Hi,
Have you guys had chance to look at this test and see what is going on? I would have thought the above use case is fairly common and is definitely pervasive in our system. The fact that it can go wrong under load is therefore a critical issue for us.

Comment by Lawrence Mount [ 08/Jul/14 ]

com.espertech.esper.epl.join.table.PropertyIndexedEventTableSingleUnique.remove(EventBean theEvent)
line 123
private void remove(EventBean theEvent)
{
Object key = getKey(theEvent);
EventBean event = propertyIndex.get(key);
if (event == null || !event.equals(theEvent))

{ return; }
propertyIndex.remove(key);
}
changed to
private void remove(EventBean theEvent)
{
Object key = getKey(theEvent);
EventBean event = propertyIndex.get(key);
if (event == null ) { return; }

propertyIndex.remove(key);
}
And the test case passes.
So it looks like the index is getting corrupted.
Any thoughts?

Comment by Lawrence Mount [ 31/Jul/14 ]

The same applies to multi keys and symettrical affects the PropertyIndexedEventTableSingle class

Comment by Andy Flury [ 31/Jul/14 ]

Hi Lawrence, we are experiencing exactly the same issue. I have attached another class that demonstrates the problem. The test fails after some time with both InboundThreading enabled and disabled.





[ESPER-794] OSGi Manifest does not contain com.espertech.esper.epl.agg.aggregator package Created: 18/Jun/14  Updated: 16/Oct/14  Resolved: 14/Oct/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0, 4.11.0
Fix Version/s: 5.1

Type: Bug Priority: Major
Reporter: George Nicoll Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, apache karaf runtime


Number of attachments : 0

 Description   

Code that defines its own aggregation functions (by extending com.espertech.esper.epl.agg.aggregator.AggregationMethod) cannot be used in an OSGi container as the Manifest does not export com.espertech.esper.epl.agg.aggregator package.

I can get round this by embedding the esper dependency in my referencing bundle but this is not ideal






[ESPER-793] QualityOfService example main uses wrong provider URI Created: 13/Jun/14  Updated: 16/Oct/14  Resolved: 30/Jul/14

Status: Closed
Project: Esper
Component/s: Examples
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The main uses the wrong provider API, test cases however use the correct one.






[ESPER-792] Dataflow is not initializing in correct order with ~16+ operators Created: 10/Jun/14  Updated: 16/Oct/14  Resolved: 30/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Blocker
Reporter: Matti Oikarinen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any.


Number of attachments : 0

 Description   

Dataflow is sorting the operators to a HashSet class that is not sorted! This prevents the initialization of operators that depend on each other as output channels are not found. To reproduce the problem:

  • Create a simple data flow with ~17 operators that depend each other in a chain.
  • Run the data flow -> initialization will fail as HashSet will not end up being sorted. Note: this has worked in small test cases as the Java SDK HashSet implementation ends up having the first ~15-16 entries in sorted order (coincident).

Bug is in DataFlowServiceImpl class analyzeBuildOrder function. Note: there is second bug in the sorting loop also - it does not create the order correctly.

Here is a sample fix that seems to work:
private Set<Integer> analyzeBuildOrder(Map<Integer, OperatorDependencyEntry> operators) throws ExprValidationException {

DependencyGraph graph = new DependencyGraph(operators.size(), true);
for (Map.Entry<Integer, OperatorDependencyEntry> entry : operators.entrySet()) {
int myOpNum = entry.getKey();
Set<Integer> incomings = entry.getValue().getIncoming();
for (int incoming : incomings)

{ graph.addDependency(myOpNum, incoming); }

}

// Fix 1: use LinkedHashSet
LinkedHashSet<Integer> topDownSet = new LinkedHashSet<Integer>();
while(topDownSet.size() < operators.size()) {

// seconardy sort according to the order of listing
Set<Integer> rootNodes = new TreeSet<Integer>(new Comparator<Integer>() {
public int compare(Integer o1, Integer o2)

{ return -1 * o1.compareTo(o2); }

});
rootNodes.addAll(graph.getRootNodes(topDownSet));

if (rootNodes.isEmpty()) { // circular dependency could cause this
for (int i = 0; i < operators.size(); i++) {
if (!topDownSet.contains)

{ rootNodes.add(i); break; }

}
}

topDownSet.addAll(rootNodes);
}

// Ugly fix 2: invert the output as it was incorrect
LinkedHashSet<Integer> inverted = new LinkedHashSet<Integer>();
Integer[] arr = topDownSet.toArray(new Integer[0]);
for (int i = arr.length - 1; i >= 0; i--)

{ inverted.add(arr[i]); }

return inverted;
}






[ESPER-791] "Route" API call with outbound threading enabled does not work Created: 03/Jun/14  Updated: 16/Oct/14  Resolved: 31/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestOutboundThreadingWithRoute.java    
Number of attachments : 1

 Description   

Sample code attached.



 Comments   
Comment by Thomas Bernhardt [ 03/Jun/14 ]

The workaround is to use "sendEvent" in this specific configuration.





[ESPER-790] IndexOutOfBoundsException if EPAdministrator.create(EPStatementObjectModel sodaStatement, String statementName) is used Created: 19/May/14  Updated: 30/Jul/14  Resolved: 30/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Type: Test Priority: Minor
Reporter: Gabriel Pilz Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: bug, exception, workaround
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If a statement is created with a String containing a natural number as statementName with EPAdministrator.create(EPStatementObjectModel sodaStatement, String statementName) and the statement consists of more than three '->' expressions (meaning A -> B -> C -> D ...), the esper engine crashes with an IndexOutOfBoundsException(index 0, size 0) if the fourth expression (-> D) is processed EVEN if the given statementName wasn't unique and got extended.

Workaround: Use EPAdministrator.createEPL(String, String), where the String should be created via EPStatementObjectModel.toEPL() or use the method mentioned above but with 'real' Strings containing more than natural numbers (e.g. "a9").

This was tested with versions 3.5.0, 4.11.0, 5.0.0.

Method call:

EPStatementObjectModel stmtModel = ... // every A -> B -> C -> D ...
EPAdministrator.create(stmtModel, someString);

...

sendEvent(A);
sendEvent(B);
sendEvent(C);
sendEvent(D); // crashes

The stacktrace is as follows:

ERROR: com.espertech.esper.core.service.ExceptionHandlingService - Exception encountered processing statement '9' statement text 'select * from pattern [every A -> B -> C -> D' : Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
	at java.util.ArrayList.get(ArrayList.java:411)
	at com.espertech.esper.pattern.EvalAndStateNode.generateMatchEvents(EvalAndStateNode.java:260)
	at com.espertech.esper.pattern.EvalAndStateNode.generateMatchEvents(EvalAndStateNode.java:242)
	at com.espertech.esper.pattern.EvalAndStateNode.evaluateTrue(EvalAndStateNode.java:154)
	at com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterStateNode.java:80)
	at com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterStateNode.java:134)
	at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterMultiple(EPRuntimeImpl.java:1212)
	at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:1054)
	at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:465)
	at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:440)
	at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197)


 Comments   
Comment by Thomas Bernhardt [ 19/May/14 ]

Please provide a test class.

Comment by Gabriel Pilz [ 20/May/14 ]

As I am creating the test class, I realized that this bug has nothing to do with the statementName but with the EPStatementObjectModel. I am still struggling to create a test case to reproduce this behaviour.





[ESPER-789] com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'null' Created: 14/May/14  Updated: 23/Feb/15  Resolved: 23/Feb/15

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 4.11.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Wolfgang Huettig Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: exception
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 and 8,
Jdk7_u15


Number of attachments : 0

 Description   

Hello,

we have problems with an error in error in "esper" for some time now:

java.lang.RuntimeException: com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'null'
...
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'null'
at com.espertech.esper.core.service.ConfigurationOperationsImpl.addEventType(ConfigurationOperationsImpl.java:316)
...
Caused by: com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'null'
at com.espertech.esper.event.xml.XSDSchemaMapper.readSchemaInternal(XSDSchemaMapper.java:131)
at com.espertech.esper.event.xml.XSDSchemaMapper.loadAndMap(XSDSchemaMapper.java:63)
at com.espertech.esper.core.service.ConfigurationOperationsImpl.addEventType(ConfigurationOperationsImpl.java:312)
... 18 more

We found some posts online from people having the same problem. It seemed to have something to do with the java version. The error occurs in java versions since jdk7u40.

Since then we are still running on jdk7_u15 and everything seemed to work.

But lately the error happened even with this version.

We are using:
Esper 4.11.0.
jdk_7_u15

Are there any known issues that can lead to this error except to the java version and are there any known fixes for that problem?

Thank you very much.

Kind regards.

Wolfgang



 Comments   
Comment by Thomas Bernhardt [ 23/Feb/15 ]

see https://jira.codehaus.org/browse/ESPER-764





[ESPER-788] Exception on uppercase MIN/MAX Created: 12/May/14  Updated: 16/Oct/14  Resolved: 30/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Test Priority: Major
Reporter: Satoshi Tagomori Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Queries like 'SELECT MIN(bytes) FROM ...' occurs ASTWalkException.

com/espertech/esper/epl/parse/ASTWalkException.java:27:in `from': com.espertech.esper.epl.parse.ASTWalkException: Uncountered unrecognized min or max node 'MAX'
from com/espertech/esper/epl/parse/ASTLibFunctionHelper.java:302:in `handleMinMax'
from com/espertech/esper/epl/parse/ASTLibFunctionHelper.java:140:in `handleLibFunc'
from com/espertech/esper/epl/parse/EPLTreeWalkerListener.java:302:in `exitLibFunction'
from com/espertech/esper/epl/generated/EsperEPL2GrammarParser.java:13692:in `exitRule'
from org/antlr/v4/runtime/tree/ParseTreeWalker.java:71:in `exitRule'
//snip

It seems that "toLowerCase()" are missing in ASTLibFunctionHelper.java line 302 and 305






[ESPER-787] NEsper .NET: regex performance can be improved if using compiled statement Created: 25/Apr/14  Updated: 25/Apr/14

Status: Open
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Oleksii Mandrychenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Number of attachments : 0

 Description   

We can use compiled regex. Msdn recommends

You should use compiled regular expressions when you call regular expression methods with a specific regular expression relatively frequently.

...

// All Sentences with Interpreted Regex:
// 13,443 matches in 00:00:01.1514100
// All Sentences with Compiled Regex:
// 13,443 matches in 00:00:00.7432921

The way Nesper is supposed to be use is to have limited number of statements and a lot more events. Therefore it's tolerable to spend more time compiling regular expression in a statement once, in favour of better performance gained from not interpreting regex each time we need to evaluate an event.

In our observations with NEsper, compiled regex results in smaller memory footprint and smaller CPU usage when evaluating events.






[ESPER-786] Nesper .NET: regex uses String.Format to wraps around user-defined regex Created: 25/Apr/14  Updated: 25/Apr/14

Status: Open
Project: Esper
Component/s: NEsper
Affects Version/s: 4.11.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Oleksii Mandrychenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: bug, contributers-welcome, regex
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Number of attachments : 0

 Description   

Bug: Nesper uses String.Format and wraps around a user-passed regex.

From source code (2 occurrences)

_pattern = new Regex(String.Format("^{0}$", patternText));

There are two problems with this:

1) It is an inefficient regex, when processing 100.000 events/sec this may degrade performance for some regex
2) Some regular expressions stop matching

An example for 2) will be: suppose I handle fraudulent transactions. I get stream of suspicious transactions that may or may not be checked. I only want to get a match on the transactions that have not been previously checked. Here is a stream of events

Id | Comment
---------------------
1  | fraud
2  | fraud
3  | [checked] fraud

The regex to match is

(?<!checked\s*)fraud

But because NEsper wraps my regex, the engine receives this

^(?<!checked\s*)fraud$ 

Note the start of the string ^ and end of line $

The last regex will no longer match events I am interested in. This adds much confusion, as some regex will work, whereas the other won't.

Solution: Call to string format should be removed and regex left up to the user to craft.






[ESPER-785] NEsper .NET: regular expression should not get un-escaped Created: 25/Apr/14  Updated: 25/Apr/14

Status: Open
Project: Esper
Component/s: NEsper
Affects Version/s: 4.11.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Oleksii Mandrychenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: bug, contributers-welcome, regex
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Number of attachments : 0

 Description   

Nesper un-escapes regular expressions. Suppose I expected the following regex

'\d'

and I want to match a number 123. The bug is that it will never match, as an actual regex that will be used by the engine will be

'd' (notice missing "\")

Sample statement:

select * from Address a
where a.HouseNumber regex '\d'

Sample event

Address.HouseNumber = 123 (no match produced)






[ESPER-784] EsperIO Socket Adapter causes configuration loss when calling "initialize" Created: 18/Apr/14  Updated: 16/Oct/14  Resolved: 31/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When calling the initialize method on EPServiceProvider on a configured engine instance and when the socket io adapter is configured, the initialize causes the configuration to become empty and therefore loosing preconfigured event types.

Example:

Configuration configuration = new Configuration();
configuration.configure("esper.cfg.xml");
EPServiceProvider epService = EPServiceProviderManager.getProvider(engineURI, configuration);
epService.initialize(); // error : EsperIOSocketAdapter overrides configuration
epService.getEPAdministrator().createEPL("select * from DailyPrice");
// get exception if plugin-loader into configuration : com.espertech.esper.client.EPStatementException: Failed to resolve event type: Event type or class named 'DailyPrice' was not found [select * from DailyPrice]

<esper-configuration >
<event-type name="DailyPrice">
<java-util-map>
<map-property name="generic_ticker" class="string"/>
<map-property name="px_open" class="double"/>
<map-property name="px_last" class="double"/>
</java-util-map>
</event-type>
<plugin-loader name="EsperIOSocketAdapter" class-name="com.espertech.esperio.socket.EsperIOSocketAdapterPlugin">
<config-xml>
<esperio-socket-configuration>
<socket name="csvStreamSocket" port="24079" data="csv" />
</esperio-socket-configuration>
</config-xml>
</plugin-loader>
</esper-configuration>






[ESPER-783] ArithmeticException big decimal divide Created: 17/Apr/14  Updated: 16/Oct/14  Resolved: 31/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperBigDecimalTest.java    
Number of attachments : 1

 Description   

I received the following error when using BigDecimal divide

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
at java.math.BigDecimal.divide(Unknown Source)
at com.espertech.esper.type.MathArithTypeEnum$DivideBigDecConvComputer.compute(MathArithTypeEnum.java:721)

This is my statement:
Select sum(price * quantity) / sum(quantity) as avgPrice from Transaction.win:time(1 minute);



 Comments   
Comment by Andy Flury [ 17/Apr/14 ]

TestClass to reproduce the problem.





[ESPER-782] "interval" keyword in match-recognize does not allow uppercase Created: 17/Apr/14  Updated: 16/Oct/14  Resolved: 30/Jul/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When "interval" is specified as uppercase the parser does not allow that.
Workaround is to specify "interval" in lowercase.

Sample EPL:
String s01 = "@Name(\"LogCorrelation\") " +
"SELECT * " +
"FROM LogMessage " +
"MATCH_RECOGNIZE ( " +
" PARTITION BY sessionId " +
" MEASURES S AS start_session, T AS threats, E AS end_session " +
" PATTERN (S T+ E?) " +
" INTERVAL 180 seconds OR terminated " +
" DEFINE " +
" S AS S.type = EsperTestCase4$LogType.TRAFFIC, " +
" T AS T.type = EsperTestCase4$LogType.THREAT AND T.sessionId = S.sessionId, " +
" E AS E.type = EsperTestCase4$LogType.TRAFFIC AND E.sessionId = S.sessionId" +
")";

Sample exception:
Caused by: com.espertech.esper.epl.parse.ASTWalkException: Invalid interval-clause within match-recognize, expecting keyword INTERVAL in text 'INTERVAL 180 seconds OR terminated'



 Comments   
Comment by Matthew Hall [ 17/Apr/14 ]

FYI: The same bug happens with the max() function in my tests.

So I'm not sure if there's a way to write a Unit Test which generates
Statement Object Models, then uppercases all Esper keywords to see if it still
compiles, but that might help ensure every function works in every
capitalization.

I really like to capitalize SQL keywords because it makes the code much easier
to read for me at least...





[ESPER-781] Prevent accidental overwrite of Map type configuration through API Created: 27/Mar/14  Updated: 14/Apr/14  Resolved: 01/Apr/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: 5.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When I register a Map Event type: (http://esper.codehaus.org/esper-4.11.0/doc/reference/en-US/html_single/#eventrep-map-properties)

The Map passed to the configuration with field names and types is not cloned, but referenced directly.
If that Map is cleared or overwriten the original Map fields and types are lost - causing EPL compile errors.

Configuration configuration = new Configuration();
Map<String,Object> typemap = new HashMap<>(1);
typemap.put("val", long.class);
configuration.addEventType("EVENT", typemap);

//Rerun with this line removed
typemap.clear();
EPServiceProvider epService = EPServiceProviderManager.getProvider("MAP Event defn bug", configuration);
EPStatement statement = epService.getEPAdministrator().createEPL(""
+ ""
+ "SELECT val from EVENT "
+ "");

Error: "com.espertech.esper.epl.expression.ExprValidationPropertyException: Property named 'val' is not valid in any stream"

[main] DEBUG c.e.e.c.s.StatementLifecycleSvcImpl - .start Error starting statement
com.espertech.esper.epl.expression.ExprValidationPropertyException: Property named 'val' is not valid in any stream
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getSuggestionException(ExprIdentNodeUtil.java:210) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getTypeFromStream(ExprIdentNodeUtil.java:58) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.expression.ExprIdentNodeImpl.validate(ExprIdentNodeImpl.java:150) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:189) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtree(ExprNodeUtility.java:151) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.assignSelectClauseNames(ResultSetProcessorFactoryFactory.java:445) ~[esper-4.11.0.jar:na]
at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.getProcessorPrototype(ResultSetProcessorFactoryFactory.java:107) ~[esper-4.11.0.jar:na]
at com.espertech.esper.core.start.EPStatementStartMethodSelectUtil.prepare(EPStatementStartMethodSelectUtil.java:295) ~[esper-4.11.0.jar:na]
at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:51) ~[esper-4.11.0.jar:na]
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:57) ~[esper-4.11.0.jar:na]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:636) [esper-4.11.0.jar:na]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:598) [esper-4.11.0.jar:na]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:138) [esper-4.11.0.jar:na]
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117) [esper-4.11.0.jar:na]
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66) [esper-4.11.0.jar:na]
at EsperTest.main(EsperTest.java:31) [classes/:na]
Exception in thread "main" com.espertech.esper.client.EPStatementException: Error starting statement: Property named 'val' is not valid in any stream [SELECT val from EVENT ]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:648)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:598)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:138)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)
at EsperTest.main(EsperTest.java:31)
Caused by: com.espertech.esper.epl.expression.ExprValidationPropertyException: Property named 'val' is not valid in any stream
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getSuggestionException(ExprIdentNodeUtil.java:210)
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getTypeFromStream(ExprIdentNodeUtil.java:58)
at com.espertech.esper.epl.expression.ExprIdentNodeImpl.validate(ExprIdentNodeImpl.java:150)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:189)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtree(ExprNodeUtility.java:151)
at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.assignSelectClauseNames(ResultSetProcessorFactoryFactory.java:445)
at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.getProcessorPrototype(ResultSetProcessorFactoryFactory.java:107)
at com.espertech.esper.core.start.EPStatementStartMethodSelectUtil.prepare(EPStatementStartMethodSelectUtil.java:295)
at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:51)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:57)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:636)
... 5 more

(OK, this is a contrived example, but if I have a huge number of event types and fields then for GC reasons it may be beneficial to clear or reuse the Map passed.)






[ESPER-780] Configuration XML of Map event type does not allow array "[]" marker for types Created: 21/Mar/14  Updated: 14/Apr/14  Resolved: 01/Apr/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: 5.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Quick question ...
Using XML configuation how to I define a field in a java.util.Map Event type to contain an array?

e.g.
<event-type name="TestMap">
<java-util-map>
<map-property name="intval" class="int"/>
<map-property name="longarrval" class="long[]"/>
<map-property name="dateval" class="java.util.Date"/>
<map-property name="datearrval" class="java.util.Date[]"/>
</java-util-map>
</event-type>

This fails:
com.espertech.esper.client.ConfigurationException: The type 'java.util.Date[]' is not a recognized type
and a similar error for long[]

I know I can do this programatically, but I'd like to have some mechanism to define the Event as a Map, with Array properties using XML configuration.

For example, can I (programmatically) define a type alias for long[] (e.g. "longarrtype") and then use this in the XML?

<map-property name="longarrval" class="longarrtype"/>
Or can you suggest any other suitable approach?






[ESPER-779] NPE nested context (non-overlapping time-based+key-partitioned) managing 30 stmts Created: 12/Mar/14  Updated: 14/Apr/14  Resolved: 27/Mar/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: 5.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperTestCase3.java    
Number of attachments : 1




[ESPER-778] Support for context builtin properties in declared expressions Created: 11/Mar/14  Updated: 14/Apr/14  Resolved: 27/Mar/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: 5.0

Type: Improvement Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example:

expression ABC

{context.name}

context CategorizedContext
select ABC() from MyEvent






[ESPER-777] Passing a stream as a parameter to nested declared expressions Created: 05/Mar/14  Updated: 14/Apr/14  Resolved: 27/Mar/14

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0

Type: Test Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperTest12.java    
Number of attachments : 1




[ESPER-776] Match_recognize shows A.size() as null in measures, unless A itself is selected as a measure as well. Created: 26/Feb/14  Updated: 14/Apr/14  Resolved: 27/Mar/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 5.0

Type: Bug Priority: Major
Reporter: Ory Henn Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperIsolatedTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

The following query works, and returns count_b as expected.
However, if I remove the 'B as b' measure, count_b comes out null, even when B exists.
Test class attached with examples.

select * from Event match_recognize (
measures A as a, B as b, A.uuid as id, B.size() as count_b
pattern (A B*)
interval 1 minute
define
A as (A.evid=1),
B as (B.evid=2)
);






[ESPER-775] NEsper .NET : Prioritized execution Created: 07/Feb/14  Updated: 11/Feb/14

Status: Open
Project: Esper
Component/s: NEsper
Affects Version/s: NEsper .NET 4.6
Fix Version/s: None

Type: Test Priority: Major
Reporter: Alex Gillula Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File TestMultipleStatements.cs    
Testcase included: yes
Number of attachments : 1

 Description   

Problem description:

Two statements, with the exact same statement text, are generating different outputs when EngineDefaults.ExecutionConfig.IsPrioritized is set to true and the statements don’t contain an @Priority hint. When @Priority hints (of different priority) are added, the output from the two statements is the same.

The attached file includes the test cases I created:

IsPrioritized_TRUE_Condition_TRUE_PrioritySpecified_TRUE (GOOD)
IsPrioritized_TRUE_Condition_TRUE_PrioritySpecified_FALSE (BAD)
IsPrioritized_TRUE_Condition_FALSE_PrioritySpecified_TRUE (GOOD)
IsPrioritized_TRUE_Condition_FALSE_PrioritySpecified_FALSE (GOOD)

IsPrioritized_FALSE_Condition_TRUE_PrioritySpecified_TRUE (GOOD)
IsPrioritized_FALSE_Condition_TRUE_PrioritySpecified_FALSE (GOOD)
IsPrioritized_FALSE_Condition_FALSE_PrioritySpecified_TRUE (GOOD)
IsPrioritized_FALSE_Condition_FALSE_PrioritySpecified_FALSE (GOOD)



 Comments   
Comment by Alex Gillula [ 07/Feb/14 ]

To clarify, we're using NEsper .NET 4.8 (the closest available in the "Affects Version" drop-down was 4.6).

Comment by Thomas Bernhardt [ 07/Feb/14 ]

try the newest version

Comment by Alex Gillula [ 10/Feb/14 ]

We've confirmed that this bug still exists in the latest .NET version 4.10.1.





[ESPER-774] Support for property name to be used on an object returned by a single-row function Created: 27/Jan/14  Updated: 27/Mar/14

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following is not yet supported:
public void testIt()

{ EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); engine.getEPAdministrator().getConfiguration().addEventType(SupportBean.class); engine.getEPAdministrator().getConfiguration().addPlugInSingleRowFunction("callIt", this.getClass().getName(), "callIt"); engine.getEPAdministrator().createEPL("select callIt(sb).intPrimitive from SupportBean as sb"); }

public static SupportBean callIt(SupportBean sb)

{ return sb; }

==========
Workaround is to use "callIt(sb).getIntPrimitive()






[ESPER-773] Improve type recognition for non-POJO event classes that implement an interface providing a generic typed getter Created: 09/Jan/14  Updated: 14/Apr/14  Resolved: 20/Jan/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.11.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have pre-existing code that I need to integrate with, which defines several classes which implement an interface Identifiable:

public static interface Identifiable<T>

{ T getId(); }

The different classes have different types of identifier and I need to join them to different data. A simple example is attached below.

My problem is that Esper does not use the generic type parameters to compute the type of the "id" property. For example:

Class Node implements Identifiable<String>

Should have an "id" property of type String.

This stackoverflow question and answer provides a solution to resolving the generic type arguments:

http://stackoverflow.com/questions/4876380/generics-and-java-beans-introspector



 Comments   
Comment by Thomas Bernhardt [ 20/Jan/14 ]

because of type erasure its not possible to determine the type





[ESPER-772] ClassCastException for method invocation on a property that is itself an event Created: 06/Jan/14  Updated: 06/Jan/14  Resolved: 06/Jan/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a bean "Node" which is associated with a window and joined to another bean "Data". When I try to invoke the a method on the "Node" with a parameter of type "Data":

public String compute(Data data)

{ return id + data.getValue(); }

With the query:

select node.id, data.nodeId, data.value, node.compute(data) from NodeDataWindow

I get the following ClassCastException:

ERROR 23Dec 09:27:00.825 [main] ExceptionHandlingService Exception encountered processing statement '60368b01-bd35-446f-b8d9-9da9b5a8647f' statement text 'select node.id, data.nodeId, data.value, node.compute(data) from NodeDataWindow' : com.espertech.esper.event.bean.BeanEventBean cannot be cast to espertest.EsperTest$Node

java.lang.ClassCastException: com.espertech.esper.event.bean.BeanEventBean cannot be cast to espertest.EsperTest$Node

at espertest.EsperTest$Node$$FastClassByCGLIB$$287ce4f2.invoke(<generated>)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

at com.espertech.esper.epl.expression.ExprDotMethodEvalNoDuck.evaluate(ExprDotMethodEvalNoDuck.java:51)

at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluateChain(ExprDotEvalRootChild.java:78)

at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluate(ExprDotEvalRootChild.java:51)

at com.espertech.esper.epl.core.eval.EvalSelectNoWildcardMap.process(EvalSelectNoWildcardMap.java:48)

at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:52)

at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.getSelectEventsNoHaving(ResultSetProcessorHandThrough.java:107)

at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.processViewResult(ResultSetProcessorHandThrough.java:72)

at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:45)

at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115)

at com.espertech.esper.epl.named.NamedWindowConsumerView.update(NamedWindowConsumerView.java:91)

at com.espertech.esper.epl.named.NamedWindowServiceImpl.processHandle(NamedWindowServiceImpl.java:454)

at com.espertech.esper.epl.named.NamedWindowServiceImpl.processDispatches(NamedWindowServiceImpl.java:264)

at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:210)

at com.espertech.esper.core.service.EPRuntimeImpl.processThreadWorkQueueFront(EPRuntimeImpl.java:821)

at com.espertech.esper.core.service.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:773)

at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:476)

at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:437)

at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:196)

at espertest.EsperTest.sendEvent(EsperTest.java:99)

at espertest.EsperTest.main(EsperTest.java:83)

I tried making the method take a parameter of type BeanEventBean:

public String compute(BeanEventBean data)

{ return id + data.get("value"); }

But then I get a type error:

Exception in thread "main" com.espertech.esper.client.EPStatementException: Error starting statement: Failed to resolve method 'compute': Could not find enumeration method, date-time method or instance method named 'compute' in class 'espertest.EsperTest$Node' with matching parameter number and expected parameter type(s) 'Data' (nearest match found was 'compute' taking type(s) 'BeanEventBean') [select node.id, data.nodeId, data.value, node.compute(data) from NodeDataWindow]

at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:637)

at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:595)

at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:137)

at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117)

at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)

at espertest.EsperTest.main(EsperTest.java:79)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Caused by: com.espertech.esper.epl.expression.ExprValidationException: Failed to resolve method 'compute': Could not find enumeration method, date-time method or instance method named 'compute' in class 'espertest.EsperTest$Node' with matching parameter number and expected parameter type(s) 'Data' (nearest match found was 'compute' taking type(s) 'BeanEventBean')

at com.espertech.esper.epl.expression.ExprDotNodeUtility.getChainEvaluators(ExprDotNodeUtility.java:172)

at com.espertech.esper.epl.expression.ExprDotNode.validate(ExprDotNode.java:290)

at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:189)

at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtree(ExprNodeUtility.java:151)

at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.assignSelectClauseNames(ResultSetProcessorFactoryFactory.java:450)

at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.getProcessorPrototype(ResultSetProcessorFactoryFactory.java:107)

at com.espertech.esper.core.start.EPStatementStartMethodSelectUtil.prepare(EPStatementStartMethodSelectUtil.java:278)

at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:51)

at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:53)

at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:625)

... 10 more

Caused by: com.espertech.esper.epl.expression.ExprValidationException: Failed to resolve method 'compute': Could not find enumeration method, date-time method or instance method named 'compute' in class 'espertest.EsperTest$Node' with matching parameter number and expected parameter type(s) 'Data' (nearest match found was 'compute' taking type(s) 'BeanEventBean')

at com.espertech.esper.epl.expression.ExprDotNodeUtility$2.handle(ExprDotNodeUtility.java:233)

at com.espertech.esper.epl.expression.ExprNodeUtility.resolveMethodAllowWildcardAndStream(ExprNodeUtility.java:637)

at com.espertech.esper.epl.expression.ExprDotNodeUtility.getValidateMethodDescriptor(ExprDotNodeUtility.java:237)

at com.espertech.esper.epl.expression.ExprDotNodeUtility.getChainEvaluators(ExprDotNodeUtility.java:149)

... 19 more

Caused by: com.espertech.esper.epl.core.EngineImportException: Could not find enumeration method, date-time method or instance method named 'compute' in class 'espertest.EsperTest$Node' with matching parameter number and expected parameter type(s) 'Data' (nearest match found was 'compute' taking type(s) 'BeanEventBean')

at com.espertech.esper.epl.core.EngineImportServiceImpl.convert(EngineImportServiceImpl.java:519)

at com.espertech.esper.epl.core.EngineImportServiceImpl.resolveMethod(EngineImportServiceImpl.java:484)

at com.espertech.esper.epl.core.MethodResolutionServiceImpl.resolveMethod(MethodResolutionServiceImpl.java:106)

at com.espertech.esper.epl.expression.ExprNodeUtility.resolveMethodAllowWildcardAndStream(ExprNodeUtility.java:627)

... 21 more

Caused by: com.espertech.esper.epl.core.EngineNoSuchMethodException: Unknown method Node.compute(class espertest.EsperTest$Data)

at com.espertech.esper.util.MethodResolver.resolveMethod(MethodResolver.java:220)

at com.espertech.esper.epl.core.EngineImportServiceImpl.resolveMethod(EngineImportServiceImpl.java:480)

... 23 more

Without the query calling compute the correct data is output, so the join is working correctly.

I’ve tried reducing the complexity of the test but this seems to be the simplest case.

I’ve tried making "compute" a static method taking a Node and Data with similar results.

I’ve tried defining two method one taking "Data" and one taking an "BeanEventBean" but the "Data" on is looked up at query compile time and still used at run time, as expected.



 Comments   
Comment by Thomas Bernhardt [ 06/Jan/14 ]

Workaround is to use a user-defined function.





[ESPER-771] Allow subqueries that select a single column that it itself an event to provide enumerable events and insert-into compatible prop Created: 16/Dec/13  Updated: 06/Jan/14  Resolved: 29/Dec/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi all:
I try to make a stream with a property queried from a named window use following EPL, but get a error

create schema A (symbol string)
create window B.std:lastevent() (a A)
create schema C (a A)
insert into C select (select a from B) @eventbean as a from pattern [timer:interval(1 sec)]

Error starting statement: Event type named 'C' has already been declared with differing column name or type information: Type by name 'C' in property 'a' expected java.lang.String but receives java.util.Map

My questions:
1, property a of B is declared with type A, but why the error message say " 'a' expected java.lang.String"
2, how can i fix this.

Plus:
Because i need to use correlated subquery in future,so i can't use contained-event selection.






[ESPER-770] Improve compatibility checking when named window event gets inserted into stream of same-as type (Map and ObjectArray only) Created: 16/Dec/13  Updated: 06/Jan/14  Resolved: 29/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi Esper users,

I have a stream of "Node" events where each Node has an id and an optional parent id. I’m trying to maintain a window which is a left outer join of a Node with its optional parent Node. The parent event is not necessarily received before the child event. I would like a query that outputs an JoinedNode which includes the node and parent. A event JoinedNode should be produced with no parent if the parent has not been received yet and should update once the parent is received.

The following EPL queries work fine ONLY if I define Node and JoinedNode as POJOs.

create window NodeWindow.std:unique(id) as Node

insert into NodeWindow select * from Node

create window JoinedNodeWindow.std:unique(node.id) as JoinedNode

insert into JoinedNodeWindow select * from JoinedNode

insert into JoinedNode select node, parent from NodeWindow as node left outer join NodeWindow as parent on node.parentId = parent.id

If I try to defined them with create schema:

create schema Node(id string, parentId string, data string)

create schema JoinedNode(node Node, parent Node)

or using "addEventType(String, Map)" I get an error when compiling the "insert into JoinedNode…" statement above:

Caused by: com.espertech.esper.event.EventAdapterException: Event type named 'JoinedNode' has already been declared with differing column name or type information: Type by name 'JoinedNode' in property 'node' expected event type 'Node' but receives event type 'NodeWindow'

I would have thought that the event type NodeWindow would be compatible with Node since NodeWindow is defined "as Node". This seems to be the case when I use POJOs. What am I doing wrong?

I’ve attached my code below. There is a boolean useBeans which can switch between the two modes.

Thanks for any help in advance,

From Richard.

import com.espertech.esper.client.EPAdministrator;

import com.espertech.esper.client.EPRuntime;

import com.espertech.esper.client.EPServiceProvider;

import com.espertech.esper.client.EPServiceProviderManager;

import com.espertech.esper.client.EPStatement;

import com.espertech.esper.client.EventBean;

import com.espertech.esper.client.StatementAwareUpdateListener;

import com.tradingscreen.toolbelt.config.ConfigException;

import java.util.HashMap;

import java.util.Map;

public class EsperTest {

public static class Node {

public String id;

public String parentId;

public String data;

public Node(Map<String, Object> event)

{ id = (String) event.get("id"); parentId = (String) event.get("parentId"); data = (String) event.get("data"); }

public String getId()

{ return id; }

public String getParentId()

{ return parentId; }

public String getData()

{ return data; }

@Override

public String toString()

{ return id + " data=" + data; }

}

public static class JoinedNode {

public Node node;

public Node parent;

public Node getNode()

{ return node; }

public void setNode(Node node)

{ this.node = node; }

public Node getParent()

{ return parent; }

public void setParent(Node parent)

{ this.parent = parent; }

}

public static void main(String[] args) throws ConfigException {

EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider();

EPAdministrator epAdministrator = epService.getEPAdministrator();

boolean useBeans = false;

if (useBeans)

{ epAdministrator.getConfiguration().addEventType(Node.class); epAdministrator.getConfiguration().addEventType(JoinedNode.class); }

else

{ epAdministrator.createEPL("create schema Node(id string, parentId string, data string)"); epAdministrator.createEPL("create schema JoinedNode(node Node, parent Node)"); }

epAdministrator.createEPL("create window NodeWindow.std:unique(id) as Node");

epAdministrator.createEPL("insert into NodeWindow select * from Node");

addListener(epAdministrator.createEPL("create window JoinedNodeWindow.std:unique(node.id) as JoinedNode"));

epAdministrator.createEPL("insert into JoinedNodeWindow select * from JoinedNode");

epAdministrator.createEPL("insert into JoinedNode select node, parent from NodeWindow as node left outer join NodeWindow as parent on node.parentId = parent.id");

// Node with no parent

System.out.println("Adding 1");

Map<String, Object> event = new HashMap<>();

event.put("id", "1");

sendEvent(epService.getEPRuntime(), event, useBeans);

// Node with already seen parent

System.out.println("Adding 2");

event = new HashMap<>();

event.put("id", "2");

event.put("parentId", "1");

sendEvent(epService.getEPRuntime(), event, useBeans);

// Node with not yet seen parent

System.out.println("Adding 3");

event = new HashMap<>();

event.put("id", "3");

event.put("parentId", "4");

sendEvent(epService.getEPRuntime(), event, useBeans);

// Parent for previous node

System.out.println("Adding 4");

event = new HashMap<>();

event.put("id", "4");

event.put("data", "x");

sendEvent(epService.getEPRuntime(), event, useBeans);

// Join to same parent

System.out.println("Adding 5");

event = new HashMap<>();

event.put("id", "5");

event.put("parentId", "4");

sendEvent(epService.getEPRuntime(), event, useBeans);

// Parent for previous node

System.out.println("Updating 4");

event = new HashMap<>();

event.put("id", "4");

event.put("data", "y");

sendEvent(epService.getEPRuntime(), event, useBeans);

}

private static void sendEvent(EPRuntime epRuntime, Map<String, Object> event, boolean useBeans) {

if (useBeans)

{ epRuntime.sendEvent(new Node(event)); }

else

{ epRuntime.sendEvent(event, "Node"); }

}

public static void addListener(EPStatement statement) {

statement.addListener(new StatementAwareUpdateListener() {

@Override

public void update(EventBean[] newEvents, EventBean[] oldEvents, EPStatement statement, EPServiceProvider epServiceProvider)

{ System.out.println(" statement: " + statement.getName() + " " + statement.getText()); System.out.println(" new: " + (newEvents == null ? "null" : "events " + newEvents.length)); print(newEvents); System.out.println(" old: " + (oldEvents == null ? "null" : "events " + oldEvents.length)); print(oldEvents); }

private void print(EventBean[] events) {

if (events != null) {

for (EventBean eventBean : events) {

System.out.print(" type = " + eventBean.getEventType().getName());

for (String property : eventBean.getEventType().getPropertyNames())

{ System.out.print(" " + property + " = " + eventBean.get(property)); }

System.out.println();

}

}

}

});

}

}






[ESPER-769] Issue evaluating nested enumeration Created: 10/Dec/13  Updated: 06/Jan/14  Resolved: 10/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I faced issue with nested collection in Esper. I have model like this:

myClass3

{ String value; }

myClass2

{ Set<myClass3> class2Value; }

myClass

{ Set<myClass2> class1Value; }

and try to use query like:

select * from myClass where myClass.class1value.anyOf(x=>x.class2Value.anyOf(y=>y.value like 'string'))

This compiles fine but fails to evaluate correctly.






[ESPER-768] Improve standard deviation to use Knuth's Created: 15/Nov/13  Updated: 06/Jan/14  Resolved: 18/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

read up on http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance






[ESPER-767] Support for tick-escape in select-clause column name Created: 14/Nov/13  Updated: 06/Jan/14  Resolved: 18/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Try this:

create schema Test(`order` int);
insert into Test select 0 as `order` from StockTick;






[ESPER-766] Allow enumeration method in pattern filter to use pattern tagged events as input Created: 11/Nov/13  Updated: 06/Jan/14  Resolved: 02/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I suggest enumeration methods support tagged-value in pattern as a new kind of input.

We use tagged-value as single value in pattern, and if we can use tagged-value as a collection it will very convenient.

Because sometimes a following event will be matched only if it's properties have some relationship with preceding values(not different tags but same tag with repeated values).

And i think that enumeration method only take values in current run of sub-expression, not entire values in whole lifecycle.

Examples:

Input stream:
1, BarEvent1

{value=1}
2, BarEvent2 {value=2}
3, StopEvent1{}
4, BarEvent3 {value=1}

5, BarEvent4

{value=4}

6, BarEvent5

{value=5}

7, BarEvent6

{value=1}

8, BarEvent7

{value=3}

9, StopEvent2 {}
10, BarEvent8

{value=9}

11, BarEvent9

{value=10}

Pattern 1:
select b from pattern
[
every ([2] b=BarEvent)
]

Output:
match 1, b=

{BarEvent1,BarEvent2}
match 2, b={BarEvent3,BarEvent4}
match 3, b={BarEvent5,BarEvent6}
match 4, b={BarEvent7,BarEvent8}

Pattern 2:
select b,c from pattern
[
every ( ([2] b= BarEvent) -> c= BarEvent(value> b.max(i=>i.value) ) )
]
Output:
match 1: b={BarEvent1,BarEvent2}

, c=BarEvent4
match 2: b=

{BarEvent5,BarEvent6}

, c=BarEvent8

Pattern 3:
select b,c from pattern
[
every ( (b= BarEvent until StopEvent) -> c= BarEvent(value> b.sumOf(i=>i.value) ) )
]
Output:
match 1, b=

{BarEvent1,BarEvent2}

, c=BarEvent4
match 2, b=

{BarEvent5,BarEvent6,BarEvent7}

, c=BarEvent9

Best regards
zhucj






[ESPER-765] Context declaration with @Priority causes first event to arrive twice Created: 03/Nov/13  Updated: 06/Jan/14  Resolved: 02/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample EPL:
@Priority(1) create context C1 start @now end bar;
@Priority(0) context C1 select symbol,value,context.name,context.id from bar"ï¼›

input events are:

{symbol=A,value=1}

expected output is:
one row output. Because create-context has priority 1 which is higher than the other statement.

actual output is:
context c1

{id=1, symbol=A, name=C1, value=1}
context c1 {id=1, symbol=A, name=C1, value=1}

=========== code
epService.getEPAdministrator().getConfiguration().addEventType(MyEvent.class);
epService.getEPAdministrator().createEPL("@Priority(1) create context C1 start @now end MyEvent");
EPStatement stmt = epService.getEPAdministrator().createEPL("@Priority(0) context C1 select symbol,value,context.name,context.id from MyEvent");
stmt.addListener(listener);
epService.getEPRuntime().sendEvent(new MyEvent("S1", 1));
assertEquals(1, listener.getLastNewData().length);






[ESPER-764] XML Schema loading fails on Ubuntu 64 bit Java 7 update 45 Created: 01/Nov/13  Updated: 04/Dec/14  Resolved: 04/Dec/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 5.1, Esper wishlist

Type: Test Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestSchemaRead.java    
Number of attachments : 1

 Description   

The XSLoader returns null even for the simplest schema.
Older JVM seems to work.

Stack:

Exception in thread "main" com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'data/AutoIdPmlCore.xsd'
at com.espertech.esper.core.service.EPServicesContextFactoryDefault.init(EPServicesContextFactoryDefault.java:355)
at com.espertech.esper.core.service.EPServicesContextFactoryDefault.createServicesContext(EPServicesContextFactoryDefault.java:90)
at com.espertech.esper.core.service.EPServiceProviderImpl.doInitialize(EPServiceProviderImpl.java:483)
at com.espertech.esper.core.service.EPServiceProviderImpl.<init>(EPServiceProviderImpl.java:89)
at com.espertech.esper.client.EPServiceProviderManager.getProviderInternal(EPServiceProviderManager.java:117)
at com.espertech.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:88)
at com.espertech.esper.example.autoid.AutoIdSimMain.run(AutoIdSimMain.java:101)
at com.espertech.esper.example.autoid.AutoIdSimMain.main(AutoIdSimMain.java:73)
Caused by: com.espertech.esper.client.ConfigurationException: Failed to read schema via URL 'data/AutoIdPmlCore.xsd'
at com.espertech.esper.event.xml.XSDSchemaMapper.readSchemaInternal(XSDSchemaMapper.java:130)
at com.espertech.esper.event.xml.XSDSchemaMapper.loadAndMap(XSDSchemaMapper.java:63)
at com.espertech.esper.core.service.EPServicesContextFactoryDefault.init(EPServicesContextFactoryDefault.java:351)
... 7 more



 Comments   
Comment by Thomas Bernhardt [ 01/Nov/13 ]

It works with Java 7 update 25.
And it didn't work with Java 7 update 45 - the newest. My previous tests were with update 40.
I guess something has been broken in Java since u40.
Thanks a lot for the help!

Comment by Thomas Bernhardt [ 27/Nov/13 ]

Attached Java class loads a schema from a string using just Java APIs without Esper dependency, for testing.

Comment by Holger Hoffstätte [ 02/Dec/13 ]

Might be related to: http://docs.oracle.com/javase/tutorial/jaxp/limits/index.html

Comment by Thomas Bernhardt [ 02/Dec/13 ]

Inner exception reported to the DOM error handler:
java.lang.NullPointerException
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.setProperty(XMLDocumentFragmentScannerImpl.java:776)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setProperty(XMLDocumentScannerImpl.java:448)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.setProperty(SchemaParsingConfig.java:492)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.setProperty(SchemaDOMParser.java:503)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reset(XSDHandler.java:3594)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.reset(XMLSchemaLoader.java:1068)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:561)
at com.sun.org.apache.xerces.internal.impl.xs.XSLoaderImpl.load(XSLoaderImpl.java:168)
at TestSchemaRead.main(TestSchemaRead.java:95)

Comment by Thomas Bernhardt [ 04/Dec/14 ]

Related JDK bug: https://bugs.openjdk.java.net/browse/JDK-8029837
This is confirmed to work in Java 7 update 72.





[ESPER-763] Allow on-merge assignment of event-typed property Created: 30/Oct/13  Updated: 06/Jan/14  Resolved: 26/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

create schema Composite as (x int, y int);
create window A.std:unique(a) as (a string, c Composite);
create schema B as (a string, c Composite);

on B e
merge A w
where e.a = w.a
when matched
then update
set c = e.c;

The above is not allowed. However a function can be called in the set such as "set somefunc(c, e)" as a workaround.






[ESPER-762] Keyed segmented context with match recognize and "prev" in define-clause causes first event to not evaluate Created: 19/Oct/13  Updated: 06/Jan/14  Resolved: 02/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperTest1.java    
Number of attachments : 1

 Description   

I have a problem when use context with match_recognize.

statements are:
"
create context PerSymbol create context PerSymbol partition by symbol from bar
context PerSymbol select * from bar
match_recognize (
measures R1.symbol as symbol, R1.value as r1_value,R2.value as r2_value
pattern (R1 R2)
define R1 as R1.value >= prev(R1.value),R2 as R2.value >= prev(R2.value)
)"
input events are:

{symbol=A, value=1} {symbol=B, value=1} {symbol=A, value=3} {symbol=B, value=3} {symbol=A, value=5} {symbol=B, value=5}

expected output is:

{symbol=A,r1_value=3,r2_value=5} {symbol=B,r1_value=3,r2_value=5}

actual output is:{symbol=B,r1_value=3,r2_value=5}
{symbol=A,r1_value=3,r2_value=5}

is missing

And this one works fine
"
select * from bar
match_recognize (
partition by symbol
measures R1.symbol as symbol, R1.value as r1_value,R2.value as r2_value
pattern (R1 R2)
define R1 as R1.value >= prev(R1.value),R2 as R2.value >= prev(R2.value)
)"
actual output is:

{symbol=A,r1_value=3,r2_value=5} {symbol=B,r1_value=3,r2_value=5}




[ESPER-761] On-Demand query inserting row into named window that contains an enumeration throws NPE Created: 18/Oct/13  Updated: 06/Jan/14  Resolved: 26/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I believe I have found a defect in Esper 4.10.0.
I try to insert event into named window with fire&forget query as described in 5.15.3 documentation chapter (http://esper.codehaus.org/esper-4.10.0/doc/reference/en-US/html/epl_clauses.html#named_insertfaf). The value in the event I insert is an enum and it seams to be the problem since inserting events with string or primitive values works fine.

See the third line here:

// create schema and window
epServiceProvider.getEPAdministrator().createEPL("CREATE SCHEMA MyMode (mode java.nio.file.AccessMode)");
epServiceProvider.getEPAdministrator().createEPL("CREATE WINDOW CurrentMode.std:unique(mode) MyMode");

// insert
epServiceProvider.getEPRuntime().executeQuery("insert into CurrentMode select java.nio.file.AccessMode.READ as mode");

this make esper to throw NPE:

com.espertech.esper.client.EPStatementException: Error executing statement: null [insert into CurrentAccessMode select java.nio.file.AccessMode.READ as mode]
at com.espertech.esper.core.service.EPRuntimeImpl.getExecuteMethod(EPRuntimeImpl.java:1590)
at com.espertech.esper.core.service.EPRuntimeImpl.executeQueryInternal(EPRuntimeImpl.java:1472)
at com.espertech.esper.core.service.EPRuntimeImpl.executeQuery(EPRuntimeImpl.java:1446)
at com.ocado.ei.monitoring.EventsMonitor.init(EventsMonitor.java:60)
at com.ocado.ei.monitoring.configuration.RulesTest.setUp(RulesTest.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.run(JUnit45AndHigherRunnerImpl.java:37)
at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.core.SelectExprProcessorHelper.getEvaluator(SelectExprProcessorHelper.java:222)
at com.espertech.esper.epl.core.SelectExprProcessorFactory.getProcessorInternal(SelectExprProcessorFactory.java:179)
at com.espertech.esper.epl.core.SelectExprProcessorFactory.getProcessor(SelectExprProcessorFactory.java:86)
at com.espertech.esper.core.start.EPPreparedExecuteInsertInto.getExecutor(EPPreparedExecuteInsertInto.java:58)
at com.espertech.esper.core.start.EPPreparedExecuteSingleStream.<init>(EPPreparedExecuteSingleStream.java:117)
at com.espertech.esper.core.start.EPPreparedExecuteInsertInto.<init>(EPPreparedExecuteInsertInto.java:32)
at com.espertech.esper.core.service.EPRuntimeImpl.getExecuteMethod(EPRuntimeImpl.java:1567)
... 29 more

However if I replace that line with parametrized query like this:

EPOnDemandPreparedQueryParameterized query = epServiceProvider.getEPRuntime().prepareQueryWithParameters("insert into CurrentMode select ? as mode");

query.setObject(1, java.nio.file.AccessMode.READ);

epServiceProvider.getEPRuntime().executeQuery(query);

It works fine.

As you can see there is some kind of workaround but I would like to add this static insert into statement to my .epl file instead of mixing it with java code.






[ESPER-760] Named window consumer able to distinguish between events expired from data window and events updated via merge/update Created: 15/Oct/13  Updated: 26/Nov/13  Resolved: 26/Nov/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 15/Oct/13 ]

EPL 1 :
create schema MyEvent
(
deviceUuid string,
channelSessionUUID string,
intWifiBssId long,
band string,
eventStart long,
noOfStats integer
)

EPL 2 :
create window MyEventwindow.std:groupwin(eventStart,deviceUuid,channelSessionUUID,intWifiBssId,band).win:time_accum(60 sec) as MyEvent

EPL 3 :
on MyEvent beps merge MyEventwindow cs
where
cs.eventStart = beps.eventStart
and cs.channelSessionUUID = beps.channelSessionUUID
and cs.deviceUuid = beps.deviceUuid
and cs.intWifiBssId = beps.intWifiBssId
and cs.band = beps.band
when not matched then insert select
deviceUuid,
channelSessionUUID,
intWifiBssId,
band,
eventStart,
0 noOfStats
when matched then update set
cs.noOfStats = cs.noOfStats + 1,
EPL 4 :
select rstream * from MyEventwindow

The desired outcome is that the listener for EPL4 only receives those events expired from the data window and does not receive the events that an update removes from the data window.

Comment by Thomas Bernhardt [ 26/Nov/13 ]

Can be addressed already laying out the EPL a little differently





[ESPER-759] Pattern with not-operator controlled by repeat ([n]) does not turn repeat to false Created: 12/Oct/13  Updated: 06/Jan/14  Resolved: 25/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File SequenceTest.java    
Number of attachments : 1

 Description   

Sample EPL:
select * from pattern [every [2] (e = Event(p='P1') and not Event(p='P2'))]

===========

I am trying to find pairs of “desired†events that arrive sequentially, without “undesired†events arriving in between.

Events with p=P1 are desired, while events with p=P2 are undesired.

The EPL I am using is:

select * from pattern [every [2] (e = Event(p='P1') and not Event(p='P2'))]

Input events are:

at time t0 = 0 seconds, an event arrives:

event E1

{p='P1'}



at time t1 = 1 seconds, an event arrives:

event E2{p='P1'}

at time t2 = 2 seconds, an event arrives:

event E3

{p='P1'}



at time t3 = 3 seconds, an event arrives:

event E4{p='P2'}



at time t4 = 4 seconds, an event arrives:

event E5{p='P1'}

at time t5 = 5 seconds, an event arrives:

event E6

{p='P1'}

Expected output is:

at time t1 = 1 seconds:

output event

{E1,E2}



at time t5 = 5 seconds:

output event {E5,E6}



Actual output is:

at time t1 = 1 seconds:

output event {E1,E2}

It seems that the pattern stops matching after it reaches undesired event E4

{p=’P2’}

, and so only pair

{E1,E2}

is fired.

This issue looks similar to http://jira.codehaus.org/browse/ESPER-112, however this was fixed in 1.10 and I’m using version 4.7.0.

Attached is a test example that demonstrates the problem.



 Comments   
Comment by Thomas Bernhardt [ 12/Oct/13 ]

Workaround: use match-recognize instead, which has immediately-followed semantics





[ESPER-758] Thread safety issue with contained-event selection Created: 09/Oct/13  Updated: 06/Jan/14  Resolved: 02/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When contained-event selection is used in a statement, an instance of com.espertech.esper.epl.property.PropertyEvaluatorAccumulative is created.
Though the instance variable eventsPerStream of PropertyEvaluatorAccumulative is declared as final, eventsPerStream[0] and eventsPerStream[1] (and eventsPerStream[2] , and so on) are set in getAccumulative method and populateEvents method.

When input events are processed in multi-threaded envirionment (e.g. using inbound threading), one instance of PropertyEvaluatorAccumulative is used for a statement, and getAccumulative method and populateEvents method are called from multiple threads. As a result, it is possible that the data of eventsPerStream[0] and eventsPerStream[1] are origined from different input events (and some contained events are missing).

A simple way to fix this problem is to mark the getAccumulative method as synchronized, it may affect the performance.






[ESPER-757] VDW callback on consuming rstream events Created: 04/Oct/13  Updated: 06/Jan/14  Resolved: 18/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Improvement Priority: Major
Reporter: David Dreyfus Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a statement starts/stops consuming VDW rstream events, let VDW know. For some virtual data windows, wrapping the events into beans and placing them on the output stream is time-consuming. If the VDW knew that there were no consumers of the window's rstream, the objects could be silently dropped within incurring the performance penalty.






[ESPER-756] NPE during destroy() when using inbound thread pool and when not waiting for pool to empty Created: 01/Oct/13  Updated: 06/Jan/14  Resolved: 27/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestNPEOnDestroy.java    
Number of attachments : 1

 Description   

workaround if to wait for the pool to empty before invoking destroy






[ESPER-755] Allow hint RECLAIM_GROUP_AGED for grouped-window to be provided variable Created: 01/Oct/13  Updated: 26/Nov/13

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For group-by aggregation, the hint parameter can already be provided by a variable






[ESPER-754] Class that extends class triggers two events when named window declared for both child and parent class Created: 01/Oct/13  Updated: 06/Jan/14  Resolved: 18/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.10.0
Fix Version/s: 4.11.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File SimpleHierarchyTesting.java    
Number of attachments : 1




[ESPER-753] Use of Reserved keyword as property name in (schema-provided) XML event Created: 20/Aug/13  Updated: 06/Jan/14  Resolved: 26/Nov/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Test Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File XMLPropTest.java    
Number of attachments : 1

 Description   

Reserved keyword which is acceptable as property name can be used as property name, but when changed some letter(s) to upper case it can't be used as property name in schema-provided XML events.
For example,

select count from SensorEvent

This rule works fine with following event.

<?xml version="1.0" encoding="UTF-8"?>
<Sensor xmlns="SensorSchema">
<count>XXXXXXXX</count>
</Sensor>

But, when some of letter(s) in "count" is changed to upper-case, e.g. "Count", "cOunt", I get following exception.

Exception in thread "main" com.espertech.esper.client.EPStatementException: Error starting statement: Property named 'count' is not valid in any stream (did you mean 'Count'?) [select Count from SensorEvent]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:637)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:595)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:137)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)
at XMLPropTest.main(XMLPropTest.java:45)
Caused by: com.espertech.esper.epl.expression.ExprValidationPropertyException: Property named 'count' is not valid in any stream (did you mean 'Count'?)
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getSuggestionException(ExprIdentNodeUtil.java:183)
at com.espertech.esper.epl.expression.ExprIdentNodeUtil.getTypeFromStream(ExprIdentNodeUtil.java:59)
at com.espertech.esper.epl.expression.ExprIdentNodeImpl.validate(ExprIdentNodeImpl.java:150)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:147)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtree(ExprNodeUtility.java:122)
at com.espertech.esper.epl.core.ResultSetProcessorFactoryFactory.getProcessorPrototype(ResultSetProcessorFactoryFactory.java:114)
at com.espertech.esper.core.start.EPStatementStartMethodSelectUtil.prepare(EPStatementStartMethodSelectUtil.java:278)
at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:51)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:53)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:625)
... 5 more

When I tried "Count" property with no-schema-provided XML event, it does not throw exception but it seems that the property name "Count" is interpreted as "count".

Attached is a sample program which throws the exception above.



 Comments   
Comment by Thomas Bernhardt [ 23/Aug/13 ]

"Count" is also an SQL keyword, thus likely to need to be escaped

Comment by Thomas Bernhardt [ 05/Sep/13 ]

Property names are always case-sensitive.

Without a schema the behavior is entirely different as there is no way to check property names and types.

Comment by Toshihiro Nishimura [ 06/Sep/13 ]

This problem is when an XML schema is provided.

Please watch the error message carefully.

> Property named 'count' is not valid in any stream (did you mean 'Count'?) [select Count from SensorEvent]

In the EPL statement (and in the XML schema) property named 'Count' (starting with upper-case 'C') is used, but the error message says "Property named 'count'" (starting with lower-case 'c').
I think that because 'Count' is transformed into 'count' at somewhere, it doesn't match the property 'Count' defined in with the XML schema.

Comment by Toshihiro Nishimura [ 12/Sep/13 ]

It was not only a matter of XML event.

As described in "Appendix B. Reserved Keywords" of "Esper Reference",
certain keywords, such as last and count, are allowed as event property names in expressions and as column names in the rename syntax of the select clause.
So, the following example is permitted to use:
insert into MyOutput select last, count as count from MyEvent
select last, count from MyOutput

This works well, and the following also works:

insert into MyOutput select last, count as count from MyEvent
select Last, Count from MyOutput

I expect the second statement produces an error at createEPL, but it does not.
And the output is same with the first example.

Moreover, I tested the following:
insert into MyStream select last, count as count from MyEvent
select Last, last from MyStream

This produces the following error message:
Column name 'last' appears more then once in select clause [select Last, last from MyStream]

The property "Last" is interpreted as "last".





[ESPER-752] @Drop annotation with context: First event not dropped Created: 07/Aug/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TheFirstEventInAContextIsntDropped.java    
Number of attachments : 1




[ESPER-751] StackOverflow when routing new event during high volume processing Created: 06/Aug/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Steve Ashton Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File OverflowEsper.java    
Testcase included: yes
Number of attachments : 1

 Description   

During high-volume processing, I have seen stackoverflow errors result when an UpdateListener routes a new event to Esper. The JVM stack size can be increased, but that only delays the issue.



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/13 ]

The "route" method is only intended for use by extension code and not for sending events into the engine, the "sendEvent" method should be used by line 70.
Downgraded to trivial - we'll look into if the behavior can be improved

Comment by Steve Ashton [ 07/Aug/13 ]

Using sendEvent() produces a StackOverflowError as well.

On a side note, I had also tried sendEvent() earlier but switched to route() based on a solution patterns suggestion:

http://esper.codehaus.org/tutorials/solution_patterns/solution_patterns.html#troubleshooting-3

I'm getting a stack overflow error?
This can happen if your listener or subscriber code sends in an event
via "sendEvent" method and that event triggers a listener again which
may send in another event (applies to default threading model). Use
the "route" method to send events into the engine from a listener.

Comment by Steve Ashton [ 07/Aug/13 ]

I just realized which line you were referring to. The route() was not intended to be called in the for loop. I was seeing the stackoverflow in my app code even when using sendEvent(). I'll work on an updated test case to correctly demonstrate the issue.

Comment by Steve Ashton [ 08/Aug/13 ]

I've added a new test case which demonstrates the stackoverflow for both sendEvent() and route() being called from an UpdateListener.
(OverflowEsper.java)

Comment by Steve Ashton [ 12/Aug/13 ]

Upgraded to Major based on newer TestCase. Please review and re-prioritize as necessary.

Comment by Thomas Bernhardt [ 12/Aug/13 ]

It is not supported to invoke "sendEvent" from an update listener. Can the test case be cleaned to only contains supported API calls and one of the two classes be removed please?

Comment by Steve Ashton [ 12/Aug/13 ]

Updated test case: demonstrates stackoverflow when route() is called in UpdateListener.

Also removed prior (no longer valid) test case attachments.





[ESPER-750] @audit miscounts pattern instances with "not" Created: 25/Jul/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Joao Duarte Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL, Java 1.7.0


Number of attachments : 0

 Description   

In a simple pattern

every a=A -> (timer:interval(10) and not A)

with @Audit('pattern-instances') and sending As every 1 second, the (not A) pattern keeps increasing while others stay at 1-2.

So I'm not sure if a) the pattern instances are actually increasing or b) @audit is counting erroneously.

This is better expressed in this gist: https://gist.github.com/jsvd/7d1c50042a2be775433a

If the problem is b) it's a minor thing, if a) then it's serious.






[ESPER-749] split stream with "output all" not working with prepared statement Created: 17/Jul/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Sebastian Lauth Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File OutputAllTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

For split-stream syntax, it seems that "output all" does not work in combination with prepared statements. Simple test case attached.
Doc link is http://esper.codehaus.org/esper-4.9.0/doc/reference/en-US/html_single/index.html#split_overview






[ESPER-748] create schema fails with fully qualified property type name Created: 18/Jun/13  Updated: 09/Sep/13  Resolved: 04/Sep/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Vitamin C Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following code fails with exception:

main.java
String epl = "create objectarray schema Foo(ts java.sql.Timestamp)"
EPServiceProviderManager
.getDefaultProvider()
.getEPAdministrator()
.getDeploymentAdmin()
.parseDeploy(epl);

The exception text as follows:

Caused by: com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near '.' expecting a closing parenthesis ')' but found a dot '.' at line 1 column 37 [create objectarray schema Foo(ts java.sql.Timestamp)]
	at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:40)
	at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:121)
	at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:117)
	at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:89)
	at com.espertech.esper.core.service.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:215)
	at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:136)


 Comments   
Comment by Thomas Bernhardt [ 23/Aug/13 ]

"sql" is a reserved keyword

Comment by Vitamin C [ 02/Sep/13 ]

What's your suggestion then? How can I reference types from java.sql namespace?

Comment by Thomas Bernhardt [ 02/Sep/13 ]

Add "java.sql" to imports and just specify "Timestamp"

Comment by Vitamin C [ 02/Sep/13 ]

This doesn't work either:

foo.epl
import java.sql.Timestamp;

create objectarray schema Foo(ts Timestamp);

leads to

Caused by: com.espertech.esper.client.EPException: Nestable type configuration encountered an unexpected property type name 'Timestamp' for property 'ts', expected java.lang.Class or java.util.Map or the name of a previously-declared Map or ObjectArray type
	at com.espertech.esper.event.EventTypeUtility.getNestableProperties(EventTypeUtility.java:415)
	at com.espertech.esper.event.BaseNestableEventType.<init>(BaseNestableEventType.java:91)
	at com.espertech.esper.event.arr.ObjectArrayEventType.<init>(ObjectArrayEventType.java:34)
	at com.espertech.esper.event.EventAdapterServiceImpl.addNestableObjectArrayType(EventAdapterServiceImpl.java:535)
	at com.espertech.esper.event.EventTypeUtility.createNonVariantType(EventTypeUtility.java:1035)
	at com.espertech.esper.core.start.EPStatementStartMethodCreateSchema.handleCreateSchema(EPStatementStartMethodCreateSchema.java:62)
Comment by Thomas Bernhardt [ 02/Sep/13 ]

try importing the package "java.sql.*", not the class itself

Comment by Vitamin C [ 03/Sep/13 ]

Importing java.sql.* changes nothing; exception reproduces.





[ESPER-747] Cron timer is skipping months Created: 21/May/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Chris Myzie Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

64bit Linux, OpenJDK 7


Attachments: Java Source File Main.java     Java Source File Main.java    
Testcase included: yes
Number of attachments : 2

 Description   

When I use a pattern that should trigger once per month like

pattern [ every timer:at(0, 17, lastweekday, *, *) ]
or
pattern [ every timer:at(0, 17, last, *, *) ]

it skips some months. For example, in the output of the attached test case, one can see it scheduling 59 days (5130000000 milliseconds) in the future:

2013-05-21 10:32:24,929 INFO EPServiceProviderImpl Initializing engine URI 'default' version 4.9.0
2013-05-21 10:32:26,009 INFO audit Statement TEST expression 0 result 0
2013-05-21 10:32:26,010 INFO audit Statement TEST expression 17 result 17
2013-05-21 10:32:26,012 INFO audit Statement TEST expression lastweekday result com.espertech.esper.type.CronParameter@72057965
2013-05-21 10:32:26,012 INFO audit Statement TEST expression * result com.espertech.esper.type.WildcardParameter@4565105e
2013-05-21 10:32:26,013 INFO audit Statement TEST expression * result com.espertech.esper.type.WildcardParameter@4565105e
2013-05-21 10:32:26,191 INFO audit Statement TEST schedule after 887254000 handle com.espertech.esper.pattern.observer.TimerAtObserver@17805bd5
2013-05-21 10:32:26,195 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) increased to 1
2013-05-21 10:32:26,196 INFO audit Statement TEST pattern-instances (every timer:at(0, 17, lastweekday, *, *)) increased to 1
2013-05-21 10:32:26,218 INFO audit Statement TEST schedule trigger handle com.espertech.esper.pattern.observer.TimerAtObserver@17805bd5
2013-05-21 10:32:26,219 INFO audit Statement TEST pattern (timer:at(0, 17, lastweekday, *, *)) evaluate-true { from: EvalObserverStateNode@71423f68 map: {} quitted: true}
2013-05-21 10:32:26,220 INFO audit Statement TEST schedule after 5130000000 handle com.espertech.esper.pattern.observer.TimerAtObserver@f9533ee
2013-05-21 10:32:26,221 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) increased to 2
2013-05-21 10:32:26,221 INFO audit Statement TEST pattern (every timer:at(0, 17, lastweekday, *, *)) evaluate-true { from: EvalEveryStateNode@443a8a2b map: {} quitted: false}
2013-05-21 10:32:26,224 INFO audit Statement TEST expression current_timestamp() result 1370174400000
2013-05-21 10:32:26,229 INFO audit Statement TEST insert test[

{current_timestamp()=1370174400000}

]
2013-05-21 10:32:26,230 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) decreased to 1



 Comments   
Comment by Thomas Bernhardt [ 21/May/13 ]

Always set the time BEFORE creating the statement

Comment by Chris Myzie [ 21/May/13 ]

Sorry, I just made that mistake in the test case. After correcting it, I can still reproduce the issue:

2013-05-21 11:19:26,931 INFO EPServiceProviderImpl Initializing engine URI 'default' version 4.9.0
2013-05-21 11:19:27,978 INFO audit Statement TEST expression 0 result 0
2013-05-21 11:19:27,979 INFO audit Statement TEST expression 17 result 17
2013-05-21 11:19:27,980 INFO audit Statement TEST expression lastweekday result com.espertech.esper.type.CronParameter@72057965
2013-05-21 11:19:27,980 INFO audit Statement TEST expression * result com.espertech.esper.type.WildcardParameter@4565105e
2013-05-21 11:19:27,981 INFO audit Statement TEST expression * result com.espertech.esper.type.WildcardParameter@4565105e
2013-05-21 11:19:28,141 INFO audit Statement TEST schedule after 884432000 handle com.espertech.esper.pattern.observer.TimerAtObserver@17805bd5
2013-05-21 11:19:28,145 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) increased to 1
2013-05-21 11:19:28,146 INFO audit Statement TEST pattern-instances (every timer:at(0, 17, lastweekday, *, *)) increased to 1
2013-05-21 11:19:28,167 INFO audit Statement TEST schedule trigger handle com.espertech.esper.pattern.observer.TimerAtObserver@17805bd5
2013-05-21 11:19:28,167 INFO audit Statement TEST pattern (timer:at(0, 17, lastweekday, *, *)) evaluate-true { from: EvalObserverStateNode@71423f68 map: {} quitted: true}
2013-05-21 11:19:28,169 INFO audit Statement TEST schedule after 5130000000 handle com.espertech.esper.pattern.observer.TimerAtObserver@f9533ee
2013-05-21 11:19:28,169 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) increased to 2
2013-05-21 11:19:28,170 INFO audit Statement TEST pattern (every timer:at(0, 17, lastweekday, *, *)) evaluate-true { from: EvalEveryStateNode@443a8a2b map: {} quitted: false}
2013-05-21 11:19:28,172 INFO audit Statement TEST expression current_timestamp() result 1370174400000
2013-05-21 11:19:28,177 INFO audit Statement TEST insert test[

{current_timestamp()=1370174400000}

]
2013-05-21 11:19:28,178 INFO audit Statement TEST pattern-instances (timer:at(0, 17, lastweekday, *, *)) decreased to 1

Comment by Chris Myzie [ 21/May/13 ]

Fixed the initial time event.

Comment by Thomas Bernhardt [ 21/May/13 ]

can you add an assertion please?

Comment by Chris Myzie [ 21/May/13 ]

Added an assertion that checks the number of events that were fired.

Comment by Chris Myzie [ 22/May/13 ]

As a workaround I was to get it working by manually specifying each month:

insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 1, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 2, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 3, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 4, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 5, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 6, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 7, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 8, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 9, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 10, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 11, *) ];
insert into eom select * from pattern [ every timer:at(0, 17, lastweekday, 12, *) ];





[ESPER-746] Self-Join between derived value streams provides incorrect result Created: 14/May/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample query:

select
Math.signum(stream1.slope) as s1,
Math.signum(stream2.slope) as s2
from
cep.SensorEvent.win:length_batch(5).stat:linest(value, time) as stream1
cep.SensorEvent.win:length_batch(4).stat:linest(value, time) as stream2

The self-join of derived values incorrectly initilizes the join and provides incorrect results.

Workaround is to use insert-into for each stream separately and std:lastevent.






[ESPER-745] Qualified names don't work in patterns Created: 07/May/13  Updated: 07/May/13  Resolved: 07/May/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Test Priority: Minor
Reporter: Andreas Voss Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Number of attachments : 0

 Description   

I want to detect a sequence of 2 transactions, where the amount of the first transaction is the same as the second transaction, but with different sign.

The following statement never matches:

@Name("SimpleSequence2")
INSERT INTO SimpleSequence2
SELECT t1.amount, t2.amount FROM PATTERN [
  every t1=Transaction(t1.amount > 0) -> every t2=Transaction(t1.amount + t2.amount = 0)
]

The following statement matches (but does not meet the requirement):

@Name("SimpleSequence2")
INSERT INTO SimpleSequence2
SELECT t1.amount, t2.amount FROM PATTERN [
  every t1=Transaction(t1.amount > 0) -> every t2=Transaction(t2.amount < 0)
]

but the output adapter receives a negative value for both, t1.amount and t2.amount. This indicates, that esper does not handle the qualified names correctly.

The only way to get this work was to use names, that are different even if not qualified:

@Name("TX1")
INSERT INTO TX1
SELECT amount as a1 FROM Transaction(amount > 0);

@Name("TX2")
INSERT INTO TX2
SELECT amount as a2 FROM Transaction(amount < 0);

@Name("SimpleSequence")
INSERT INTO SimpleSequence
SELECT t1.a1, t2.a2 FROM PATTERN [
  every t1=TX1 -> every t2=TX2(t1.a1 + t2.a2 = 0)
];



 Comments   
Comment by Thomas Bernhardt [ 07/May/13 ]

Please provide a test class that demonstrates the issue, review test class instructions at http://esper.codehaus.org/esper/issues/issues.html

Comment by Andreas Voss [ 07/May/13 ]

I'm sorry, when I prepared the example class, I noticed the bug was in my test code. I was re-using the Event like

Transaction tx = new Transaction(100); // amount
send(tx);
tx.setAmount(-100);
send(tx);

This (of course) was confusing esper.

Sorry again, and thanks for your quick response.





[ESPER-744] parse error in prepared statement for count(*,filter_expr) Created: 23/Apr/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The epl example in the code snippet below gets compiled wrongly if it is done via a prepared statement. The print statement outputs "count(false)" instead of "count(*, false)" and the aggregate behaves like count disregarding the filter expression. Compiling to EPStatement directly does not produce the same problem.

String epl = "select count(*, false) from TestEvent.win:length(6)"
EPPreparedStatement eps = admin.prepareEPL(epl);
EPStatement statement = admin.create(eps, "test");
System.out.println(statement.getText());





[ESPER-743] Join accross ObjectArrayEvent and MapEvent leaks data from MapEvent Created: 18/Apr/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Reinhard Iben Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows7 64bit,
Java 6
Esper 4.9


Attachments: Java Source File TestMethod1.java     Java Source File TestMethod.java    
Number of attachments : 2

 Description   

I tried to enrich an ObjectArrayEvent by using method invocation. Therefore I started with create schema and window for the new inherited Event.
Running through the properties of the enriched Event in the update listener, all the expected propertynames are available, but on accessing data provided by the MapEvent, it throws an exception. Test case is TestMethod.

The same approch with smaller EPL without creating schema and windows works fine.

To verify whether method invocation causes the problem, I did the second sample TestMethod1, which does not rely on method invocation, is running into the same problem.



 Comments   
Comment by Reinhard Iben [ 24/Apr/13 ]

The following list of statements, does not provide the properties of B1 to the listener.

problem
create schema C as (u int) inherits A;
create window Cw.win:time(30 days) as C;
insert into Cw select B1.u as u, A1.* from A.win:time(5 days) as A1, method:TestMethod1.lookupB() as B1;

@Name('listener')
select * from Cw;

A different approach without using the explicit create schema statement does it correctly.

workaround
insert into C select A1.*, B1.u as u from A as A1, method:TestMethod1.lookupB() as B1;
create window Cw.win:time(5 days) as C;
insert into Cw select * from C;

@Name('listener')
select * from Cw;




[ESPER-742] Static method lookup selects incorrect classstatic method lookup Created: 15/Apr/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Barry Kaplan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I import two classes to provide UDFs (in this order)

NonOverlappingIntervalSeries
OverlappingIntervalSeries

When looking up the class while resolving the method (by com.espertech.esper.epl.core.EngineImportServiceImpl#resolveClassInternal) the list of imports is checked for a match. When a class import is found, the class name being searched is compared against the import via:

if(importName.endsWith(className))

{ ClassLoader cl = Thread.currentThread().getContextClassLoader(); return Class.forName(importName, true, cl); }

In my example

"NonOverlappingIntervalSeries".endsWith("OverlappingIntervalSeries") == true

resulting in the incorrect class being selected form the imports.






[ESPER-741] Named window on-action with relational operator (<, <=) where-clause incorrect behavior when reversing comparison Created: 13/Apr/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Chris Myzie Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 64bit, OpenJDK 7


Attachments: Java Source File Main.java     File test_case.epl    
Testcase included: yes
Number of attachments : 2

 Description   

The following trivial example does not work as expected. It should immediately delete the arriving event from the window.

create window
TestWindow.win:keepall()
as
(x double, y double);

insert into
TestWindow
select
1.1 as x,
1.2 as y
from pattern [ timer:at(0,,,,) ];

@Audit
on
TestWindow as triggerEvent
delete from
TestWindow as testWindow
where
1.0 < testWindow.x;

The simple work around is to flip "On Delete"'s criteria_expression to "testWindow.x >= 1.0", and then the event is deleted as expected.



 Comments   
Comment by Chris Myzie [ 13/Apr/13 ]

The automatic formatting mangled the EPL.

Comment by Thomas Bernhardt [ 13/Apr/13 ]

Can you provide a test class the demonstrates the issue please?

Comment by Chris Myzie [ 13/Apr/13 ]

Added a test class.

Comment by Thomas Bernhardt [ 13/Apr/13 ]

Thanks for the test case, I was able to reproduce.

Comment by Thomas Bernhardt [ 13/Apr/13 ]

Affects named window on-trigger with a where clause providing a constant in a relational op comparison.





[ESPER-740] POJO event populated by selectclause and via POJO constructor and select clause selects same type twice is created using wrong parameters Created: 07/Apr/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Chris Myzie Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 64bit with OpenJDK 7


Attachments: Java Source File BBO.java     Java Source File Main.java     Java Source File Quote.java    
Testcase included: yes
Number of attachments : 3

 Description   

Please see the attached minimal example.

The first statement demonstrates the problem. It should merge the two Quote events into a single BBO event with one Quote of type 'BID' and one Quote of type 'ASK', but instead it passes the Quote of type 'BID' twice.

The second statement performs the same operation, but instead creates an adhoc event, which is created correctly.



 Comments   
Comment by Thomas Bernhardt [ 08/Apr/13 ]

Applies only when no setters are present and constructor must be used to populate POJO. Workaround is to provide setters.
Also applies only when the same event type gets selected twice, i.e. in the below example the Quote event type:
insert into BBO select bid,ask from Quote(quoteType='BID').std:lastevent() as bid, Quote(quoteType='ASK').std:lastevent() as ask





[ESPER-739] All calls methods named "get" assumed to be Date-Time method Created: 27/Mar/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If a property or a variable is a Map or other object with a get method then this cannot be called from within a statement (on the other hand put works fine). Eg:

create variable Map FOO
select FOO.get(ticker) from MyEvent

com.espertech.esper.client.EPStatementException: Error starting statement: Date-time enumeration method 'get' requires either a Calendar, Date or long value as input or events of an event type that declares a timestamp property

(Example does not show variable being set). Workaround is to use wrapper class renaming get methods. Assume same namespace clash could occur for other methods?

Possibly this could be fixed by prioritizing object methods over other methods.






[ESPER-738] Performance issue with 8 threads, keyed context partitioned, synchronized listener, event sequence for same partition Created: 25/Mar/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The engine logs frequent "[UpdateDispatchFutureSpin] Spin wait timeout exceeded in listener dispatch for statement 'select'" and performance is low.

This is when sending events that affect the same partition, i.e. all 8 threads sending an event affecting the same partition.

I can turn off dispatch preserve order and performance is great.
For turning off I use:
configuration.getEngineDefaults().getThreading().setListenerDispatchPreserveOrder(false);

This is with 8 threads and these two statements:
create context CtxEachString partition by theString from SupportBean
context CtxEachString select * from SupportBean

This is with a synchronized listener:
public synchronized void update(EventBean[] newEvents, EventBean[] oldEvents)

{ count += 1; }




[ESPER-737] NullPointerException with grouped data window intersecting time window and last/first event Created: 25/Mar/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File FirstEventTest.java    
Number of attachments : 1

 Description   

Sample data window definitions that cause the exception:
BookDesc.std:groupwin(BookDesc.author).win:time(.0083 sec).std:firstevent()

Workaround:
Grouping a time window is the same as not grouping a time window, therefore the following has the same semantics:
BookDesc.win:time(.0083 sec).std:firstunique(BookDesc.author)

Exception trace:
com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: null [select * from BookDesc.std:groupwin(BookDesc.author).win:time(.0083 sec).std:firstevent()]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:651)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:595)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:137)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:117)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)
at FirstEventTest.testFirstEvent(FirstEventTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at com.espertech.esper.view.ViewServiceHelper.getUniqueCandidateProperties(ViewServiceHelper.java:49)
at com.espertech.esper.core.service.StreamJoinAnalysisResult.addUniquenessInfo(StreamJoinAnalysisResult.java:189)
at com.espertech.esper.core.start.EPStatementStartMethodSelectUtil.prepare(EPStatementStartMethodSelectUtil.java:243)
at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:51)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:53)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:625)
... 31 more



 Comments   
Comment by Thomas Bernhardt [ 25/Mar/13 ]

Attached test case provided by Nathan R.





[ESPER-736] EPL Pattern that reacts to events inserted into a named window when using on-merge Created: 21/Mar/13  Updated: 31/Mar/14

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample:
create window ABCWindow.win:time(30) as SomeEvent
select * from pattern[every ABCWindow]
on SomeEvent merge ABCWindow when not matches insert select *

Workaround is simple: the pattern reacts to the event inserted into the named window instead.

Workaround for the example above:
select * from pattern[every SomeEvent]






[ESPER-735] Esper 4.9.0 OSGi bundle execution environment restricted to J2SE 1.6 Created: 21/Mar/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Declan Cox Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java 1.7


Number of attachments : 0

 Description   

The OSGi metadata in Esper 4.9.0 includes the following directive:

Bundle-RequiredExecutionEnvironment: J2SE-1.6

This is not a minimum requirement but an exact requirement, which means that the Esper bundle may not be used in a Java 1.7 OSGi environment.

This can be solved by altering the directive as follows:

Bundle-RequiredExecutionEnvironment: J2SE-1.6, J2SE-1.7

We verified this locally by manually altering the manifest data and were able to start the bundle successfully on Apache Karaf.



 Comments   
Comment by Declan Cox [ 22/Aug/13 ]

We would love to use Esper in Karaf - please somebody have a look at this , Thanks.

Comment by Thomas Bernhardt [ 23/Aug/13 ]

for 4.10 release





[ESPER-734] Unclear exception for invalid match_recognize Created: 13/Mar/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.9
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Johan Van Noten Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Scenario:

  • Register the match_recognize statement below.
  • An expression is returned.
    I guess the reason for the expression is clear.
    The exception does not occur when exactly the same statement is submitted, without the *.
    So the exception probably indicates that the statement is invalid since C cannot be used as a measure without an aggregate function.

Problem:

  • The exception's message is not really helpful.
    This could be improved.

The exception:
com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: null [select * from BaseEvent match_recognize (
measures
A as a,
B as b,
C as c
pattern (A C*? B)
define
A as typeof(A) = "MyEventTypeA",
B as typeof(B) = "MyEventTypeB"
)]






[ESPER-733] Passing aggregate scalars to global script Created: 05/Mar/13  Updated: 09/Sep/13  Resolved: 23/Aug/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The select below compiles fails silently to produce any results

create expression change(open, close) [ (open - close) / close ]

select change(first(price), last(price)) as ch from PC.win:time(1 day)


 Comments   
Comment by Mitch [ 06/Mar/13 ]

Sorry, logging was not turned on properly. Err was:

ERROR [main]: Exception encountered processing statement 'afcf701b-5db6-482f-ab3a-0f93a068b239' statement text 'select change(first(price), last(price)) as ch from PC.win:time(1 day)' : null
java.lang.NullPointerException
	at com.espertech.esper.epl.expression.ExprAggregateNodeBase.evaluate(ExprAggregateNodeBase.java:131)
	at com.espertech.esper.epl.script.ExprNodeScriptEvalJSR223.evaluate(ExprNodeScriptEvalJSR223.java:40)
	at com.espertech.esper.epl.core.eval.EvalSelectNoWildcardMap.process(EvalSelectNoWildcardMap.java:48)
	at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:52)
	at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.getSelectEventsNoHaving(ResultSetProcessorHandThrough.java:107)
	at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.processViewResult(ResultSetProcessorHandThrough.java:72)
	at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:45)
	at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115)
	at com.espertech.esper.view.window.TimeWindowView.update(TimeWindowView.java:148)
	at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:54)
	at com.espertech.esper.view.stream.StreamFactorySvcImpl$2.matchFound(StreamFactorySvcImpl.java:188)
	at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1247)
	at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:988)
	at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:459)
	at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:437)
	at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:196)




[ESPER-732] Transpose event aggregation result as events to new stream Created: 05/Mar/13  Updated: 09/Sep/13  Resolved: 30/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.8
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If have event MyEvent with int property quantity, then following statements wont compile:

insert into MYSTREAM select quantity from MyEvent

insert into TEST select last as lastEvent from MYSTREAM.win:length_batch(4)

select lastEvent.quantity as quantity from TEST

The last statement fails to compile with "ExprValidationPropertyException: Failed to resolve property 'lastEvent.quantity' to a stream or nested property in a stream"

It seems that last.quantity is valid, but property access breaks down if the map is inserted into another stream.

Also if the first statement is changed to "select * from MyEvent" and MyEvent is registered POJO, then you can pass last to another stream and the last statement works. Creating a schema for MYSTREAM does not help.

P.S. have raised this in nabble forum but I think old nabble is having technical issues.



 Comments   
Comment by Thomas Bernhardt [ 05/Mar/13 ]

It would be desirable to allow transposing events returned by event aggregation functions (window, last etc.) into insert-into streams. Currently transposing events occurs only when selecting stream alias or pattern tags (or wildcard and stream-wildcard or transpose-function).

One needs to note that existing contracts should not be broken. One contract is to have the inserted events be the same as the events that any statement listeners receive. Another is that event aggregation functions return the underlying event(s) unless passed to udf or used with enumeration methods of course i.e. if plainly selected. Another is that the result of a select is the same whether there is an insert-into or not. Therefore I think an indication is necessary whether the underlying events or transposable events are selected.

Comment by Mitch [ 05/Mar/13 ]

Would be nice to be able to pass the array returned by window() or the new sorted() aggregation functions to another stream and then be able to use enumeration methods.

Not sure I followed your comment about not breaking existing contracts, but you may want to test with decorated events too.

Comment by Thomas Bernhardt [ 05/Mar/13 ]

You can already pass an array of classes or scalar values between streams and invoke enumeration methods. Including arrays of events that result from pattern tag multiple matches. Just not yet those backed by map or object array events in combination with event aggregation functions (sorted, window).
Therefore whats new would be passing array of events that are object array or map-backed between streams and that originate from event aggregation functions such as "sorted" and "window".

Comment by Mitch [ 05/Mar/13 ]

Thanks, yes, I didn't make that clear.





[ESPER-731] Question on pattern with every Created: 14/Feb/13  Updated: 18/Feb/13  Resolved: 18/Feb/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.8
Fix Version/s: None

Type: Story Priority: Trivial
Reporter: Dan Dreon Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java6


Number of attachments : 0

 Description   

The documentation clearly states that the pattern[every(A)] resets after A is satisfied. In the attached example, the UpdateListener is receiving a multiplicity of events every time the subexpression is reset. This will eventually lead to an EventBean[] that is unworkable.

Unfortunately the attachments button is not working so I will include the code here.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPAdministrator;
import com.espertech.esper.client.EPRuntime;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;

class Zig {
public int id;
public Zig(int id)

{ this.id=id; }
}

class Status {
public int id;
public Status(int id) { this.id=id; }

}

class Zag {
public int id;
public Zag(int id)

{ this.id=id; }

}

public class TestAndNot {

public static final void main(String[] args) {

Configuration config = new Configuration();

config.addEventType("Zig", Zig.class);
config.addEventType("Status", Status.class);
config.addEventType("Zag", Zag.class);

EPServiceProvider provider = EPServiceProviderManager.getDefaultProvider(config);
EPRuntime runtime = provider.getEPRuntime();
EPAdministrator admin = provider.getEPAdministrator();

EPStatement stmt = admin.createEPL("select * from pattern[every((zig=Zig -> every status=Status) and not zag=Zag)]");
stmt.addListener(new UpdateListener() {
@Override
public void update(EventBean[] arg0, EventBean[] arg1) {
System.out.println("\n");
for (EventBean b : arg0) {
try

{ Object e = b.get("zig"); Object f = b.get("status"); System.out.println("Events Sent: " + arg0.length + " >>> Zig: " + ((Zig)e).id + ", Status: " + ((Status)f).id); }

catch(Exception ex) {
}
}
}
});

int j = 0;
for (int i = 0; i < 4; i++)

{ runtime.sendEvent(new Zig(j++)); runtime.sendEvent(new Status(j++)); runtime.sendEvent(new Status(j++)); runtime.sendEvent(new Zag(j++)); }

}
}



 Comments   
Comment by Thomas Bernhardt [ 18/Feb/13 ]

You pattern is this:
every((zig=Zig -> every status=Status) and not zag=Zag)

When a Zig event arrives, the engine starts looking for all Status events. For every Status event your "zig=Zig -> every status=Status" subexpression turns true, therefore the engine looks for the next Zip event. It will not stop looking for Status events, it will look for Zip and Status events. When the next Zig comes in it will look twice for Status events, once for the first Zig and once for the second Zig.

Maybe you will find a join/outer join (also good for absence detection) more easy to handle in designing for, also since the pattern seems to look for many-to-many relationships (it is utterly uncorrelated),





[ESPER-730] Statement Object Model for "is null" Created: 12/Feb/13  Updated: 04/Mar/13  Resolved: 27/Feb/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.8
Fix Version/s: 4.9

Type: Improvement Priority: Minor
Reporter: Rathna kumar S Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

property=NULL check works in 4.6 but not in 4.8.

This is similar to issue http://jira.codehaus.org/browse/ESPER-569.



 Comments   
Comment by Thomas Bernhardt [ 12/Feb/13 ]

Esper is following SQL standards, use "property is null" to check for null

Comment by Rathna kumar S [ 12/Feb/13 ]

Can you tell me how this can be achieved when we use the Pull-API? We are trying to build an Esper Query using Expressions. We had earlier used Expressions.eq(name,value), which worked in 4.6 but after we migrated to 4.8, it doesn't work. Now, we tried using Expressions.not(Expressions.isNotNull(..)), which also doesn't help.

Comment by Rathna kumar S [ 12/Feb/13 ]

Can you tell me how this can be achieved when we use the Pull-API? We are trying to build an Esper Query using Expressions. We had earlier used Expressions.eq(name,value), which worked in 4.6 but after we migrated to 4.8, it doesn't work. Now, we tried using Expressions.not(Expressions.isNotNull(..)), which also doesn't help.

Comment by Thomas Bernhardt [ 12/Feb/13 ]

Do you mean the Statement Object Model API? Is there an "is null" expression missing in that API?

Comment by Rathna kumar S [ 12/Feb/13 ]

Yes, seems the "is null" expression is missing in the API. Or, I am not sure if there is any workaround for this.

Comment by Thomas Bernhardt [ 04/Mar/13 ]

In release 4.9.0





[ESPER-729] Null-value comparison for "not/equals"-operator (!=, =) works inconsistently between Esper V4.6 and V4.8 Created: 12/Feb/13  Updated: 12/Feb/13  Resolved: 12/Feb/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Major
Reporter: Rathna kumar S Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In version 4.3, the expression "property = NULL" always returns null. Use "property is NULL" instead to compare against null values.

In version 4.2 and earlier, the expression "property = NULL" compares the property against null and returns true/false.

More examples:

1) "select 2 != null" returns null in version 4.3 (in version 4.2 it returns true)
2) "select null = null" returns null in version 4.3 (in version 4.2 it returns true)
3) "select 2 != null or 1 = 2" returns null in version 4.3 (in version 4.2 it returns true)
4) "select 2 != null and 2 = 2" returns null in version 4.3 (in version 4.2 it returns true)

Use "is null" or "is not null" instead.






[ESPER-728] Filter improvement for expressions in relationship to other filter ops Created: 05/Feb/13  Updated: 04/Mar/13  Resolved: 27/Feb/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.8
Fix Version/s: 4.9

Type: Improvement Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java 7, Windows 7


Attachments: Java Source File EsperConstantTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

Given the following two statements:

1: select * from A(value = 1 or value = 2)

2: select * from A(value = 3, EsperConstantTest.evaluate(value))

sending an event A with value 0 erroneously invokes the static method EsperConstantTest.evaluate()

leaving out the first statement, this effect disappears! Also if leaving out the second condition of the first statement ("value = 2") the effect also disappears!

Please see supplied test class

Andy



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/13 ]

In release 4.9.0





[ESPER-727] Thread safety issue with enumeration method in stateless select Created: 09/Jan/13  Updated: 04/Mar/13  Resolved: 09/Jan/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.8
Fix Version/s: 4.9

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example statement:
select strvals.anyOf(v => v = 'somevalue') from CollectionEvent

This affects only enumeration methods that are part of a select statement that is stateless and therefore executes lock-free. Workaround is to make the statement stateful i.e. add a std:lastevent for example.

Exception:
09:51:42,600 [pool-1-thread-4] FATAL [SendEventCallable] Error in thread 3
com.espertech.esper.client.EPException: java.lang.RuntimeException: Unexpected exception in statement '7e6ed450-383b-4cb6-81d8-a4b77bbf0bb3': null
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:465)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:438)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197)
at com.espertech.esper.multithread.SendEventCallable.call(SendEventCallable.java:42)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Unexpected exception in statement '7e6ed450-383b-4cb6-81d8-a4b77bbf0bb3': null
at com.espertech.esper.support.client.SupportExceptionHandlerFactoryRethrow$SupportExceptionHandlerRethrow.handle(SupportExceptionHandlerFactoryRethrow.java:31)
at com.espertech.esper.core.service.ExceptionHandlingService.handleException(ExceptionHandlingService.java:55)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1228)
at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:982)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:460)
... 8 more
Caused by: java.util.NoSuchElementException
at java.util.ArrayDeque.removeFirst(ArrayDeque.java:251)
at java.util.ArrayDeque.remove(ArrayDeque.java:410)
at com.espertech.esper.core.service.ExpressionResultCacheServiceAgentInstance.popContext(ExpressionResultCacheServiceAgentInstance.java:193)
at com.espertech.esper.epl.enummethod.dot.ExprDotEvalEnumMethodBase.evaluate(ExprDotEvalEnumMethodBase.java:178)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluateChain(ExprDotEvalRootChild.java:79)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluate(ExprDotEvalRootChild.java:52)
at com.espertech.esper.epl.core.eval.EvalSelectNoWildcardMap.process(EvalSelectNoWildcardMap.java:48)
at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:52)
at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.getSelectEventsNoHaving(ResultSetProcessorHandThrough.java:107)
at com.espertech.esper.epl.core.ResultSetProcessorHandThrough.processViewResult(ResultSetProcessorHandThrough.java:72)
at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:45)
at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:58)
at com.espertech.esper.view.stream.StreamFactorySvcImpl$2.matchFound(StreamFactorySvcImpl.java:188)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1221)
... 10 more



 Comments   
Comment by Thomas Bernhardt [ 09/Jan/13 ]

Change in bugfix480 branch

Comment by Thomas Bernhardt [ 04/Mar/13 ]

In release 4.9.0





[ESPER-726] aggregation function avg based on BigDecimal with scale defined throws Non-terminating decimal expansion Created: 08/Jan/13  Updated: 22/May/14  Resolved: 27/Feb/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.8
Fix Version/s: 4.9

Type: Bug Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

There is a problem with the aggregation function avg if used in conjunction with a BigDecimal value that has a scale defined.

Example: select avg(a.value) from A as a

if a.value is of type BigDecimal that has a scale defined like this:

a.setScale(2, RoundingMode.HALF_UP);

then the following exception is thrown:

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.

I assume, that this problem could be fixed by changing com.espertech.esper.epl.agg.aggregator.BigDecimalAvgAggregator

Replacing:
return sum.divide(new BigDecimal(numDataPoints));

with something like this:
return sum.divide(new BigDecimal(numDataPoints), RoundingMode.HALF_UP);



 Comments   
Comment by Thomas Bernhardt [ 27/Feb/13 ]

No test provide and cannot reproduce.

Sample code
AggregatorAvgBigDecimal agg = new AggregatorAvgBigDecimal();

BigDecimal bigOne = new BigDecimal(20);
bigOne.setScale(2, RoundingMode.HALF_UP);
agg.enter(bigOne);

BigDecimal bigTwo = new BigDecimal(10);
bigTwo.setScale(2, RoundingMode.HALF_EVEN);
agg.enter(bigTwo);

agg.getValue();

Comment by Andy Flury [ 27/Feb/13 ]

Please try this example, which will throw the exception:

AggregatorAvgBigDecimal agg = new AggregatorAvgBigDecimal();

BigDecimal bigOne = new BigDecimal(0);
bigOne.setScale(2, RoundingMode.HALF_UP);
agg.enter(bigOne);

BigDecimal bigTwo = new BigDecimal(0);
bigTwo.setScale(2, RoundingMode.HALF_UP);
agg.enter(bigTwo);

BigDecimal bigThree = new BigDecimal(1);
bigThree.setScale(2, RoundingMode.HALF_UP);
agg.enter(bigThree);

agg.getValue();

Andy

Comment by Thomas Bernhardt [ 27/Feb/13 ]

We could make the MathContext configurable in the engine configs or @Hint

Comment by Andy Flury [ 27/Feb/13 ]

both would be great, whatever you think makes more sense

Comment by Thomas Bernhardt [ 04/Mar/13 ]

In release 4.9.0

Comment by Bob Tiernay [ 22/May/14 ]

I just hit this running 4.11.0:

014-05-22 20:41:41,724 [com.espertech.esper.Timer@614b722-1] ERROR c.e.e.e.a.a.AggregatorAvgBigDecimal - Error computing avg aggregation result: Non-terminating decimal expansion; no exact representable decimal result.
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
	at java.math.BigDecimal.divide(BigDecimal.java:1616) ~[na:1.7.0_55]
	at com.espertech.esper.epl.agg.aggregator.AggregatorAvgBigDecimal.getValue(AggregatorAvgBigDecimal.java:88) ~[esper-4.11.0.jar:na]
	at com.espertech.esper.epl.agg.service.AggSvcGroupAllNoAccessImpl.getValue(AggSvcGroupAllNoAccessImpl.java:67) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.context.stmt.AIRegistryAggregationMultiPerm.getValue(AIRegistryAggregationMultiPerm.java:68) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.expression.ExprAggregateNodeBase.evaluate(ExprAggregateNodeBase.java:130) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.core.eval.EvalSelectNoWildcardMap.process(EvalSelectNoWildcardMap.java:48) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:58) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getSelectListEvents(ResultSetProcessorRowForAll.java:165) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processViewResult(ResultSetProcessorRowForAll.java:139) [esper-4.11.0.jar:na]
	at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:48) [esper-4.11.0.jar:na]
	at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115) [esper-4.11.0.jar:na]
	at com.espertech.esper.view.window.TimeBatchView.sendBatch(TimeBatchView.java:220) [esper-4.11.0.jar:na]
	at com.espertech.esper.view.window.TimeBatchView$1.scheduledTrigger(TimeBatchView.java:282) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:1131) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:689) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:636) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:537) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:425) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197) [esper-4.11.0.jar:na]
	at com.espertech.esper.core.service.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:171) [esper-4.11.0.jar:na]
	at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61) [esper-4.11.0.jar:na]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_55]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_55]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_55]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]

This may be another location that needs a rounding (AggregatorAvgBigDecimal:line 88)

            if (optionalMathContext == null) {
                return sum.divide(new BigDecimal(numDataPoints));
            }




[ESPER-725] Object-array event type not enforcing single supertype Created: 21/Dec/12  Updated: 04/Jan/13  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

While the documentation states that object-array event types can only have a single supertype, there is no exception thrown when declaring multiple supertypes. The documentation also has an incorrect example.



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/12 ]

also document that the additional values added by a subtype append to the object array

Comment by Thomas Bernhardt [ 21/Dec/12 ]

change in bugfix470 branch

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-724] Mail bouncing back when sent to user@esper.codehaus.org Created: 21/Dec/12  Updated: 21/Dec/12  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Prasannar Rajaraman Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

we have registered for queries. After the registration, we try to send a mail to the ID user@esper.codehaus.org. But the mail keeps bouncing back.

Please help us resolve this.



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/12 ]

Open Codehaus infrastructure issue, see http://jira.codehaus.org/browse/HAUS-2283





[ESPER-723] Not able to achieve polling Created: 21/Dec/12  Updated: 21/Dec/12  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: Core, Documentation
Affects Version/s: 4.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Prasannar Rajaraman Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Our requirement if to poll a table/set of tables from every say 1 minute and fetch the available records.
We have provide the below and still do not see it working. Please let us know how to proceed on this.

EPStatement statement = cepAdmin.createEPL("select * from pattern [timer:interval(10)], sql:srdv ['select * from testtabforexpbuild']");



 Comments   
Comment by Prasannar Rajaraman [ 21/Dec/12 ]

P.S: Since the mail to user@esper.codehaus.org failed, we have raised this as a bug. We actually need help to proceed further.

Comment by Thomas Bernhardt [ 21/Dec/12 ]

JIRA is not a discussion forum

Comment by Thomas Bernhardt [ 21/Dec/12 ]

The user mailing list is the best place to ask usage questions





[ESPER-722] Partitioned full outer join selecting remove stream with time windows fails with NullPointerException Created: 18/Dec/12  Updated: 04/Jan/13  Resolved: 18/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Partitioned as follows:
create context SegmentedBySession partition by user.sessionId from WebEvent

Statement:
return " context SegmentedBySession " +
" select irstream A.page.pageName as pageNameA , A.user.sessionId as sessionIdA, B.page.pageName as pageNameB, C.page.pageName as pageNameC from " +
"WebEvent(page.pageName='Start').win:time(30) A " +
"full outer join " +
"WebEvent(page.pageName='Middle').win:time(30) B on A.user.sessionId = B.user.sessionId " +
"full outer join " +
"WebEvent(page.pageName='End').win:time(30) C on A.user.sessionId = C.user.sessionId " +
"where A.page.pageName is not null and (B.page is null or C.page is null) "

Exception:
java.lang.RuntimeException: Unexpected exception in statement 'e1d84e82-1020-4c18-96b7-25f3ea5d0df7': null
at com.espertech.esper.support.client.SupportExceptionHandlerFactoryRethrow$SupportExceptionHandlerRethrow.handle(SupportExceptionHandlerFactoryRethrow.java:31)
at com.espertech.esper.core.service.ExceptionHandlingService.handleException(ExceptionHandlingService.java:55)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:1067)
at com.espertech.esper.core.service.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:743)
at com.espertech.esper.core.service.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:618)
at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:526)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:423)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197)
at com.espertech.esper.example.webevent.TxnGenMainCase.run(TxnGenMainCase.java:170)
at com.espertech.esper.example.webevent.TestTxnSimMainCase.testSmall(TestTxnSimMainCase.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.join.exec.base.LookupInstructionExecNode$MyResultAssembler.result(LookupInstructionExecNode.java:207)
at com.espertech.esper.epl.join.assemble.RootOptionalAssemblyNode.result(RootOptionalAssemblyNode.java:53)
at com.espertech.esper.epl.join.assemble.BranchOptionalAssemblyNode.result(BranchOptionalAssemblyNode.java:117)
at com.espertech.esper.epl.join.assemble.LeafAssemblyNode.processEvent(LeafAssemblyNode.java:59)
at com.espertech.esper.epl.join.assemble.LeafAssemblyNode.process(LeafAssemblyNode.java:50)
at com.espertech.esper.epl.join.exec.base.LookupInstructionExecNode.process(LookupInstructionExecNode.java:142)
at com.espertech.esper.epl.join.base.ExecNodeQueryStrategy.lookup(ExecNodeQueryStrategy.java:57)
at com.espertech.esper.epl.join.base.JoinSetComposerImpl.join(JoinSetComposerImpl.java:94)
at com.espertech.esper.epl.join.base.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:47)
at com.espertech.esper.epl.join.base.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:64)
at com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle.internalDispatch(EPStatementAgentInstanceHandle.java:142)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:1063)
... 29 more



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-721] NPE on count() in combination with order by Created: 18/Dec/12  Updated: 04/Jan/13  Resolved: 19/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Lukas Prettenthaler Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java


Number of attachments : 0

 Description   

statement used:
select distinct eventId, count(eventId) as messages from Object.win:time(60 sec) group by eventId output last every 10 seconds order by messages desc

if there are no events in the 60 seconds window the below exception is thrown
after that exception when new events are incoming, the count() itself does not work anymore and reports an aggregated count of all time windows (not only the 60 sec one)

ERROR [com.espertech.esper.core.service.ExceptionHandlingService] (com.espertech.esper.TimerExec-stats-1) Exception encountered processing statement 'b0477b68-ea55-46f5-82bf-b78775812be3' statement text 'select distinct eventId, count(eventId) as messages from Object.win:time(60 sec) group by eventId output last every 10 seconds order by messages desc' : null: java.lang.NullPointerException



 Comments   
Comment by Thomas Bernhardt [ 18/Dec/12 ]

Attach the full stack trace please.
If you have a test class to reproduce that would also be good.

Comment by Lukas Prettenthaler [ 18/Dec/12 ]

sorry i missed that

that's the stacktrace:

20:09:43,271 ERROR [com.espertech.esper.core.service.ExceptionHandlingService] (com.espertech.esper.TimerExec-stats-1) Exception encountered processing statement '0463b3fb-3a22-4443-b672-684c5c5284bd' statement text 'select distinct eventId, count(eventId) as messages from Object.win:time(60 sec) group by eventId output last every 10 seconds order by messages desc' : null: java.lang.NullPointerException
at com.espertech.esper.epl.view.OutputProcessViewConditionDefault.continueOutputProcessingView(OutputProcessViewConditionDefault.java:166) [esper-4.7.0.jar:]
at com.espertech.esper.epl.view.OutputProcessViewConditionDefault$1.continueOutputProcessing(OutputProcessViewConditionDefault.java:253) [esper-4.7.0.jar:]
at com.espertech.esper.epl.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:125) [esper-4.7.0.jar:]
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:1054) [esper-4.7.0.jar:]
at com.espertech.esper.core.thread.TimerUnitMultiple.run(TimerUnitMultiple.java:55) [esper-4.7.0.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_06]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_06]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]

i am trying to reproduce that problem yet
but what i know for sure, it happened twice on a production system were it had already processed some millions of messages
maybe also helpful: there are about 4 similar statements running with separate listeners attached and all are having the same exceptions

Comment by Thomas Bernhardt [ 19/Dec/12 ]

workaround is to remove "distinct"

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-720] Thread safety issue with enumeration method in stream-level filter Created: 17/Dec/12  Updated: 04/Jan/13  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example statement:
select count from CollectionEvent(strvals.anyOf(v => v = 'somevalue'))

This affects only enumeration methods that are part of the filter i.e. "Type(filter)" and not the where-clause. Workaround is to move the enumeration method to the where clause.

Exception:
16:01:46,796 [pool-1-thread-1] ERROR [ExprNodeAdapterBase] Error evaluating expression 'strvals.anyOf(null)' statement '5588f955-f51f-4596-a019-38926bbf7c09': null
java.util.NoSuchElementException
at java.util.ArrayDeque.removeFirst(ArrayDeque.java:251)
at java.util.ArrayDeque.remove(ArrayDeque.java:410)
at com.espertech.esper.core.service.ExpressionResultCacheService.popContext(ExpressionResultCacheService.java:206)
at com.espertech.esper.epl.enummethod.dot.ExprDotEvalEnumMethodBase.evaluate(ExprDotEvalEnumMethodBase.java:167)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluateChain(ExprDotEvalRootChild.java:79)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluate(ExprDotEvalRootChild.java:52)
at com.espertech.esper.filter.ExprNodeAdapterBase.evaluatePerStream(ExprNodeAdapterBase.java:52)
at com.espertech.esper.filter.ExprNodeAdapterBase.evaluate(ExprNodeAdapterBase.java:47)
at com.espertech.esper.filter.FilterParamIndexBooleanExpr.matchEvent(FilterParamIndexBooleanExpr.java:75)
at com.espertech.esper.filter.FilterHandleSetNode.matchEvent(FilterHandleSetNode.java:97)
at com.espertech.esper.filter.EventTypeIndex.matchType(EventTypeIndex.java:171)
at com.espertech.esper.filter.EventTypeIndex.matchEvent(EventTypeIndex.java:109)
at com.espertech.esper.filter.FilterServiceImpl.evaluate(FilterServiceImpl.java:75)
at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:912)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:460)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:438)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197)
at com.espertech.esper.multithread.SendEventCallable.call(SendEventCallable.java:42)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-719] Exception using variable in "after" endpoint context declaration Created: 17/Dec/12  Updated: 04/Jan/13  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example, the EPL:
create variable int var_endsec = 60
create context CtxPerId start after 0 sec end after var_endsec sec

Exception:

com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: Variables node has not been validated [create context CtxPerId start after 0 sec end after var_endsec sec]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:658)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:602)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:136)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:118)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:67)
at com.espertech.esper.regression.context.TestContextInitatedTerminated.testStartZeroInitiatedNow(TestContextInitatedTerminated.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.IllegalStateException: Variables node has not been validated
at com.espertech.esper.epl.expression.ExprVariableNodeImpl.getType(ExprVariableNodeImpl.java:150)
at com.espertech.esper.epl.expression.ExprTimePeriodImpl.validate(ExprTimePeriodImpl.java:196)
at com.espertech.esper.epl.expression.ExprTimePeriodImpl.validate(ExprTimePeriodImpl.java:155)
at com.espertech.esper.core.start.EPStatementStartMethodCreateContext.validateRewriteContextCondition(EPStatementStartMethodCreateContext.java:149)
at com.espertech.esper.core.start.EPStatementStartMethodCreateContext.validateContextDetail(EPStatementStartMethodCreateContext.java:116)
at com.espertech.esper.core.start.EPStatementStartMethodCreateContext.startInternal(EPStatementStartMethodCreateContext.java:50)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:59)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:632)
... 27 more



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-718] Debug-level logging triggers ClassCastException in dataflow Select operator when using XML underlying Created: 17/Dec/12  Updated: 04/Jan/13  Resolved: 21/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl cannot be cast to [Ljava.lang.Object;
at com.espertech.esper.dataflow.ops.Select.onInput(Select.java:246)
at com.espertech.esper.dataflow.ops.Select$$FastClassByCGLIB$$11bf719.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at com.espertech.esper.dataflow.core.EPDataFlowEmitter1Stream1TargetPassAlongWStream.submitInternal(EPDataFlowEmitter1Stream1TargetPassAlongWStream.java:31)
at com.espertech.esper.dataflow.core.EPDataFlowEmitter1Stream1TargetBase.submit(EPDataFlowEmitter1Stream1TargetBase.java:44)
at com.espertech.esper.dataflow.ops.Emitter.submit(Emitter.java:32)
at EmitterXMLDataFlow.main(EmitterXMLDataFlow.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-717] Allow certain enumeration methods to have lambda and operate on scalar values Created: 11/Dec/12  Updated: 13/Dec/12  Resolved: 13/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a query which I would naturally be inclined to write like so:

select
my.java.lib.getStringArray(event) – extract an array of strings
.Where( ...lambda... ) – filter that array
.Max( ...lambda... ) – extract a number from each string, take the maximum number
from feed;

However, this fails validation:

ExprValidationException Invalid input for built-in enumeration method 'Max' and 1-parameter footprint, expecting collection of events as input, received collection of String

This surprises me a bit: The documentation for the max enumeration method appears to describe it as taking a "collection of values", and it isn't obvious to me why the output of calling the Where enumeration method against a String[] wouldn't qualify.



 Comments   
Comment by Thomas Bernhardt [ 11/Dec/12 ]

Sample:

public void testMinMaxScalarWithLambda() {

epService.getEPAdministrator().getConfiguration().addPlugInSingleRowFunction("extractNum", MyService.class.getName(), "extractNum");

String[] fields = "val0,val1".split(",");
String eplFragment = "select " +
"strvals.min(v => extractNum(v)) as val0, " +
"strvals.max(v => extractNum(v)) as val1 " +
"from SupportCollection";
EPStatement stmtFragment = epService.getEPAdministrator().createEPL(eplFragment);
stmtFragment.addListener(listener);
LambdaAssertionUtil.assertTypes(stmtFragment.getEventType(), fields, new Class[]

{Integer.class, Integer.class}

);

epService.getEPRuntime().sendEvent(SupportCollection.makeString("E2,E1,E5,E4"));
EPAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{1, 5}

);

epService.getEPRuntime().sendEvent(SupportCollection.makeString("E1"));
EPAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{1, 1}

);

epService.getEPRuntime().sendEvent(SupportCollection.makeString(null));
EPAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{null, null});

epService.getEPRuntime().sendEvent(SupportCollection.makeString(""));
EPAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]{null, null}

);
}

public static class MyService {
public static int extractNum(String arg)

{ return Integer.parseInt(arg.substring(1)); }

}

Comment by Thomas Bernhardt [ 11/Dec/12 ]

Is adding support for scalar arrays to SelectFrom() also a plausible improvement, as in the following?

{'1','2','3'}

.SelectFrom(v => int(v)).Max()

Comment by Thomas Bernhardt [ 13/Dec/12 ]

Changes in enhancements500 branch





[ESPER-716] Allow use of backtick to escape Enumeration constant (i.e. TickType.`LAST`) Created: 02/Dec/12  Updated: 19/Dec/12

Status: Reopened
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: Esper wishlist

Type: Improvement Priority: Trivial
Reporter: Chris Myzie Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

64bit Linux; OpenJDK 7


Attachments: Text File error.txt    
Number of attachments : 1

 Description   

The EPL uses TickType.LAST, but because "last" is a function name, it is quoted as TickType.`LAST`. The attached log shows the error.

The backtick notation would be useful for use with enumeration, where "TickType".



 Comments   
Comment by Thomas Bernhardt [ 03/Dec/12 ]

Would that not be `ticktype.last`

Comment by Chris Myzie [ 04/Dec/12 ]

I tried just that, but then it fails for all Esper versions:

Caused by: com.espertech.esper.epl.expression.ExprValidationPropertyException: Property named 'TickType\.LAST' is not valid in any stream

Comment by Thomas Bernhardt [ 19/Dec/12 ]

Assigned to wishlist





[ESPER-715] new clause "output first after xxx elapsed" Created: 30/Nov/12  Updated: 19/Dec/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: Esper wishlist

Type: New Feature Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperOutputAfterTestExtended.java     Java Source File EsperOutputAfterTest.java     GIF File output after elapsed.gif     Text File TestOutputLimitSimple.java.patch    
Number of attachments : 4

 Description   

It would be nice to have modified version of the "output first after xxx" clause that only releases a new event after at least the specified time period has elapsed since the last event.

Example "output first after 1 min" clause:
Event 1 at 18:00:05 -> released
Event 2 at 18:00:30 -> ignored
Event 3 at 18:01:25 -> released
Event 4 at 18:02:10 -> released
Event 5 at 18:03:15 -> released

Event 3/4 and 4/5 are less than 1 minute apart, but they are still released

Example "output first after 1 min elapsed" clause:
Event 1 at 18:00:05 -> released
Event 2 at 18:00:30 -> ignored
Event 3 at 18:01:25 -> released
Event 4 at 18:02:10 -> ignored
Event 5 at 18:03:15 -> released

Event 4 is ignored, because it is only 45 seconds from Event 3. Event 5 is released because it is more than 1 min from Event 3

Andy



 Comments   
Comment by Thomas Bernhardt [ 30/Nov/12 ]

Thats seems to exist in "after", check docs?

Comment by Andy Flury [ 30/Nov/12 ]

the doc says "When using after ..., the engine discards all output events until the time period passed as measured from the start of the statement"

The "after" does however not intervene with events arriving after this initial period. What I would like is to have a clause that makes sure that there has been a least the specified amount of time elapsed after the last event (but not just since the start of the statement)

Hope I could make this more clear!

Comment by Thomas Bernhardt [ 30/Nov/12 ]

Can you please compare these 5 cases:
select count from MyEvent output first
select someprop, count from MyEvent output first
select someprop, count from MyEvent group by someprop output first
select count from MyEvent group by someprop output first
select prop from MyEvent output first
... and report if they behave differently or consistently.
The behavior you are reporting here is for what query?

Comment by Andy Flury [ 30/Nov/12 ]

The behavior should be the same for all the examples that you mentioned. I attached a graphic to illustrate the behavior

Comment by Thomas Bernhardt [ 30/Nov/12 ]

Have you tested where the behavior is different?
The "first" similar to "last" and "all" is most frequently uses with group-by.

Comment by Andy Flury [ 30/Nov/12 ]

Well, that there is not really anything i can test at the moment, cause this is would be new feature I'm proposing.

All above mentioned queries behave the way the upper example in my graphic depicts.

Comment by Thomas Bernhardt [ 30/Nov/12 ]

So you have actually tested that all above mentioned queries behave the way the upper example in my graphic depicts?

Comment by Andy Flury [ 30/Nov/12 ]

I have not tested all of them myself. But the examples at the end of the documentation (http://esper.codehaus.org/esper-4.5.0/doc/reference/en/html_single/index.html#appendix_outputspec ) are telling exactly this. Please excuse, if this new functionality already exists and I was not aware of it.

Comment by Thomas Bernhardt [ 30/Nov/12 ]

It would really help to test this out.
Perhaps this is not a new feature but a bug or inconsistency in the way "output first" works for different types of statements.

Comment by Thomas Bernhardt [ 30/Nov/12 ]

reclassified as "test"

Comment by Andy Flury [ 30/Nov/12 ]

Well now I'm getting confused. Are you saying that the "output first after" should already work like the lower part of my graphic?
Please see attached Java Class that behaves like the upper part of my graphic. As you can see Event 3 and 4 are only 45 seconds apart but 4 is still released. In the new functionality that I am proposing a following Event should only be release if at least the specified amount of time has elapsed.

Comment by Thomas Bernhardt [ 30/Nov/12 ]

I don't know whether its a bug or a new feature. It would be nice if you could find that out?

Comment by Andy Flury [ 30/Nov/12 ]

Ok, I did test all cases from "Appendix A. Output Reference and Samples" (see attached Java Class). The results are exactly as the are printed in the documentation. So the behavior is like the upper part of my graphic.
This of course is not a Bug, it just a different behavior than the one I'm proposing. But in my opinion both behaviors are relevant and have their own distinct use cases.
Hope you agree.

Comment by Thomas Bernhardt [ 30/Nov/12 ]

great thanks.
I can point you to the place where to make the changes?

Comment by Andy Flury [ 30/Nov/12 ]

I'm not too familiar with the Esper internals, but would be willing to give it a try if you provide me with some hints

Comment by Thomas Bernhardt [ 30/Nov/12 ]

For the case "select prop from MyEvent output first" the code is in "com.espertech.esper.epl.view.OutputConditionTime" Other cases need to look separately.

We first need to decide on a EPL grammer (syntax change). Then can write a test case, then make engine changes.

The test case to be added would be similar to "com.espertech.esper.regression.view.TestOutputLimitSimple" method "test17FirstNoHavingNoJoin"

For the syntax, the question appears to be one of reference point or no reference point.

Currently we have "select prop from MyEvent output first every 10 seconds" with a reference time point determined based on first event arrival.

Perhaps "select prop from MyEvent output first every 10 seconds reference-time null/xxxx" would allow the reference time point to be set to a given value or null for no reference time, i.e. behavior like you propose.

Comment by Andy Flury [ 01/Dec/12 ]

I added another test case to TestOutputLimitSample (see attachment).

I will have a look at OutputConditionTime for the implementation, but that might take me a while.

Regarding reference point. There would be a new reference point set whenever a valid event arrives. So in my opinion we probably would not need "reference-time null/xxxx"

Comment by Andy Flury [ 01/Dec/12 ]

do you want to change the type back to feature request?

Comment by Thomas Bernhardt [ 01/Dec/12 ]

How to tell the engine to set a new reference point based on event arrival, i.e. instead of regular intervals use irregular intervals

Comment by Thomas Bernhardt [ 19/Dec/12 ]

Moved to wishlist





[ESPER-714] NPE in enumeration method with join Created: 26/Nov/12  Updated: 04/Jan/13  Resolved: 26/Nov/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

An NPE can potentially be observed when using a enumeration method in a join where clause, such as:

EPStatement stmt = epService.getEPAdministrator().createEPL("" +
"select * from SelectorEvent.win:keepall() as sel, ContainerEvent.win:keepall() as cont " +
"where cont.items.anyOf(i => sel.selector = i.selected)");

com.espertech.esper.client.EPException: java.lang.RuntimeException: Unexpected exception in statement '994014c0-d644-4463-903a-4dd80072f34c': null
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:465)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:438)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:197)
at com.espertech.esper.regression.enummethod.TestEnumDataSources.testJoin(TestEnumDataSources.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.RuntimeException: Unexpected exception in statement '994014c0-d644-4463-903a-4dd80072f34c': null
at com.espertech.esper.support.client.SupportExceptionHandlerFactoryRethrow$SupportExceptionHandlerRethrow.handle(SupportExceptionHandlerFactoryRethrow.java:31)
at com.espertech.esper.core.service.ExceptionHandlingService.handleException(ExceptionHandlingService.java:55)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1228)
at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:982)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:460)
... 25 more
Caused by: java.lang.NullPointerException
at com.espertech.esper.core.service.ExpressionResultCacheService.popContext(ExpressionResultCacheService.java:202)
at com.espertech.esper.epl.enummethod.dot.ExprDotEvalEnumMethodBase.evaluate(ExprDotEvalEnumMethodBase.java:167)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluateChain(ExprDotEvalRootChild.java:79)
at com.espertech.esper.epl.expression.ExprDotEvalRootChild.evaluate(ExprDotEvalRootChild.java:52)
at com.espertech.esper.epl.join.base.JoinSetFilter.filter(JoinSetFilter.java:63)
at com.espertech.esper.epl.join.base.JoinSetFilter.process(JoinSetFilter.java:40)
at com.espertech.esper.epl.join.base.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:49)
at com.espertech.esper.epl.join.base.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:64)
at com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle.internalDispatch(EPStatementAgentInstanceHandle.java:142)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1225)



 Comments   
Comment by Thomas Bernhardt [ 26/Nov/12 ]

Change in bugfix470 branch

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-713] Transaction example probabilistic event skipping won't ever skip for event type B Created: 18/Nov/12  Updated: 04/Jan/13  Resolved: 07/Dec/12

Status: Closed
Project: Esper
Component/s: Examples
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Eric Friedman Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Number of attachments : 0

 Description   

in TransactionEventSource.createNextTransaction(), there's some code to suppress events a small % of the time. It's correct for types A and C, but there's a mistake in type B:

//skip event 2 with probability 1 in 1000
if (random.nextInt(1000) < 9998) {

a random int in that range will always be under 9998: Need to make that 998 to achieve the desired result. A somewhat less error prone approach would be to reference the same symbol:

public static final int EVENT_B_PROB = 1000;
...

if (random.nextInt(EVENT_B_PROB) < (EVENT_B_PROB - 2)) {



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-712] Contained-event misbehaves in join and subquery when used with named window Created: 16/Nov/12  Updated: 04/Jan/13  Resolved: 18/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestJIRA712.java    
Number of attachments : 1

 Description   

When the contained-event selection is made against a named window in the from-clause of a join or subquery the join or subquery may return incorrect results, unless the contained-event selection is itself marked as unidirectional.

For example:
create window MyWindow.std:unique(containerId) as ItemContainer

insert into MyWindow select * from ItemContainer

select * from MyWindow[items], MyOtherEvent unidirectional

Events are:
public static class ItemContainer {
private String containerId;
private SingleItem item;

public ItemContainer(String containerId, SingleItem item)

{ this.containerId = containerId; this.item = item; }

public SingleItem[] getItems() {
return new SingleItem[]

{item}

;
}

public String getContainerId()

{ return containerId; }

}

public static class SingleItem {
private String itemId;
private int value;

public SingleItem(String id, int value)

{ this.itemId = id; this.value = value; }

public String getItemId()

{ return itemId; }

public int getValue()

{ return value; }

}



 Comments   
Comment by Thomas Bernhardt [ 16/Nov/12 ]

Workaround is to insert the contained-event into the named window instead.
Workaround example:
create window MyWindow.std:unique(itemId) as SingleItem

insert into MyWindow select * from ItemContainer[items]

select * from MyWindow, MyOtherEvent unidirectional

Comment by Thomas Bernhardt [ 18/Dec/12 ]

The query validation rejects the query.

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-711] Schema-based XML type to represent "dateTime" builtin type as java.util.Date Created: 08/Nov/12  Updated: 19/Dec/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have an event type defined by this schema.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="CLF">
<xs:complexType>
<xs:sequence>
<xs:element name="host" type="xs:string" />
<xs:element name="timestamp" type="xs:dateTime" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I would like that property timestamp will be mapped to a datetime java object (or something similar) so i can dump it on a database's datetime field.
The problem is that method getPropertyType("timestamp") of class EventType return a String type.



 Comments   
Comment by Thomas Bernhardt [ 19/Dec/12 ]

Moved to wishlist.

========== User provided change:
Those are the code changes done.

In SympleTypeParserFactory added:

if (classBoxed == Date.class) {
return new SimpleTypeParser() {
public Object parse(String text) {
SimpleDateFormat parser = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
try

{ return parser.parse(text); }

catch (Exception ex)

{ return null; }

}
};
}

In SchemaUtil modified typeMap from

{"dateTime", String.class}

,

to

{"dateTime", Date.class}

,

I've used this SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") cause it's the standard xml date format.





[ESPER-710] esperio relies on opentick in maven repository Created: 24/Oct/12  Updated: 24/Oct/12  Resolved: 24/Oct/12

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 3.3
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Eric Miller Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: 3 minutes
Time Spent: Not Specified
Original Estimate: 3 minutes

Number of attachments : 0

 Description   

esperio package on the maven repository relies on an opentick package, which is not in the repository.

http://mvnrepository.com/artifact/com.espertech/esperio/3.3.0

This is causing my maven builds to fail as I want to include esperio so I can use CSVAdapter.



 Comments   
Comment by Thomas Bernhardt [ 24/Oct/12 ]

That part of EsperIO is no longer maintained.





[ESPER-709] esperio AMQPSink ignores exchange propetry Created: 18/Oct/12  Updated: 04/Jan/13  Resolved: 07/Dec/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Wouter De Borger Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

esperio AMQPSink ignores exchange propetry

the code is

channel.basicPublish("", settings.getQueueName(), null, bytes);

and should be

channel.basicPublish(settings.getExchange() , settings.getRoutingKey(), null, bytes);



 Comments   
Comment by Thomas Bernhardt [ 07/Dec/12 ]

change in bugfix470 branch

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-708] Allow configuration for static methods/UDF to trigger exception handler upon exception Created: 18/Oct/12  Updated: 04/Jan/13  Resolved: 18/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Since the static method or UDF is completely under the control of your application, currently the engine will not hand exceptions to the exception handler which is also under the control of your application.
It would be better to make this behavior configurable so that exceptions thrown by a UDF end up in the engine exception handler as well.



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-707] Throw error regarding to CGLib when creating window backed by cache Created: 18/Oct/12  Updated: 24/Dec/12  Resolved: 18/Oct/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6, 4.7
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Jack Meng Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Throw error regarding to CGLib when creating window backed by cache.

Deploy below EPLs when startup.
@Name('cep-demo-CreateType BankAccountAdded')
create schema BankAccountAdded as com.demo.cep.event.BankAccountAdded;

@ExternalDW(name='sampleTerracottaCache') @ExternalDWKey(property='id')
create window BankAccountAddedWindow.terracotta:cache() as BankAccountAdded;

@Name('cep-demo-CreateIndex BankAccountAdded')
create index BankAccountAddedIndex on BankAccountAddedWindow(accountNumber);

@Name('cep-demo-InsertToWindow BankAccountAdded')
insert into BankAccountAddedWindow select id, accountNumber, timeCreated from BankAccountAdded;

The BankAccountAdded class as below.

public class BankAccountAdded implements EventProcessable, Serializable{
private static final long serialVersionUID = 6199063368997785569L;
private static Log log = LogFactory.getLog(BankAccountAdded.class);

private String id;
private long accountNumber;
private long timeCreated;

public String getId()

{ return "EP-BankAccountAdded-"+ this.accountNumber + "-" + this.timeCreated; }

public void setId(String id)

{ this.id = id; }

@Override
public void process(EPRuntime engine)

{ log.info("receive a new BankAccountAdded message"); engine.sendEvent(new DashboardEventCount("BankAccountAdded")); }

public long getAccountNumber()

{ return accountNumber; }

public void setAccountNumber(long accountNumber)

{ this.accountNumber = accountNumber; }

public long getTimeCreated()

{ return timeCreated; }

public void setTimeCreated(long timeCreated)

{ this.timeCreated = timeCreated; }

}

Error logs:

10:57:14,545 [main] WARN [BeanEventType] .initialize Unable to obtain CGLib fast class and/or method implementation for class com.demo.cep.event.BankAccountAdded, error msg is com.demo.cep.event.BankAccountAdded$$FastClassByCGLIB$$b798f254 cannot be cast to net.sf.cglib.reflect.FastClass
java.lang.ClassCastException: com.demo.cep.event.BankAccountAdded$$FastClassByCGLIB$$b798f254 cannot be cast to net.sf.cglib.reflect.FastClass
at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:64)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:46)
at com.espertech.esper.event.bean.BeanEventType.initialize(BeanEventType.java:359)
at com.espertech.esper.event.bean.BeanEventType.<init>(BeanEventType.java:91)
at com.espertech.esper.event.EventAdapterServiceImpl.addBeanTypeByName(EventAdapterServiceImpl.java:393)
……

10:57:14,607 [main] INFO [VDWCacheBase] Initializing named window 'BankAccountAddedWindow' cache type TERRACOTTA cache
name 'sampleTerracottaCache'
10:57:14,607 [main] INFO [VDWCacheBase] Initialization completed for named window 'BankAccountAddedWindow' with enableC
acheListener=false enableIterate=true unique=false
10:57:14,623 [main] INFO [VDWCacheBase] Destroyed named window 'BankAccountAddedWindow'
10:57:14,623 [main] ERROR [SimulatorContextListener] Unexpected exception deploying 'cepdemo.epl': Deployment failed in
module 'com.demo.cep.event' in module url 'cepdemo.epl' in expression '@Name('cep-demo-InsertToWindow BankAccount
Added')...(145 chars)' : Unexpected exception starting statement: null [@Name('cep-demo-InsertToWindow BankAccountAdded'
)
insert into BankAccountAddedWindow select id, accountNumber, timeCreated from BankAccountAdded]
com.espertech.esper.client.deploy.DeploymentActionException: Deployment failed in module 'com.demo.cep.event' in
module url 'cepdemo.epl' in expression '@Name('cep-demo-InsertToWindow BankAccountAdded')...(145 chars)' : Unexpected ex
ception starting statement: null [@Name('cep-demo-InsertToWindow BankAccountAdded')
insert into BankAccountAddedWindow select id, accountNumber, timeCreated from BankAccountAdded]
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.buildException(EPDeploymentAdminImpl.java:264)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:225)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deploy(EPDeploymentAdminImpl.java:102)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployQuick(EPDeploymentAdminImpl.java:602)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.readDeploy(EPDeploymentAdminImpl.java:537)
at com.demo.cep.server.SimulatorContextListener.startupFunction(SimulatorContextListener.java:64)
at com.demo.cep.server.SimulatorContextListener.contextInitialized(SimulatorContextListener.java:51)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.espertech.esper.server.webapp.HotDeployer.deploy(HotDeployer.java:175)
at com.espertech.esper.server.webapp.HotDeployer.doStart(HotDeployer.java:272)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:201)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.espertech.esper.server.webapp.WebAppPlugin.postInitialize(WebAppPlugin.java:73)
at com.espertech.esper.core.service.EPServiceProviderImpl.postInitialize(EPServiceProviderImpl.java:118)
at com.espertech.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:90)
at com.espertech.esper.server.Bootstrap.main(Bootstrap.java:287)
Caused by: com.espertech.esper.client.deploy.DeploymentItemException: Unexpected exception starting statement: null [@Name('cep-demo-InsertToWindow BankAccountAdded')
insert into BankAccountAddedWindow select id, accountNumber, timeCreated from BankAccountAdded]
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:201)
... 20 more
Caused by: com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: null [@Name('cep-de
mo-InsertToWindow BankAccountAdded')
insert into BankAccountAddedWindow select id, accountNumber, timeCreated from BankAccountAdded]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:654)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:598)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:132)

at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:118)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:92)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:174)
... 20 more
Caused by: java.lang.NullPointerException
at com.espertech.esper.event.EventAdapterServiceHelper.getWriteableProperties(EventAdapterServiceHelper.java:71)

at com.espertech.esper.event.EventAdapterServiceImpl.getWriteableProperties(EventAdapterServiceImpl.java:101)
at com.espertech.esper.epl.core.SelectExprInsertEventBeanFactory.getInsertUnderlyingNonJoin(SelectExprInsertEven
tBeanFactory.java:65)



 Comments   
Comment by Jack Meng [ 18/Oct/12 ]

It works use insert into BankAccountAddedWindow select * from BankAccountAdded;





[ESPER-706] Query plan output for on-select not comprehensive and Join does not list key field names Created: 17/Oct/12  Updated: 04/Jan/13  Resolved: 07/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestQueryPlan.java    
Number of attachments : 1

 Description   

For on-select statements the query plan is not as comprehensively output as for joins. See attached test case.
Joins should also output the key field name(s).



 Comments   
Comment by Thomas Bernhardt [ 17/Oct/12 ]

Another common request is to add to the documentation some examples how query plan output looks like and what it means

Comment by Thomas Bernhardt [ 07/Dec/12 ]

Documentation for query plan output TBD

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-705] Esper tests build fails on platform with default encoding other than ISO-8859-2 Created: 15/Oct/12  Updated: 04/Jan/13  Resolved: 07/Dec/12

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 4.7
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Marek Winkler Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux (default encoding UTF-8)


Number of attachments : 0

 Description   

The build fails during test-compile with the following message:

[ERROR] /home/mwinkler/work/repositories/esper/trunk/esper/src/test/java/com/espertech/esper/regression/view/TestOrderBySimple.java:[158,61] unmappable character for encoding UTF8

The POM does not specify project.build.sourceEncoding property, therefore the build is platform dependent.

Either please supply encoding information in the POM, or (more preferably) switch sources to UTF-8 encoding. The following conversion worked for me on Fedora Linux:

iconv --from-code=ISO-8859-2 --to-code=UTF-8 esper/src/test/java/com/espertech/esper/regression/view/TestOrderBySimple.java > esper/src/test/java/com/espertech/esper/regression/view/TestOrderBySimple.new

mv esper/src/test/java/com/espertech/esper/regression/view/TestOrderBySimple.new esper/src/test/java/com/espertech/esper/regression/view/TestOrderBySimple.java


 Comments   
Comment by Thomas Bernhardt [ 07/Dec/12 ]

in enhancements500 branch

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-704] Function to return triggering event for a JOIN Created: 11/Oct/12  Updated: 11/Oct/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.7
Fix Version/s: Esper wishlist

Type: New Feature Priority: Minor
Reporter: Charles Duffy Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If several streams are JOINed together, it can be difficult to know the immediate cause of a statement trigger.

A function returning this trigger, where one exists, would be a useful extension.






[ESPER-703] Stateless statement with output rate limiting only outputs same event multiple times under inbound threading Created: 05/Oct/12  Updated: 04/Jan/13  Resolved: 19/Dec/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, Windows


Attachments: Java Source File OutputEvery_InboundThread.java    
Number of attachments : 1

 Description   

Following simple EPL with inboud threading yields unstable outputs.
select * from event output every 2 events

I expect 2 events will be outputted for evch call of UpdateListener#update as follow:
------------------------------------
Update is invoked:
newEvents.length = 2
newEvent[0] = A
newEvent[1] = B
Update is invoked:
newEvents.length = 2
newEvent[0] = C
newEvent[1] = D
------------------------------------

But I've got following results with attached program:
------------------------------------
Update is invoked:
newEvents.length = 4
newEvent[0] = A
newEvent[1] = B
newEvent[2] = C
newEvent[3] = D
Update is invoked:
newEvents.length = 4
newEvent[0] = A
newEvent[1] = B
------------------------------------
Update is invoked:
newEvents.length = 4
newEvent[0] = A
newEvent[1] = C
newEvent[2] = B
newEvent[3] = D
Update is invoked:
newEvents.length = 4
newEvent[0] = A
newEvent[1] = C
newEvent[2] = B
newEvent[3] = D
------------------------------------
Update is invoked:
newEvents.length = 4
newEvent[0] = A
newEvent[1] = C
newEvent[2] = B
------------------------------------
Update is invoked:
newEvents.length = 3
newEvent[0] = B
newEvent[1] = D
newEvent[2] = C
Update is invoked:
newEvents.length = 3
newEvent[0] = B
newEvent[1] = D
newEvent[2] = C
------------------------------------

Workaround is to turn off inbound threading or to specify a view like event.win:length(1).



 Comments   
Comment by Thomas Bernhardt [ 05/Oct/12 ]

Reclassified as task since most likely expected behavior

Comment by Thomas Bernhardt [ 19/Dec/12 ]

Cause by the engine classifying the statement as stateless, it is stateful.

Comment by Thomas Bernhardt [ 04/Jan/13 ]

part of 4.8 release





[ESPER-702] Distinct count in correlated subselect returns invalid result Created: 03/Oct/12  Updated: 08/Oct/12  Resolved: 03/Oct/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestDistinctCountSubselect.java    
Number of attachments : 1

 Description   

Esper returns invalid result when count(distinct something) is used in subselect which use where condition.

Steps to reproduce the bug:

1) create EPL statement:
select theString, (select count(distinct previous.intPrimitive) from com.espertech.esper.support.bean.SupportBean().win:keepall() as previous where bean.theString = previous.theString) as previosCount from com.espertech.esper.support.bean.SupportBean as bean

2) send 4 events:
SupportBean("BMW", 1);
SupportBean("Jaguar", 1);
SupportBean("Jaguar", 2);
SupportBean("Jaguar", 1);

4) verify results - correct values are:
BMW, 1
Jaguar, 1
Jaguar, 2
Jaguar, 2
but returned:
BMW, 1
Jaguar, 2
Jaguar, 4
Jaguar, 6

See attached test case TestDistinctCountSubselect.java



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-701] Nested context with partitioned context managing a non-overlapping context produces incorrect results Created: 26/Sep/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File ContextBugTest.java    
Number of attachments : 1

 Description   

This bug affects a context declared as nested (2 levels for this example, same for multiple levels), and wherein the parent context is a partitioned context and the child context is a overlapping context (bug also applies for non-overlapping and category-based subcontext).

Test case attached.



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-700] Multicast UDP support for esperio Created: 25/Sep/12  Updated: 03/Mar/15  Resolved: 19/Feb/15

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.6
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Walter Eaves Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux with openpgm


Number of attachments : 0

 Description   

I'd like to know if it would be easy to extend or adapt the SocketConfig of the esperio-socket implementation to support PGM.
It would be useful to support this protocol directly.
Many financial data tick distribution systems use a customized UDP multicast, but PGM seems more robust.
PGM seems to be well-supported by both Windows and Linux.



 Comments   
Comment by Walter Eaves [ 26/Sep/12 ]

I've done some research (I asked Steven McCoy). There is no full PGM stack in pure Java. But Java 7 does support multicast UDP. Would it be possible to extend esperio-socket to support a multicast UDP sockets? The esperio-socket multicast service would be limited to single packets of the CSV type data, but that would be enough for many high-volume, low-latency systems: in particular, tick data services.

http://docs.oracle.com/javase/7/docs/api/java/nio/channels/MulticastChannel.html

Comment by Thomas Bernhardt [ 26/Sep/12 ]

Moved to the wishlist. Please feel free to contribute an adapter.

Comment by Thomas Bernhardt [ 19/Feb/15 ]

out of scope





[ESPER-699] Variable not recognized in output-rate-limiting when using deployment API (default compile option) Created: 23/Sep/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When deploying a module using the deployment API and the module contains a variable that is used in output rate limiting, it is not recognized.

Workaround: create the variable separately, either via API or createEPL.
An alternative is to disable the "compile" option in deployment step.

========= sample code

String moduleStr = "create variable integer snapshotOutputSecs = 10; " +
"create schema foo as (bar string); " +
"select bar from foo " +
"output snapshot every snapshotOutputSecs seconds;";
try

{ EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(); EPDeploymentAdmin deployAdmin = epService.getEPAdministrator().getDeploymentAdmin(); Module module = deployAdmin.parse(moduleStr); String moduleDeploymentId = deployAdmin.add(module); deployAdmin.deploy(moduleDeploymentId, null); }

catch (Exception e)

{ e.printStackTrace(); }

================= Exception
EPStatementException: Invalid time period expresion: Property named 'snapshotOutputSecs' is not valid in any stream



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-698] Update-istream with sub-select has thread-safety issue Created: 23/Sep/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestUpdateSubselectMultiThread.java    
Number of attachments : 1

 Description   

This affects the update-istream statement (on the fly event update) when the update statement has a subselect and multiple threads update events.

See attached test case TestUpdateSubselectMultiThread.java



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-697] EsperIOSocketAdapter hides a critical exception Created: 18/Sep/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Leonid Ilyevsky Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: exception
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any


Number of attachments : 0

 Description   

When there is a problem opening socket, an error message appears in the log, but the exception is not propagated up the calling stack.
Then there is no way in client code to know that the adapter is not actually listening to anything.
I tested it simply by running two instances trying to listen to the same port; the second one was just sitting there pretending that everything is fine, but in fact it could not receive any events.



 Comments   
Comment by Leonid Ilyevsky [ 21/Sep/12 ]

Suggestion: minimalistic fix for this problem is the following.
In the EsperIOSocketAdapter class add a private boolean member "started". Set it to true if all sockets successfully started. Also provide the get method, so the application code can check it.

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-696] Insert into predefined Map-type does not check type conversion criteria of subtype/supertype Created: 13/Sep/12  Updated: 27/Sep/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File InsertFromPatternTest.java    
Number of attachments : 1

 Description   

Example to recreate:

create schema MapOne as (prop1 string)
create schema MapTwo as (prop1 string)
insert into MapOne select * from MapTwo

Above insert-into should fail as the two types are not related.



 Comments   
Comment by Thomas Bernhardt [ 27/Sep/12 ]

The types have the exact same property names and property types, automatic conversion does allow this for convenients (see doc insert into underlying type)





[ESPER-695] Pattern with named window events when used in partitioned context, not allowing named window Created: 11/Sep/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example:

CREATE SCHEMA CarEvent(license_plate String);
CREATE CONTEXT ByCar PARTITION BY license_plate FROM CarEvent;
CONTEXT ByCar CREATE WINDOW RecentCarEvents.win:time(8 hours) AS CarEvent;
CONTEXT ByCar SELECT * FROM RecentCarEvents; – this works
CONTEXT ByCar SELECT * FROM pattern[RecentCarEvents]; – this fails

Exception:
Segmented context 'ByCar' requires that any of the event types that are listed in the segmented context also appear in any of the filter expressions of the statement



 Comments   
Comment by Charles Duffy [ 11/Sep/12 ]

In terms of the immediate cause:

EventTypeUtility.isTypeOrSubTypeOf(evt_RecentCarEvents, evt_CarEvent) returns false when called from ContextControllerPartitionedUtil.validateStatementForContext().

I'm unclear on which codepath is used when no pattern is in play, and thus am unclear on how this issue is avoided under those circumstances.

Comment by Thomas Bernhardt [ 13/Sep/12 ]

Does the exception mean the resources get cleaned up?
User comment: The last of these fails with an EPStatementException (for the reason described in a previous email: The CREATE WINDOW branch of validateStatementForContext doesn't check for superclasses). What's surprising, however, is that the window is still created! Thus, this statement fails in different ways between initial and future invocations.
On first invocation: "Segmented context 'ByPlate' requires that any of the event types that are listed in the segmented context also appear in any of the filter expressions of the statement"
On future invocations: "A named window by name 'RecentCarEvents' has already been created"

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-694] Output-first for unaggregated grouped query not outputting first only Created: 10/Sep/12  Updated: 14/Apr/14  Resolved: 20/Jan/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 5.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestUnaggregatedOutputFirst.java    
Number of attachments : 1

 Description   

See also discussion in http://stackoverflow.com/questions/12310194/generating-a-deduplicated-event-stream-without-a-window

"Output first" is for aggregated use cases, herein the "select * from" means there is no aggregation taking place, it would still be nice to output first per group.



 Comments   
Comment by Thomas Bernhardt [ 20/Jan/14 ]

for version 5 release





[ESPER-693] Unit test fails with JDK 1.7_07 Created: 07/Sep/12  Updated: 08/Oct/12  Resolved: 07/Sep/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

There is a unit test that fails when testing with JDK 7 update 7



 Comments   
Comment by wsduifnxkjvw [ 07/Sep/12 ]

ONLINE STORE :

+++ http://fff.to/XGC ++++++++++

Best online store

Best quality, Best reputation , Best services

---**** NHL Jersey Woman $ 40 ---**** NFL Jersey $ 35

---**** NBA Jersey $ 34 ---**** MLB Jersey $ 35

---**** Jordan Six Ring_m $ 36 ---**** Air Yeezy_m $ 45

---**** T-Shirt_m $ 25 ---**** Jacket_m $ 36

---**** Hoody_m $ 50 ---**** Manicure Set $ 20

---**** handbag $ 37 ---**** ugg boot $ 43 ---****

---**** sunglass $ 16 ---**** bult $ 17 ---****

+++ http://fff.to/XGC ++++++++++

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-692] What is NamedCache Created: 05/Sep/12  Updated: 05/Sep/12  Resolved: 05/Sep/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Jagan Vittal Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When using distcache.
I use Oracle Coherance

This is my statement
@ExternalDW(name='OrderCache') @ExternalDWKey(property='orderId')@ExternalDWListener(threaded=false)create window OrderWindow.coherence:cache() as OrderEvent");

so now how can i access namedCache.EntrySet() or namedCache.get('key');

Here is namedCache (OrderCache / OrderWindow)

How can we use it?
How to use in EPStatement?
Can you explain?



 Comments   
Comment by Thomas Bernhardt [ 05/Sep/12 ]

Creating a JIRA is not the right way to ask a question, please use the mailing list instead.





[ESPER-691] Strange Behaviour from Socket Adpater Created: 05/Sep/12  Updated: 05/Sep/12  Resolved: 05/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.6

Type: Improvement Priority: Minor
Reporter: Jagan Vittal Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Number of attachments : 0

 Description   

When i execute below program, rarely the Event Recieved is Printed.

(i.e) Prints 1 time when i execute for more than 20 times.

Can anyone explain what would be the problem.

package com.espertech.esper.socket;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStreamWriter;
import java.io.Serializable;
import java.net.Socket;
import java.net.UnknownHostException;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;
import com.espertech.esperio.socket.EsperIOSocketAdapter;
import com.espertech.esperio.socket.config.ConfigurationSocketAdapter;
import com.espertech.esperio.socket.config.DataType;
import com.espertech.esperio.socket.config.SocketConfig;

public class CheckSocket {

public static class Tick implements Serializable{

public String symbol;
public double price;

public Tick()

{ super(); }

public Tick(String symbol, double price)

{ super(); this.symbol = symbol; this.price = price; }

public void setSymbol(String symbol)

{ this.symbol = symbol; }

public void setPrice(double price)

{ this.price = price; }

public String getSymbol()

{ return symbol; }

public double getPrice()

{ return price; }

}

public static class MyLis implements UpdateListener{

@Override
public void update(EventBean[] arg0, EventBean[] arg1)

{ System.out.println("Event Recieved"); }

}

public static void main(String[] args) throws UnknownHostException, IOException

{ Configuration config = new Configuration(); config.addEventType("MyTick",Tick.class.getName()); ConfigurationSocketAdapter adapterConfig = new ConfigurationSocketAdapter(); SocketConfig socket = new SocketConfig(); socket.setDataType(DataType.CSV); socket.setDataType(DataType.OBJECT); socket.setPort(8709); adapterConfig.getSockets().put("SocketStream", socket); // start adapter EPServiceProvider epService = EPServiceProviderManager.getProvider("engineURI",config); EsperIOSocketAdapter socketAdapter = new EsperIOSocketAdapter(adapterConfig,epService.getURI()); socketAdapter.start(); EPStatement stmt = epService.getEPAdministrator().createEPL("select * from MyTick"); stmt.addListener(new MyLis()); Socket clientSocket = new Socket("localhost",8709); ObjectOutputStream out = new ObjectOutputStream(clientSocket.getOutputStream()); out.writeObject(new Tick("sym",2000)); out.writeObject(new Tick("dem",1000)); String newline = System.getProperty("line.separator"); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(clientSocket.getOutputStream())); bw.write("stream=MyTick,symbol=sym,price=20"); bw.write(newline); bw.flush(); bw.close(); out.flush(); out.close(); clientSocket.close(); socketAdapter.destroy(); }

}



 Comments   
Comment by Thomas Bernhardt [ 05/Sep/12 ]

Please send to the user mailing list.





[ESPER-690] Batch window that accumulates until value changes Created: 04/Sep/12  Updated: 30/Aug/13  Resolved: 30/Aug/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be nice to have a simple batch window that accumulates events until the value of an expression changes.

Events come in sequences of equal values of property P
like P = 1, 1, 1, 1, 6, 6, 6, 3, 3, 9, 9, 9, 9, 9, 9, 9, 1, 1, 2, 5, 5, 5,
12, 12 etc. (only one, like "2" above, or more, sometimes a value comes up
again in a new sequence, that is nevetheless a new sequence, like "1"
above). Each sequence "bounds" one group with one or more events out of
which I want to take aggregate "min" of a function of two other numeric
properties Q and R in each event for ALL events in each sequence. Time is no
issue since only the equality of P defines grouping as soon as P changes
value the grouping is done, aggregation should fire and grouping should
start again.



 Comments   
Comment by Thomas Bernhardt [ 30/Aug/13 ]

Already provided by expiry expression batch window.





[ESPER-689] ClassCastException with "stream.*" syntax and insert-into and context Created: 24/Aug/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestEnrichedPOJOEvents.java    
Number of attachments : 1

 Description   

The workaround is to simply select the stream, i.e.
instead of "insert into EnrichedE2 select e2.* as event"
use "insert into EnrichedE2 select e2 as event"



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-688] ArrayOOB exception with expression def in where-clause of on-select Created: 24/Aug/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestExpressionDefArrayException.java    
Number of attachments : 1

 Description   

An exception ArrayIndexOutOfBoundsException can occur when a declared expression is referred to in a where-clause part of an on-select. See attached test case.

Workaround is to not refer to the declared expression in the where-clause and instead put the expression in (undeclared).



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-687] Named Window and Fire-And-Forget query incorrectly passes null comparison operator Created: 21/Aug/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Jonathan Knehr Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File NullTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

I have traced the bug to the class "NamedWindowConsumerView.java". It is here, in the passFiler function:

boolean pass = true;
for (ExprEvaluator filter : filterList)
{
Boolean result = (Boolean) filter.evaluate(eventPerStream, isNewData, exprEvaluatorContext);
if ((result != null) && (!result))

{ pass = false; break; }

}

if (pass)
{
if (filtered == null)

{ filtered = new OneEventCollection(); }

filtered.add(theEvent);
}

The highlighted line should be changed to this:

if ((result == null) || (!result))

Otherwise when the null comparison happens in the "ExprEqualsNodeImpl.java" class, it always passes through the event incorrectly.



 Comments   
Comment by Jonathan Knehr [ 23/Aug/12 ]

This bug exists in com.espertech.esper.epl.named.FilteredEventIterator.java as well...

Probably else where, too.

Comment by Jonathan Knehr [ 23/Aug/12 ]

and EPPreparedExecuteMethod.java

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-686] (.NET) Cannot use reserved words as part of a property chain Created: 16/Aug/12  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: NEsper
Affects Version/s: 4.5
Fix Version/s: NEsper .NET 4.6

Type: Bug Priority: Major
Reporter: Alastair Maw Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I've admittedly only tried this in NEsper, but I suspect it's an issue in Esper too, as I think it might be an EPL grammar bug...

I'm trying to select down my object tree - something like this:

    select Bar.Baz from Foo

...but my top-level property is called `Order`. Now, `Order` is a reserved keyword, so you need to escape it in backticks. I figured that this would work:

    select `Order`.Baz from Foo

But it blows up with this:

Error starting statement: Failed to resolve property 'Order.Baz' to a stream or nested property in a stream [select `Order`.Baz as x from Foo]

If I change the property's name from `Order` to `Bar`, but keep the backticks in the select, it all works fine.






[ESPER-685] "Very likely memory leak" warning in Tomcat 6 Created: 16/Aug/12  Updated: 08/Oct/12  Resolved: 24/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Studienprojekt Apro Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tomcat6 6.0.35, Java 6, Windows and Linux


Attachments: Text File logfile.txt    
Number of attachments : 1

 Description   

We use Esper in a servlet and get a lot of log entries about very likely memory leaks when undeploying the servlet.

An example log entry:

SCHWERWIEGEND: The web application [/Test3] created a ThreadLocal with key of type [com.espertech.esper.epl.variable.VariableVersionThreadLocal$1] (value [com.espertech.esper.epl.variable.VariableVersionThreadLocal$1@7bcf1c23]) and a value of type [com.espertech.esper.epl.variable.VariableVersionThreadEntry] (value [com.espertech.esper.epl.variable.VariableVersionThreadEntry@5a407d55]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

This one occurs after just deploying and immediately undeploying the servlet. After using Esper with just two or three events there are a lot more entries. (see attached log file)

We launch Esper without a special configuration.
Shutdown is done by calling:

EPServiceProvider provider;
EPAdministrator administrator;
...
administrator.destroyAllStatements();
provider.destroy();


 Comments   
Comment by Thomas Bernhardt [ 24/Sep/12 ]

Change in enhancements500 branch

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-684] Object Array Event Types in Isolated Services Created: 08/Aug/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Task Priority: Major
Reporter: Bastian Hoßbach Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The sendEvent() methods in isolated services differ from the normal ones. When somebody is working with object array event types and he wants to catch up a statement from historical data (persisted as object array events), there is no method in isolated services that could be used (only map, object and node event types are supported).



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-683] Firstunique window and firstevent window handling updates Created: 04/Aug/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File OnUpdateTest.java    
Number of attachments : 1

 Description   

On-update of a value when expiry controlled by firstunique or firstevent data window not leaving value in data window.



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-682] Support for short-type arithmetic Created: 03/Aug/12  Updated: 25/Sep/12  Resolved: 25/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add support for java.lang.Short in +/-/*/divide ops.



 Comments   
Comment by Thomas Bernhardt [ 25/Sep/12 ]

Duplicate to ESPER-671





[ESPER-681] (NEsper .NET) when using time window, a blank event was captured at starting and then a blank event was captured at end Created: 02/Aug/12  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: NEsper
Affects Version/s: None
Fix Version/s: NEsper .NET 4.6

Type: Bug Priority: Minor
Reporter: Chris Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

.net 4.0


Number of attachments : 0

 Description   

as the code below:
exp = "select avg(price) as avgPrice from OrderEvent.win:time_batch(5 sec)";

the listener will get one blank event at first, then when the last event passed, one blank event was inserted into the stream by the engine.
the statement codes:
statement.AddEventHandlerWithReplay(delegate(object sender, UpdateEventArgs e)
{
Console.WriteLine("

{1}

The average price is

{0}

", b.Get("avgPrice"), DateTime.Now.ToString("hh:mm:ss"));
});
the sending codes:
for (int i = 0; i < 10; i++)

{ epService.EPRuntime.SendEvent(new OrderEvent("Name" + i, (i + 1) * 10)); System.Threading.Thread.Sleep(1000); }

the output:
11:57:30 The average price is and oldEvent count:0 // this is a blank event engine fired
11:57:35 The average price is 35 and oldEvent count:0
11:57:40 The average price is 85 and oldEvent count:0
11:57:45 The average price is and oldEvent count:0






[ESPER-680] Improve performance of CSVInputAdapter Created: 30/Jul/12  Updated: 24/Sep/12  Resolved: 24/Sep/12

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: 4.6
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Daniel Korzekwa Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm processing millions of records from CSV files with Esper and I found that simply reading events from CSV files is pretty slow. After debugging I found that by default Esper CSV Adapter reads events byte by byte using FileInputStream. I believe that using BufferedReader and reading events by line should be much faster.

That's how I read events myself not using Esper:
-----------------------------------------------------------------------------------------------------------------------------------------
val marketDataReader = new BufferedReader(new FileReader(marketFile))

/*Process CREATE_MARKET EVENT/

val createMarketEvent = marketDataReader.readLine
------------------------------------------------------------------------------------------------------------------------------------------
and then use split/parse every line in a loop.

Am I missing something?, is there some important reason for not reading line by line with BufferedReader by Esper. Is there some simple way to switch from FileInputStream to BufferedReader? I found this code in Esper CSVSource file:

/**

  • Read from the underlying resource.
  • @return the result of the read
  • @throws IOException for io errors
    */
    public int read() throws IOException
    Unknown macro: { if(stream != null) { return stream.read(); } else { return reader.read(); } }

So there is an option to use Reader but it still reads a single byte rather than a line.

I was also profiling performance of Esper CSV. Please see attachment for more details.

I use Esper 4.6.0



 Comments   
Comment by Daniel Korzekwa [ 30/Jul/12 ]

Because of some reason I cannot attach png file with cpu profiling for esper. Please look here from this file:
http://old.nabble.com/Why-CSV-adapter-uses-FileInputStream-for-reading-CSV-files-rather-than-using-BufferedReader-for-better-efficiency-to34173665.html

Comment by Thomas Bernhardt [ 24/Sep/12 ]

Actually the code uses BufferedInputStream already. (And not FileInputStream, where did you think that from), see CSVSource line 38.
Also BufferedReader is used by the CSV adapter just like you commented your code would use? Did you check carefully?
That leaves the suggestion to use "readLine" instead of reading bytes. The CSV algo is actually a little smarter then what a split for "," would give you, try to encode "," as a value and use split.
The CSV adapter also needs to handle buffered input stream and buffered reader the exact same way, as part of the contract the behavior must be the same for reader and input stream. Since buffered input stream has no readline that contract would be hard to accomplish.





[ESPER-679] Improve performance of CSVInputAdapter Created: 30/Jul/12  Updated: 08/Oct/12  Resolved: 30/Jul/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Daniel Korzekwa Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Daniel Korzekwa [ 30/Jul/12 ]

It's a duplicate of ESPER-680

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-678] Return R² for Linear Regression Created: 13/Jul/12  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Andreas Eiselt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be useful to have a feedback about the quality of the linear regression performed by stat:linest. I would therefor propose to return the Coefficient of determination (R²) as part of the result.






[ESPER-677] Support for insert for Fire-and-Forget (on-demand) queries Created: 06/Jul/12  Updated: 09/Sep/13  Resolved: 06/Sep/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.6
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently "On Delete" Queries are the only way to remove Events from a Named Window.

It would be nice to be able to remove Events from a Named Window or empty an entire Named Window through a Fire-and-Forget Query and/or an API Call



 Comments   
Comment by Andy Flury [ 01/Jul/13 ]

According to the Doc Modifying and Deleting from Named Windows through FAF queries is now possible.

Would it possibly make sense to also allow inserting into Named Windows trough FAF queries?

Comment by Thomas Bernhardt [ 01/Jul/13 ]

It would require adding "values" as a keyword which would potentially break applications using that name for other purposes

Comment by Andy Flury [ 03/Jul/13 ]

How about this syntax:

insert into OrdersWindow set name='IBM', count=4, price=12.0

I believe ANSI SQL has both variants:

INSERT INTO table (a, b, c) VALUES (1,2,3)

INSERT INTO table SET a=1, b=2, c=3





[ESPER-676] Exception using @Audit with create-context and terminated-by filter Created: 27/Jun/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 4.7

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When I add the @Audit-tag to my context statement, I get the following error:

16:45:20,990 ERROR [ExceptionHandlingService] Exception encountered processing statement 'AdBreakCtx' statement text '
@Name('AdBreakCtx')
@Audit
create context AdBreakCtx as
initiated by
tv.AdIdentified(begin=true) as ad
terminated by
tv.AdIdentified(detectionId=ad.detectionId, begin=false) as endAd
' : 2
java.lang.ArrayIndexOutOfBoundsException: 2
at com.espertech.esper.pattern.EvalAuditStateNode.toStringEvaluateTrue(EvalAuditStateNode.java:139)



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-675] Memory leak in stat:linest implementation Created: 13/Jun/12  Updated: 14/Jun/12  Resolved: 14/Jun/12

Status: Closed
Project: Esper
Component/s: Core, Performance
Affects Version/s: 4.6
Fix Version/s: None

Type: Test Priority: Minor
Reporter: Andreas Eiselt Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: exception, leak, memory, stat:linest
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04 LTS x64, 8 GB RAM


Attachments: Java Source File memoryLeak.java    
Testcase included: yes
Number of attachments : 1

 Description   

The use of the stat:linest view provokes an Out-of-Memory Exception because of a memory leak in the implementation. After some tests it seems, as the there are copies of the events stored in memory and not free after their expiry.

I attached a code example which demonstrates the behavior. In order to make it easier to observe, the application will output the memory use every 10 seconds on the console. There is as well a commented EPL-Query which doesn't contain the stat:linest view and hence doesn't comprise the memory leak.



 Comments   
Comment by Thomas Bernhardt [ 13/Jun/12 ]

Your test is producing an unlimited number of group-by values?

Comment by Andreas Eiselt [ 13/Jun/12 ]

I'm not sure to what you refer with "unlimited". The number of groups depends in the event-data and is therefor not statically limited. In the test all events (words and their count) are collected during 10 seconds and then events with identical words are grouped together. This produces one stream per word. Over each stream I do then a linear regression. If there is no explication about what is held in memory after this (simple) request, I think this is neither a test nor a minor issue!

Comment by Thomas Bernhardt [ 14/Jun/12 ]

If the "term" value is generated by a random number it may never repeat therefore the number of groups is unlimited, i.e. 100 billion groups for example. Also see std:groupwin docs.

If you want to claim a memory leak in stat:linest you need to come up with a test that doesn't generate a very large number of groups, as the engine is forced to maintain state per group.

Comment by Andreas Eiselt [ 14/Jun/12 ]

I was able to resolve this issue. Actually the problem was not the stat:linest, but the std:groupwin view. This view, for some unclear reasons, holds the value of the attribute you are grouping by in the memory, even if the corresponding window is already empty. So in the following example, the value of "term" stays in memory: SELECT term, COUNT FROM TermEvent.std:groupwin(term).win:time(%s seconds). In my opinion this is inconsistent with concept behind Esper, as the system holds data in memory although it is not anymore needed. The issue can be solved with "@Hint('reclaim_group_aged=10')" which will advise the system to sweep the unused data.

Comment by Thomas Bernhardt [ 14/Jun/12 ]

See doc for expiring groups in std:groupwin.
Default is to keep an empty window in memory (at least for a while) since frequent construction and destroy of windows would kill performance.





[ESPER-674] SocketTimeoutException in HTTP adapter when browser posts events using URL entry Created: 11/Jun/12  Updated: 27/Sep/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello,
Everytime a new event is posted in the browser, after capturing the events, i am getting read timed out exception.

03:45:28,568 [Thread-20] ERROR [WorkerThread] I/O error: Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:260)
at org.apache.http.impl.io.HttpRequestParser.parseHead(HttpRequestParser.java:90)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
at org.apache.http.impl.AbstractHttpServerConnection.receiveRequestHeader(AbstractHttpServerConnection.java:242)
at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:238)
at com.espertech.esperio.http.core.WorkerThread.run(WorkerThread.java:37)



 Comments   
Comment by Jagan Vittal [ 08/Aug/12 ]

The default connection timeout of EsperHttpAdapter is 5 secs. see HttpAdapterClassic -> SO_TIMEOUT.





[ESPER-673] Aggregated row-per-event and grouped query with unidirectional join produces incorrect aggregation value Created: 01/Jun/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EPLTest.java    
Number of attachments : 1

 Description   

I used the following EPL
select count,sum(E1.value),E1.id from E1 unidirectional inner join E2.win:keepall() on E1.id=E2.id group by E1.grp
where the event definitions were
E1 : (id string, grp string, value int)
E2 : (id string, value2 string)
and send following Events:
E2 ["AAA", 100]
E1 ["AAA", "XXX", 10]
E1 ["AAA", "YYY", 20]

The results are:
E1 ["AAA", "XXX", 10]
-> [count(*),sum(E1.value)] = [0,null]
E1 ["AAA", "YYY", 20]
-> [count(*),sum(E1.value)] = [0,null]

If the query is fully-aggregated
select count,sum(E1.value),E1.grp from E1 unidirectional inner join E2.win:keepall() on E1.id=E2.id group by E1.grp
or un-grouped
select count,sum(E1.value),E1.id from E1 unidirectional inner join E2.win:keepall() on E1.id=E2.id
or does not use unidirectional join
select count,sum(E1.value),E1.id from E1.win:length(1) inner join E2.win:keepall() on E1.id=E2.id group by E1.grp
, then count and sum produce reasonable outputs:
E1 ["AAA", "XXX", 10]
-> [count(*),sum(E1.value)] = [1,10]
E1 ["AAA", "YYY", 20]
-> [count(*),sum(E1.value)] = [1,20]



 Comments   
Comment by Thomas Bernhardt [ 01/Jun/12 ]

Yes a "sum" result can be null, what is special about that?

Comment by Thomas Bernhardt [ 01/Jun/12 ]

Provide a test case and describe the problem please?

Comment by Toshihiro Nishimura [ 04/Jun/12 ]

I attached a test program.
I understand that "sum" result can be null, but I'm not sure this is the case.
I'd like to know where the difference come from between EPL1 and others (EPL2,EPL3,EPL4).

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-672] NullPointerException when executing on-demand statement query with a nested context partition Created: 01/Jun/12  Updated: 24/Sep/12  Resolved: 24/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5, 4.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Paolo de Dios Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File JIRA672Test.java    
Number of attachments : 1

 Description   

When executing an on-demand statement with a nested context partition, the Esper core runtime throws a NullPointerException. The statement runs to completion and returns a result, though.

Here is the context partition I am using:

CREATE CONTEXT TimeSeriesNestedSegmentPerQueryById
CONTEXT TimeSeriesSegmentPerQuery
INITIATED BY TimeSeriesBeginEvent AS tsb
TERMINATED BY TimeSeriesEndEvent(segmentId = tsb.segmentId),
CONTEXT TimeSeriesSegmentById PARTITION BY segmentId FROM TimeSeriesUnitEvent;

CONTEXT TimeSeriesNestedSegmentPerQueryById
CREATE WINDOW TimeSeriesNestedUnitWindow.win:keepall() AS TimeSeriesUnitEvent;

INSERT INTO TimeSeriesUnitWindow SELECT * FROM TimeSeriesUnitEvent;

CONTEXT TimeSeriesNestedSegmentPerQueryById
SELECT facet, sum(measure) AS total
FROM TimeSeriesUnitWindow
WHERE segmentId = whatever
GROUP BY facet
ORDER BY sum(measure) DESC;

Produces this exception stack trace:

CREATE CONTEXT TimeSeriesNestedSegmentPerQueryById
CONTEXT TimeSeriesSegmentPerQuery
INITIATED BY TimeSeriesBeginEvent AS tsb
TERMINATED BY TimeSeriesEndEvent(segmentId = tsb.segmentId),
CONTEXT TimeSeriesSegmentById PARTITION BY segmentId FROM TimeSeriesUnitEvent' : null L=[ExceptionHandlingService] RID=[1338539950256-0cGpfk]
java.lang.NullPointerException
at com.espertech.esper.core.context.mgr.ContextManagerNested.recursivePopulateBuiltinProps(ContextManagerNested.java:348)
at com.espertech.esper.core.context.mgr.ContextManagerNested.startStatement(ContextManagerNested.java:336)
at com.espertech.esper.core.context.mgr.ContextManagerNested.contextPartitionInstantiate(ContextManagerNested.java:246)
at com.espertech.esper.core.context.mgr.ContextControllerPartitioned.create(ContextControllerPartitioned.java:139)
at com.espertech.esper.core.context.mgr.ContextControllerPartitionedFilterCallback.matchFound(ContextControllerPartitionedFilterCallback.java:64)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterMultiple(EPRuntimeImpl.java:1185)
at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:1053)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:503)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:481)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:240)



 Comments   
Comment by Thomas Bernhardt [ 01/Jun/12 ]

Attach a test class please?

Comment by Thomas Bernhardt [ 24/Sep/12 ]

Cannot reproduce, see attached test case.
Also whatever the user provided where has not been backed up with a user-provided test case. The named window name as listed in the statement is also not matching and this would not compile.





[ESPER-671] Unexpected exception occurs when applying a basic arithmetic operation to short/byte properties Created: 01/Jun/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When I try the following EPL statements,
create schema sample (prop1 short, prop2 short);
select prop1+prop2 as r1 from sample;
I get the following message:
Unexpected exception starting statement: Expected base numeric type for computation result but got type class java.lang.Short [select prop1+prop2 as r1 from sample]

The same exception occurs when prop1 and prop2 are both "byte" type.



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-670] Event that ends/terminates context partition Created: 22/May/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In my project I create a non-overlapped context. The Esper 4.6.0
documentation describe when an event which fire the context start condition
will be processed in statements with this context. But the documentation say
nothing about an event firing the context end condition. Do the Esper engine
ensure delivering of this event to statements with this context?



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-669] Enumeration method not working on bean-array that is property of Map Created: 10/May/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample code to reproduce:

epService.getEPAdministrator().createEPL("create schema BookDesc as " + BookDesc.class.getName());
epService.getEPAdministrator().createEPL("create schema MySchema (books BookDesc[])");

EPStatement stmt = epService.getEPAdministrator().createEPL("select books.max(i => i.price) as mymax from MySchema");
SupportUpdateListener listener = new SupportUpdateListener();
stmt.addListener(listener);

Map<String, Object> event = Collections.<String, Object>singletonMap("books", new BookDesc[]

{new BookDesc("1", "book1", "dave", 1.00, null)}

);
epService.getEPRuntime().sendEvent(event, "MySchema");



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-668] CharSequence and String type not compatible Created: 09/May/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The type CharSequence and the String type should be compatible, however the below throws an exception:

epService.getEPAdministrator().createEPL("create schema ConcreteType as (value java.lang.CharSequence)");
epService.getEPAdministrator().createEPL("insert into ConcreteType select \"Test\" as value from pattern[every timer:interval(1 second)]");

Exception: Event type named 'ConcreteType' has already been declared with differing column name or type information: Type by name 'ConcreteType' in property 'value' expected interface java.lang.CharSequence but receives class java.lang.String



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-667] Trim statement name Created: 09/May/12  Updated: 14/Apr/14  Resolved: 01/Apr/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 5.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When an application provides a statement name using the @Name annotation or by API then that statement name may carry additional spaces. Additional space characters are currently carried forward and are part of the unique name of the statement. By trimming the statement name the name schema could be more consistent when spaces are appended by accident.






[ESPER-666] StatementAgentInstanceFactoryCreateWindow.newContext() throws NPE if other named window does not exist in insert case Created: 08/May/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Minor
Reporter: Daniel Huss Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n/a (JDK6 JVM)


Number of attachments : 0

 Description   

The following statement results in a NullPointerException if "SomeEventType" exists but does not identify a named window:

create window Bla.win:time(10 seconds) as SomeEventType insert;

(Feature Request?) Instead of failing with another exception, I'm boldly guessing Esper could potentially handle this case as if the following statements were given instead:

create window Bla.win:time(10 seconds) as select * from SomeEventType;
insert into Bla select * from SomeEventType;


 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-665] java.lang.Long.parseLong(String) in SELECT clause is affected by no-schema XML type? Created: 07/May/12  Updated: 24/Sep/12  Resolved: 24/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Daniel Huss Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n/a (JDK6 JVM)


Attachments: Java Source File SelectStaticMethodCallTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

I was expecting all of the following statements to result in [longValue=42] but the third one produced [longValue=null]

select java.lang.Long.parseLong('42') as longValue from pattern[every XML]
select java.lang.Long.valueOf(42) as longValue from XML
select java.lang.Long.parseLong('42') as longValue from XML

Could be related to "XML" being a no-schema XML type?



 Comments   
Comment by Thomas Bernhardt [ 24/Sep/12 ]

no-schema XML types accept any properties.
"java.Long.parseLong('42')" is a valid property name and could be resolved in the XML document





[ESPER-664] ValueCache.DISABLED in single row function configuration does not disable UDF cache Created: 02/May/12  Updated: 08/Oct/12  Resolved: 26/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Major
Reporter: Daniel Huss Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n/a, JDK 6 JVM


Attachments: Java Source File ValueCacheConfigurationTest.java     Text File valuecache.patch.txt    
Testcase included: yes
Patch Submitted:
Yes
Number of attachments : 2

 Description   

If a single row function is added via the configuration API, ValueCache.DISABLED does not force re-evaluation of the corresponding Java method.



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-663] Keyed Segmented Context with multiple properties not working Created: 01/May/12  Updated: 08/Oct/12  Resolved: 03/Aug/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File ContextWindowTest.java    
Number of attachments : 1

 Description   

Sample statements:
String epl =
"@Audit @Name('CTX') create context Ctx partition by grp, subGrp from Event;" +
"@Audit @Name('Window') context Ctx create window EventData.std:unique(type) as Event;" +
"@Audit @Name('Insert') context Ctx insert into EventData select * from Event;" +
"@Audit @Name('Test') context Ctx select irstream * from EventData;";
engine.getEPAdministrator().getDeploymentAdmin().parseDeploy(epl);

Sending an event does not trigger the listener for statement 'Test'.



 Comments   
Comment by Thomas Bernhardt [ 01/May/12 ]

Only workaround available is to either use a single event property or a different context i.e. hash based
Doc link is http://esper.codehaus.org/esper-4.6.0/doc/reference/en-US/html_single/index.html#context_def_keyed

Comment by Thomas Bernhardt [ 03/Aug/12 ]

change in bugfix460 branch

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-662] Custom aggregation function that receives wildcard ("*") receives instance of com.espertech.esper.type.WildcardParameter and not event Created: 01/May/12  Updated: 08/Oct/12  Resolved: 27/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 4.7

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement:
select collect from BookDesc.win:time_batch(.25 sec)

Workaround is to add alias:
select collect(book) from BookDesc.win:time_batch(.25 sec) as book



 Comments   
Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-661] EPStatementException in on-select with virtual data window and where-clause using greater-than (less-than) operator Created: 19/Apr/12  Updated: 27/Apr/12  Resolved: 19/Apr/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: 4.6

Type: Bug Priority: Minor
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Esper 4.5 on Linux


Number of attachments : 0

 Description   

@Name('epl1')
on SampleEvent as Sample select Sample.prop1 as prop1 from SampleWindow as VDW where Sample.prop1 > VDW.prop1

With the EPL statement above where SampleWindow is a virtual data window, I got following StackTrace:

Exception in thread "main" com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: 0 [@Name('epl1')
on SampleEvent as Sample select Sample.prop1 as prop1 from SampleWindow as VDW where Sample.prop1 > VDW.prop1]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:652)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:596)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:130)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:116)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:65)
at sample.esper.vdw.SampleWindowProcessor.main(SampleWindowProcessor.java:60)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at com.espertech.esper.epl.virtualdw.SubordTableLookupStrategyVirtualDW.<init>(SubordTableLookupStrategyVirtualDW.java:67)
at com.espertech.esper.epl.virtualdw.VirtualDWViewImpl.getSubordinateLookupStrategy(VirtualDWViewImpl.java:91)
at com.espertech.esper.epl.named.NamedWindowRootViewInstance.getSubqueryStrategyPair(NamedWindowRootViewInstance.java:505)
at com.espertech.esper.epl.named.NamedWindowRootViewInstance.getStrategyPair(NamedWindowRootViewInstance.java:535)
at com.espertech.esper.epl.named.NamedWindowRootViewInstance.addOnExpr(NamedWindowRootViewInstance.java:367)
at com.espertech.esper.core.context.factory.StatementAgentInstanceFactoryOnTrigger.newContext(StatementAgentInstanceFactoryOnTrigger.java:117)
at com.espertech.esper.core.start.EPStatementStartMethodOnTrigger.startInternal(EPStatementStartMethodOnTrigger.java:362)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:59)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:626)
... 5 more

At line 67 of SubordTableLookupStrategyVirtualDW.java, I think the second argument of "new ExternalEvaluatorHashRelOp" is wrong.



 Comments   
Comment by Thomas Bernhardt [ 19/Apr/12 ]

in 4.6 release

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-660] Allow fragment event type to perform datetime methods Created: 18/Apr/12  Updated: 27/Apr/12  Resolved: 18/Apr/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Simon Lehmann Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Given an event type like this

create schema Example as (startts long) starttimestamp startts;

the following statement fails on creation:

select * from pattern [ a = Example -> b = Example ] where b.after(a);

The exception message is: "Error validating expression: Date-time enumeration method 'after' requires either a Calendar, Date or long value as input or events of an event type that declares a timestamp property but received java.util.Map [select * from pattern [ a = Example -> b = Example ] where b.after(a)]"

This statement, however, works as expected:

select * from pattern [ a = Example -> b = Example(b.after(a)) ];

It seems, as if the event type information is somehow lost outside the pattern. Note, that using the events as such does indeed work, e.g. writing '... where b.startts.after(a.startts)'. The same behavior can also be observed when using POJO-backed events, in which case the error message states '[...] but received full.qualified.NameOfPojoClass [...]'. This indicates that the actual underlying type is preserved, but somehow the EventBean wrappers are lost.



 Comments   
Comment by Thomas Bernhardt [ 18/Apr/12 ]

Can be addressed via "where b.startts.after(a.startts)".

Comment by Thomas Bernhardt [ 18/Apr/12 ]

Change in enhancement460 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-659] Inherit timestamp properties from event super types Created: 18/Apr/12  Updated: 27/Apr/12  Resolved: 19/Apr/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: 4.6

Type: Improvement Priority: Trivial
Reporter: Simon Lehmann Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: wish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When using POJOs as event types (e.g. create schema Example as org.example.Example) it would be nice if timestamp properties defined on a super type would be inherited. For example, this

create schema Base as org.example.Base starttimestamp startts;
create schema Derived as org.example.Derived;

should make it possible to use any event of type derived be useable with the time interval algebra methods without explicitly stating 'startts' as the timestamp property. I think this should be not too hard to implement, as inheritance information of POJOs is already used when matching events to from-clauses (e.g. 'select * from Base' will also select any event of type Derived).

This would also be consistent with the behavior of non-POJO types, like this

create schema Base as (startts long) starttimestamp startts;
create schema Derived as (foo String) inherits Base;

which actually inherits the starttimestamp property.



 Comments   
Comment by Simon Lehmann [ 18/Apr/12 ]

Somehow I thought the non-POJO example worked as I described it, but as I tried it again, it failed in the same way. I don't know what I did to assume it once worked, but at least it is consistent behavior now.

So, as no inheritance of timestamp properties is done right now, I would suggest to inherit the timestamp properties in all cases. I guess it could lead to problems with multiple inheritance, when timestamp properties are configured on more than one of them. In those cases, an error (a warning?) should be given and the property has to be defined manually. I guess this kind of check has to be done anyways as indentically named properties might occur in general.

Comment by Thomas Bernhardt [ 18/Apr/12 ]

It may not always be desirable to automatically inherit the start and end timestamp property names.

Comment by Simon Lehmann [ 19/Apr/12 ]

Of course this might be a matter of opinion, but I would assume, if you use inheritance for event types, you want to be able to

a) use a base type name in a stream spec to also match any derived type
b) have some basic properties (and, in case of POJOs, also methods) available on all derived types without duplicating code
c) use any derived event type in places where a base type could have been used

In general, Esper already supports all of this, execpt for using a derived type with date-time methods. At least to me, it was a bit surprising, as the base type defines the timestamp property and that it should be used as such.

So I would still suggest to change the inheritance behavior. Maybe a configuratio option or something like that could be introduced to control this, if there really are cases where it might be undesireable to inherit those properties. Otherwise, at least the documentation should make it clear that those properties are excluded from inheritance.

Anyway, keep up the good work!

Comment by Thomas Bernhardt [ 19/Apr/12 ]

ok we'll if we can have this in 4.6

Comment by Thomas Bernhardt [ 19/Apr/12 ]

in 4.6 release

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-658] context with "start after 0 seconds" starts only after next time tick Created: 17/Apr/12  Updated: 27/Apr/12  Resolved: 17/Apr/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: 4.6

Type: Improvement Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Another thing I've noticed:

create context EveryMinute start after 0 seconds end after 60 seconds

context EveryMinute
select avg(value)
from Wattage
output snapshot when terminated

The while testing:

esper.send(Wattage(100))
averageEvents mustBeEmpty

clock.advanceBy(5.second)

esper.send(Wattage(300))
averageEvents mustBeEmpty

clock.advanceBy(5.second)
averageEvents mustMatch (Average(200))

The last assertion fails because when the first Wattage was sent the
statement was not yet started. In order to start the statement I must
advance the clock (1 milli does it). With a "start after 0 seconds" I would
expect the statement to start immediately like a statement without a
context.

This is probably only an issue with an externally managed clock which
effects mostly test code. But it could also be an issue in replaying events
with an externally managed clock.



 Comments   
Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-657] Adapt the documentation of the reserved keywords Created: 29/Mar/12  Updated: 17/Apr/12  Resolved: 17/Apr/12

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Studienprojekt Apro Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It seems to be, that the list of reserved keywords in the documentation is incomplete.
We tried to make a rule with the word "start" and got an exception, which says that start is a reserved keyword, although it is not mentioned in the documentation.



 Comments   
Comment by Thomas Bernhardt [ 17/Apr/12 ]

for release with 4.6





[ESPER-656] Variant stream of type ANY when inserting columns and the underlying event in combination the result is not carrying the inserted columns Created: 15/Mar/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a variant stream gets declared to hold any-event and an insert-into statement selects columns and an underlying event then the columns are lost in the output event.

Sample test code
=================
epService.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
epService.getEPAdministrator().createEPL("create variant schema PokerAchStream as *");
epService.getEPAdministrator().createEPL("insert into PokerAchStream select 'test' as eventConfigId, * from SupportBean");
epService.getEPAdministrator().createEPL("select * from PokerAchStream").addListener(listener);

epService.getEPRuntime().sendEvent(new SupportBean("E1", 1));
EventBean event = listener.assertOneGetNewAndReset();
System.out.println(event);
=================

The event that is output by above test code does not hold the "eventConfigId" field.



 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

change in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-655] Copy method for bean-backed events should prefered configured method over Serializable Created: 10/Mar/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Debugging this and looking at BeanEventType.getCopyMethod() I am seeing that the copy method is only used if the event class does not implement Serializable. I had expected that defining and copy method would override serialization but it does not seem so.



 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

changes in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-654] Allow backtick notation for any identifier Created: 09/Mar/12  Updated: 01/Jun/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Daniel Huss Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n.a. (JDK6 JVM)


Number of attachments : 0

 Description   

I'm proposing an enhancement to the EPL syntax that would allow any identifier to be escaped using the backtick ("`") notation that is currently used to delimit property names. This change would make the following statement valid:

select * from pattern[every `candidate book`=`XML Message Type`(catalog.`children's books`[0].age >= 12)]



 Comments   
Comment by Daniel Huss [ 09/Mar/12 ]

Looks like I'm having a hard time remembering the JIRA markup syntax, sorry about that.

Comment by Thomas Bernhardt [ 10/Mar/12 ]

WOuld you like to take a stab at making the changes? We'll help to point you to the right places.

Comment by Daniel Huss [ 12/Mar/12 ]

Yes, I'll look into it. I've skimmed over the grammar, now making friends with Antlr.

Comment by Thomas Bernhardt [ 16/Mar/12 ]

The changes for this improvement did not look easy. I have taken a stab at it and completed the changes. They are checked into the "enhancements460" branch for 4.6 release. Please try them out?

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0

Comment by Daniel Huss [ 31/May/12 ]

Sweet, I've finally had some time to test the enhancement and found some bugs. I should've given a slightly more precise definition of what I'd consider an identifier:

  • Type/schema names
  • Window names
  • Generally all event stream names
  • Pattern tags
  • Property names, e.g., in filter expressions
  • Method names (regardless of Java method names and Esper identifiers 'coincidentally' sharing the same syntax)
  • Variable names
  • Database names in sql: queries
  • Column names
  • measure_expression and variable within match_recognize
  • Might have missed something important, so I don't claim this list is complete
create window `SlidingTimeWindow-10SecondsStream`.win:time(10 seconds) as select * from `__AnyConsumed`];

/*
   The selected row in the following statement should have a single column named
   "tag`s name" (enclosing quotes AND backticks are not part of the column name)

   The double backtick is meant to escape a single backtick. Using the backslash
   to escape backticks would be more consistent with the current way of escaping 
   dots in property names, but do we really need two different escape character 
   flavors? Assuming backticks work for any identifier, "MyEvent.prop1\.prop2" 
   style expressions could be deprecated and replaced by "MyEvent.`prop1.prop2`"
 */
select `tag``s name`.`some.property` as `tag``s name` from pattern[every `tag``s name`=`My-Event-Type`]; 

Unfortunately this feedback is all I can contribute for the moment, really wish I had more (any) spare time to work on actual patches

Comment by Daniel Huss [ 01/Jun/12 ]

I'm ...determined to provide plenty test cases in case I end up with some time to spare. Should I reopen this issue once enough test exist?





[ESPER-653] ExprDotNode.validate does not handle empty array returned by validationContext.getStreamTypeService().getEventTypes() Created: 06/Mar/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Daniel Huss Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n.a. (Sun JDK6 JVM)


Attachments: Java Source File ExprDotNodeTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

ExprDotNode.java (line 224) raises an ArrayIndexOutOfBoundsException if the returned array has zero elements:

{{

{EventType streamZeroType = validationContext.getStreamTypeService().getEventTypes()[0];}

}}

The following EPL statement provokes the exception:

create constant variable java.util.Date START_TIME = java.util.Calendar.getInstance().getTime()



 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

in branch bugfix450

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-652] regexp matches whole pattern Created: 20/Feb/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EPL rexexp matches whole pattern match (java.util.regex.Matcher match() method).
Mysql regexp behaves like the find() method, which was the behaviour I expected.
If this is not a bug, documentation (section The 'regexp' Keyword) should describe behaviour in more detail.

Also, example given is:

select * from PersonLocationEvent where name regexp 'Jack'

is that meant to be '.Jack.' ?



 Comments   
Comment by Mitch [ 20/Feb/12 ]

Reposting above examples as mangled by formatting:

 select * from PersonLocationEvent where name regexp '*Jack*'

is that meant to be

'.*Jack.*'

?

Comment by Thomas Bernhardt [ 21/Feb/12 ]

The behavior is the Java regex matcher behavior.

Comment by Mitch [ 21/Feb/12 ]

As described above, there are two methods in the java API, find() and matches(). Esper appears to use the latter, which is not how mysql behaves and is not how perl behaves. Normally you would use '^pattern$' to indicate you wanted to match the whole input.

Also the example regex in the doc is not well formed.

Comment by Thomas Bernhardt [ 21/Feb/12 ]

ok, do you want to provide a patch with the changes?

Comment by Mitch [ 21/Feb/12 ]

Hi Tom, I've not looked at the source Im just reporting the behaviour as it caused me to have a buggy rule. Sorry not got time to do more at the moment.

Comment by Thomas Bernhardt [ 16/Mar/12 ]

documententation change only, change in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-651] Remove stream events with having-clause and "Aggregated and Grouped" (row-per-event) with group-by and time-window Created: 19/Feb/12  Updated: 14/Apr/14  Resolved: 20/Jan/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.6
Fix Version/s: 5.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Assume a query that selects the remove stream, has a having-clause and group-by and time-window, sample query:

select rstream string, intPrimitive, sum(longPrimitive) from SupportBean.win:time(1 sec) group by string having count > 2

When events get removed from the time window and the resolution is set to 2 seconds, the having-clause will not fire even if there are more then 2 events in the time window and all events expire at the same time.

Assigned to low priority as remove stream is rarely looked at, and the workaround is simply to select from an aggregated stream.

Assigned to release 5.0 so that the behavior of the remove stream in this case does change between minor releases.



 Comments   
Comment by Thomas Bernhardt [ 19/Feb/12 ]

In my query, the query is not "fully aggregated and grouped" so I should receive a notification for each unique Remove event that passes the Having clause.
( I've already been caught out with that tricky devil cf: bug report ESPER-640 )

E.g. SELECT RSTREAM somefield, otherfield, anotherfield, COUNT
from eventStream.win:time(2 sec)
GROUP BY somefield HAVING COUNT > 15

E.g. Observed behaviour:
COUNT is currently 21.
4 RSTREAM events processed together.
All 4 notification messages have count = 17
All 4 pass the having clause (count>15) so all are delivered.

E.g. Observed behaviour:
COUNT is currently 18.
4 RSTREAM events processed together.
All 4 notification messages have count = 14
All 4 FAIL the having clause (count>15) so NONE are delivered.

E.g. Expected Behaviour
COUNT is currently 18.
4 RSTREAM events processed together.
Remove 1 -> count = 17.
Remove 2 -> count = 16.
Remove 3 -> count = 15.
Remove 4 -> count = 14.
Only the notifications for Remove 1&2 pass the having clause (count>15), so only those notifications should be delivered.

Im finding it difficult to create an accurate testcase to repeat this.
It only seems to happen when Esper is heavily loaded so RSTREAM processing for a sliding window happens in batchs.

Please try the attached code.
1: Try messing with the sleep time on line 82 until the window remove processing happens in batches of 2-7ish.
2: Then check out the value for "Count" in the RSTREAM results.
3: Then refactor the Esper script on line 62 with line 61. The HAVING clause, combined with the somewhat arbitrary batching of window remove processing means that the result of the RSTREAM query will be nothing, or some results or correct results.

NOTE 1: This is Only for RSTREAM processing. ISTREAM processing seems to be performed as expected - i.e. not batched.

NOTE 2: Try add " SUM(one) " to the select clause of the query. You'll see that this question is probably valid for All aggregates, not just COUNT.

I hope this helps clarify my question.

Comment by Thomas Bernhardt [ 20/Jan/14 ]

>> Only the notifications for Remove 1&2 pass the having clause (count>15), so only those notifications should be delivered.

Since all 4 events expire at the same time, the count after all 4 events expired is 14. So the count drops from 18 to 14 (and not from 18 to 17 to 16 and so on).

This is consistent for example with a last-event window. Its count will never go up from 1 to 2 and back down to 1.

Comment by Thomas Bernhardt [ 20/Jan/14 ]

The output for "sum(longPrimitive)" and "count" when added to the select clause is always the total i.e. the count in the output jumps from 18 to 14, i.e. is the before vs. after of the per-string group. reporting different aggregated values for the same group would be illegal.





[ESPER-650] Deadlock when UpdateListener creates a new pattern in Esper 4.4.0 Created: 11/Feb/12  Updated: 24/Feb/12  Resolved: 24/Feb/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: uttkrant Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Esper running in tomcat with thread pools configured for inbound event processing and outbound event listeners


Number of attachments : 0

 Description   

The outbound thread gets blocked while trying to create a pattern. Below are the jstack logs

"com.espertech.esper.Outbound-xyz-8" daemon prio=10 tid=0x5f65d000 nid=0x1bf3 waiting on condition [0x5e583000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
    at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireWriteLock(ManagedReadWriteLock.java:74)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:261)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStoppedAssignName(StatementLifecycleSvcImpl.java:169)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:123)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:102)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:62)
    at com.xyz.impl.SignalManagerImpl.update(SignalManagerImpl.java:316)
    at com.espertech.esper.core.service.StatementResultServiceImpl.dispatchInternal(StatementResultServiceImpl.java:372)
    at com.espertech.esper.core.service.StatementResultServiceImpl.processDispatch(StatementResultServiceImpl.java:241)
    at com.espertech.esper.core.thread.OutboundUnitRunnable.run(OutboundUnitRunnable.java:45)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

"com.espertech.esper.Inbound-xyz-1" daemon prio=10 tid=0x5eec3400 nid=0x1be2 waiting on condition [0x623fe000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:941)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1261)
    at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireReadLock(ManagedReadWriteLock.java:140)
    at com.espertech.esper.core.service.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:591)
    at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:512)
    at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:409)
    at com.espertech.esper.core.thread.InboundUnitSendEvent.run(InboundUnitSendEvent.java:42)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)


 Comments   
Comment by Thomas Bernhardt [ 11/Feb/12 ]

Please test against 4.5 version, I think there may have been a related change.

Can you please attach a test case.

Comment by uttkrant [ 24/Feb/12 ]

Tested this using 4.5.0 version and it appears that fixed the issue.Thanks so much for the quick turnaround





[ESPER-649] Deadlock when UpdateListener creates a new pattern Created: 11/Feb/12  Updated: 24/Feb/12  Resolved: 24/Feb/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: uttkrant Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The deadlock occurs an UnmatchedListener is provided and the UnmatchedListener implementation attempts to create a new statement.

Workaround: add new statement to queue and let another thread create the new statement.

Sample code to reproduce:

<pre>
public class TestItUnmatchCreateStmt extends TestCase {

public void testIt()

{ EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); engine.getEPAdministrator().getConfiguration().addEventType(MyEvent.class); MyUnmatchedListener listener = new MyUnmatchedListener(engine); engine.getEPRuntime().setUnmatchedListener(listener); engine.getEPRuntime().sendEvent(new MyEvent()); }

private static class MyEvent {
}

private static class MyUnmatchedListener implements UnmatchedListener {

private final EPServiceProvider engine;

private MyUnmatchedListener(EPServiceProvider engine)

{ this.engine = engine; }

public void update(EventBean event)

{ engine.getEPAdministrator().createEPL("select * from MyEvent"); }

}
}
</pre>



 Comments   
Comment by uttkrant [ 11/Feb/12 ]

This issue is reproducible with Esper 4.4.0 when updateListener creates a new pattern. This issue occurs where esper is configured with threadpools for inbound event processsing and outbound listeners. Below are Jstack logs for the issue.

"com.espertech.esper.Outbound-ATC-8" daemon prio=10 tid=0x5f65d000 nid=0x1bf3 waiting on condition [0x5e583000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
    at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireWriteLock(ManagedReadWriteLock.java:74)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:261)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStoppedAssignName(StatementLifecycleSvcImpl.java:169)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:123)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:102)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:62)

"com.espertech.esper.Inbound-ATC-1" daemon prio=10 tid=0x5eec3400 nid=0x1be2 waiting on condition [0x623fe000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:941)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1261)
    at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireReadLock(ManagedReadWriteLock.java:140)
    at com.espertech.esper.core.service.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:591)
    at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:512)
    at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:409)
    at com.espertech.esper.core.thread.InboundUnitSendEvent.run(InboundUnitSendEvent.java:42)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Comment by uttkrant [ 24/Feb/12 ]

Duplicate of 650





[ESPER-648] NullPointerException with "utput Every" & "for discrete_delivery" when no output is available Created: 08/Feb/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: John Keeney Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File SimpleEsperTest4.java    
Number of attachments : 1

 Description   

NullPointerException in com.espertech.esper.core.service.StatementResultServiceImpl.processDispatch(UniformPair<EventBean[]> events)

  • Line 252.

For query
SELECT Anything FROM AnyStream
OUTPUT ALL EVERY 2 seconds
for discrete_delivery

No error when:

  • "for discrete_delivery" is removed
  • when there Is some output
  • before some event is inserted into the stream - even one

See line 252 in
com.espertech.esper.core.service.StatementResultServiceImpl.processDispatch(UniformPair<EventBean[]> events)
"events" is null
"event" should probably be an empty array instead?
So perhaps error is in com.espertech.esper.event.EventBeanUtility.UniformPair<EventBean[]> flattenList(ArrayDeque<UniformPair<EventBean[]>> eventVector)
??

ERROR com.espertech.esper.timer.EPLTimerTask - Timer thread caught unhandled exception: java.lang.NullPointerException
com.espertech.esper.client.EPException: java.lang.NullPointerException
at com.espertech.esper.core.service.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:1221)
at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:519)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:413)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:240)
at com.espertech.esper.core.service.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:214)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.espertech.esper.core.service.StatementResultServiceImpl.processDispatch(StatementResultServiceImpl.java:252)
at com.espertech.esper.core.service.StatementResultServiceImpl.execute(StatementResultServiceImpl.java:231)
at com.espertech.esper.core.service.UpdateDispatchViewBase.execute(UpdateDispatchViewBase.java:75)
at com.espertech.esper.core.service.UpdateDispatchFutureSpin.execute(UpdateDispatchFutureSpin.java:85)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServiceImpl.java:52)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.java:31)
at com.espertech.esper.core.service.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:1217)
... 13 more



 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

branch bugfix450

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-647] On-merge for indexed properties only updates the first two values of the array Created: 07/Feb/12  Updated: 09/Feb/12  Resolved: 09/Feb/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: 5.0

Type: Bug Priority: Major
Reporter: Andreas bauer Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

iMac, Lion 10.7.3, 12GB memory


Number of attachments : 0

 Description   

On-merge updates for indexed properties within a POJO event only update the first two values into the property, i.e. when the event arriving in the on-clause has an property of type array containing 5 elements only the two first get updated in the event specified in the merge-part.

POJO class FeatureEvent (implements Serializable):

private Double[] creditScore;

public FeatureEvent()

{ this.creditScore = new Double[10]; }

public Double[] getCreditScore()

{...}

public void setCreditScore(Double[] creditScore)

{ this.creditScore = creditScore; }

The upsert looks like this

create window monitor.win:time(5 sec) as FeatureEvent;

on summedstream s
merge monitor r
where r.originUuid = s.originUuid
when matched and s.type ='credit' and r.creditArrived < 1
then update set r.creditArrived = 1, r.creditScore = s.scale_normalized, r.itemsArrived = r.itemsArrived + 1
when not matched
then insert select
originUuid as originUuid
,creditArrived = 0
,

{0.0,0.0,0.0,0.0,0.0,0.0,0.0}

as creditScore
,itemsArrived = 0;

The insert into the summedstream is

create window summedstream.win:time(5 sec).std:unique(originUuid,type) as (
originUuid String
, scale_normalized Double[]
, type String);

insert into summedstream
select
r.originUuid as originUuid
,window(r.scale_normalized) as scale_normalized
,r.type as type
from rankingstream r
group by r.originUuid, r.type

When I do a select on summedstream for testing I get all the expected double[] values, e.g. "0.1 | 0.9 | 0.34 | 0.22| ..."

But when I do a select on monitor and the "when-matched" part has already performed the update, I always get only the first two elements from summedstream, i.ed. the property creditScore only contains "0.1|0.0". The "when not matched" part always creates the array with the defined amount of empty elements, i.e. property creditScore contains 7 times "0.0"






[ESPER-646] Output rate limiting "Output first" could retain less results in memory Created: 01/Feb/12  Updated: 16/Mar/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The query "select * from MyEvent group by someproperty output first every 10 hours" keeps 10 hours of events in memory, it could discard. This is documented but could be improved.



 Comments   
Comment by Thomas Bernhardt [ 02/Feb/12 ]

One can instead declare a intersection between first-unique and time window: "std:firstunique(hostname).win:time(10 hours)" retains the intersection between unique hostname and 10 hours.

Or alternatively "from pattern[every-distinct(a.hostname,10 hours) a=A]"

Comment by Thomas Bernhardt [ 16/Mar/12 ]

It seems the user sent an unlimited number of "someproperty" group keys. This cannot be reproduced.

For reference, the code to reproduce would be:
============
String stmtText = "select * from SupportBean group by string output first every 10 hours";
epService.getEPAdministrator().createEPL(stmtText).addListener(listener);

int count = 0;
while(true)

{ count++; epService.getEPRuntime().sendEvent(new SupportBean("E", count)); listener.reset(); }




[ESPER-645] CSV input adapter when used with CSV-provided timestamp the win:ext_timed() behavior as compared to win:time() should that be the exactly the same or different Created: 01/Feb/12  Updated: 16/Mar/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2, 4.4, 4.5
Fix Version/s: 4.5

Type: Test Priority: Minor
Reporter: Walter Eaves Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: help-requested
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Linux 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 GNU/Linux


Attachments: Zip Archive eepgwde-ext_timed.zip    
Number of attachments : 1

 Description   

I want to be able to replay data at faster than real-time. I've tried to use
http://esper.codehaus.org/esperio-3.5.0/doc/api/com/espertech/esperio/csv/CSVInputAdapterSpec.html#setUsingExternalTimer(boolean)
So I chose to use a win:ext_timed() window.
http://esper.codehaus.org/esper-4.2.0/doc/reference/en/html/epl-views.html#view-win-ext_time
And I compared the results from a run at real-time. I found there were 2000 discrepancies in a file of 20000 events.
I've attached the two trial runs within a zip. These are sest-*.zip. I've also attached the source data. The esper.xml file and the EPL files that describe the queues.






[ESPER-644] Infinite loop when restarting a statement Created: 27/Jan/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When running the Groovy example below, Esper 4.4 goes to infinite loop in

com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:76)

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPServiceProviderManager;

public class EsperTrial {

    public static void main(String[] args) {
        def config = new Configuration()

        def FB = [ 'timeTaken' : double ]
        config.addEventType 'FB', FB

        def engine = EPServiceProviderManager.getDefaultProvider(config)
        def admin = engine.EPAdministrator

        def st = admin.createEPL(
'''
select avg(timeTaken) as timeTaken
from FB
order by timeTaken desc
'''
)
        st.stop()
        st.start()
    }
}

Produces

Caught: java.lang.StackOverflowError
java.lang.StackOverflowError
        at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:65)
        at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:76)
        at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:76)


 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

Changes in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-643] Use expression as mapped-property key or indexed-property index Created: 26/Jan/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am trying to access a mapped-property's values, by using one event property as a key. For instance:

Input Event:
----------------

name string,
value string,
properties java.util.Map

Statement:
---------------

select name,
value,
properties(name) = value as ok
from InputEvent;

Unfortunately, this statement does not compile, saying it cannot find a function 'properties'. If I use a string literal as a key it works. It would really be useful to dynamically access mapped properties' values in EPL.



 Comments   
Comment by Thomas Bernhardt [ 26/Jan/12 ]

Alternative solution is to use a single-row method or call a method on the event (i.e. inputEvent.getProp(abc)).

Comment by Thomas Bernhardt [ 16/Mar/12 ]

change in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-642] Log destination for @Audit logs moved to "com.espertech.esper.util.AuditPath" but should be "com.espertech.esper.audit" Created: 23/Jan/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.5
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

change in bugfix450 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-641] Add SupportSubscriber and SupportSubscriberMRD to Public Test Framework Created: 20/Jan/12  Updated: 27/Apr/12  Resolved: 16/Mar/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

>> The test framework API contains a statement listener but does not contain a statement subscriber for multi-row delivery.
>> Could one be added similar to the existing test class com.espertech.esper.support.util.SupportSubscriberMRD
>> I believe that MRD is Multi Row Delivery. It would be nice to have a test subscriber for row by row delivery and multi row delivery.



 Comments   
Comment by Thomas Bernhardt [ 16/Mar/12 ]

changes in enhancements460 branch

Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-640] When events are pushed out of a window they are being delevered as NEW events, not OLD events - Only when SELECT selects only the field used for GROUP BY Created: 18/Jan/12  Updated: 19/Jan/12  Resolved: 18/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: John Keeney Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File SimpleEsperTest2.java    
Number of attachments : 1

 Description   

It think this is a bug ... otherwise I'm not understnding how windows work .....

given a query :

SELECT istream particularField from MYEVENT.win:length(5) GROUP by particularField

After 5 events (window is full, so 1st event is pushed out), the one being pushed out is Also notified to the listener/subscriber as a new event.

This is the same for time-based and length based windows.
Haven't tried batch windows.

If I select any other field too, it doesn't happen.
If I select the Particular field, but using an alias, it doesn't happen.
If I select count in addition to the Particular field, it does happen.
(Only happens for Fully Aggregated and Grouped?)
Is the pushed out event getting added to "istream" instead of "rstream" ?



 Comments   
Comment by John Keeney [ 18/Jan/12 ]

When I call:

SELECT rstream ....

I am also notified to events Entering the window.

Comment by Thomas Bernhardt [ 18/Jan/12 ]

This is expected behavior although not very intuitive for this special case of aggregation.

For example, the query "select key, count from MyEvent.std:lastevent() group by key" will post:

Arrival

{key=E1}

Output

{key=E1, count(*)=1}

Arrival

{key=E2}


Output

{key=E1, count(*)=0}

Output

{key=E2, count(*)=1}

Therefore when using group-by, when events leave the data window they trigger group changes (since using group by) and for each group the engine indicates the changes to listeners as "newData".

The "select rstream" for aggregation means selecting the before-and-after value for each group that is updated, while "select istream" selects the after-value.

Comment by John Keeney [ 19/Jan/12 ]

Thanks for the reply.
It seems I didn't understand the behaviour of Fully Aggregated and grouped vs Non-Fully Aggregated and grouped queries.
It does seem a little counter intuitive alright ...
So is this a correct interpretation of what is happening??:

FULLY Aggregated (istream)
(Alerted when GROUP changes. insertStream supplies the group's key and the group's aggregation value(s) AFTER the change. removeStream alway null.)

select istream key, count from MyEvent.win.time(5) group by key
T+0
Register Query

T+2
Event (key=E1 nonKey=X)
Output (insertStream[]) -> E1 Group has changed, (event enters)(Now) count IS 1
Output (removeStream[]) -> null

T+3
Event (key=E1 nonKey=Y)
Output (insertStream[]) -> E1 Group has changed, (event enters) (Now) count IS 2
Output (removeStream[]) -> null

T+4
Event (key=E2 nonKey=Z)
Output (insertStream[]) -> E2 Group has changed, (event enters) (Now) count IS 1
Output (removeStream[]) -> null

T+7 (First event in E1 group window expires)
Output (insertStream[]) -> E1 Group has changed, (event leaves) (Now) count IS 1
Output (removeStream[]) -> null
.....

FULLY Aggregated (rstream)
(Alerted when GROUP changes. insertStream gives the group's key and the aggregation value(s) BEFORE the change, removestream alway null).

select rstream key, count from MyEvent.win.time(5) group by key
T+0
Register Query

T+2
Event (key=E1 nonKey=X)
Output (insertStream[]) -> E1 Group has changed, (event added) (Before change) count WAS 0
Output (removeStream[]) -> null

T+3
Event (key=E1 nonKey=Y)
Output (insertStream[]) -> E1 Group has changed, (event added) (Before change) count WAS 1
Output (removeStream[]) -> null

T+4
Event (key=E2 nonKey=Z)
Output (insertStream[]) -> E2 Group has changed, (event added) (Before change) count WAS 0
Output (removeStream[]) -> null

T+7 (First event in E1 group window expires)
Output (insertStream[]) -> E1 Group has changed, (event leaves) (Before change) count WAS 2
Output (removeStream[]) -> null
.....

NOT FULLY AGGREGATED (irstream)
(Alerted when groups' WINDOW changes. When an event enters a group's window insertStream supplies queried fields of the entering event and current aggregation value(s) for the group. When an event leaves a group's window removesStream gives the queried fields of the leaving event and the current aggregation value(s) for the group.)

select irstream nonKey, key, count from MyEvent.win.time(5) group by key
T+0
Register Query

T+2
Event (key=E1 nonKey=X)
Output (insertStream[]) -> E1 Group Window changed. Event added. key=E1, nonkey=X, count=1
Output (removeStream[]) -> null

T+3
Event (key=E1 nonKey=Y)
Output (insertStream[]) -> E1 Group Window changed. Event added. key=E1, nonkey=Y, count=2
Output (removeStream[]) -> null

T+4
Event (key=E2 nonKey=Z)
Output (insertStream[]) -> E2 Group Window changed. Event added. key=E2, nonkey=Z, count=1
Output (removeStream[]) -> null

T+7 (First event in E1 group window expires)
Output (insertStream[]) -> null
Output (removeStream[]) -> Group Window changed. Event removed. key=E1, nonkey=X, count=1
.....

Those are Very different semantics for such similar queries!

"Select irstream" gives strange behaviour for Fully Aggregated. There is no way to know which event is "Before" the change, and which is "After" the change. It seems to make more sense to have "After event change" (istream and irstream) sent to the update's insertStream, and the "Before event change" (irstream and rstream) sent to update's removeStream.
(Just my 2c worth

Thanks for the feedback.

Comment by Thomas Bernhardt [ 19/Jan/12 ]

This is because we wanted the behavior to be consistent with SQL for relational databases.

Consider the queries:
(A) select nonKey, key, sum from MyEvent group by key
(B) select key, sum from MyEvent group by key

When fired against any relational database the query (A) returns an output row per row in the table, query (B) returns an output row per key





[ESPER-639] NullPointerException with Subscriber and Context and Aggregation: at com.espertech.esper.core.context.stmt.AIRegistryAggregationMultiPerm.getValue(AIRegistryAggregationMultiPerm.java:64) Created: 18/Jan/12  Updated: 19/Jan/12  Resolved: 18/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: John Keeney Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File SimpleEsperTest.java    
Number of attachments : 1

 Description   

NullPointerException with a subscriber listening for Esper Results, where the SELECT query uses a CONTEXT and has an aggregation.

(No error when using a listener instead of a subscriber)
(No error when there is no aggregation in the SELECT)
(No error when CONTEXT is not used)
(Same error whether PARTITION BY or GROUP BY is used)
(Same error regardless of the window used by the aggregate, I think)

e.g.
CREATE CONTEXT MyEvent_Context_Grouped PARTITION BY oddness FROM MYEVENT
CONTEXT MyEvent_Context_Grouped SELECT count from MYEVENT

Can be recreated with the attached sample code.

java.lang.NullPointerException
at com.espertech.esper.core.context.stmt.AIRegistryAggregationMultiPerm.getValue(AIRegistryAggregationMultiPerm.java:64)
at com.espertech.esper.epl.expression.ExprAggregateNodeBase.evaluate(ExprAggregateNodeBase.java:133)
at com.espertech.esper.epl.core.BindProcessor.process(BindProcessor.java:164)
at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:79)
at com.espertech.esper.epl.core.ResultSetProcessorSimple.getSelectEventsNoHaving(ResultSetProcessorSimple.java:156)
at com.espertech.esper.epl.core.ResultSetProcessorAggregateAll.processViewResult(ResultSetProcessorAggregateAll.java:138)
at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:45)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.view.window.LengthWindowView.update(LengthWindowView.java:122)
at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:58)
at com.espertech.esper.core.context.activator.ViewableActivatorFilterProxy$2.matchFound(ViewableActivatorFilterProxy.java:94)
at com.espertech.esper.core.service.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1191)
at com.espertech.esper.core.service.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:960)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:446)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:424)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)



 Comments   
Comment by Thomas Bernhardt [ 18/Jan/12 ]

Thanks for providing a test case.

Comment by John Keeney [ 18/Jan/12 - Visible by: LoggedIn ]

Wow That was quick!
Thanks!

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-638] Allow, using backlash, to escape points after reserved keyword 'as' (rather then ticks) Created: 16/Jan/12  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: Esper wishlist

Type: Improvement Priority: Trivial
Reporter: Studienprojekt Apro Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

According to chapter 2.2.1 Escape Characters it is possible to escape points in porperty names.

Unfortunately it is not possible to insert into a property which contains a point in its name.

For example:

select xxx as example\.test into Quote



 Comments   
Comment by Thomas Bernhardt [ 18/Jan/12 ]

You could however select "`example.test`"

Comment by Thomas Bernhardt [ 18/Jan/12 ]

Assigned to 5.0 release as the behavior could change in regards to where ticks are removed

Comment by Thomas Bernhardt [ 18/Jan/12 ]

Also note that property name and column name are not the same, property name syntax is much more comprehensive then the column alias identifier.





[ESPER-637] Update of Map event type not cause derived type to update its event property information Created: 16/Jan/12  Updated: 19/Jan/12  Resolved: 16/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.5.0-preview-2.jar    
Number of attachments : 1

 Description   

When a Map-type gets updated via "updateMapEventType", and a standing select such as "select *, addiitonal_field from MyMapType" exists, then the output type of that select does not reflect the additional properties added to the Map type.



 Comments   
Comment by Thomas Bernhardt [ 16/Jan/12 ]

Attached preview for 4.5 addresses this issue.

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-636] EPRuntimeImpl.getVariableValueAll() return non serializable BeanEventBean for object type variables Created: 13/Jan/12  Updated: 26/Sep/12

Status: Reopened
Project: Esper
Component/s: None
Affects Version/s: 4.4
Fix Version/s: Esper wishlist

Type: Improvement Priority: Trivial
Reporter: Andy Flury Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For object type variables the method EPRuntimeImpl.getVariableValueAll() returns objects of type BeanEventBean which are not serializable.

If you try to expose these variables through JMX you end up with a NotSerializableException.

The following code would solve this problem:

public Map<String, Object> getVariableValueAll() throws EPException
{
services.getVariableService().setLocalVersion();
Map<String, VariableReader> variables = services.getVariableService().getVariables();
Map<String, Object> values = new HashMap<String, Object>();
for (Map.Entry<String, VariableReader> entry : variables.entrySet())
{
Object value = entry.getValue().getValue();
if (value instanceof BeanEventBean)

{ value = ((BeanEventBean)value).getUnderlying(); }

values.put(entry.getValue().getVariableName(), value);
}
return values;
}



 Comments   
Comment by Andy Flury [ 13/Jan/12 ]

also, it would be nice, if the variables returned by this method would be sorted alphabetically

Comment by Thomas Bernhardt [ 13/Jan/12 ]

Variables declared as an event type get delivered as an EventBean instance

Comment by Andy Flury [ 13/Jan/12 ]

if have the following variable definition:

<variable name="engineStrategy" type="com.algoTrader.entity.Strategy"/>

Note: com.algoTrader.entity.Strategy is an arbitrary Java Class and not an event type!

When I debug into EPRuntimeImpl i see that "Object value = ..." is an object of type com.espertech.esper.event.bean.BeanEventBean

Comment by Thomas Bernhardt [ 13/Jan/12 ]

For variables that are declare as a Class the getVariableValueAll() should optimally deliver as Object and not EventBean.

Assigned to the next major release (5.0) since this would change interface behavior and may therefore break existing applications.

Comment by Andy Flury [ 13/Jan/12 ]

thanks





[ESPER-635] Property is ambiguous exception for a pattern that features multiple repeats and followed by Created: 12/Jan/12  Updated: 19/Jan/12  Resolved: 18/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Exception:
com.espertech.esper.client.EPStatementException: Property named 'A[0].intPrimitive' is ambigous as is valid for more then one stream [select * from pattern [ every [2] A=SupportBean(string='1') > [2] B=SupportBean(string='2' and intPrimitive=A[0].intPrimitive)> [2] C=SupportBean(string='3' and intPrimitive=A[0].intPrimitive)]]

To reproduce:
String epl = "select * from pattern [ every [2] A=SupportBean(string='1') " +
"-> [2] B=SupportBean(string='2' and intPrimitive=A[0].intPrimitive)" +
"-> [2] C=SupportBean(string='3' and intPrimitive=A[0].intPrimitive)]";
epService.getEPAdministrator().createEPL(epl);



 Comments   
Comment by Thomas Bernhardt [ 18/Jan/12 ]

Change in trunk

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-634] ClassCastException in pattern with unbound repeat until and interval observer Created: 11/Jan/12  Updated: 19/Jan/12  Resolved: 11/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Reproduce using the following code
<pre>
epService.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
epService.getEPRuntime().sendEvent(new CurrentTimeEvent(0));
String query="select * from pattern [every ([2:]e1=SupportBean(string='2') until timer:interval(5))->([2:]e2=SupportBean(string='3') until timer:interval(2))]";

statement = epService.getEPAdministrator().createEPL(query);
statement.addListener(listener);

epService.getEPRuntime().sendEvent(new SupportBean("2", 0));
epService.getEPRuntime().sendEvent(new SupportBean("2", 0));
epService.getEPRuntime().sendEvent(new CurrentTimeEvent(5000));

epService.getEPRuntime().sendEvent(new SupportBean("3", 0));
epService.getEPRuntime().sendEvent(new SupportBean("3", 0));
epService.getEPRuntime().sendEvent(new SupportBean("3", 0));
epService.getEPRuntime().sendEvent(new SupportBean("3", 0));
epService.getEPRuntime().sendEvent(new CurrentTimeEvent(10000));

epService.getEPRuntime().sendEvent(new SupportBean("2", 0));
epService.getEPRuntime().sendEvent(new SupportBean("2", 0));
epService.getEPRuntime().sendEvent(new CurrentTimeEvent(15000));
</pre>



 Comments   
Comment by Thomas Bernhardt [ 11/Jan/12 ]

change in trunk for 4.5 release

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-633] Undeployment not removing event type for on-merge with insert into new stream Created: 11/Jan/12  Updated: 19/Jan/12  Resolved: 11/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

To reproduce:

<pre>
epService.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
String moduleString =
"@Name('S0') create window MyWindow.std:unique(intPrimitive) as SupportBean;\n" +
"@Name('S1') on MyWindow insert into SecondStream select *;\n" +
"@Name('S2') on SecondStream merge MyWindow when matched then insert into ThirdStream select * then delete\n";
Module module = epService.getEPAdministrator().getDeploymentAdmin().parse(moduleString);
epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");
epService.getEPAdministrator().getDeploymentAdmin().undeployRemove("myid_101");

// Note the second deploy of the same module
epService.getEPAdministrator().getDeploymentAdmin().deploy(module, null, "myid_101");
</pre>

Exception: Event type named 'ThirdStream' has already been declared with differing column name or type information: Type 'ThirdStream' is not compatible



 Comments   
Comment by Thomas Bernhardt [ 11/Jan/12 ]

change in bugfix440 and trunk

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-632] No @Audit output for stream category for statement that selects from a named window via select star Created: 10/Jan/12  Updated: 19/Jan/12  Resolved: 11/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a statement selects from a named window such as "@Audit select * from MyWindow" then the @Audit does not print stream information for the named window.



 Comments   
Comment by Thomas Bernhardt [ 10/Jan/12 ]

Add a category for @Audit that produces output for insert-into. Currently the following two statements produce the same output:

@Audit insert into NewStream select * from SomeStream
@Audit select * from SomeStream

Comment by Thomas Bernhardt [ 11/Jan/12 ]

Change in enhancements450 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-631] ClassCastException with variant stream using single-column conversion to insert into named window Created: 06/Jan/12  Updated: 19/Jan/12  Resolved: 06/Jan/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.4.0-JIRA631.jar    
Number of attachments : 1

 Description   

When a named window is backed by a variant type and the insert-into uses a function to convert, the conversion does not insert a variant event bean.

To reproduce:
==============
public void testSingleColumnConversion()

{ epService.getEPAdministrator().getConfiguration().addEventType("SupportBean", SupportBean.class); epService.getEPAdministrator().getConfiguration().addEventType("SupportBeanVariantStream", SupportBeanVariantStream.class); ConfigurationVariantStream variant = new ConfigurationVariantStream(); variant.addEventTypeName("SupportBean"); variant.addEventTypeName("SupportBeanVariantStream"); epService.getEPAdministrator().getConfiguration().addVariantStream("MyVariantStream", variant); // test single-function conversion insert epService.getEPAdministrator().getConfiguration().addPlugInSingleRowFunction("convertToSupportBean", this.getClass().getName(), "convertIt"); epService.getEPAdministrator().createEPL("create window TheWindow.win:keepall() as MyVariantStream"); epService.getEPAdministrator().createEPL("insert into TheWindow select convertToSupportBean('a') from MyVariantStream"); epService.getEPRuntime().sendEvent(new SupportBean("E1", 1)); }

===========

Exception
===========
java.lang.ClassCastException: com.espertech.esper.event.bean.BeanEventBean cannot be cast to com.espertech.esper.event.vaevent.VariantEvent
at com.espertech.esper.event.vaevent.VariantPropResolutionStrategyDefault$2.get(VariantPropResolutionStrategyDefault.java:194)
at com.espertech.esper.event.WrapperEventType$2.get(WrapperEventType.java:192)
at com.espertech.esper.epl.expression.ExprIdentNodeEvaluatorImpl.evaluate(ExprIdentNodeEvaluatorImpl.java:35)
at com.espertech.esper.epl.expression.ExprEqualsNodeImpl$ExprEqualsEvaluatorEquals.evaluate(ExprEqualsNodeImpl.java:216)
at com.espertech.esper.epl.named.NamedWindowConsumerView.passFilter(NamedWindowConsumerView.java:116)
at com.espertech.esper.epl.named.NamedWindowConsumerView.update(NamedWindowConsumerView.java:71)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.processHandle(NamedWindowServiceImpl.java:453)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.processDispatches(NamedWindowServiceImpl.java:263)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:209)
at com.espertech.esper.core.service.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:776)
at com.espertech.esper.core.service.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:807)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:467)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:428)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:240)



 Comments   
Comment by Thomas Bernhardt [ 06/Jan/12 ]

change in bugfix440 branch

Comment by Thomas Bernhardt [ 08/Jan/12 ]

Cumulative full build attached fixes this issue and:
ESPER-622 NullPointerException creating a statement selecting from a filled named window that also subqueries
ESPER-623 NullPointerException in NamedWindowServiceImpl.processHandle when context-dependent and under prioritized execution
ESPER-618 Output-When not executing the "then"-part when triggered by output events
ESPER-627 Evaluation order of subquery against the same named window that triggers the evaluation
ESPER-625 Intersection between length-batch window and unique data window produces incorrect aggregation values
ESPER-613 Plug-in aggregation functions can't retain context built from validate method
ESPER-616 Allow create-schema and create-window type definition syntax to refer to event type name of POJO-event type
ESPER-619 Add a new built-In properties for "output when" that is "count_total"
ESPER-614 Allow named window name to prefix properties in on-merge update set-clause
ESPER-620 Allow "when terminated" in the output rate limiting clause to have an "and" expression
ESPER-615 DeploymentActionException when commenting-out block of statements in deployment via deployment admin
ESPER-624 ConcurrentModificationException using a subquery against a named window within the stream filter criteria
ESPER-629 Declared expression not recognized by split-stream syntax when used in second or later stream insert
ESPER-617 Insert from POJO-type event to property of named named window not validating
ESPER-621 Allow outer join with streams that don't provide properties (i.e. pattern timer)
ESPER-626 Expression Batch Window
ESPER-631 ClassCastException with variant stream using single-column conversion to insert into named window

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-630] (.NET) Incorrect behaviour of NEsper with regex Created: 04/Jan/12  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core, NEsper
Affects Version/s: 4.1
Fix Version/s: NEsper .NET 4.6

Type: Bug Priority: Major
Reporter: Oleksii Mandrychenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: runtime
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win 2008 Server R2 x64


Attachments: Zip Archive oleksii-mdr-NEsper-6e7559a.zip    
Testcase included: yes
Number of attachments : 1

 Description   

Problem
I tried both approaches of creating statements createPattern and createEPL and they are not firing a match event, however a regular expression and an input are matching by the .NET Regex class. If instead of regex ("\b\d

{1,3}.\d{1,3}

.\d

{1,3}.\d{1,3}

\b") I pass a matching value ("127.0.0.5") to the statement, the event successfully fires.

INPUT
127.0.0.5

==RULE FAIL==
every (Id123=TestDummy(Value regexp '\b\d

{1,3}\.\d{1,3}

\.\d

{1,3}\.\d{1,3}

\b'))
// and I want this to pass

==RULE PASS==
every (Id123=TestDummy(Value regexp '127.0.0.5'))

Code to reproduce
https://github.com/oleksii-mdr/NEsper

Asked on stackoverflow as well
http://stackoverflow.com/questions/8728002/nesper-issue-with-regexp

Zipped source code attached



 Comments   
Comment by Oleksii Mandrychenko [ 12/Jan/12 ]

I was debugging this issue for some time now and found that NEsper incorrectly handles WHERE regexp '' statement. So if I have
SELECT *
FROM MyType
WHERE PropertyA regexp 'some valid regexp'

Then NEsper does some string formatting and validation with 'some valid regexp' and removes some important (and valid) symbols from regexp.

Proposed changes. (I don't really know the code but I tried to fix this small issue for me, this is not necessarily the best approach):

-------
1. com.espertech.esper.epl.expression.ExprRegexpNode

public object Evaluate(EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext)

{...}
Two occurances of
_pattern = new Regex(String.Format("^{0}$", patternText));
change to
_pattern = new Regex(patternText);

Reason: I think it is up to the user how regexp is constructed, this shall not be part of a framework.

-------
2. com.espertech.esper.epl.parse.ASTConstantHelper

public static Object Parse(ITree node){...}

From
case EsperEPL2GrammarParser.STRING_TYPE:

{ return StringValue.ParseString(node.Text, requireUnescape); }

To
case EsperEPL2GrammarParser.STRING_TYPE:
{
bool requireUnescape = true;

if (node.Parent != null)
{
if (!String.IsNullOrEmpty(node.Parent.Text))
{
if (node.Parent.Text == "regexp")

{ requireUnescape = false; }

}
}

return StringValue.ParseString(node.Text, requireUnescape);
}

Reason: requireUnescape for all strings, but skip regexp as this brakes valid regexp and removes some valid symbols from it.

-------
3. com.espertech.esper.type.StringValue

public static String ParseString(String value)

{...}

From
public static String ParseString(String value)
{
if ((value.StartsWith("\"")) & (value.EndsWith("\"")) || (value.StartsWith("'")) & (value.EndsWith("'")))
{
if (value.Length > 1)
{
if (value.IndexOf('
') != -1)

{ return Unescape(value.Substring(1, value.Length - 2)); }

return value.Substring(1, value.Length - 2);
}
}

throw new ArgumentException("String value of '" + value + "' cannot be parsed");
}

To
public static String ParseString(String value, bool requireUnescape = true)
{
if ((value.StartsWith("\"")) & (value.EndsWith("\"")) || (value.StartsWith("'")) & (value.EndsWith("'")))
{
if (value.Length > 1)
{
if (requireUnescape)
{
if (value.IndexOf('
') != -1)

{ return Unescape(value.Substring(1, value.Length - 2)); }

}

return value.Substring(1, value.Length - 2);
}
}

throw new ArgumentException("String value of '" + value + "' cannot be parsed");
}

Reason: unescape all strings, but the regexp value.





[ESPER-629] Declared expression not recognized by split-stream syntax when used in second or later stream insert Created: 27/Dec/11  Updated: 19/Jan/12  Resolved: 28/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a split-stream syntax (http://esper.codehaus.org/esper-4.4.0/doc/reference/en/html_single/index.html#split_overview)
refers to expression that is declared earlier, the expression is not recognized.

Sample code:
=============
EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
engine.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);

String epl =
"expression myLittleExpression

{ event => true }" +
"on SupportBean as myEvent " +
" insert into ABC select * where myLittleExpression(myEvent)" +
" insert into DEF select * where not myLittleExpression(myEvent);";

engine.getEPAdministrator().getDeploymentAdmin().parseDeploy(epl);
=========



Exception
=========
om.espertech.esper.client.deploy.DeploymentActionException: Deployment failed in expression 'expression myLittleExpression { event => true }

o...(197 chars)' : Error validating expression: Unknown single-row function, aggregation function or mapped or indexed property named 'myLittleExpression' could not be resolved [expression myLittleExpression

{ event => true }
on SupportBean as myEvent insert into ABC select * where myLittleExpression(myEvent) insert into DEF select * where not myLittleExpression(myEvent)]
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.buildException(EPDeploymentAdminImpl.java:260)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:221)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deploy(EPDeploymentAdminImpl.java:105)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployQuick(EPDeploymentAdminImpl.java:597)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.parseDeploy(EPDeploymentAdminImpl.java:542)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.parseDeploy(EPDeploymentAdminImpl.java:536)
at ExpressionTest.testExpression(ExpressionTest.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: com.espertech.esper.client.deploy.DeploymentItemException: Error validating expression: Unknown single-row function, aggregation function or mapped or indexed property named 'myLittleExpression' could not be resolved [expression myLittleExpression { event => true }

on SupportBean as myEvent insert into ABC select * where myLittleExpression(myEvent) insert into DEF select * where not myLittleExpression(myEvent)]
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:197)
... 26 more
Caused by: com.espertech.esper.client.EPStatementException: Error validating expression: Unknown single-row function, aggregation function or mapped or indexed property named 'myLittleExpression' could not be resolved [expression myLittleExpression

{ event => true }

on SupportBean as myEvent insert into ABC select * where myLittleExpression(myEvent) insert into DEF select * where not myLittleExpression(myEvent)]
at com.espertech.esper.core.start.EPStatementStartMethodHelperValidate.validateNodes(EPStatementStartMethodHelperValidate.java:98)
at com.espertech.esper.core.start.EPStatementStartMethodOnTrigger.startInternal(EPStatementStartMethodOnTrigger.java:287)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:59)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:536)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:506)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:124)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:108)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:57)
at com.espertech.esper.core.deploy.EPDeploymentAdminImpl.deployInternal(EPDeploymentAdminImpl.java:170)
... 26 more
Caused by: com.espertech.esper.epl.expression.ExprValidationException: Unknown single-row function, aggregation function or mapped or indexed property named 'myLittleExpression' could not be resolved
at com.espertech.esper.epl.expression.ExprDotNode.validate(ExprDotNode.java:121)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:82)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtreeInternal(ExprNodeUtility.java:76)
at com.espertech.esper.epl.expression.ExprNodeUtility.getValidatedSubtree(ExprNodeUtility.java:60)
at com.espertech.esper.core.start.EPStatementStartMethodHelperValidate.validateNodes(EPStatementStartMethodHelperValidate.java:81)
... 34 more



 Comments   
Comment by Thomas Bernhardt [ 28/Dec/11 ]

change in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-628] outofmemory problem Created: 26/Dec/11  Updated: 27/Dec/11  Resolved: 27/Dec/11

Status: Closed
Project: Esper
Component/s: Core, Performance
Affects Version/s: 4.2, 4.4
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: jeff Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux2.6.18
JDK1.6.0.29
-Xmx1024M


Attachments: Java Source File EsperTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

I run a simple Esper test and get a OutofMemory error. (An internal error has occurred. Java heap space)
Can someone tell me what is wrong with my code?The test code is attached.
Any help is appreciated.



 Comments   
Comment by Thomas Bernhardt [ 27/Dec/11 ]

Nonsensible pattern, 2M instance of state machines

Comment by jeff [ 27/Dec/11 ]

Thank Thomas.
I'm new to Esper,I think Time Windows and Length Windows should work, but they seem not?
The codes is attached and like following:
"FROM PATTERN[every(filter_1= EventObject) where timer:withinmax(60 sec,300)].win:time(60 sec).win:length(300)
"





[ESPER-627] Evaluation order of subquery against the same named window that triggers the evaluation Created: 19/Dec/11  Updated: 19/Jan/12  Resolved: 19/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The problem appears to be introduced by version 4.4 and was not found in version 4.3 and lower.

Sample statements:
create window MyWindow.win:length(1) as (mycount long);
insert into MyWindow select 1L as mycount from SupportBean;
create variable long myvar = 0;
@Name('assign') on MyWindow set myvar = (select mycount from MyWindow);

The problem occurs when a subquery evaluates against the same named window that triggers the statement evaluation.

The 'assign' statement subquery assigns a null for the 1st event, however should assign a value of "1".



 Comments   
Comment by Thomas Bernhardt [ 19/Dec/11 ]

bug fix in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-626] Expression Batch Window Created: 19/Dec/11  Updated: 19/Jan/12  Resolved: 06/Jan/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: New Feature Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Expression Batch Window (i.e. win:expr_batch) similar to the win:expr window.

The Expression Batch Window would buffer events until the defined expression returns true.

This window could for example be used to create constant volume bars:

select max(price) as high, min(price) as low, first(price) as open, last(price) as close from StockTickEvent.win:expr_batch(sum(volume) > 1000)



 Comments   
Comment by Thomas Bernhardt [ 04/Jan/12 ]

Scheduled for 5.0 version; This functionality can be addressed by other means.

Comment by Andy Flury [ 05/Jan/12 ]

could you please elaborate on how this can be done by other means?

Comment by Thomas Bernhardt [ 05/Jan/12 ]

With version 4.5 upcoming there is the new feature where context can be started and ended(terminated).

Such as:

create context MyCtx start StockTickEvent end TerminateStockTick

select max(price) as high, min(price) as low, first(price) as open, last(price) as close from StockTickEvent output snapshot when terminated

insert into TerminateStockTick select true from StockTickEvent having sum(volume) > 1000

Comment by Thomas Bernhardt [ 05/Jan/12 ]

Lets see if we can have this in 4.5, more convoluted to express with contexts.

Comment by Thomas Bernhardt [ 06/Jan/12 ]

changes in enhancements450 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-625] Intersection between length-batch window and unique data window produces incorrect aggregation values Created: 14/Dec/11  Updated: 19/Jan/12  Resolved: 28/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestUniqueAndLengthBatchAggregation.java    
Number of attachments : 1

 Description   

Example EPL statement:
select *, count(amount), sum(amount) from Withdrawal.std:unique(account).win:length_batch(3)

The above statement produces a count of minus 1 eventually. Test case attached.



 Comments   
Comment by Thomas Bernhardt [ 02/Jan/12 ]

Changes in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-624] ConcurrentModificationException using a subquery against a named window within the stream filter criteria Created: 12/Dec/11  Updated: 19/Jan/12  Resolved: 13/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.4.0-JIRA624-upd1.jar     Java Source File TestMTStmtFilterSubquery.java    
Number of attachments : 2

 Description   

A ConcurrentModificationException can be thrown by the engine when it evaluates a subquery that queries a named window and that lives within the filter criteria

For example:
create window MyWindow.win:keepall() as EventOne
insert into MyWindow select * from EventOne
select * from SupportBean(not exists (select * from MyWindow mw where mw.p00 = 'E')

Workaround: move subquery to where-clause



 Comments   
Comment by Thomas Bernhardt [ 12/Dec/11 ]

Second workaround: specify @Hint('enable_window_subquery_indexshare')
i.e.
@Hint('enable_window_subquery_indexshare') create window MyWindow.win:keepall() as SupportBean_S0

Comment by Thomas Bernhardt [ 13/Dec/11 ]

bug fix in branch bugfix440

Comment by Thomas Bernhardt [ 17/Dec/11 ]

Full build attached for this issue and cumulative for following issues:
ESPER-623 NullPointerException in NamedWindowServiceImpl.processHandle when context-dependent and under prioritized execution
ESPER-618 Output-When not executing the "then"-part when triggered by output events
ESPER-622 NullPointerException creating a statement selecting from a filled named window that also subqueries
ESPER-614 Allow named window name to prefix properties in on-merge update set-clause
ESPER-620 Allow "when terminated" in the output rate limiting clause to have an "and" expression
ESPER-619 Add a new built-In properties for "output when" that is "count_total"
ESPER-615 DeploymentActionException when commenting-out block of statements in deployment via deployment admin
ESPER-613 Plug-in aggregation functions can't retain context built from validate method
ESPER-624 ConcurrentModificationException using a subquery against a named window within the stream filter criteria

Comment by Barry Kaplan [ 17/Dec/11 ]

Any chance of getting a source jar attached as well?

Comment by Barry Kaplan [ 17/Dec/11 ]

I can confirm that this build fixes the issue from http://old.nabble.com/NPE-after-upgrade-from-4.3-to-4.4-to32878414.html

Comment by Thomas Bernhardt [ 19/Dec/11 ]

The "esper-4.4.0-JIRA614.jar" build fails to correct the same issue for patterns.
For example the pattern "SupportBean_S0 -> SupportBean(not exists (select * from MyWindow mw where mw.p00 = 'E'))"
We are attaching an updated build "esper-4.4.0-JIRA624-upd1.jar" to address the same issue for patterns.

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-623] NullPointerException in NamedWindowServiceImpl.processHandle when context-dependent and under prioritized execution Created: 01/Dec/11  Updated: 19/Jan/12  Resolved: 01/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem is known to occur only when using a context and when prioritized execution is on and when there are multiple subqueries against the named window as the sample below shows.

Exception stack
====================
com.espertech.esper.client.EPException: java.lang.RuntimeException: Unexpected exception in statement 'C': null
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:213)
at com.espertech.esper.core.service.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:772)
at com.espertech.esper.core.service.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:463)
at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:424)
at com.espertech.esper.core.service.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
at com.espertech.esper.regression.context.TestPrioritizedExec.testPriorititzedExec(TestPrioritizedExec.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.RuntimeException: Unexpected exception in statement 'C': null
at com.espertech.esper.support.client.SupportExceptionHandlerFactoryRethrow$SupportExceptionHandlerRethrow.handle(SupportExceptionHandlerFactoryRethrow.java:31)
at com.espertech.esper.core.service.ExceptionHandlingService.handleException(ExceptionHandlingService.java:55)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.processHandle(NamedWindowServiceImpl.java:460)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.processDispatches(NamedWindowServiceImpl.java:390)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:209)
... 26 more
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.named.NamedWindowServiceImpl.processHandle(NamedWindowServiceImpl.java:451)
... 28 more
====================

Code to reproduce:
====================
private EPServiceProvider epService;

public void testPriorititzedExec() throws Exception

{ Configuration configuration = SupportConfigFactory.getConfiguration(); configuration.getEngineDefaults().getExecution().setPrioritized(true); epService = EPServiceProviderManager.getDefaultProvider(configuration); epService.initialize(); epService.getEPAdministrator().getConfiguration().addEventType(Event.class); sendTimeEvent("2002-05-1T10:00:00.000"); String epl = "\n @Name('ctx') create context RuleActivityTime as start (0, 9, *, *, *) end (0, 17, *, *, *);" + "\n @Name('window') context RuleActivityTime create window EventsWindow.std:firstunique(productID) as Event;" + "\n @Name('variable') create variable boolean IsOutputTriggered_2 = false;" + "\n @Name('A') insert into EventsWindow select * from Event(not exists (select * from EventsWindow));" + "\n @Name('B') insert into EventsWindow select * from Event(not exists (select * from EventsWindow));" + "\n @Name('C') insert into EventsWindow select * from Event(not exists (select * from EventsWindow));" + "\n @Name('D') insert into EventsWindow select * from Event(not exists (select * from EventsWindow));" + "\n @Name('out') context RuleActivityTime select * from EventsWindow"; epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(epl); epService.getEPAdministrator().getStatement("out").addListener(new SupportUpdateListener()); epService.getEPRuntime().sendEvent(new Event("A1")); }

private void sendTimeEvent(String time)

{ epService.getEPRuntime().sendEvent(new CurrentTimeEvent(SupportDateTime.parseGetMSec(time))); }

public static class Event {
private final String productID;

public Event(String productId)

{ this.productID = productId; }

public String getProductID()

{ return productID; }

}
====================



 Comments   
Comment by Thomas Bernhardt [ 01/Dec/11 ]

bug fix in branch bugfix440

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-622] NullPointerException creating a statement selecting from a filled named window that also subqueries Created: 01/Dec/11  Updated: 19/Jan/12  Resolved: 07/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.5.0-preview-1.jar    
Number of attachments : 1

 Description   

When creating a statement on a named window that already has events and when that statement contains a subquery the engine raises an NPE.

Sample Code
==========
EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
engine.getEPAdministrator().getConfiguration().addEventType(SupportBean.class);
engine.getEPAdministrator().getConfiguration().addEventType(SupportBean_S0.class);

engine.getEPAdministrator().createEPL("create window ABC.win:keepall() as SupportBean");
engine.getEPAdministrator().createEPL("insert into ABC select * from SupportBean");

engine.getEPRuntime().sendEvent(new SupportBean("E1", 1));
engine.getEPRuntime().sendEvent(new SupportBean("E2", 1));

engine.getEPAdministrator().createEPL("select * from ABC where (select count from ABC) > 0");

==========

Stack Trace
==========
com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: null [select * from ABC where (select count(*) from ABC) > 0]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:562)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:506)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:124)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:108)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:57)
at TestNamedWindowStatefulInitBug.testIt(TestNamedWindowStatefulInitBug.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.expression.ExprSubselectNode.evaluateMatching(ExprSubselectNode.java:134)
at com.espertech.esper.epl.expression.ExprSubselectNode.evaluate(ExprSubselectNode.java:119)
at com.espertech.esper.epl.expression.ExprRelationalOpNodeImpl.evaluate(ExprRelationalOpNodeImpl.java:100)
at com.espertech.esper.epl.view.FilterExprView.filterEvents(FilterExprView.java:81)
at com.espertech.esper.epl.view.FilterExprView.update(FilterExprView.java:50)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.epl.named.NamedWindowConsumerView.update(NamedWindowConsumerView.java:82)
at com.espertech.esper.core.context.factory.StatementAgentInstanceFactorySelect.newContext(StatementAgentInstanceFactorySelect.java:220)
at com.espertech.esper.core.start.EPStatementStartMethodSelect.startInternal(EPStatementStartMethodSelect.java:372)
at com.espertech.esper.core.start.EPStatementStartMethodBase.start(EPStatementStartMethodBase.java:59)
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:536)
... 26 more
==========



 Comments   
Comment by Thomas Bernhardt [ 07/Dec/11 ]

bug fix in branch bugfix440

Comment by Barry Kaplan [ 17/Dec/11 ]

The build attached to issue http://jira.codehaus.org/browse/ESPER-624 fixed the problem described in http://old.nabble.com/NPE-after-upgrade-from-4.3-to-4.4-to32878414.html

Comment by Thomas Bernhardt [ 13/Jan/12 ]

The 4.5.0-preview-1 is a prerelease of version 4.5 that also corrects this issue.

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-621] Allow outer join with streams that don't provide properties (i.e. pattern timer) Created: 23/Nov/11  Updated: 19/Jan/12  Resolved: 30/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a stream that is part of an outer join does not provide properties, such as "pattern[every timer:at(45,*,*,*,*)]", the outer join doesn't have properties to join on thus the following can currently not be expressed in one statement:

select * from pattern[every timer:at(45,*,*,*,*)] as timer left outer join TABLE1 as table1 on timer.??????? = a.??????
left outer join sql:DB[ "SELECT .." ] as table2 on table1.entity = table2.entity
where table2.entity is null

Workaround: split in two statements, one that joins TABLE1 and one that joins the remaining table, via insert-into



 Comments   
Comment by Thomas Bernhardt [ 30/Dec/11 ]

change in enhancements450 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-620] Allow "when terminated" in the output rate limiting clause to have an "and" expression Created: 23/Nov/11  Updated: 19/Jan/12  Resolved: 06/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File epl_clauses.html     Java Archive File esper-4.4.0-JIRA620.jar     Java Archive File esper-4.4.0-JIRA620-upd1.jar     Java Archive File esper-4.4.0-JIRA620-upd2.jar    
Number of attachments : 4

 Description   

For example:

select * from MyEvent output when count_insert > 4 and when terminated and count_insert > 0



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/11 ]

Cumulative jar file "esper-4.4.0-JIRA620.jar" attached addresses the following issues:
ESPER-620 Allow "when terminated" in the output rate limiting clause to have an "and" expression
ESPER-619 Add a new built-In properties for "output when" that is "count_total"
ESPER-618 Output-When not executing the "then"-part when triggered by output events
ESPER-615 DeploymentActionException when commenting-out block of statements in deployment via deployment admin

Comment by Thomas Bernhardt [ 27/Nov/11 ]

The attached "esper-4.4.0-JIRA620-upd1.jar" is an update to JIRA620 (full build).
It fixes the following issue:

  • For the clause "output when false and when terminated and count_insert > 1" the built-in "count_insert" propery carries the wrong value (see @Audit)
  • Support for "output when terminated and count_insert > 1" (without additional when-clause)
Comment by Thomas Bernhardt [ 27/Nov/11 ]

The attached "esper-4.4.0-JIRA620-upd2.jar" is an update to JIRA620 (full build).
It fixes the following issue:

  • Context termination does not read updated variable values
Comment by Thomas Bernhardt [ 06/Dec/11 ]

changes in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-619] Add a new built-In properties for "output when" that is "count_total" Created: 23/Nov/11  Updated: 19/Jan/12  Resolved: 06/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

See http://esper.codehaus.org/esper-4.4.0/doc/reference/en/html_single/index.html#epl-output-expression

The "count_total" carries the total number of events.



 Comments   
Comment by Thomas Bernhardt [ 06/Dec/11 ]

Changes in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-618] Output-When not executing the "then"-part when triggered by output events Created: 21/Nov/11  Updated: 19/Jan/12  Resolved: 06/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestABC.java    
Number of attachments : 1

 Description   

When incoming events trigger an output-when condition and that output-when has a "then" part the "then" part does not execute.

To reproduce:
create variable boolean IsOutputTriggered_1 = false
select * from Event output snapshot when (count_insert > 1 and IsOutputTriggered_1 = false) then set IsOutputTriggered_1 = true;

The "then" part executes if the variable is explicitly changed and output occurs. It does not seem to execute when output is triggered by arriving events.



 Comments   
Comment by Thomas Bernhardt [ 21/Nov/11 ]

Test case attached

Comment by Thomas Bernhardt [ 06/Dec/11 ]

change in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-617] Insert from POJO-type event to property of named named window not validating Created: 11/Nov/11  Updated: 19/Jan/12  Resolved: 28/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a named window is declared to have a property that is an object of a given type, for example:
create window AllocationWindow.std:lastevent() as (tick com.mycompany.Tick)

And when the insert tries to convert the object-event to a property, such as:
insert into AllocationWindow select tick.* as tick from com.mycompany.Tick as tick

Then the second statement does not validate, the message is "Event type named 'AllocationWindow' has already been declared with differing column name or type information: Type by name 'AllocationWindow' in property 'tick' expected com.mycompany.Tick but receives event type 'com.mycompany.Tick'"



 Comments   
Comment by Thomas Bernhardt [ 28/Dec/11 ]

changes in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-616] Allow create-schema and create-window type definition syntax to refer to event type name of POJO-event type Created: 10/Nov/11  Updated: 19/Jan/12  Resolved: 30/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently the following is not supported:
config.addEventType("Tick", Tick.class);
create schema ABC as (tick Tick) // Tick is not a Map-type event type, currently only Map-type event types are supported for listening by type name

The following is fine:
create schema ABC as (tick com.maycompany.Tick) // Fully-qualified class name is fine

The same for create-window syntax.

Also, can auto-import be considered, for example:
config.addImport(TestABC.class); // With Tick being an inner class of TestABC

Workaround: as above, use fully-qualified class name



 Comments   
Comment by Thomas Bernhardt [ 11/Nov/11 ]

There is a difference between these two:
1)create window AllocationWindow.std:lastevent() as (tick com.mycompany.Tick)
2)create window AllocationWindow.std:lastevent() as com.mycompany.Tick

1) creates a window backed by a Map-type that has a single property "tick" of type "Tick"
2) creates a window backed by a Tick class

Comment by Thomas Bernhardt [ 30/Dec/11 ]

change in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-615] DeploymentActionException when commenting-out block of statements in deployment via deployment admin Created: 09/Nov/11  Updated: 19/Jan/12  Resolved: 09/Nov/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem can be reproduced as follows:
Module module = deployAdmin.parse("/* abc */");
deployAdmin.deploy(module, new DeploymentOptions());

Above throws an exception: DeploymentActionException: Compilation failed in expression '/* abc /' : Unexpected end of input near '/ abc */' [/* abc */]

This occurs when a EPL block consists of comments only and no other (or further) statement in in the same module.



 Comments   
Comment by Thomas Bernhardt [ 09/Nov/11 ]

Bug fix in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-614] Allow named window name to prefix properties in on-merge update set-clause Created: 09/Nov/11  Updated: 19/Jan/12  Resolved: 08/Dec/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example that returns "Property 'B.previousState' is not available for write access:"
On A
merge B
where A.id = B.id
when matched and (A.state != B.state)
then update set B.previousState = B.state
then insert select A.id as id, A.state as state

Example that is fine:
On A
merge B
where A.id = B.id
when matched and (A.state != B.state)
then update set previousState = B.state
then insert select A.id as id, A.state as state



 Comments   
Comment by Thomas Bernhardt [ 08/Dec/11 ]

change in bugfix440 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-613] Plug-in aggregation functions can't retain context built from validate method Created: 31/Oct/11  Updated: 19/Jan/12  Resolved: 01/Nov/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.4
Fix Version/s: 4.5

Type: Bug Priority: Minor
Reporter: Andy Flury Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File extension_release_4.5_proposed.html    
Number of attachments : 1

 Description   

In 4.3.0 there was a method newAggregator that could be overridden inside com.espertech.esper.epl.agg.AggregationSupport. This method was used to "Make a new, initalized aggregation state." (it was not documented, text is from javadocs).

In 4.3.0 it was possible to "initialize" the Aggregation Function in the validate method (which has access to the AggregationValidationContext). Then the overridden newAggregator method was able to deliver new "copies" of the function.

In 4.4.0 this method has disappeared.

In 4.4.0 validate is called on one instance of the Aggregation Function during statement validation. Then during the actual event processing new instances are created internally. Problem with this is, that there is no way of passing information gathered from the validate method (from the AggregationValidationContext) to the actual processing.

For this reason, it would probably make sense to restore the old (4.3.0) version of AggregationSupport with the method newAggregator added back to it.

A potential fix (to be verified) to the internal functionality would be to replace line 47 of ExprPlugInAggFunctionNodeFactory with:
AggregationMethod method = aggregationSupport.newAggregator(methodResolutionService);



 Comments   
Comment by Thomas Bernhardt [ 31/Oct/11 ]

This bug is introduced as version 4.4 refactored aggregate state to allow support for context partitions.

The suggested potential fix (line 47 of ExprPlugInAggFunctionNodeFactory) would not compile as "newAggregator" is not an method of AggregationSupport or AggregationMethod interface.

Comment by Thomas Bernhardt [ 31/Oct/11 ]

We are deprecating AggregationSupport for the next release.

The new extension interface that the next version introduces is "AggregationFunctionFactory". The updated chapter of etension doc is attached.

The code change has been checked into "enhancements450" branch.

Comment by Thomas Bernhardt [ 01/Nov/11 ]

Change in enhancements450 branch

Comment by Thomas Bernhardt [ 19/Jan/12 ]

released as 4.5.0





[ESPER-612] Add capability for the DeploymentAdmin (manage Modules) to manage modules by user provided name and not by auto generated deployment id Created: 23/Oct/11  Updated: 24/Oct/11  Resolved: 23/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Improvement Priority: Major
Reporter: Jonathan Hasson Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Number of attachments : 0

 Description   

Currently the interface EPDeploymentAdmin supports managing modules by a deployment id which is auto-generated by Esper engine. This limits the client to using the module in one session (unless developing a persistency mechanism for the deployment ids).
I'm using Esper not as an embedded engine, but on a different server than the client applicatin. It is necessary to have the ability to use the module name as the unique managing key instead of the deployment id, since the module name is something the client decides on and have the logic to create it at all times.

For example: remove(moduleName) instead of remove(deploymentId)



 Comments   
Comment by Thomas Bernhardt [ 23/Oct/11 ]

for release 4.4





[ESPER-611] ExprValidationException when create from statement object model with SQL join using variable Created: 21/Oct/11  Updated: 24/Oct/11  Resolved: 22/Oct/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: charlie arnold Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Before I decided this was a bug, I asked about it on the email list (http://markmail.org/thread/2weiy4zrlsxcrtfl). The issue is this:

Testing out the example statements for polling from a database in the docs (http://esper.codehaus.org/esperio-4.3.0/doc/reference/en/html/adapter_db.html), with both 4.2.0 and 4.3.0 (I didn't test any other versions) I got an error

/* -------------------- */
@Name('Create a variable to hold the last poll timestamp')
create variable long VarLastTimestamp = 0

/* -------------------- */
@Name('Poll every 5 seconds')
insert into PollStream
select qry.* from pattern[every timer:interval(5 sec)],
sql:flyq['
select UNIX_TIMESTAMP(timestamp) as ts
from MyTable
where UNIX_TIMESTAMP(timestamp) > $

{VarLastTimestamp}'] qry
/* Error:
Error starting statement: Internal error find expression for historical stream parameter 0 stream 1 [@Name('Poll every 5 seconds') insert into PollStream select qry.* from pattern [every timer:interval(5 seconds)], sql:flyq["
select UNIX_TIMESTAMP(timestamp) as ts
from MyTable
where UNIX_TIMESTAMP(timestamp) > ${VarLastTimestamp}

"] as qry]
*/

/* -------------------- */
@Name('Assign last value to variable')
on PollStream set VarLastTimestamp = ts
/* Error:
Failed to resolve event type: Event type or class named 'PollStream' was not found [@Name('Assign last value to variable') on PollStream set VarLastTimestamp = ts]
*/

The stacktrace I get is:
13:39:19,153 DEBUG [PersistentEplStatment] Error starting statement: Internal error find expression for historical stream parameter 0 stream 1 [@Name('Poll every 5 seconds') insert into PollStream select qry.* from pattern [every timer:interval(5 seconds)], sql:flyq["
select UNIX_TIMESTAMP(timestamp) as ts
from MyTable
where UNIX_TIMESTAMP(timestamp) > $

{VarLastTimestamp}"] as qry]
com.espertech.esper.client.EPStatementException: Error starting statement: Internal error find expression for historical stream parameter 0 stream 1 [@Name('Poll every 5 seconds') insert into PollStream select qry.* from pattern [every timer:interval(5 seconds)], sql:flyq["
select UNIX_TIMESTAMP(timestamp) as ts
from MyTable
where UNIX_TIMESTAMP(timestamp) > ${VarLastTimestamp}

"] as qry]
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:585)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:543)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:162)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:117)
at com.espertech.esper.core.EPAdministratorImpl.create(EPAdministratorImpl.java:126)
at com.espertech.esper.core.EPAdministratorImpl.create(EPAdministratorImpl.java:105)
... out of esper
Caused by: com.espertech.esper.epl.expression.ExprValidationException: Internal error find expression for historical stream parameter 0 stream 1
at com.espertech.esper.epl.db.DatabasePollingViewable.validate(DatabasePollingViewable.java:116)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:1127)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:144)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:573)
... 32 more

With a little guesswork I was able to work around the issue by swapping the order of the event streams in the "from" clause:

/* -------------------- */
@Name('Create a variable to hold the last poll timestamp')
create variable long VarLastTimestamp = 0

/* -------------------- */
@Name('Poll every 5 seconds')
insert into PollStream
select qry.* from sql:flyq['
select UNIX_TIMESTAMP(timestamp) as ts
from MyTable
where UNIX_TIMESTAMP(timestamp) > $

{VarLastTimestamp}

'] qry,
pattern[every timer:interval(5 sec)]

/* -------------------- */
@Name('Assign last value to variable')
on PollStream set VarLastTimestamp = ts

/* -------------------- */
@Name('print pollstream')
insert into Unmatched
select * from PollStream

/* End of Statements */

This works and I get the output I expect (i.e., my UnmatchedListener prints the statements I expect to see).

I would be glad to submit any other info that may be helpful ..



 Comments   
Comment by Thomas Bernhardt [ 22/Oct/11 ]

workarounds are to use EPL text to create the statement or switch streams in from-clause





[ESPER-610] IllegalStateException for prepared statement with "select * from pattern[[?] Event]" Created: 17/Oct/11  Updated: 24/Oct/11  Resolved: 17/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If we specify a substitution parameter for the Repeat [match_count] we get a:

java.lang.IllegalStateException: Index '1' already found in collection

Example:

select * from pattern[[?] A]

However it does seem that the match_count does allow expressions. The following will work:

select * from pattern[[1+1] A]

We have a use case, where we would like a statement to notify us, when a specified number of Orders have completed successfully. Since the number of Orders depend an arbitrary user input, it would be nice to be able to use prepared statements here. As a work around we are currently using a variable instead.






[ESPER-609] Distinct causing null pointer exception on time batch query Created: 16/Oct/11  Updated: 24/Oct/11  Resolved: 17/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Major
Reporter: Giltal Tzabar Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: exception
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File SecurityQuotesOneSecondTimeBatch.epl    
Number of attachments : 1

 Description   

I wrote the attached query in-order to batch securities tick events into one second events.

When i used the query and sent in the tests two events under one second
the result was two new event-beans that are identical.

When i used the 'group by symbol' clause in my query and sent in the tests two events under one second
the result was two new event-beans when one of them got all the calculations and the other holds null values.

When i used the 'group by symbol' clause and the 'DISTINCT' word in my query and sent in the tests two events under one second the result was two new event-beans when one of them got all the calculations and the other holds null values.

When i used the 'DISTINCT' word in my query (without 'GROUP BY') and sent in the tests two events under one second
the result was two new event-beans when one of them got all the calculations and the other holds null values.
I got the following exception:

java.lang.NullPointerException
at com.espertech.esper.epl.view.OutputProcessViewDistinctOrAfter.update(OutputProcessViewDistinctOrAfter.java:82)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.view.window.TimeBatchView.sendBatch(TimeBatchView.java:212)
at com.espertech.esper.view.window.TimeBatchView$1.scheduledTrigger(TimeBatchView.java:267)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:1048)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:646)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:594)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:502)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:399)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:226)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:200)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)






[ESPER-608] Prepared statement referring to variable that is a class (nested property syntax) not working Created: 13/Oct/11  Updated: 24/Oct/11  Resolved: 13/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following exception occurs:
Subscriber method named 'update' for parameter number 1 is not assignable, expecting type 'A' but found type 'String'

Sample to reproduce:

package com.algoTrader.test;

import java.io.Serializable;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPPreparedStatement;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;

public class EsperPreparedStatementTest {

public static void main(String[] args) throws InterruptedException {

Configuration config = new Configuration();
config.addVariable("var_a", A.class, new A());
config.addEventType(B.class);

EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config);

EPPreparedStatement prepared = epService.getEPAdministrator().prepareEPL("select var_a.value from B");

EPStatement statement = epService.getEPAdministrator().create(prepared);

statement.setSubscriber(new Object() {
public void update(String value)

{ System.out.println(value); }

});

epService.getEPRuntime().sendEvent(new B());

epService.destroy();
}

public static class A implements Serializable {

public static String getValue()

{ return ""; }

}

public static class B {
}
}



 Comments   
Comment by Thomas Bernhardt [ 13/Oct/11 ]

change in branch bugfix430





[ESPER-607] Allow wildcard in stat:uni view Created: 10/Oct/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is there a way to get the entire POJO event in the resultset instead of having to pass each event property seperatly into the stat:uni view? For example, the query below uses the stat:uni view as documented in section 11.3.1.

select * from TransactionEvent
.std:groupwin(TransactionEvent.cardnumber)
.win:length(20)\
.stat:uni(TransactionEvent.amount, TransactionEvent.amount, TransactionEvent.cardnumber, TransactionEvent.cardholder, ...) \
where TransactionEvent.amount > (prior(1, average) * 3)

Instead, I would like to be able to specify the following query and have the entire POJO event available in the result set.

select * from TransactionEvent
.std:groupwin(TransactionEvent.cardnumber)
.win:length(20)\
.stat:uni(TransactionEvent.amount) \
where TransactionEvent.amount > (prior(1, average) * 3)

Note: I am using the stat:uni view instead of the average aggregation function with 'group by' because I could not figure out how to group the length window as discussed in the last example of section 4.6.5.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Changes in enhacements440 branch





[ESPER-606] Memory leak if creating a large numbers of different event types and using "remove" operation in runtime configuration operations Created: 05/Oct/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When calling "getEPAdministrator().getConfiguration().removeEventType(String)" the event type does not get removed from filters.

==============

I am working on an application based on esper that creates and destroys thousands of statements.
After running some time it seems that not all resources are released and I would like to ask if anyone encountered this issue.

In just a few words:
1) an 'insert into" statement is created
2) a "select" statement is created to work on the stream created in step 1
3) call EPServiceProvider#getEPAdministrator().getStatement(String).destroy() for statement created in step 1
4) call EPServiceProvider#getEPAdministrator().getStatement(String).destroy() for statement created in step 2
5) call EPServiceProvider#getEPAdministrator().getConfiguration().removeEventType(String)

After debug sessions and dumping heaps during application execution it seems that property eventTypes of com.espertech.esper.filter.EventTypeIndex does not releases 'some' objects.
During debug session:
1) found entry is added to above mentioned data structure on step 2, and,
2) there was no call to EventTypeIndex#removeType(EventType) (neither on destroying statements or after, no call for the duration of the test)
3) when run in iteration (repeating steps 1-5) using same esper runtime instance, on step 2 eventTypes shows data added from previous iterations

Also heap dumps show the same findings, objects hold in eventTypes.

By running in debug mode with esper source code in step 2 there is a call to
EventTypeIndex#add(EventType,FilterHandleSetNode)
eventTypes.put(eventType, rootNode);

A simple project to replicate above findings:

structure:
pom.xml
src/main/java/org/test/domain/StreamEvent.java
src/main/java/org/test/EventTypeIndexTest.java
src/main/java/org/test/util/HeapDumper.java
src/main/resources/log4j.properties

========== pom.xml ==========
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>eti-test</artifactId>
<version>1.0-SNAPSHOT</version>
<name>eti-test</name>

<properties>
<esper.version>4.3.0</esper.version>
</properties>

<dependencies>
<dependency>
<groupId>com.espertech</groupId>
<artifactId>esper</artifactId>
<version>$

{esper.version}

</version>
</dependency>
</dependencies>

</project>

========== EventTypeIndexTest ==========

package org.test;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.test.util.HeapDumper;

import com.espertech.esper.client.EPAdministrator;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;

public class EventTypeIndexTest {

private static final Log LOG = LogFactory.getLog(EventTypeIndexTest.class);

private String INSERT_QUERY = "insert into Stream_id_key select * from org.test.domain.StreamEvent(id=id_key)";
private String SELECT_QUERY = "select * from Stream_id_key.win:length(2)";

private int numberOfStatements = 1;
private int numberOfIterations = 5;

public static void main(String[] a) {

try

{ new EventTypeIndexTest().runTest(); }

catch (Exception e)

{ e.printStackTrace(); }

}

public void runTest() throws Exception {

EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider();
EPAdministrator admin = epService.getEPAdministrator();

for(int iteration = 1;iteration < numberOfIterations;iteration++) {

for(int k =1000000*iteration ; k < 1000000*iteration + numberOfStatements; k++)

{ admin.createEPL(INSERT_QUERY.replaceAll("id_key", Integer.toString(k)), "insert_"+Integer.toString(k)); admin.createEPL(SELECT_QUERY.replaceAll("id_key", Integer.toString(k)), "select_"+Integer.toString(k)); }

LOG.info("Number of statements in esper = " + epService.getEPAdministrator().getStatementNames().length);
LOG.info("Number of event types in esper = " + epService.getEPAdministrator().getConfiguration().getEventTypes().length);

LOG.info("Destroy statements & remove event types");

for(int k =1000000*iteration ; k < 1000000*iteration + numberOfStatements; k++)

{ epService.getEPAdministrator().getStatement("insert_"+Integer.toString(k)).destroy(); epService.getEPAdministrator().getStatement("select_"+Integer.toString(k)).destroy(); }

LOG.info("Number of statements in esper after destroy = " + epService.getEPAdministrator().getStatementNames().length);

for(int k =1000000*iteration ; k < 1000000*iteration + numberOfStatements; k++)

{ epService.getEPAdministrator().getConfiguration().removeEventType("Stream_"+Integer.toString(k), true); }

LOG.info("Number of event types in esper after remove = " + epService.getEPAdministrator().getConfiguration().getEventTypes().length);

/*System.gc();
Thread.sleep(5000);*/
HeapDumper.main(new String[]

{"et-test_heap_dump-"+iteration, "true"}

);

LOG.info("=== END ITERATION " + iteration + " ===");
}
}

}

========== StreamEvent ==========
package org.test.domain;

public class StreamEvent {

private int id;

public StreamEvent(int id)

{ this.id = id; }

public int getId()

{ return id; }

public String toString()

{ return new StringBuilder(this.getClass().getSimpleName()) .append(" [ id = ").append(this.getId()) .append("]").toString(); }

}

========== HeapDumper ==========
package org.test.util;

import javax.management.MBeanServer;
import java.lang.management.ManagementFactory;
import com.sun.management.HotSpotDiagnosticMXBean;

/**

// field to store the hotspot diagnostic MBean
private static volatile HotSpotDiagnosticMXBean hotspotMBean;

static void dumpHeap(String fileName, boolean live) {
// initialize hotspot diagnostic MBean
initHotspotMBean();
try

{ hotspotMBean.dumpHeap(fileName, live); }

catch (Exception re)

{ re.printStackTrace(); }

}

// initialize the hotspot diagnostic MBean field
private static void initHotspotMBean() {
if (hotspotMBean == null) {
synchronized (HeapDumper.class) {
if (hotspotMBean == null)

{ hotspotMBean = getHotspotMBean(); }

}
}
}

// get the hotspot diagnostic MBean from the
// platform MBean server
private static HotSpotDiagnosticMXBean getHotspotMBean() {
try

{ MBeanServer server = ManagementFactory.getPlatformMBeanServer(); HotSpotDiagnosticMXBean bean = ManagementFactory.newPlatformMXBeanProxy(server, HOTSPOT_BEAN_NAME, HotSpotDiagnosticMXBean.class); return bean; }

catch (RuntimeException re)

{ throw re; }

catch (Exception exp)

{ throw new RuntimeException(exp); }

}

public static void main(String[] args) {
// default heap dump file name
String fileName = "heap.bin";
// by default dump only the live objects
boolean live = true;

// simple command line options
switch (args.length)

{ case 2: live = args[1].equals("true"); case 1: fileName = args[0]+".hprof"; }

// dump the heap
dumpHeap(fileName, live);
}
}



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Change in bugfix430 branch





[ESPER-605] Allow empty selection list Created: 30/Sep/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Allowing an empty select clause and allowing subscribers that have an update method without any parameters makes sense for certain Spring-injected subscribers.

For example:

select void from ...
or
select from ....



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Changes in bugfix430 branch





[ESPER-604] epl_clauses.xml documentation patch Created: 23/Sep/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: charlie arnold Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File diff    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

There are some cases where the documentation doesn't seem to be correct; here's a small patch of what seems wrong.






[ESPER-603] NPE in match-recognize when reg-ex pattern event is optional and doesn't have a definition Created: 13/Sep/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem occurs when in match-recognize an event is optional, i.e. "A?", and does not have a definition.
Workaround is to add a definition.

To reproduce (B is optional):

Configuration config = SupportConfigFactory.getConfiguration();
config.addEventType("A", Collections.<String, Object>singletonMap("id", String.class));

EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config);
epService.initialize();

String epl = "select * from A\n" +
"match_recognize (\n" +
"measures A.id as id, B.id as b_id\n" +
"pattern (A B?)\n" +
"define\n" +
" A as typeof(A) = \"A\"\n" +
")";

EPStatement stmt = epService.getEPAdministrator().createEPL(epl);






[ESPER-602] Reduce memory use when large number of threads send events - ThreadLocal use Created: 12/Sep/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For patterns an instance of ExprNodeAdapter uses a non-static ThreadLocal, when the number of threads is large this could use more memory then necessary as a small array of events is retained. Can be made a static ThreadLocal.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Part of refactoring done for 4.4 release in enhancements440 branch





[ESPER-601] Deadlock when an UnmatchedListener creates a new statement Created: 01/Sep/11  Updated: 11/Feb/12  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The deadlock occurs an UnmatchedListener is provided and the UnmatchedListener implementation attempts to create a new statement.

Workaround: add new statement to queue and let another thread create the new statement.

Sample code to reproduce:

<pre>
public class TestItUnmatchCreateStmt extends TestCase {

public void testIt()

{ EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); engine.getEPAdministrator().getConfiguration().addEventType(MyEvent.class); MyUnmatchedListener listener = new MyUnmatchedListener(engine); engine.getEPRuntime().setUnmatchedListener(listener); engine.getEPRuntime().sendEvent(new MyEvent()); }

private static class MyEvent {
}

private static class MyUnmatchedListener implements UnmatchedListener {

private final EPServiceProvider engine;

private MyUnmatchedListener(EPServiceProvider engine)

{ this.engine = engine; }

public void update(EventBean event)

{ engine.getEPAdministrator().createEPL("select * from MyEvent"); }

}
}
</pre>



 Comments   
Comment by uttkrant [ 11/Feb/12 ]

This issue still occurs quite erratically in Esper 4.4.0. The deadlock occurs not only due to unmatched listener, it also appears when any listener creates a pattern on receiving update event.

Esper has been configured with inbound and outbound threadpools of size 10. On receiving an event, the outbound thread calls the listener which in turn creates a new pattern. This gets stuck due to deadlock

Below is the jstack log for this, which should point to the issue. The issue appears to be that ManagedReadWriteLock is trying to writelock where readlock is already acquired by inbound threads

"com.espertech.esper.Outbound-MGZ-8" daemon prio=10 tid=0x5f65d000 nid=0x1bf3 waiting on condition [0x5e583000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
    at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireWriteLock(ManagedReadWriteLock.java:74)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:261)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createStoppedAssignName(StatementLifecycleSvcImpl.java:169)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:123)
  • locked <0x7699b628> (a com.espertech.esper.core.service.StatementLifecycleSvcImpl)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:102)
    at com.espertech.esper.core.service.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:62)

"com.espertech.esper.Inbound-MGZ-0" daemon prio=10 tid=0x61ae9800 nid=0x1be1 waiting on condition [0x6296b000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x7699ad10> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:941)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1261)
    at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)
    at com.espertech.esper.util.ManagedReadWriteLock.acquireReadLock(ManagedReadWriteLock.java:140)
    at com.espertech.esper.core.service.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:591)
    at com.espertech.esper.core.service.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:512)
    at com.espertech.esper.core.service.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:409)
    at com.espertech.esper.core.thread.InboundUnitSendEvent.run(InboundUnitSendEvent.java:42)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)




[ESPER-600] Memory leak with "group by", "order by" and a lot of different group by keys Created: 29/Aug/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Samuel Benz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I use Esper for real time statistics of a socket server. Unfortunately, after some days, my server runs in a OutOfMemory-Exception.

The memory leak is caused by the "newGenerators" Map in the ResultSetProcessorRowPerGroup class. More detailed, the map is filled up by three methods in the "isSorted" code path. But as I can see, the map is never read or cleand.

The problem is triggered only when you will use a "group by" statement with an "order by" while you have a lot of different group by keys (eg. srcIP-dstIP pairs).

For me, this seems to be a bug.

By the way, comment out the different map.put() did not affect the "order by" functionality.



 Comments   
Comment by Thomas Bernhardt [ 29/Aug/11 ]

Did you read http://esper.codehaus.org/esper-4.3.0/doc/reference/en/html_single/index.html#epl-grouping-group-by
and the hint described therein?
There is also a reference in the performance section on hints.

Comment by Samuel Benz [ 29/Aug/11 ]

Yes I read it already. I use the group-by with a time_batch window. All events are cleaned correctly after the time_batch timed out. So I have enough memory to hold all events during the time window.
However, the described map holds one event instance for every group key observed (srcIP/dstIP); not only the ones during the time window. This is the reason for the OutOfMemery exception after a while.

Comment by Thomas Bernhardt [ 29/Aug/11 ]

Can you please put the EPL statement text into the comment? Are you using the @Hint? It would be required to use the @Hint since the engine has no way of finding out the group is unused.

Comment by Samuel Benz [ 29/Aug/11 ]

"@Hint(\"reclaim_group_aged=60,reclaim_group_freq=30\") select from_ip, to_ip, cid, count as count from QFlow.win:time_batch("10 sec") group by from_ip, to_ip, cid having count > 0 order by count desc"

With this statement, the "newGenerators" Map in the "ResultSetProcessorRowPerGroup" class still grows endlessly.

Comment by Thomas Bernhardt [ 29/Aug/11 ]

ok thanks for clarifying.
We'll assign it for 4.4 release or 5.0 release.

Workaround: don't add "order by" clause

Comment by Thomas Bernhardt [ 14/Oct/11 ]

Thanks for the analysis. Release 4.4 on Oct. 24 will have the change.





[ESPER-599] Aggregation functions 'first' and 'last' with index are represented incorrectly when converted back to EPL Created: 12/Aug/11  Updated: 24/Oct/11  Resolved: 13/Oct/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Juan Lopes Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File fix_projection_expression_base_epl_repr.diff    
Testcase included: yes
Patch Submitted:
Yes
Number of attachments : 1

 Description   

When compiling an expression with indexed 'first' or 'last' functions with index specification, their representation back to EPL is created without the index. That is: "select last(prop, 1) from Stream" when compiled, and called toEPL(), becomes "select last(prop) from Stream".

This cause problems when more than one auto-named last call is included in select clause.

Patch with possible solution and tests attached.



 Comments   
Comment by Thomas Bernhardt [ 13/Oct/11 ]

Change in bugfix430 branch





[ESPER-598] Copy type information using create schema Created: 05/Aug/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4

Type: Improvement Priority: Minor
Reporter: James Sheridan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'd like to define a schema based on another schema.
I'd like to do something like the following
create schema Foo as (prop1 string);
create schema Bar as Foo;

It might also be nice be able to extend the properties also, eg
create schema Foo as (prop1 string);
create schema Bar(prop2 string) extends Foo;
might be better name than 'extends' but certainly this is different from 'inherits' since
we are only copying property definitions here.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Change in enhancements440 branch





[ESPER-597] example code error in documentation Created: 05/Aug/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Trivial
Reporter: Michal Oskera (Mycroft Mind) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It is about example in the section 6.4.3. Alternation.

It says:

select * from TemperatureSensorEvent
match_recognize (
partition by device
measures A.id as a_id, B.id as b_id, C.id as c.id
pattern (A (B | C))
define
A as A.temp >= 50,
B as B.temp <= 45,
C as Math.abs(B.temp - A.temp) >= 10)

In my opinion, there is an error in the last row of the example where the subtraction should be 'C.temp - A.temp' instead of 'B.temp - A.temp'.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

thanks for reporting this





[ESPER-596] Provide documentation in .epub format for ereaders Created: 04/Aug/11  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Documentation
Affects Version/s: 4.3
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It was suggested providing the Esper/NEsper documentation in .epub format for ereaders. The single page html version for NEsper converted pretty cleanly using Calibre.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Assigned to version 5





[ESPER-595] Two statements with identical stream and "prev" function not delivering expected events Created: 31/Jul/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following statement and code reproduces the problem.
When a statement with "prev" function and identical stream (OuterEvent.std:groupwin(bid).win:length(2)) is created twice the second version does not deliver expected results for "prev".

@Test
public void testGroupWin() {
epService.getEPAdministrator().getConfiguration().addEventType("OuterEvent", OuterEvent.class);

String text = "select bid, ask, \n" +
"prev(ask) as previous\n" +
"from OuterEvent.std:groupwin(bid).win:length(2)\n" +
"where ask != prev(ask, 1)";
for (int i=0; i<2; i++) {
System.out.println("in " + i);
final EPStatement epStatement = epService.getEPAdministrator().createEPL(text, i);
final CounterObject counter = new CounterObject();
final UpdateListener updateListener = new UpdateListener() {
@Override
public void update(EventBean[] eventBeans, EventBean[] eventBeans1)

{ counter.increment(); }

};
epStatement.addListener(updateListener);
epService.getEPRuntime().sendEvent(new OuterEvent(0.1, 0.4));
epService.getEPRuntime().sendEvent(new OuterEvent(0.1, 0.2));
epService.getEPRuntime().sendEvent(new OuterEvent(0.1, 0.2));
epService.getEPRuntime().sendEvent(new OuterEvent(0.1, 0.4));
Assert.assertEquals(2, counter.getCount());
//epStatement.destroy();
}
}

public static class OuterEvent {
public Double bid;
public Double ask;
public OuterEvent(Double bid, Double ask)

{ this.bid = bid; this.ask = ask; }

public Double getAsk()

{ return ask; }

public Double getBid()

{ return bid; }

}



 Comments   
Comment by Thomas Bernhardt [ 01/Aug/11 ]

Workaround is to disable view sharing:
config.getEngineDefaults().getViewResources().setShareViews(false);

Comment by Thomas Bernhardt [ 14/Oct/11 ]

fixed in enhancements440 branch (no change)





[ESPER-594] Exception starting statement with @Audit and groupwin Created: 31/Jul/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following code:
String textWithAudit = "@Audit Select * From OuterEvent.std:groupwin(bid).win:length(2)";
epService.getEPAdministrator().createEPL(textWithAudit);

Causes the following exception:
com.espertech.esper.client.EPStatementException: Unexpected exception starting statement: null [@Audit Select * From OuterEvent.std:groupwin(bid).win:length(2)]
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:560)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:504)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:121)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:108)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:57)
at com.espertech.esper.TestIt2.testAuditWin(TestIt2.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy6.attach(Unknown Source)
at com.espertech.esper.view.ViewServiceImpl.createFactories(ViewServiceImpl.java:63)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:1034)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:141)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:534)
... 27 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.espertech.esper.view.ViewFactoryProxy.invoke(ViewFactoryProxy.java:43)
... 32 more
Caused by: com.espertech.esper.view.ViewParameterException: Group by view for this merge view could not be found among parent views
at com.espertech.esper.view.std.MergeViewFactory.attach(MergeViewFactory.java:59)
... 37 more

There is no workaround other then not specifying @Audit.






[ESPER-593] Add table to documentation outlining tradeoffs between different event types Created: 31/Jul/11  Updated: 14/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.3
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[ESPER-592] Statements are not able to get GCed when using Force Update Created: 27/Jul/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Anoop Sam John Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a scenario of creating a set of statements ( create time batch window ,insert statements and select aggregated value). With the create window statement I am using force update clause. I will be keep on sending the events and the inserts and selects are happening fine. As per the business needs these statements needs to be removed also. At the time of removal I am destroying the statements .
I am using cepAdm.getConfiguration ().removeEventType ( "mywindow", true ); so as to remove the event type also fully. When we test with many a times creation and deletion and and again create of these statements I have noticed that some memory leak is happening. Some statement objects are not getting GCed [statement corresponding to create window]. When checked further with Esper code (4.2) the below I got
SchedulingServiceImpl handleSetMap holds a reference to the callback handles that are evaluated periodically. If force_output flag is enabled, even if there is no event entering a particualar window time of an EPStatement, the SchedulingService's handleSetMap will not release the reference to the EPStatement's scheduleCallback. Even on destroying the statement, this reference will still remain and so will not be gced. Calling the stop() method on the View will make sure the handle is removed from the SchedulingService.
Two points I can make out from here
1. The destroy call on the create window statement does not call the stop() method on the statment before the destruction. Well this I can also call explicitely before making the call to destroy ()
2. Even if I call stop () on the statement it is not getting benefited for solving the leak as this call in turn is not calling stop() on the view which is a stoppable view.
So on the stoppable view making a stop call is essential while stop() call on the create statement happens. Also making stop() call on the statement while the destroy() also would be better as from the app code I no need to do this explicetly.



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

change in bugfix430 branch





[ESPER-591] Exception "Attempting to remove key from map that wasn't added" in RefCountedSet. Created: 24/Jul/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A user reports the mentioned exception raised by the following query:

insert into town select
coalesce(bh.town_id, rh.town_id) as town_id,
count(distinct bh.id) as blue_houses_count,
count(distinct rh.id) as red_houses_count
from bluehouse.win:time_batch(10 sec) as bh
full outer join
redhouse.win:time_batch(10 sec) as rh
on bh.town_id = rh.town_id
group by bh.town_id, rh.town_id;



 Comments   
Comment by Thomas Bernhardt [ 24/Jul/11 ]

Alternative query designs:

You could write with 3 statement such as:
insert into RedStream select count(...), ... from redhouse....
insert into BlueStream select count(...), ... from bluehouse....
// then join or outer join RedStream and BlueStream's last event, something like:
select * from RedStream.std:lastevent(), BlueStream.std:lastevent() where ....

Or use the new filtered aggregation syntax if bluehouse and redhouse inherit from the same event
select count(distinct bh.id, color='blue'), count(distinct bh.id, color='red') from houseevent....





[ESPER-590] Allow configuration of fair locking for administrative functions excluding event processing Created: 24/Jul/11  Updated: 24/Oct/11  Resolved: 24/Jul/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 24/Jul/11 ]

change in bugfix430 branch





[ESPER-589] Allow escape syntax for select-clause expression name syntax Created: 21/Jul/11  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

According to chapter 2.2.1. Escape Characters it is possible to escape event properties that correspond to reserved keywords. Example:

select `order` from Quote

Unfortunately it is not possible to insert into a property that is equal to a reserved keyword:

select xxx as `order` into Quote

Also consider:

insert into ABC('order', field2, field3...) select ...

It looks like the StatementSpecCompiled.selectClauseSpec is currently holding the escaped property (`order`) instead of the actual property (order)



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

Still looking into this, assigned to 5.0 release.

Note that in the example provided 'order' is a reserved keyword versus a identifier-allowed-keyword which is listed explicitly in the EPL doc.

Comment by Thomas Bernhardt [ 03/Dec/13 ]

Duplicate to ESPER-767





[ESPER-588] New "rank" aggregation function that also allows a filters Created: 21/Jul/11  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 4.3
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Suggestion: the new filter expressions from 4.3 inside aggregates could be used to support a rank() aggregate.
This could be based on the code for max().

rank(property, boolean direction, boolean expr) would return an integer
representing the ordinal position of an event in a view as ranked by the
specified property value (ascending if direction=true).

eg:

rank(price, false, model='Ford') would return the position of the most
expensive Ford in a list of models ordered by price.

Currently if you want to find if something is in the top 10 by value and
combine this with other selection criteria then I think you have to do:

std.groupwin(model).ext.sort(10, price desc)



 Comments   
Comment by Mitch [ 21/Jul/11 ]

Might be worth putting some thought into how to deal with tied ranks. There is the mode I suggested above and there is the mode where 3.5 would be returned if, for example, third and fourth position had same value- as used in non-parametric statistics. Both forms might be useful.

Comment by Thomas Bernhardt [ 14/Oct/11 ]

Would you have an example implementation?





[ESPER-587] groupwin EPStatementException text Created: 19/Jul/11  Updated: 24/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.2
Fix Version/s: 4.4

Type: Bug Priority: Trivial
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Exception text should refer to groupwin not group-by:

com.espertech.esper.client.EPStatementException: Error starting statement: The group-by view must occur in the first position in conjuntion with multiple data windows

I'm guessing there may be other exceptions still referring to group-by






[ESPER-586] Crontab-schedule when use with list-parameter and zero give incorrect results Created: 18/Jul/11  Updated: 18/Jul/11  Resolved: 18/Jul/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This trigger every second however should trigger every 10 seconds:
select current_timestamp() from Product.std:lastevent() output snapshot at (,,,,*,[0,10,20,30,40,50])

When leaving "0" from the list the crontab behaves fine.



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

Workaround is to use "at (,,,,,/10)"

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-585] On-merge not dispatching if input stream is also from named window Created: 08/Jul/11  Updated: 18/Jul/11  Resolved: 08/Jul/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I use an upsert statement, but when I do a select on the upserted stream I don't receive any events. Example

create window summedstream.std:unique(id) as (id Integer, score Double);
insert into summedstream
select istream id, sum(normalized) as score
from rankingstream
group by id;

create window rankedstream.std:unique(id) as (id Integer, score Double, type String);
on summedstream ra
merge rankedstream rs
where ra.id = rs.id
when matched
then update set rs.score = ra.score, type = 'update'
when not matched
then insert select originUuid, score, 'insert' as type

This works as I can see that events get updated and inserted.

But when I do a select, e.g. I don't get any results:
select * from rankedstream



 Comments   
Comment by Thomas Bernhardt [ 08/Jul/11 ]

Workaround:

insert into YetAnotherStream select * from summedstream

on YetAnotherStream merge rankedstream....

Comment by Thomas Bernhardt [ 08/Jul/11 ]

change in bugfix420 branch

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-584] Filter expression with relational op and constant not matching Created: 29/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a filter is written as:

select * From TestEvent where 3 < x

When "x=4" the filter above does not match. When written as "select * From TestEvent where x > 3" the filter matches.



 Comments   
Comment by Thomas Bernhardt [ 29/Jun/11 ]

Change in bugfix420 branch

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-583] Support for filtering aggregation functions Created: 27/Jun/11  Updated: 18/Jul/11  Resolved: 28/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GZip Archive filteragg.tar.gz     GZip Archive filteragg.tar.gz     GZip Archive filteragg.tar.gz     Java Source File FilterCountAggregator.java     Java Source File FilterLastAggregator.java     Java Source File FilterSumAggregator.java    
Number of attachments : 6

 Description   

I have implemented a set of aggregate plugins which do filtering on
expressions- I call these fsum(), fcount(), favg etc so I can do things
like:

select fsum(quantity, side='buy') as buy_total from TXN_WINDOW

This example will sum over the window only including quantities where the
filter side='buy' evaluates to true. (So the aggregates subsume the existing
set.)

Example use case:
select fsum(quantity, side='buy') / sum(quantity) as buy_fraction from
TXN_WINDOW
(succinct and efficient as no sub select or join required)

In general the form is aggregate(value expression, boolean expression)

I have found these to be very handy and wonder if other people would find
them useful?

I did raise this suggestion in passing in another thread but it was somewhat
buried
http://old.nabble.com/Partitioned-Aggregates-to31695663.html



 Comments   
Comment by Mitch [ 27/Jun/11 ]

three sample filtering aggregates

Comment by Mitch [ 27/Jun/11 ]

Have attached code for fsum, flast and fcount which works with 4.1 and above- should be possible to extrapolate to other aggregates from these.
Mitch

Comment by Mitch [ 27/Jun/11 ]

try again

Comment by Mitch [ 27/Jun/11 ]

third time lucky?

Comment by Mitch [ 27/Jun/11 ]

sending files individually

Comment by Mitch [ 27/Jun/11 ]

not sure if this one is tested properly

Comment by Mitch [ 27/Jun/11 ]

last one...

Comment by Thomas Bernhardt [ 27/Jun/11 ]

Thank you for sharing this idea once more.

Comment by Thomas Bernhardt [ 27/Jun/11 ]

Since there are single-row functions for "max" and "min" that can take any number of parameters, the engine would not be able to distinguish between "max(field, filter_expression)" and "max(field, field)".
It sounds like we will go with "fmax" and "fmin" in the case of min and max (fmin and fmax would not be added to the grammer however, they are dynamically resolved).
To be consistent with the rest of the aggregation function, it seems better to use "fsum" and "fcount".

Comment by Thomas Bernhardt [ 28/Jun/11 ]

Changes in enhancements430 branch

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-582] Error parsing reserved keyword "last" inside a function call Created: 27/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux java 6


Number of attachments : 0

 Description   

"Math.abs( last(quantity) )" will not parse- see err below.
"Math.abs( ( last(quantity) ) )" is OK
"Math.abs( first(quantity) )" is OK, so is sum(), have not tested others.

This bug is new in 4.2.

com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near '(' ('last' is a reserved keyword) expecting a closing parenthesis ')' but found an opening parenthesis '(' at line 1 column 21, please check the select clause [select Math.abs( last(quantity) ) from MyEvent.win:length(3)]

workaround- wrap nested last() functions in parentheses.

Mitch



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-581] rownum() function (multiple update listener version) Created: 19/Jun/11  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: None
Fix Version/s: 5.0

Type: Wish Priority: Minor
Reporter: Andreas bauer Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A function for numbering the events when a listener gets invoked. In this version of the function, the numbering continue everytime the same update listener gets invoked. The numbering should be based on ordering or on event arrival. The start (0,1,2..n) of the numbering should be configurable as well as the increment.



 Comments   
Comment by Thomas Bernhardt [ 27/Jun/11 ]

It seems that update listener code could also assign a row number.
What is the advantage of having an EPL function?

Comment by Andreas bauer [ 07/Jul/11 ]

It's more or less about convenience. With this function in place, I can just add and remove it from a statement. Otherwise I have to explicitly add an RowNumEPA everytime I need I an event number. And as I'm working a lot directly with statements without an implemented EPA in between, this would make life a lot easier, if I didn't have to switch from one paradigm (EPL) to the other (Java).

Comment by Thomas Bernhardt [ 14/Oct/11 ]

Assigned to version 5





[ESPER-580] rownum() function Created: 19/Jun/11  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Type: Wish Priority: Minor
Reporter: Andreas bauer Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A function for numbering the events when a listener gets invoked. In this version of the function, the numbering should start over again, everytime the update listener gets invoked. The numbering should be based on ordering or on event arrival. The start (0,1,2..n) of the numbering should be configurable as well as the increment.



 Comments   
Comment by Thomas Bernhardt [ 27/Jun/11 ]

It seems that update listener code could also assign a row number.
What is the advantage of having an EPL function?

Comment by Andreas bauer [ 07/Jul/11 ]

It's more or less about convenience. With this function in place, I can just add and remove it from a statement. Otherwise I have to explicitly add an RowNumEPA everytime I need I an event number. And as I'm working a lot directly with statements without an implemented EPA in between, this would make life a lot easier, if I didn't have to switch from one paradigm (EPL) to the other (Java).

Comment by Thomas Bernhardt [ 14/Oct/11 ]

Assigned to version 5 release

Comment by Thomas Bernhardt [ 21/May/12 ]

can easily be accomplished by listener, closing issue





[ESPER-579] Memory leak if creating and removing a large numbers of different event types Created: 17/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Anoop Sam John Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a scenario of creating a set of statements ( create time batch window ,insert statements and select aggregated value)
After use these statements need to get destroyed as per the business need..
This create a delete can keep on continue.
After the same is scenario ( along with events send ) keep on running for long time I am able to see memory leak with esper
code. EventType objects are leaking as I noticed.
At the time of statement destroy I am calling
cepAdm.getConfiguration ().removeEventType ( "mywindow", true );
// I am doing forceful remove only as I am sure no statement refers to this event type
This call is removing eventType from one data structure in EventAdapterService
But I can see that the eventType is being added in a hashMap in com.espertech.esper.filter.EventTypeIndex
private Map<EventType, FilterHandleSetNode> eventTypes;
From here the EventType is not getting removed and the size of the map is keep on increasing as I register new windows



 Comments   
Comment by Thomas Bernhardt [ 17/Jun/11 ]

If you force removal then the engine does not guarantee that no reference is left behind.

You should determine which statements depend on the type (an API for that is available) and destroy all statements that depend on the type. Then "force" will not be necessary and a clean removal occurs.

Comment by Anoop Sam John [ 17/Jun/11 ]

Hi
I am destroying all the related statements for sure before calling the forceful event removal. I am just using forceful thats it. But the issue mentioned is not as you explained. Sorry I think you didnt get me!

In class com.espertech.esper.filter.EventTypeIndex , which maps FilterHandleSetNode against EventType, it is clear that the entries will not get removed even if the EventType I am removing explictly. There is no code in this class which removes data from the HashMap [ private Map<EventType, FilterHandleSetNode> eventTypes; ]

In my testing scenario I will be running the engine for long time and during which statements will get added and then removed. ( I am creating a set of statements as per my business rule and when business rule is de-registered I am destroying the statements also ) At removal I am removing EventType using the API as mentioned above. This API removes EventType related entries from EventAdapterService. ( I have seen the code ). But the map in EventTypeIndex is not getting removed with this data and this map's size keep on growing as I add and remove my rules ( statements )

Comment by Thomas Bernhardt [ 17/Jun/11 ]

Reopened, it is correct that an event type may not be removed from this index.

Comment by Anoop Sam John [ 18/Jun/11 ]

Please consider this comment also
One more object related to the statement is not getting cleaned. I observed now.
This is com.espertech.esper.core.StatementRWLockImpl
I have found that when a statement is created a lock is being created for the same and when the statement is a create window statement , the lock is being cached in the NamedWindowServiceImpl class. [This is for the ondelete statements as per the code comment]. But when this window I am destroying fully this cached entry wont get removed. In NamedWindowServiceImpl there is no code to remove the entry from the HashMap which is keeping the locks
private final Map <String, StatementLock> windowStatementLocks;

Pls consider this point also along with this issue

Thanks
Anoop

Comment by Thomas Bernhardt [ 29/Jun/11 ]

change in bugfix420 branch

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-578] Allowing transposing the result of an aggregation function to a stream Created: 16/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have developed a custom Aggregate Function which returns Java-Objects (POJO's)

Is there a way of transposing those returned objects onto a stream? See following Examle:

insert into NewEvent

select custom(event.value).*

from Event as event;



 Comments   
Comment by Thomas Bernhardt [ 16/Jun/11 ]

Workaround is to transpose as a property and not as a stream, for example:

insert into ABC select custom(event.val) as myprop from Event

Comment by Petar Dimitrov [ 16/Jun/11 ]

I've noticed that the same applies to any custom function and to subqueries returning POJOs. It would also be nice to handle functions and subqueries returning arrays (as in "select mypackage.myFunction(a,b,c)[0] from ...").

Comment by Thomas Bernhardt [ 29/Jun/11 ]

The design for version 4.3 adds a new "transpose" function. There are reasons for staying away from ".*" syntax for anything but stream names and property names...it seems to make syntax look ugly.

So the design is:
insert into NewEvent select transpose(custom(event.value)) from Event as event;

Comment by Thomas Bernhardt [ 29/Jun/11 ]

change in enhancements430 branch

Comment by Thomas Bernhardt [ 29/Jun/11 ]

The "mypackage.myFunction(a,b,c)[0]" requirements can be solved with "mypackage.myFunction(a,b,c).get(0)"

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-577] Allow chained method invocation on cast() result Created: 13/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Andy Flury [ 13/Jun/11 ]

example:
select cast(expression, Class).doSomething()

Comment by Thomas Bernhardt [ 29/Jun/11 ]

change in enhancements430 branch

Comment by Thomas Bernhardt [ 29/Jun/11 ]

>> Would this also be done with the new "transpose" function mentioned in 578?

No just the same syntax as mentioned: cast(expression, Class).doSomething()

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-576] Expose API to dynamically register new views Created: 13/Jun/11  Updated: 18/Jul/11  Resolved: 27/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 27/Jun/11 ]

change in enhancement430 branch

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-575] (.NET) NEsper - invalid call to static method Created: 08/Jun/11  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 4.1
Fix Version/s: .NET NEsper 4.4.0

Type: Bug Priority: Trivial
Reporter: Lloyd A Berube Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In NEsper-4.1.0\src\NEsper\NEsper\compat\magic\MagicType.cs
In public static Func<object, object> GetLambdaAccessor(MethodInfo methodInfo)

The following line throws "ArgumentException : Static method requires null instance, non-static method requires non-null instance." if the method is static:

var eMethod = Expression.Call(eCast1, methodInfo);

Could write instead

var eMethod = Expression.Call((methodInfo.IsStatic) ? null : eCast1, methodInfo);






[ESPER-574] Timer:interval pattern observer when a subquery is the parameter throws NPE Created: 06/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample EPL:
select * from pattern[timer:interval((select * from EventWindow))]

Exception in thread "main" com.espertech.esper.client.EPStatementException: Unexpected error compiling statement: java.lang.NullPointerException:null
at com.espertech.esper.epl.expression.ExprCoalesceNode.validate(ExprCoalesceNode.java:46)
at com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:1008)
at com.espertech.esper.epl.expression.ExprNodeUtil.getValidatedSubtreeInternal(ExprNodeUtil.java:65)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:211)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:161)
at com.espertech.esper.epl.expression.ExprNodeUtil.getValidatedSubtreeInternal(ExprNodeUtil.java:59)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:117)
at com.espertech.esper.epl.expression.ExprNodeUtil.getValidatedSubtreeInternal(ExprNodeUtil.java:59)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:97)
at com.espertech.esper.epl.expression.ExprNodeUtil.getValidatedSubtreeInternal(ExprNodeUtil.java:59)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:55)
at EventReceiver.EventEPLStatements.initTimingStatements(EventEPLStatements.java:186)
at com.espertech.esper.epl.expression.ExprNodeUtil.getValidatedSubtree(ExprNodeUtil.java:43)
at EventReceiver.EventEPLStatements.addPackageTracer(EventEPLStatements.java:34)
at EventReceiver.EventReceiver.<init>(EventReceiver.java:168)
at EventReceiver.EventReceiver.main(EventReceiver.java:79)
at com.espertech.esper.epl.spec.PatternStreamSpecRaw.validateExpressions(PatternStreamSpecRaw.java:408)
at com.espertech.esper.epl.spec.PatternStreamSpecRaw.recursiveCompile(PatternStreamSpecRaw.java:212)
at com.espertech.esper.epl.spec.PatternStreamSpecRaw.recursiveCompile(PatternStreamSpecRaw.java:94)



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-573] Improve statement checking for on-merge "not matched" clause to not allow access to named window properties when subquery Created: 03/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement:

on CPEEvent as cpe
merge SomeWindow as joinevent
where cpe.userId = joinevent.userId
when not matched and exists(select * from UserProfileEventWindow where userId = joinevent.userId)
then....

Note that this is a not-matched clause thereby "joinevent" cannot exist however query compilation lets this query pass.



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-572] Short-circuit evaluation not always performed for filters Created: 01/Jun/11  Updated: 18/Jul/11  Resolved: 29/Jun/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File FilterOrderTest.java     Java Source File MyEvent.java    
Number of attachments : 2

 Description   

> Does esper enable filter short circuiting? Are filters called in order?
yes, however filters undergo an additional optimization step that may not perform short-circuit optimization

Attached test files.

My example runs the following EPL: select * from MyEvent(MyEvent.property2 = '4' and MyEvent.property1 = '1')

Note the filter: for other checks the engine will perform short-circuit, filter optimization however may remove that (where-clause rewrite to filter may also apply)



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-571] NPE for fully-aggregated and ungrouped query with having clause that selects a non-aggregated property Created: 06/May/11  Updated: 18/Jul/11  Resolved: 07/May/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem occurs when the select-clause is fully-aggregated (all properties under aggregation) and no group-by and when the having-clause has a property that is not aggregated, for example:

select max(val)-min(val)
from Event.win:time(1)
having (max(val)-min(val))/min(val) > someOtherVal

The stack trace, during event evaluation, is as follows:
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.expression.ExprIdentNodeEvaluator.evaluate(ExprIdentNodeEvaluator.java:30)
at com.espertech.esper.epl.expression.ExprRelationalOpNodeImpl.evaluate(ExprRelationalOpNodeImpl.java:106)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getSelectListEvents(ResultSetProcessorRowForAll.java:165)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processViewResult(ResultSetProcessorRowForAll.java:148)
at com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:63)

Sample code:
epService.getEPAdministrator().getConfiguration().addEventType("SupportBean", SupportBean.class);
String epl = "select max(intPrimitive)-min(intPrimitive) from SupportBean.win:time(1) having (max(intPrimitive)-min(intPrimitive))/min(intPrimitive)>doublePrimitive";
EPStatement stmt = epService.getEPAdministrator().createEPL(epl);
epService.getEPRuntime().sendEvent(new SupportBean("E1", 1));



 Comments   
Comment by Thomas Bernhardt [ 06/May/11 ]

Workaround: add group-by, or replace un-aggregated property in having-clause with a variable or function, or change select clause to "*" for example

Comment by Thomas Bernhardt [ 07/May/11 ]

change in branch bugfix420

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-570] 3-way inner join and using outer-join notation not working when where-clause added Created: 20/Apr/11  Updated: 18/Jul/11  Resolved: 21/Apr/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Minor
Reporter: Petar Dimitrov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperTest3.java    
Testcase included: yes
Number of attachments : 1

 Description   

I am observing a weird (and somehow dangerous) behavior of the WHERE clause in the new Esper 4.2 release. The presence of it seems to modify the behavior of INNER JOIN-s and produce more results than necessary.

In the following example, the WinProductOwnerDetails named window only contains a single record.

This query properly returns a single row:

select WinProduct.productId
 from WinProduct
 inner join WinCategory on WinProduct.categoryId=WinCategory.categoryId
 inner join WinProductOwnerDetails on WinProduct.productId=WinProductOwnerDetails.productId

But, if a where clause is added to it, the query now produces a row for each record in WinProduct:

select WinProduct.productId
 from WinProduct
 inner join WinCategory on WinProduct.categoryId=WinCategory.categoryId
 inner join WinProductOwnerDetails on WinProduct.productId=WinProductOwnerDetails.productId
 where WinCategory.owner=WinProductOwnerDetails.owner

If I substitute WHERE with HAVING the query again properly returns a single row:

select WinProduct.productId
 from WinProduct
 inner join WinCategory on WinProduct.categoryId=WinCategory.categoryId
 inner join WinProductOwnerDetails on WinProduct.productId=WinProductOwnerDetails.productId
 having WinCategory.owner=WinProductOwnerDetails.owner

This behavior holds for both adhoc queries and statement listeners.

This is only present in the latest 4.2 release. Testing this with Esper 4.1 produces the proper and expected results.

I am attaching a small test case to illustrate the problem.



 Comments   
Comment by Thomas Bernhardt [ 21/Apr/11 ]

Workaround is to formulate as a join instead, not using the outer-join syntax with "on":

select WinProduct.productId
from WinProduct, WinCategory, WinProductOwnerDetails
where WinCategory.owner=WinProductOwnerDetails.owner and WinProduct.categoryId=WinCategory.categoryId
and WinProduct.productId=WinProductOwnerDetails.productId

Comment by Thomas Bernhardt [ 21/Apr/11 ]

Updated to minor: workaround available

Comment by Thomas Bernhardt [ 21/Apr/11 ]

Applies only to all-inner-joins using outer-join notation (i.e. with on-clause) and 3 or more streams.

Comment by Thomas Bernhardt [ 21/Apr/11 ]

Bug fix in bugfix420 branch

Comment by Petar Dimitrov [ 21/Apr/11 ]

Tom,

Was there a significant change in version 4.2 vs 4.1 that created this issue?

My sample looks pretty trivial because I wanted to create a very specific and small test case to illustrate the problem. In reality, we use this kind of joins very often for both on-demand queries and internal event processing. The moment I switched the esper 4.1 jar with esper 4.2, my development environment crashed within a minute.

Here is the real world EPL (note that this is not an on-demand query):

select ...
from BSignalWin B unidirectional
inner join InstrumentWin I on B.underlying=I.underlying
inner join UnderlyingWin U on B.underlying=U.underlying
inner join SurfaceGreeksWin G on I.inst_id=G.inst_id
where U.defaultSurface=G.surface

The BSignalWin receives a new event about once a second. Whenever the event/signal is received, we need to apply it to all relevant instruments, gathering the greeks for the proper volatility surface (in this case a defaultSurface is defined based on the instrument's underlying). Adding the "U.defaultSurface=G.surface" condition in the join is also not an option in this case (Esper will complain with a "Outer join ON-clause columns must refer to properties of the same joined streams when using multiple columns in the on-clause" error).

This query used to generate about 700 events per second in version 4.1. With the new release, the query started generating over 1 million events per second! And they are not just duplicates, but actually wrong because they do not satisfy the join contract.

Comment by Thomas Bernhardt [ 21/Apr/11 ]

Prior to 4.2 the outer-join query planner would process this query as it is formulated as an outer join. However the query is really a regular join, as suggested in the workaround. With 4.2 the regular join query planner is used and plans the query the same way as a regular join, however failed to rewrite the on-clauses into the where-clause. With 4.2 the query planning has been overworked significantly allowing hints and recognizing more operators, and this was one of the refactorings. Our test suite covers joins rather well however missed this test case.

Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-569] Null-value comparison for "not/equals"-operator (!=, =) not fully consistent with SQL standard Created: 20/Apr/11  Updated: 18/Jul/11  Resolved: 20/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.2
Fix Version/s: 4.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In version 4.3, the expression "property = NULL" always returns null. Use "property is NULL" instead to compare against null values.

In version 4.2 and earlier, the expression "property = NULL" compares the property against null and returns true/false.

More examples:

1) "select 2 != null" returns null in version 4.3 (in version 4.2 it returns true)
2) "select null = null" returns null in version 4.3 (in version 4.2 it returns true)
3) "select 2 != null or 1 = 2" returns null in version 4.3 (in version 4.2 it returns true)
4) "select 2 != null and 2 = 2" returns null in version 4.3 (in version 4.2 it returns true)

Use "is null" or "is not null" instead.



 Comments   
Comment by Thomas Bernhardt [ 18/Jul/11 ]

release 4.3 completed





[ESPER-568] Duplicate remove stream events posted from intersection-data window when used with on-update (named window only) Created: 19/Apr/11  Updated: 19/Apr/11  Resolved: 19/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement:
epService.getEPAdministrator().createEPL("create schema S2 ( company string, value double, total double)");
epService.getEPAdministrator().createEPL("create window S2Win.win:time(25 hour).std:firstunique(company) as S2");
epService.getEPAdministrator().createEPL("insert into S2Win select * from S2.std:firstunique(company)");
epService.getEPAdministrator().createEPL("on S2 as a update S2Win as b set total = b.value + a.value");
EPStatement stmt = epService.getEPAdministrator().createEPL("select count as cnt from S2Win");
stmt.addListener(listenerWindow);

HashMap<String, Object> eventOne = createEvent("AComp", 3.0, 0.0);
epService.getEPRuntime().sendEvent(eventOne, "S2");
listenerWindow.reset();

HashMap<String, Object> eventTwo = createEvent("AComp", 6.0, 0.0);
epService.getEPRuntime().sendEvent(eventTwo, "S2");
assertEquals(1L, listenerWindow.assertOneGetNewAndReset().get("cnt"));

// the result of "select count" statement must be 1.



 Comments   
Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-567] Time batch window - Select query not fired when no data pushed into window in batch time and FORCE_UPDATE is true Created: 19/Apr/11  Updated: 07/May/11  Resolved: 07/May/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Anoop Sam John Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have statements to create a time batch window with FORCE_UPDATE mode. I want the statements associated with this window to get executed in batch interval even if not sending any events. I have a select statement associated with this window in which I have null check also for the aggregate value. WHen it is null I want to know this in the listener associated with the select statement.
But even if the FORCE_UPDATE is true it seems not working
When checked the code
com.espertech.esper.view.window.TimeBatchViewRStream
protected final void sendBatch() {
...............
if (this.hasViews())
{
// Convert to object arrays
EventBean[] newData = null;
EventBean[] oldData = null;

if ( !currentBatch.isEmpty())

{ newData = currentBatch.toArray(new EventBean[currentBatch.size()]); }

if ((lastBatch != null) && (!lastBatch.isEmpty()))

{ oldData = lastBatch.toArray(new EventBean[lastBatch.size()]); }

if ((newData != null) || (oldData != null) || (isForceOutput))

{ updateChildren(newData, oldData); }

}
................

}
for isForceOutput even if the newData and oldData is null call is there to updateChildren but both newData and oldData passed will be null. And as part of the updateChildren () call down the line in code if newData and oldData both are null just return without doing any processing. ( For time batch window )
SO because of this code the intention of the Force_Update is not working. In teh above code if it was like
if ( isForceOutput || !currentBatch.isEmpty())

{ newData = currentBatch.toArray(new EventBean[currentBatch.size()]); }

It would have worked.

Pls see



 Comments   
Comment by Thomas Bernhardt [ 19/Apr/11 ]

Can you please attached a small test case that demonstrates the problem?

Comment by Anoop Sam John [ 19/Apr/11 ]

Hi,
Please find the problem explanation. Hope this makes it clear.
------------------------------------------------------------------------
String createQuery = "create window window1.win:time_batch(10 seconds, \"FORCE_UPDATE\")(eventSource string, cpu double, mmy double)";
String insertQuery = "insert into window1 select eventSource as eventSource , cpu as cpu , mmy as mmy from GenericEvent";
String selectQuery = "select case when avg(cpu)is null then -1 when avg(cpu)>=20 then 1 else 0 end as result from window1 ";

These are the statements created. I have an impl for UpdateListener which is attached with the selectQuery statement.
Event is as below
public class GenericEvent {
String eventSource;
Double cpu;
Double mmy;
public GenericEvent( String eventSource, Double cpu, Double mmy )

{ this.eventSource = eventSource; this.cpu = cpu; this.mmy = mmy; }

public double getCpu()

{ return cpu; }

public String getEventSource()

{ return eventSource; }

public Double getMmy ()

{ return mmy; }

}

When no events are reaching in the interval 10secs also I want a business logic and for that I need to get -1 in the listener. But this is not happening with the time batch window.
Note : I dont need start eager. I want the start to happen only on 1st event arrival. Once the events starts coming and then in between if no events coming in the interval time, then only I need to know the result.

Comment by Thomas Bernhardt [ 07/May/11 ]

FORCE_UPDATE only posts events to the listeners of the statement itself, but your select is listening to the named window.
We'll document the behavior.
Consider output rate limiting instead.





[ESPER-566] First Aggregation Function Returns Wrong (Growing) Result When Used in Correlated Subquery Created: 12/Apr/11  Updated: 19/Apr/11  Resolved: 16/Apr/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: Heiko Selber Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX 10.6.7, Java 1.6.0_24, Eclipse 3.6.1, Junit 4.8.2


Attachments: File exercise.esp     Java Source File ExerciseTest.java    
Testcase included: yes
Number of attachments : 2

 Description   

See attachments:

A JUnit test ExerciseTest.java which inserts events ("measurements") into a simple Esper statement (exercise.esp).

The first event has a timestamp of 0 and a "value" of 0.0.

However, the first function returns (unpredictably) growing values instead of the first one.

In the test case, the update listener inserts a couple of diagnostic values into arrays which are printed and verified at the end (after inserting 10 events).

The assertions for time and fm_values fail. It seems that the pointer to first increases occasionally.

Sometimes (perhaps once in 10 runs) the test passes.

This bug seems to be related to ESPER-546, but it is supposed to have been fixed in 4.1.0.



 Comments   
Comment by Thomas Bernhardt [ 12/Apr/11 ]

Could you please simplify the EPL and code such that it proves the point (first(...) not returning the right result?) and remove all other unrelated constructs and assertions.

Comment by Heiko Selber [ 12/Apr/11 ]

Uploaded smaller versions of the JUnit and EPL files.

I removed as much as I could (with my so far limited knowledge of Esper).

It seems that the call to std:groupwin() is significant.

The test runs (i.e. first() works correctly) if it is removed.

(The call to groupwin doesn't change the result of the query with the test data, but it is needed in my real use case.)

Comment by Thomas Bernhardt [ 13/Apr/11 ]

First() returns the first per group according to the group-by clause (and not the grouped-data-window).
Is that what you expected?

Comment by Heiko Selber [ 14/Apr/11 ]

Hm.. I don't know if I understand your comment. I don't think it has anything to do with the issue.

I'm not using a group-by clause.

And I do expect that first() returns the first event in a group/window/stream (forgive me if I struggle with the nomenclature).

Why should it return a later event?

In the attached example, I would expect that these two statements return exactly the same if Measurement.source is equal for all events:

with groupwin
[...]
from Measurement.std:groupwin(source).win:ext_timed(date.time, 240 minutes) as m
[...]
without groupwin
[...]
from Measurement.win:ext_timed(date.time, 240 minutes) as m
[...]

But the attached unit test shows that they don't.

Am I making wrong assumptions?

Comment by Thomas Bernhardt [ 14/Apr/11 ]

"First" is an aggregation function. You can compare that to "prev" or "prior" which are single-row functions.
Aggregation functions either aggregate across all events, or aggregate across a group if there is a group-by clause.
Therefore "first" without group-by returns the first event regardless of what data window is declared. "First" with "group by xyz" returns the first per-xyz.

Comment by Thomas Bernhardt [ 16/Apr/11 ]

Thanks Heiko, the test case demonstrates the point well and there is a problem. Its assigned for version 4.2 release.

Comment by Heiko Selber [ 18/Apr/11 ]

Ah, what a relief! Your previous comment made me wonder whether I got something completely wrong. (I mean I did get something wrong for sure, but apparently not everything

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-565] Question regarding esper variables and 'output when' Created: 05/Apr/11  Updated: 10/Apr/11  Resolved: 10/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We have a situation where we are aggregating a set of events down to a smaller set of derived events. For efficiency, we avoid intermediate results by using 'output last when' and setting a variable when we are ready to emit the derived events.

The problem is, it appears that merely setting the variable is not sufficient to cause the esper engine to emit the derived events. I have found that, after setting the variable, esper won't emit derived events until either 1) a subsequent event comes in, or 2) (using external timing) an external timing event occurs.

Depending on subsequent events is non-deterministic, and using external timing results in a lot of 'Duplicate time' errors in our logs. I'm wondering if there is a cleaner approach. If not, perhaps esper can be changed such that setVariableValue() causes esper to evaluate related 'output when' clauses, with no subsequent action required?



 Comments   
Comment by Thomas Bernhardt [ 06/Apr/11 ]

For reference, the doc section is "4.7.1.1. Controlling Output Using an Expression"
A "setVariableValue" does not currently trigger output by the same thread that is setting the variable value, that is correct. Output occurs "next time" i.e. when the timer next fires or when an event arrives that would need to be output, whichever comes first.
Is the application using external-time events exclusively or internal timer?
From a threading perspective, the guarantee is that only event-sending thread(s) or timer-thread(s) produce output. I don't think that interacting with variables should itself produce output. Is it possible to handle this requirement in application code?

Comment by Scott Frenkiel [ 06/Apr/11 ]

Thanks, Thomas. Some more detail: the way our data is aggregated is controlled by the end-user; we currently have a situation where several types are aggregated once, then that aggregated data is itself aggregated again. To ensure that everything happens in the correct order, each event type has its own variable, and each variable change is separated by it's own timing event. This means there are lots of timing events and we usually get duplicate time events in the logs, which look sloppy.

I suppose the alternative is to invent a 'prod' event, which we could inject between variable changes. To me, though, both approaches feel a little heavy-handed. I understand that variable changes don't always need to result in event processing, but I wonder if esper could track those variables which are tied to 'output when' clauses, or similar, to decide if additional processing is warranted when those variables change.

Comment by Thomas Bernhardt [ 06/Apr/11 ]

The tracking of variable changes already occurs: In more detail when the variable changes and the output-when expression evaluates to true the statement registers a callback with scheduling to make the output "next time". This is to prevent the thread that sets the variable to perform the output, and leaves it to the event-sending or timer thread(s) to perform the output (as always).

Comment by Scott Frenkiel [ 06/Apr/11 ]

I see. I think I'll convert to using artificial 'prod' events rather than external timing. Thanks for your time.





[ESPER-564] Subquery of identical event stream does not include most recent event in window aggregate Created: 28/Mar/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: Richard O'Brien Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

WinXPx64, JRE 1.6.24


Attachments: Java Source File TradeEventTest.java    
Number of attachments : 1

 Description   

When I have a query that tries to compare windows of differing lengths of the same event stream, the subquery window does not contain the most recent event.

For instance:

SELECT current_timestamp, window(tl.*) as longItems,
(SELECT window(ts.*) AS shortItems FROM TradeEventTest.win:time(20 minutes) as ts WHERE ts.securityID=tl.securityID)
FROM TradeEventTest.win:time(20 minutes) as tl
WHERE tl.securityID IN (1000)
GROUP BY tl.securityID

in the above query, I would expect the update to receive identical TradeEvent[] arrays. That is the case only if no other EPL statements have subscribed to the TradeEventTest stream. However, when/if I do add another EPL, the 'tl' stream will update with length n and the 'ts' subquery window will have length n-1.

The intended logic is to use differing win:time lengths, however, this example is made most clear when using identical lengths that the window should be the same length.

I've attached complete source that demonstrates the issue.



 Comments   
Comment by Thomas Bernhardt [ 28/Mar/11 ]

There is a subquery evaluation order flag in the configuration, have you tried that?
For many use cases it is useful to have the subquery not reflect the current event, therefore the configuration flag exists.

Comment by Richard O'Brien [ 28/Mar/11 ]

Additionally, the 2nd EPL that queries TradeEventTest must be created before the query/subquery EPL above.

Comment by Thomas Bernhardt [ 28/Mar/11 ]

Possibly related to view sharing, try disabling view sharing in the configuration?

Comment by Richard O'Brien [ 28/Mar/11 ]

Having

config.getEngineDefaults().getExpression().setSelfSubselectPreeval(boolean);

set to true or false results in the same behavior. Is this the flag to which you're referring?

If there is no dummy/first EPL this flag does have an effect... true makes both windows fully populated, false has the subselect missing the most recent event as indicated in the docs at 11.4.18.2

Comment by Richard O'Brien [ 28/Mar/11 ]

Setting view sharing to false achieves the desired behavior.

config.getEngineDefaults().getViewResources().setShareViews(false);

Does the share view memory optimization affect the logic of EPL statements?

Comment by Thomas Bernhardt [ 31/Mar/11 ]

change in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-563] Small memory leak creating large number of failed-validation statements Created: 24/Mar/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a statement compiles syntactically but the statement fails to validate against event types the engine indicates via exception. A very small amount of memory is still retained for the failed statement that should not be retained. This is in the order of 400 bytes to 2k per failed statement.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/11 ]

for 4.2 release

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-562] On-select with aggregation and group-by not releasing memory after completion of a triggering event Created: 15/Mar/11  Updated: 19/Apr/11  Resolved: 15/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

An on-select statement is found to retain its aggregation state until the next triggering event. An improvement would be to release the aggregation state after an on-select triggered.



 Comments   
Comment by Thomas Bernhardt [ 15/Mar/11 ]

in bugfix410 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-561] Invoking instance method of an object returned by static method invocation returns cache of static method Created: 03/Mar/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When invoking a static method and then invoking an instance method of the returned object (e.g. SomeClass.staticMethod().instanceMethod()), "evaluate" method of class "com.espertech.esper.epl.expression.ExprStaticMethodEvalInvoke" is called.

When "evaluate" method is called at the first time, it calls the static method, caches the returned object to cachedResult, call the instance method, and then return the result.
But when the "evaluate" method is called at the second time, it returns the cached object (cachedResult) and does not call the instance method. The instance method should be called.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/11 ]

change in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-560] Updated (or deleted) event in a Named Window is not delivered to a consuming statement Created: 03/Mar/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: Toshihiro Nishimura Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Attached programs are tested with JDK 6.0 Update 21 on Windows 7


Attachments: Java Source File TestCase1.java     Java Source File TestCase2.java    
Number of attachments : 2

 Description   

In some situation, updated (or deleted) event in a Named Window is not delivered to its consuming statement (which selects from the Named Window).
I couldn't figure out the exact situation when this issue take place, but I can provide simple sample programs.

TestCase2.java doesn't have this issue.
It inserts into an event to Named Window (NamedWin) and update the event. The consuming statement receives two events.
TestCase1.java has this issue. The consuming statement receives only one event (when an event is inserted into the NamedWin).
The only difference between these two programs is if there is an EPL statement before on-update statement or not.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/11 ]

change in branch enhancements420

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-559] Output-first With Having-Clause not honoring output interval reliably Created: 16/Feb/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestOutputFirstHaving.java    
Number of attachments : 1

 Description   

This problem is observed for statements that use a having-clause and use "output first". The problem does not apply to statements without having-clause or without "output first". A workaround is to move filter criteria to the where-clause instead.

Sample queries affected by the problem:
select doublePrimitive from SupportBean having doublePrimitive > 1 output first every 2 events
select doublePrimitive, avg(doublePrimitive) from SupportBean having doublePrimitive > 2*avg(doublePrimitive) output first every 2 minutes

Sample unit test attached.



 Comments   
Comment by Thomas Bernhardt [ 16/Feb/11 ]

Statements with group-by are also not affected.

Comment by Thomas Bernhardt [ 31/Mar/11 ]

change in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-558] Incorrect having-clause validation "non-aggregated properties in the 'having' clause must occur in the 'group-by' clause" Created: 16/Feb/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have some questions about 'having' clause validation...

Question 1
Why Esper imposes the restriction that non-aggregated properties in the 'having' clause must occur in the 'group-by' clause?

Question 2
The query

select host, response_time, prev(1,response_time) from HTTP.std:groupby(host).win:length(10) ​group by host​ having response_time > 10​

does not satisfy the mentioned restriction and then it yields this error:

"Error starting statement: Non-aggregated property 'response_time' in the HAVING clause must occur in the group-by clause [select host, response_time, prev(1,response_time) from HTTP.std:groupby(host).win:length(10) group by host having response_time > 10]"

However, if I add an aggregated value to the 'having' clause, then the query is considered as correct. For example, appending 'and avg(response_time) > 0​' to the previous query yields a valid query:

select host, response_time, prev(1,response_time) from HTTP.std:groupby(host).win:length(10) ​group by host​ having response_time > 10​ and avg(response_time) > 0​



 Comments   
Comment by Thomas Bernhardt [ 16/Feb/11 ]

Actually this validation should take place. The having clause is not the right place to filter data since the aggregation values would change depending on whether the filter is considered or not.

Compare against MySQL (this query uses the Esper regression test table):

mysql> select myint, sum(myint) from mytesttable group by mychar having mybool = 1;
ERROR 1054 (42S22): Unknown column 'mybool' in 'having clause'

This is fine:
select * from mytesttable group by mychar having mybool = 1;

Comment by Thomas Bernhardt [ 16/Feb/11 ]

In non-aggregated queries however Esper should allow the having-clause to have such filter.

Comment by Thomas Bernhardt [ 31/Mar/11 ]

bug fix in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-557] On-merge statement creation throws StringIndexOutOfBoundsException when using alias for named window but not for property Created: 15/Feb/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Richard O'Brien Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

WinXP x64, JRE 1.6.0.23


Attachments: Java Source File FillEvent.java     Java Source File Main.java     Java Source File PositionEvent.java    
Testcase included: yes
Number of attachments : 3

 Description   

public class PositionEvent

{ public final long time; public final int portfolioID; public final int securityID; public final double position; // ... constructors, getters, etc, src attached }

When I create a schema based on this class with this statement
String schemaEPL = "create schema PositionData as `com.acme.PositionEvent`";

I get this error when creating an onMerge statement using a window based on that schema.

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.espertech.esper.epl.named.NamedWindowUpdateHelper.make(NamedWindowUpdateHelper.java:73)
at com.espertech.esper.epl.named.NamedWindowOnMergeView.setup(NamedWindowOnMergeView.java:148)
at com.espertech.esper.epl.named.NamedWindowOnMergeView.<init>(NamedWindowOnMergeView.java:66)
at com.espertech.esper.epl.named.NamedWindowRootView.addOnExpr(NamedWindowRootView.java:227)
at com.espertech.esper.epl.named.NamedWindowProcessor.addOnExpr(NamedWindowProcessor.java:101)
at com.espertech.esper.core.EPStatementStartMethod.startOnTrigger(EPStatementStartMethod.java:368)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:118)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:564)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:534)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:160)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:115)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:104)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:55)
at com.acme.Main.main(Main.java:30)

When I create the schema like this:
String schemaEPL = "create schema PositionData as (time long, portfolioID int, securityID int, position double)";

everything works as expected.

Window and merge EPL:

String windowEPL = "create window Positions.std:unique(portfolioID,securityID) as PositionData";
EPStatement window = epService.getEPAdministrator().createEPL(windowEPL);

String mergeEPL =
"on `com.acme.FillEvent` f "+
" merge Positions p where p.portfolioID=f.portfolioID and p.securityID=f.securityID "+
"when matched then " +
" update set position=position+f.fillQuantity "+
"when not matched then "+
" insert(time,portfolioID,securityID,position) select time,portfolioID,securityID,fillQuantity";
EPStatement merge = epService.getEPAdministrator().createEPL(mergeEPL);

I am new to Esper, have I misunderstood what types of objects can be used as schema?

Sources attached.



 Comments   
Comment by Thomas Bernhardt [ 16/Feb/11 ]

The exception is caused by the on-merge logic for properties, which allows properties to be prefixed by the named window alias, if provided.

Problem EPL:
on com.acme.FillEvent f
merge Positions p where p.portfolioID=f.portfolioID and p.securityID=f.securityID
when matched then
update set position=position+f.fillQuantity
when not matched then
insert(time,portfolioID,securityID,position) select time,portfolioID,securityID,fillQuantity

As the named window "Positions" uses alias "p", the property "position" is not prefixed by "p". This causes a bug in the on-merge logic causing the exception to be thrown.

Workaround is to either remove the prefix from the named window i.e. "merge Positions where..." or by prefixing the property, i.e. "update set p.position = p.position+..."

Comment by Richard O'Brien [ 17/Feb/11 ]

Thank you Thomas. In this case the alias is required to disambiguate portfolioID and securityID fields so I will go with workaround 2.

After changing the fields to have the 'p' prefix, I get this error (also only when using the POJO schema):
Event type does not support event bean copy

EPL:
on `com.acme.FillEvent` f
merge Positions p where p.portfolioID=f.portfolioID and p.securityID=f.securityID
when matched then
update set p.position=p.position+f.fillQuantity
when not matched then
insert (time,portfolioID,securityID,position) select f.time,f.portfolioID,f.securityID,f.fillQuantity

Just to clarify, why does the on merge EPL syntax need to change when the window's schema is based on a POJO instead of an explicit declaration?

Comment by Thomas Bernhardt [ 17/Feb/11 ]

If the Position named window is based on a POJO event class then that class must implement Serializable. A schema is internally represented as a Map so no problem writing to it, but a POJO as an underlying class best adheres to JavaBean and for merging needs to be Serializable.

Comment by Thomas Bernhardt [ 31/Mar/11 ]

bug fix in bugfix410 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-556] Method-invocation-join when not unidirectional in combination with max/min aggregation function produces warning Created: 04/Feb/11  Updated: 19/Apr/11  Resolved: 04/Feb/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample warning:
WARN [MinMaxEverAggregator] .leave Received remove stream, none was expected

Sample statement:
select max(col1) as maxcol1 from MyEvent.std:unique(string), method:MyClass.fetchResult(100)

Wherein "col1" is a field returned by the static method invocation.

The warning can be ignored - no change in output expected.



 Comments   
Comment by Thomas Bernhardt [ 04/Feb/11 ]

in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-555] Improve error message for UDF functions and subscribers that expect primitive typed parameters and receive null Created: 31/Jan/11  Updated: 19/Apr/11  Resolved: 11/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Change the error message and include a warning at statement compile time.

The current error reporting is as follow:
ERROR [main] 16:46:23 Method 'setFilter' of class 'com.dnam.esper.SingleRowFunct

ions' reported an exception: java.lang.NullPointerException

java.lang.NullPointerException

at com.dnam.esper.SingleRowFunctions$$FastClassByCGLIB$$96558b13.invoke(

<generated>)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

at com.espertech.esper.epl.expression.ExprStaticMethodEvalInvoke.evaluat

e(ExprStaticMethodEvalInvoke.java:73)

at com.espertech.esper.epl.core.eval.EvalBase.process(EvalBase.java:47)

at com.espertech.esper.epl.core.SelectExprResultProcessor.process(Select



 Comments   
Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-554] Allow chained method invocation on first() and last() aggregation functions Created: 31/Jan/11  Updated: 19/Apr/11  Resolved: 14/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example:
select * from PosReport.win:time(60 sec) group by id having first().distanceTo(last()) > 200



 Comments   
Comment by Thomas Bernhardt [ 14/Apr/11 ]

change in trunk

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-553] Allow first() and last() aggregation functions without parameters Created: 31/Jan/11  Updated: 11/Apr/11  Resolved: 11/Apr/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be nice if first() and last() and window() don't have required parameters in the case where a single stream is selected:

Example:
select * from PosReport.win:time(60 sec) group by id having VoyageAnalyzer.distanceBetween(first(),last()) > 200



 Comments   
Comment by Thomas Bernhardt [ 11/Apr/11 ]

not consistent with prev, prior function; Also a join would still require parameters so less clear.





[ESPER-552] NPE logged delivering null-value results to Subscriber update method Created: 27/Jan/11  Updated: 19/Apr/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6, 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Edward Wagner Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

With the following query I started recieving NPE's in the log when the stream was paused. Due to this, the subscriber does not receive empty updates.

select fieldName, count as evtCount
from Result(resultId=1)[select fieldName from events where dataSourceName in ('ds1','ds2')]
group by fieldName
output last every 5 seconds
order by evtCount desc
limit 10

Timer thread caught unhandled exception: java.lang.NullPointerException
com.espertech.esper.client.EPException: java.lang.NullPointerException
at com.espertech.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:1077)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:477)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:377)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:212)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:186)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.espertech.esper.core.ResultDeliveryStrategyObjectArr.execute(ResultDeliveryStrategyObjectArr.java:45)
at com.espertech.esper.core.StatementResultServiceImpl.dispatchInternal(StatementResultServiceImpl.java:349)
at com.espertech.esper.core.StatementResultServiceImpl.processDispatch(StatementResultServiceImpl.java:243)
at com.espertech.esper.core.StatementResultServiceImpl.execute(StatementResultServiceImpl.java:229)
at com.espertech.esper.core.UpdateDispatchViewBase.execute(UpdateDispatchViewBase.java:75)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServiceImpl.java:58)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.java:32)
at com.espertech.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:1073)
... 14 more



 Comments   
Comment by Edward Wagner [ 27/Jan/11 ]

Accidently messed up title before submitting.
'NPE thrown by timer thread when stream stopped'

Comment by Thomas Bernhardt [ 27/Jan/11 ]

Please provide the subscriber specifically the update method.
You could try having the subscriber accept all boxed types: not "int" but "Integer" for example.

Comment by Edward Wagner [ 27/Jan/11 ]

subscriber only has one update method:

public void update(Object[][] insertedRows, Object[][] removedRows)

{...}

Through debugging I have found the problem is that the 'result' object passed into the execute method of ResultDeliveryStrategyObjectArr is null. The NPE is thrown on the first call to 'result.getFirst()'.

Comment by Thomas Bernhardt [ 31/Jan/11 ]

Assigned to 4.2

Comment by Thomas Bernhardt [ 31/Mar/11 ]

change in enhancements420 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-551] Custom exception handler that rethrows runtime exceptions may cause wrong callback for next event Created: 26/Jan/11  Updated: 19/Apr/11  Resolved: 26/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When an application custom exception handler for runtime exceptions is installed via configuration, and that exception handler re-throws a runtime exception it receives, the rethrown exception may cause the next event to be sent into the engine to perform extraneous processing.



 Comments   
Comment by Thomas Bernhardt [ 26/Jan/11 ]

Change committed to bugfix410 branch

Comment by Olivier Girardot [ 26/Jan/11 ]

thank you

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-550] Where-clause expression validation not taking expression return type into account Created: 26/Jan/11  Updated: 19/Apr/11  Resolved: 26/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When creating an incorrect statement using a view like :

Select instrument
From Summary.win:time(30 seconds)
where descriptor.lastExecPrice
group by instrument

i get a (relevant) ClassCastException when sending events (and not at compile time):
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Boolean
at com.espertech.esper.epl.view.FilterExprView.filterEvents(FilterExprView.java:81)
at com.espertech.esper.epl.view.FilterExprView.update(FilterExprView.java:51)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115)
at com.espertech.esper.view.window.TimeWindowView.expire(TimeWindowView.java:194)
at com.espertech.esper.view.window.TimeWindowView$1.scheduledTrigger(TimeWindowView.java:76)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:898)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:622)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:503)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:474)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:377)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:212)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:186)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

The engine should validate the return type of the "where descriptor.lastExecPrice" expression and display an appropriate exception at compile time.



 Comments   
Comment by Thomas Bernhardt [ 26/Jan/11 ]

Change committed to bugfix410 branch

Comment by Olivier Girardot [ 26/Jan/11 ]

Ok, that would be nice too

+1 for the feature

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-549] NullPointerException upon failing to resolve UDF and when configuring a non-default auto-import Created: 26/Jan/11  Updated: 19/Apr/11  Resolved: 26/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive attachments_2011_01_26.zip    
Number of attachments : 1

 Description   

Test to reproduce is attached.

The problem occurs when an application changes the auto-import list removing the required import, and when a statement such as below is compiled:
select * from SupportBean(Math.abs(-1) = 1)

Quote:
I am seeing some auto-import weirdness. Esper can compile the statement, select * from SupportBean(Math.abs(-1) = 1), with no auto-import configuration elements. However, when the same statement is compiled with java.math.* auto-imported, an error is received: "Unexpected error compiling statement: java.lang.NullPointerExcepton:null". See attached Junits for details.



 Comments   
Comment by Thomas Bernhardt [ 26/Jan/11 ]

Bug fix checked into bugfix410 branch

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-548] ClassCastException prevent children view from being updated Created: 25/Jan/11  Updated: 26/Jan/11  Resolved: 26/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Olivier Girardot Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When creating an incorrect statement using a view like :

Select instrument
From Summary.win:time(30 seconds)
where descriptor.lastExecPrice
group by instrument

i get a (relevant) ClassCastException :
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Boolean
at com.espertech.esper.epl.view.FilterExprView.filterEvents(FilterExprView.java:81)
at com.espertech.esper.epl.view.FilterExprView.update(FilterExprView.java:51)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115)
at com.espertech.esper.view.window.TimeWindowView.expire(TimeWindowView.java:194)
at com.espertech.esper.view.window.TimeWindowView$1.scheduledTrigger(TimeWindowView.java:76)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:898)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:622)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:503)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:474)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:377)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:212)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:186)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

due to the fact that my where clause is not "appropriate", but it's not why i'm filling this bug. This classCast exception comes from the FilterExprView.filterEvents method but this view is only a child and in this case this view is only updated because it's been registered with the others into the TimeWindowView.

My point is that shouldn't views :

  • whether handle themselves exceptions thrown during update
  • or when processing children views, ensure that if a child's update method fails it doesn't prevent the other views from getting the information.

especially when they compiles (due, i guess, to the fact that when using views the AST Tree walker lose the types available in the where clause ??)

Thank you for your time.



 Comments   
Comment by Thomas Bernhardt [ 26/Jan/11 ]

Replaced by two independent JIRA:
http://jira.codehaus.org/browse/ESPER-550
http://jira.codehaus.org/browse/ESPER-551





[ESPER-547] Support for more granular triggering stream selection for joins (expand 'unidirectional') Created: 25/Jan/11  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Petar Dimitrov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I often need to join multiple data windows in Esper like this:

insert into targetWin select ... from
winA inner join winB on ... inner join winC on ...

In many cases, I would only want to trigger the insert when events arrive in winA or winB, but not in winC. In that case, I would build two separate EPLs:

insert into targetWin select ... from
winA unidirectional inner join winB on ... inner join winC on ...

insert into targetWin select ... from
winA inner join winB unidirectional on ... inner join winC on ...

I would be nice to have a similar keyword which lets you specify more than one event streams which trigger the EPL, for example like this:

insert into targetWin select ... from
winA directional inner join winB directional on ... inner join winC on ...

Alternatively (or in addition , there may be a keyword to specifically exclude an event stream from triggering the EPL like this:

insert into targetWin select ... from
winA inner join winB on ... inner join winC nondirectional on ...

Note that in all cases, it would still be desirable to get the latest value for the join from winC (the way unidirectional currently works).



 Comments   
Comment by Petar Dimitrov [ 25/Jan/11 ]

Sorry, should have created the issue with a "Minor" priority, but cannot find a way to edit it now

Comment by Thomas Bernhardt [ 25/Jan/11 ]

Changed to "minor" priority.





[ESPER-546] "Last" aggregation function with on-select returns inconsistent results Created: 19/Jan/11  Updated: 19/Jan/11  Resolved: 19/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When used with on-select to query a named window, the "last" aggregation function may return not the last value in the data window but any other value.

Sample test:

public void testLastMaxMixedOnSelect() {
epService.getEPAdministrator().createEPL("create window MyWindow.win:keepall() as SupportBean");
epService.getEPAdministrator().createEPL("insert into MyWindow select * from SupportBean(string like 'A%')");

String epl = "on SupportBean(string like 'B%') select last(mw.intPrimitive) as li, max(mw.intPrimitive) as mi from MyWindow mw";
EPStatement stmt = epService.getEPAdministrator().createEPL(epl);
stmt.addListener(listener);
String[] fields = "li,mi".split(",");

epService.getEPRuntime().sendEvent(new SupportBean("A1", 10));
epService.getEPRuntime().sendEvent(new SupportBean("B1", -1));
ArrayAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{10, 10}

);

for (int i = 11; i < 20; i++) {
epService.getEPRuntime().sendEvent(new SupportBean("A1", i));
epService.getEPRuntime().sendEvent(new SupportBean("Bx", -1));
ArrayAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{i, i}

);
}

epService.getEPRuntime().sendEvent(new SupportBean("A1", 1));
epService.getEPRuntime().sendEvent(new SupportBean("B1", -1));
ArrayAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{1, 19}

);

epService.getEPRuntime().sendEvent(new SupportBean("A1", 2));
epService.getEPRuntime().sendEvent(new SupportBean("B1", -1));
ArrayAssertionUtil.assertProps(listener.assertOneGetNewAndReset(), fields, new Object[]

{2, 19}

);
}



 Comments   
Comment by Thomas Bernhardt [ 19/Jan/11 ]

change in trunk for 4.1 release

Comment by Mitch [ 19/Jan/11 ]

also applies to first(), nth etc





[ESPER-545] startAllStatements() does not re-initialize variables Created: 19/Jan/11  Updated: 31/Mar/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4, 4.0 - requires JDK6
Fix Version/s: 5.0

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Variable is created as follows:
"create variable int FOO = 0"
and changed as
"on pattern [every MyEvent] set FOO = FOO + 1"

rules are stopped and restarted after sending a few events using API:
admin.stopAllStatements();
admin.startAllStatements();

the variable FOO keeps its old value instead of being reinitialized.



 Comments   
Comment by Thomas Bernhardt [ 19/Jan/11 ]

A "stop" operation for a statement means it will receive no more events or time however the statement retains the references to variables and event types. With "destroy" all such references are relieved. If a reference still exists then stopping and starting does not override the current variable value as the variable is still in use.
It is easy to reset a variable via runtime API or "on-set" so other solutions exist.

Comment by Thomas Bernhardt [ 31/Mar/11 ]

Can use destroy instead, thus closed.





[ESPER-544] Prefer more specific update method over less specific update method in subscriber Created: 17/Jan/11  Updated: 08/Oct/12  Resolved: 25/Sep/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 4.7

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Assume a subscriber class has two update methods:

class TestSubscriber

{ public void update(String key, OrderEvent orderEvent) public void update(Object[] row) }

The first update method is a more specific footprint then the second method. It would be nice if the engine, when a subscriber with multiple suitable update methods is provided, chooses the most specific in terms of parameter types matching the select clause.

This is assigned to version 5 as any 4.x version must be consistent in the update-method chosen.



 Comments   
Comment by Thomas Bernhardt [ 25/Sep/12 ]

Change in enhancements500 branch

Comment by Thomas Bernhardt [ 08/Oct/12 ]

in release 4.7.0





[ESPER-543] Multiple engine instances same thread sending and receiving problem Created: 14/Jan/11  Updated: 19/Jan/11  Resolved: 14/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Assume two engine instances are initialized.
A thread sends an event into engine A, a listener receives the event and sends the same underlying to engine B (all the same thread, default threading).
In the situation where multiple individual events must be delivered to the listener to engine A, the remaining outstanding deliveries can be lost when the same thread send the events into engine B.

Workaround: use a threading barrier (queue/threadpool) or configure inbound or outbound (or both) threading when sending events between engine instances from the same thread.



 Comments   
Comment by Thomas Bernhardt [ 14/Jan/11 ]

Change in enhancements410 branch for 4.1 release





[ESPER-542] The esper-4.0.0.jar in maven central repository can't be installed using maven because it contains the 'production' path. Created: 11/Jan/11  Updated: 19/Jan/11  Resolved: 19/Jan/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Tina Vießmann Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

~ apache maven 2.2.1


Number of attachments : 0

 Description   

The jar used for the maven central repository contains the 'production' path next to the normal path. Therefor the jar can't be installed using maven. (http://mvnrepository.com/artifact/com.espertech/esper/4.0.0)



 Comments   
Comment by Tina Vießmann [ 11/Jan/11 ]

a extract of the error message is:

[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/regression/adapter/TestCSVAdapterUseCasesBean.class but the path in the jar is test/esperio-csv/com/espertech/esperio/regression/adapter/TestCSVAdapterUseCasesBean.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/support/util/ArrayCompareUtil.class but the path in the jar is test/esperio-csv/com/espertech/esperio/support/util/ArrayCompareUtil.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/support/util/ExampleMarketDataBeanReadWrite.class but the path in the jar is test/esperio-csv/com/espertech/esperio/support/util/ExampleMarketDataBeanReadWrite.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/support/util/SupportUpdateListener.class but the path in the jar is test/esperio-csv/com/espertech/esperio/support/util/SupportUpdateListener.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/ArrayAssertionUtil.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/ArrayAssertionUtil.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/SupportBean.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/SupportBean.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/SupportSocketClientCSV.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/SupportSocketClientCSV.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/SupportSocketClientObject.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/SupportSocketClientObject.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/SupportSocketUtil.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/SupportSocketUtil.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/SupportUpdateListener.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/SupportUpdateListener.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/TestSocketAdapterCSV.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/TestSocketAdapterCSV.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/TestSocketAdapterObject.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/TestSocketAdapterObject.class from Jar:lib/esper-4.0.0.jar
[ERROR] Error in manifest for mypackage:esper-proj:jar:0.1-SNAPSHOT : Class in different directory than declared. Path from class name is com/espertech/esperio/socket/config/TestConfig.class but the path in the jar is test/esperio-socket/com/espertech/esperio/socket/config/TestConfig.class from Jar:lib/esper-4.0.0.jar

Comment by Thomas Bernhardt [ 19/Jan/11 ]

Thanks for making us aware. We'll make sure 4.1 does not have this problem.





[ESPER-541] Esper-4.0.0.jar (Execution fails: no Main-Class attribute in mainifest.mf file) Created: 08/Jan/11  Updated: 06/Sep/11  Resolved: 09/Jan/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Horst Köhler Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64


Attachments: JPEG File Esper.JPG    
Number of attachments : 1

 Description   

I need help.
I am completely new to Esper. After having unzipped Esper-4.0.0 to my desktop folder, I tried to execute the esper-4.0.0.jar file as it is supposed by clicking twice. But all I get is the error message: "Failed to load Main-Class manifest attribute from C:\Users\Cerb\Desktop\Trading System\esper-4.0.0\esper-4.0.0.jar"

I am not sure if it is the right place of forum to ask for help and whether it is a bug or not. If not, I kindly appologize but please help me to start that jar-file.

I have already tried to open the maifest.mf file within the jar and to write something like "Main-Class: classname" to indicate the entry point of the jar application but it didn't work. Probably because I don't actually know where the entry point is and where to set it.

Any helpful answer would be appreciated.



 Comments   
Comment by Thomas Bernhardt [ 09/Jan/11 ]

The Esper CEP engine is an Java component (JAR) that runs in a server of your own environment or within Espertech's Enterprise Edition server. Enterprise Edition is a download from http://www.espertech.com

Comment by Horst Köhler [ 09/Jan/11 ]

Dear Mr. Bernhardt, could You provide further information on that issue?
Do You mean that I need "Espertech's Enterprise Edition server" for running Esper?
On that site: http://esper.codehaus.org/esper/building/building.html is written: "You can start using Esper with the binary jar that is included in all distributions. There is no need to build your own kit at all unless your goal is to contribute.
You also do not need to build Esper to run the examples. Please follow the instructions in the readme file in the "examples/etc" folder to run the examples."
I thought I could run Esper in Eclipse or run it just by executing the jar file (esper-4.0.0.jar) after downloading and unzipping the zip file from that site: http://esper.codehaus.org/esper/download/download.html.

Furthermore I thought Esper is a freely available open source application and Espertech's Enterprise Edition server is not freely available.

Could You please tell me what to do to run Esper after all or at least the examples I mentioned above?

Comment by Thomas Bernhardt [ 09/Jan/11 ]

You do not need Enterprise Edition to run Esper but you can use it to run Esper.
Please check out the examples that come with the distribution as described in http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/examples.html

Comment by Thomas Bernhardt [ 09/Jan/11 ]

user@esper.codehaus.org is best for questions

Comment by irvin telepeni [ 06/Sep/11 ]

Hi,

I'm facing the same problem. Has this been solved yet? I am not quite sure how to run both esper and esperee?

Apologies if this looks trivial.

Many thanks,

I

Comment by Thomas Bernhardt [ 06/Sep/11 ]

Esper Enterprise Edition has a "running.txt" file in the root folder of the distribution.

Esper as downloaded from Codehaus can only be run by running any of the examples that ship with the Esper distribution.





[ESPER-540] For Event Objects Populated by Insert Into support constructor injection Created: 06/Jan/11  Updated: 19/Apr/11  Resolved: 10/Apr/11

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

See http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/event_representation.html#eventrep-insertinto

Currently only JavaBean style is supported, requiring an empty ctor. The suggestion is to support constructor calls as well.



 Comments   
Comment by Thomas Bernhardt [ 17/Jan/11 ]

Assigned to 5.0 release as this can potentially change the behavior of existing apps using 4.x

Comment by Thomas Bernhardt [ 10/Apr/11 ]

Moved to 4.2

Comment by Thomas Bernhardt [ 10/Apr/11 ]

in 4.2 release

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2





[ESPER-539] Support for insert-into to specifiy the fully-qualified class name Created: 06/Jan/11  Updated: 19/Jan/11  Resolved: 16/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example:
insert into com.mycompany.MyEvent select abc from MyStream

The insert-into currently supports a stream name, adding support for a fully-qualified class name could round this up compared to from-clause and on-clause support for fully-qualified class names, and UDF support as well.






[ESPER-538] Support for auto-event name in insert-into (populate underlying event) Created: 06/Jan/11  Updated: 19/Jan/11  Resolved: 16/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example:
insert into MyEvent select abc from MyStream

When "MyEvent" is an auto-import (auto-name) event it could be discovered automatically but currently isn't.






[ESPER-537] NullpointerException in Create-Window with Model-after Syntax when a nested property does not exist Created: 05/Jan/11  Updated: 19/Jan/11  Resolved: 05/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement:
create window MyWindow.win:keepall() as select innermap.abc from OuterMap

In the example, when the OuterMap type has an innermap property and that does not have the "abc" field, throws NPE as below.

Caused by: java.lang.NullPointerException

at
com.espertech.esper.util.JavaClassHelper.resolveIdentAsEnumConst(JavaClassHe
lper.java:1454)

at
com.espertech.esper.epl.expression.ExprNode.resolveIdentAsEnumConst(ExprNode
.java:379)

at
com.espertech.esper.epl.expression.ExprNode.resolveStaticMethodOrField(ExprN
ode.java:283)

at
com.espertech.esper.epl.expression.ExprNode.getValidatedSubtree(ExprNode.jav
a:106)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.compileLimitedSelect(Stat
ementLifecycleSvcImpl.java:1236)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.handleCreateWindow(Statem
entLifecycleSvcImpl.java:1151)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycl
eSvcImpl.java:1046)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLi
fecycleSvcImpl.java:207)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementL
ifecycleSvcImpl.java:158)

at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementL
ifecycleSvcImpl.java:114)

at
com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorIm
pl.java:104)

at
com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.j
ava:70)



 Comments   
Comment by Thomas Bernhardt [ 05/Jan/11 ]

Bug fix in bugfix400 branch





[ESPER-536] NPE using Output Limiting clause with an EPStatementObjectModel - ExprTimePeriod Created: 04/Jan/11  Updated: 19/Jan/11  Resolved: 17/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Olivier Girardot Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux - Ubuntu - X86-64 with IntelliJ Idea 10 and JDK 6


Number of attachments : 0

 Description   

Hi,
i had an issue using Output Limit Clauses. I wanted to do the following :

  • compile the EPL Statement into an EPStatementObjectModel
  • analyse dependencies and output streams (insert into clauses etc...)
  • then create the EPStatement using this very same model.

The problem was using a statement of this kind (i created one reproducing the bug, with no dependency from my part) :

> Select * from pattern[every timer:interval(10 seconds)] output last every 2 seconds

But this statement didn't want to compile and a NullPointerException was thrown (and catched internally by Esper). The root cause is from this code :

In com.espertech.esper.epl.expression.ExprTimePeriod
> Double result = eval(evaluators[exprCtr], eventsPerStream, exprEvaluatorContext);

evaluators is used even if it's null because the "com.espertech.esper.epl.expression.ExprTimePeriod#validate" method was not called.

I went back to understand, and here's the conclusion :
The problem is coming from the "Back And Forth" between the EPStatementObjectModel object and the StatementSpecRaw object, the com.espertech.esper.epl.spec.StatementSpecMapper#map method is doing an incomplete job not restoring the "evaluators".

the com.espertech.esper.epl.spec.StatementSpecMapper#mapExpressionFlat method is taking care of the TimePeriodExpression :
> else if (expr instanceof TimePeriodExpression)
>

{ > TimePeriodExpression tpe = (TimePeriodExpression) expr; > return new ExprTimePeriod(tpe.isHasDays(), tpe.isHasHours(), tpe.isHasMinutes(), tpe.isHasSeconds(), tpe.isHasMilliseconds()); > }

and the com.espertech.esper.epl.spec.StatementSpecMapper#mapExpressionRecursive is taking care of the childNodes for the ExprTimePeriod, but afterwards no-one calls the com.espertech.esper.epl.expression.ExprTimePeriod#validate method and therefor "evaluators" is null and the ExprTimePeriod instance is not usable...

A simple work around for this is to use the model for what one needs, and then compile the statement using the priorly defined EPL Statement (String) called condition in the following example :

EPStatementObjectModel statementObjectModel = administrator.compileEPL(condition);
// analyse dependencies :
dependencies = new ArrayList<String>();
...

// find if an output stream is created
insertInto = statementObjectModel.getInsertInto();

// create the statement :
if(statementName != null)

{ statement = administrator.createEPL(condition, statementName); }

else

{ statement = administrator.createEPL(condition); }

thank you for your time,

Regards,

Olivier.



 Comments   
Comment by Thomas Bernhardt [ 17/Jan/11 ]

Change in version 4.1





[ESPER-535] "Previous" function when used under single-row plug-in function or user-defined function not compiling in match-recognize Created: 27/Dec/10  Updated: 19/Jan/11  Resolved: 27/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement:

select * from TemperatureSensorEvent match_recognize (
partition by device
measures A as b
pattern (A)
define A as ((Math.abs(A.temp-prev(A.temp)))/prev(A.temp)*100)>10)

com.espertech.esper.client.EPStatementException: Error starting statement:
Previous function cannot be used in this context [select * from
TemperatureSensorEvent match_recognize (partition by device measures A as
b pattern (A) define A as
((Math.abs(A.temp-prev(A.temp)))/prev(A.temp)*100)>10)]
at
com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:579)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:533)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:159)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:114)
at
com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:104)
at
com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:55)
at cat.acm.test.MatchWindow.testMatchCase(MatchWindow.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)



 Comments   
Comment by Thomas Bernhardt [ 27/Dec/10 ]

In bugfix400 branch





[ESPER-534] Allow Configuration setting of the two group-by @Hint default values Created: 21/Dec/10  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: Esper wishlist

Type: Improvement Priority: Minor
Reporter: Theo Schlossnagle Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In queries you may specify:

@Hint('reclaim_group_aged=60,reclaim_group_freq=30')

It would be good to allow those to be set globally to user-specified values via Configuration and still allow the @Hint override.






[ESPER-533] NullpointerException in Pattern And-state with timer:interval and "not" Created: 14/Dec/10  Updated: 19/Jan/11  Resolved: 14/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA533.jar    
Number of attachments : 1

 Description   

Sample statement where this infrequently get reported:

select
*, -1l as threshold_status
from pattern [ every a=A -> every (timer:interval(a.cycle + 15) and not new=B(company=a.company)) ]' : null
java.lang.NullPointerException
at com.espertech.esper.pattern.EvalAndStateNode.evaluateTrue(EvalAndStateNode.java:90)
at com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:49)
at com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:50)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:892)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:622)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:503)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:474)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:377)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:212)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:186)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Thomas Bernhardt [ 14/Dec/10 ]

We are issuing a cumulative patch for this issue for use with version 4.0. Please add the patch to the classpath before "esper-4.0.0.jar".

This is a cumulative patch, remove all other patches for version 4 from classpath, if any.

The patch fixes this issue as well as the following issues:
ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable
ESPER-512 EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object
ESPER-514 Allow XML event type update at runtime via ConfigurationOperations (QIQ-175889)
ESPER-516 Insert into stream defined by a schema created as a map schema with property type being an event type not compiling
ESPER-520 Possible memory leak using @Hint('reclaim_group_aged=xxx') with time windows
ESPER-521 Insert into stream defined by a schema created as a map schema with property type being an event type not populating when inserted from a map schema stream





[ESPER-532] Function coalesce doesn't work with aggregation Created: 09/Dec/10  Updated: 10/Dec/10  Resolved: 09/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jiri Karpisek (Mycroft Mind) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello,
I would like to report that coalesce probably doesn't work with aggregation, Following statement can return NULL value:

SELECT
id as id
sum(coalesce(Volume, 0)) as sumDelivery,
current_timestamp() as timeStamp
FROM DeliveryWin
GROUP BY id
OUTPUT LAST at (59, 23, *, *, *, 59)

  • DeliveryWin is named window what hold deliveries and in given time remove them. (so the group can be empty in time of output)

This statement may return (and really returns) the NULL value for sumDelivery



 Comments   
Comment by Thomas Bernhardt [ 09/Dec/10 ]

The "sum" aggregation function returns null if there are no values to aggregate, i.e. when events leave a data window.

Comment by Jiri Karpisek (Mycroft Mind) [ 10/Dec/10 ]

So is there any chance how to suppress the NULL value when using sum?

Comment by Thomas Bernhardt [ 10/Dec/10 ]

coalesc(sum(...), 0)





[ESPER-531] Avg used as property name for Map properties gets folded to lower-case Created: 02/Dec/10  Updated: 03/Dec/10  Resolved: 02/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Major
Reporter: Dan Douglas Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following example code

Map<String, Object> props = new HashMap<String, Object>();
props.put("Name", String.class);
props.put("Avg", double.class);

EPServiceProvider sp = EPServiceProviderManager.getProvider("BugTest");
sp.getEPAdministrator().getConfiguration().addEventType("Transactions",props);

EPStatement stmt = sp.getEPAdministrator().createEPL("select Name, Avg from Transactions");

generates this exception

com.espertech.esper.client.EPStatementException: Error starting statement:
Property named 'avg' is not valid in any stream (did you mean 'Avg'?)
[select Name, Avg from Transactions]

Notice that we're referencing 'Avg' in the query, but 'avg' gets flagged.

It's not a trivial issue for us since we're actually creating the event streams from thousands of .csv files that use Avg as a column heading.

We'll come up with some work-around for now, but this folding of Avg to avg by the query parser seems to be some sort of bug.

It seems to apply to other reserved keywords allowed as property names as well. For example, replacing 'Avg' as 'Min' in the above snippet yields the same result. 'avg' or 'min' used throughout work fine. They are valid property names and at least some part of the system respects case when they are defined. However, it seems that the EPL parsing folds the keywords to lower case, even when they are used as property names.



 Comments   
Comment by Thomas Bernhardt [ 02/Dec/10 ]

"avg" is a reserved keyword, see doc list for reserved keywords

Comment by Dan Douglas [ 02/Dec/10 ]

Thanks for the quick response, but I think you're wrong... or the documentation is.

"avg" is a keyword.

"Avg" is not. (case-sensitive is default)

The doc ALSO states that "avg" is allowed as a property name

http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/appendix_keywords.html

(avg has "yes" in the second column of this table indicating that it is allowed as a property name)

Comment by Dan Douglas [ 02/Dec/10 ]

Reopenning issue.

The example us using "Avg" as a property name, not "avg".

Even if "avg" was being used, according to

http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/appendix_keywords.html

it is allowed as a property name.

Comment by Thomas Bernhardt [ 02/Dec/10 ]

All keywords are case-insensitive.

Comment by Dan Douglas [ 02/Dec/10 ]

Are you also saying that keywords CANNOT be used as property names, despite what is documented at

http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/appendix_keywords.html

Comment by Dan Douglas [ 02/Dec/10 ]

There seem to be several principles at work here.

a) ALL KEYWORDS ARE CASE-INSENSITIVE: So the parser is folding keywords to lower case as they are found.

b) CASE-SENSITIVE PROPERTY NAMES IS THE DEFAULT AND ONLY METHOD ALLOWED FOR MAP-BASED EVENTS. The option allowed for POJOs does not seem to apply to map-based events.

c) SOME KEYWORDS ARE ALLOWED AS PROPERTY NAMES. However, because of a) and b) above, they cannot be referenced in EPL queries unless that are lowercase.

Comment by Dan Douglas [ 02/Dec/10 ]

Just to close this out. I worked around this issue by using a PushbackInputStream to change our .csv file column names on the fly. We changed where we used "Avg" to be "avg" and everything works fine now.

Comment by Thomas Bernhardt [ 02/Dec/10 ]

One uses the escape syntax to make it clear what is meant with "avg"

Comment by Dan Douglas [ 03/Dec/10 ]

You mean as documented here

http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/epl_clauses.html#epl-syntax-keywords

and that reworking the example as

  Map<String, Object> props = new HashMap<String, Object>();
  props.put("Name", String.class);
  props.put("Avg", double.class);
		
  EPServiceProvider sp = EPServiceProviderManager.getProvider("BugTest");	  
  sp.getEPAdministrator().getConfiguration().addEventType("Transactions",props);
		
  EPStatement stmt = sp.getEPAdministrator().createEPL(
	"select Name, `Avg` from Transactions");

would work?

That would have been cool, but it doesn't help. I still get this exception

  com.espertech.esper.client.EPStatementException: 
    Error starting statement: 
    Property named 'avg' is not valid in any stream (did you mean 'Avg'?) 
    [select Name, Avg from Transactions] at
  com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal
    (StatementLifecycleSvcImpl.java:579)

The problem is not that the use of "Avg" as a property name is being flagged as a keyword. What's happening is that "Avg" is being forced to lower case by the statement parser, even if it is escaped as `Avg`. So, when the statement if validated Esper looks for a property named "avg" and cannot find it, because the property is defined as "Avg". avg as a property name works fine.

The restriction is that if you use a keyword for a property name it must be all lower case if you want to be able to reference it in an EPL statement.





[ESPER-530] Support for loading an XML schema from a string Created: 28/Nov/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently the configuration supports loading a schema from a classpath URL, it would be nice if the schema could be provided as a string



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

Change in branch enhancements410





[ESPER-529] create-schema to allow dot characters in property names Created: 28/Nov/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It's probably a minor issue, but I cannot find a way to create an event with a property that has a dot in it, when trying to use "create schema".

I can create such an event if I use the old addEventType method like this:

HashMap<String,Object> eventConfig = new HashMap<String,Object>();
eventConfig.put("product.name", "string");
eventConfig.put("productsize", "int");
epService.getEPAdministrator().getConfiguration().addEventType("Product", eventConfig);

But any of the following attempts fails:

epService.getEPAdministrator().createEPL("create schema Product (product.name string, productsize int)");
epService.getEPAdministrator().createEPL("create schema Product (product
.name string, productsize int)");
epService.getEPAdministrator().createEPL("create schema Product (`product.name` string, productsize int)");
epService.getEPAdministrator().createEPL("create schema Product (`product
.name` string, productsize int)");

I'd like to move to the EPL Modules and the new packaging and deployment features, but I have some legacy events with dots in their properties and cannot seem to find a way around them



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

change is in enhancements410 branch





[ESPER-528] Unidirectional left outer join between same streams (self join) when used with staggered time-window and grouped view causes out of memory Created: 23/Nov/10  Updated: 19/Jan/11  Resolved: 06/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

import java.util.HashMap;
import java.util.Map;
import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;

public class EsperTest2 {
private EPServiceProvider epService = EPServiceProviderManager.getProvider("ESPER1", new Configuration());

public void testDuplicates() {
epService.getEPAdministrator().createEPL("create schema Product (product string, productsize int)");
epService.getEPAdministrator().createEPL("create schema Product2 (product string, productsize int)");

String query = "@Hint('reclaim_group_aged=5,reclaim_group_freq=5') " +
" insert into Product2" +
" select Product.product as product, Product.productsize as productsize from Product unidirectional" +
" left outer join Product.win:time(3 seconds).std:groupwin(product,productsize).std:size() PrevProduct on Product.product=PrevProduct.product and Product.productsize=PrevProduct.productsize" +
" having PrevProduct.size<2";

epService.getEPAdministrator().createEPL(query);

for (int i=0; ; i++) {
sendProduct("The id of this product is deliberately very very long so that we can use up more memory per instance of this event sent into Esper " + i, i);
try

{Thread.sleep(1);}

catch (Exception e) {}
if (i % 2000 == 0) System.out.println("i=" + i + "; Allocated: " + Runtime.getRuntime().totalMemory() / 1024 / 1024 + "; Free: " + Runtime.getRuntime().freeMemory() / 1024 / 1024);
}
}

private void sendProduct(String product, int size)

{ Map<String, Object> event = new HashMap<String, Object>(); event.put("product", product); event.put("productsize", size); epService.getEPRuntime().sendEvent(event, "Product"); }

public static void main(String[] args) throws Exception

{ (new EsperTest2()).testDuplicates(); }


}

The purpose of the query in green is to eliminate subsequent duplicate events (that is, send an event as soon as it receives it, but if the very same event is received again within the next 3 seconds, ignore it).

I am running the above app on a Java 1.6, giving it 128MB of memory. The JVM parameters look like this: -Xms128m -Xmx128m -verbose:gc -XX:+PrintGCTimeStamps

The build path in Eclipse looks like this (esper-4.0.0-JIRA520-1.jar appears before esper-4.0.0.jar):

The above test case runs for about 1-2 minutes sending about 100,000 events before it uses up the 128MB of memory and eventually dies with an OutOfMemory exception. The output look like this:

i=0; Allocated: 123; Free: 102
i=2000; Allocated: 123; Free: 95
4.760: [GC 34944K->7004K(126720K), 0.0327559 secs]
i=4000; Allocated: 123; Free: 115
i=6000; Allocated: 123; Free: 106
i=8000; Allocated: 123; Free: 97
i=10000; Allocated: 123; Free: 87
12.459: [GC 41948K->18697K(126720K), 0.0765807 secs]
i=12000; Allocated: 123; Free: 101
i=14000; Allocated: 123; Free: 92
i=16000; Allocated: 123; Free: 83
i=18000; Allocated: 123; Free: 74
20.359: [GC 53641K->31100K(126720K), 0.0820961 secs]
i=20000; Allocated: 123; Free: 86
i=22000; Allocated: 123; Free: 77
i=24000; Allocated: 123; Free: 68
i=26000; Allocated: 123; Free: 59
27.958: [GC 66044K->43115K(126720K), 0.0727693 secs]
i=28000; Allocated: 123; Free: 72
i=30000; Allocated: 123; Free: 63
i=32000; Allocated: 123; Free: 53
35.675: [GC 78059K->55787K(126720K), 0.0782690 secs]
i=34000; Allocated: 123; Free: 66
i=36000; Allocated: 123; Free: 57
i=38000; Allocated: 123; Free: 48
i=40000; Allocated: 123; Free: 38
43.358: [GC 90731K->67603K(126720K), 0.0752499 secs]
i=42000; Allocated: 123; Free: 53
i=44000; Allocated: 123; Free: 43
i=46000; Allocated: 123; Free: 34
i=48000; Allocated: 123; Free: 26
51.070: [GC 102547K->80032K(126720K), 0.0734721 secs]
i=50000; Allocated: 123; Free: 37
i=52000; Allocated: 123; Free: 29
i=54000; Allocated: 123; Free: 19
58.559: [Full GC 114976K->62397K(126720K), 0.2778561 secs]
i=56000; Allocated: 123; Free: 61
i=58000; Allocated: 123; Free: 52
i=60000; Allocated: 123; Free: 43
i=62000; Allocated: 123; Free: 34
66.533: [GC 97341K->74994K(126720K), 0.0634840 secs]
i=64000; Allocated: 123; Free: 46
i=66000; Allocated: 123; Free: 38
i=68000; Allocated: 123; Free: 28
i=70000; Allocated: 123; Free: 19
74.215: [GC 109938K->87276K(126720K), 0.0714527 secs]
i=72000; Allocated: 123; Free: 32
i=74000; Allocated: 123; Free: 23
i=76000; Allocated: 123; Free: 14
i=78000; Allocated: 123; Free: 5
81.882: [Full GC 122220K->81302K(126720K), 0.3231844 secs]
i=80000; Allocated: 123; Free: 36
i=82000; Allocated: 123; Free: 27
i=84000; Allocated: 123; Free: 18
89.859: [Full GC 116246K->89712K(126720K), 0.3481371 secs]
i=86000; Allocated: 123; Free: 34
i=88000; Allocated: 123; Free: 25
i=90000; Allocated: 123; Free: 16
i=92000; Allocated: 123; Free: 7
98.338: [Full GC 126719K->91557K(126720K), 0.3767400 secs]
i=94000; Allocated: 123; Free: 3
99.907: [Full GC 126719K->93720K(126720K), 0.3112051 secs]
i=96000; Allocated: 123; Free: 2
i=98000; Allocated: 123; Free: 1
105.259: [Full GC 126720K->101949K(126720K), 0.3375009 secs]
i=100000; Allocated: 123; Free: 3
106.844: [Full GC 126720K->101557K(126720K), 0.3188777 secs]
i=102000; Allocated: 123; Free: 3
i=104000; Allocated: 123; Free: 2
112.160: [Full GC 126719K->102043K(126720K), 0.3905339 secs]
i=106000; Allocated: 123; Free: 3
113.777: [Full GC 126719K->103793K(126720K), 0.3281260 secs]
i=108000; Allocated: 123; Free: 3
i=110000; Allocated: 123; Free: 1
119.160: [Full GC 126720K->108969K(126720K), 0.3676355 secs]
i=112000; Allocated: 123; Free: 4
120.725: [Full GC 126720K->110614K(126720K), 0.3498020 secs]
i=114000; Allocated: 123; Free: 1
122.330: [Full GC 126720K->109473K(126720K), 0.3568286 secs]
i=116000; Allocated: 123; Free: 3
i=118000; Allocated: 123; Free: 0
126.637: [Full GC 126719K->112681K(126720K), 0.3705914 secs]
i=120000; Allocated: 123; Free: 2
130.160: [Full GC 126720K->117271K(126720K), 0.3749454 secs]
i=122000; Allocated: 123; Free: 1
131.768: [Full GC 126719K->116692K(126720K), 0.3715266 secs]
i=124000; Allocated: 123; Free: 2
134.386: [Full GC 126719K->119672K(126720K), 0.3812152 secs]
136.049: [Full GC 126719K->121649K(126720K), 0.3775852 secs]
i=126000; Allocated: 123; Free: 3
137.456: [Full GC 126719K->120463K(126720K), 0.3812975 secs]
i=128000; Allocated: 123; Free: 0
139.261: [Full GC 126719K->122580K(126720K), 0.3825558 secs]
140.622: [Full GC 126719K->123652K(126720K), 0.3833216 secs]
141.621: [Full GC 126720K->122244K(126720K), 0.3873792 secs]
i=130000; Allocated: 123; Free: 2
143.035: [Full GC 126720K->123696K(126720K), 0.3785055 secs]
144.082: [Full GC 126719K->124653K(126720K), 0.3811623 secs]
144.930: [Full GC 126719K->125157K(126720K), 0.3822166 secs]
145.592: [Full GC 126719K->125574K(126720K), 0.3866073 secs]
i=132000; Allocated: 123; Free: 0
146.212: [Full GC 126720K->125887K(126720K), 0.3844535 secs]
146.697: [Full GC 126720K->123805K(126720K), 0.3841348 secs]
147.776: [Full GC 126719K->124584K(126720K), 0.3733109 secs]
148.651: [Full GC 126719K->125426K(126720K), 0.3825430 secs]
149.332: [Full GC 126719K->125872K(126720K), 0.3836476 secs]
149.932: [Full GC 126719K->126217K(126720K), 0.3835187 secs]
150.370: [Full GC 126719K->126148K(126720K), 0.3855629 secs]
i=134000; Allocated: 123; Free: 0
150.855: [Full GC 126719K->126305K(126720K), 0.3831232 secs]
151.299: [Full GC 126719K->126363K(126720K), 0.3841250 secs]
151.725: [Full GC 126719K->124483K(126720K), 0.3757437 secs]
152.589: [Full GC 126719K->125046K(126720K), 0.3817903 secs]
153.364: [Full GC 126720K->125695K(126720K), 0.3831885 secs]
154.003: [Full GC 126719K->126112K(126720K), 0.3792278 secs]
154.532: [Full GC 126719K->126348K(126720K), 0.3846067 secs]
155.018: [Full GC 126719K->126443K(126720K), 0.3757348 secs]
155.398: [Full GC 126719K->126540K(126720K), 0.3800073 secs]
155.789: [Full GC 126720K->126404K(126720K), 0.3821940 secs]
156.193: [Full GC 126719K->126380K(126720K), 0.3792534 secs]
156.639: [Full GC 126719K->126438K(126720K), 0.3816303 secs]
157.038: [Full GC 126719K->125149K(126720K), 0.3739402 secs]
157.763: [Full GC 126719K->125632K(126720K), 0.3727819 secs]
i=136000; Allocated: 123; Free: 0
158.407: [Full GC 126719K->126059K(126720K), 0.3842948 secs]
158.968: [Full GC 126719K->126271K(126720K), 0.3773160 secs]
159.462: [Full GC 126719K->126501K(126720K), 0.3823894 secs]
159.887: [Full GC 126719K->126560K(126720K), 0.3771756 secs]
160.307: [Full GC 126719K->126631K(126720K), 0.3795670 secs]
160.688: [Full GC 126719K->126654K(126720K), 0.3741113 secs]
161.063: [Full GC 126719K->126712K(126720K), 0.3774141 secs]
161.441: [Full GC 126719K->126718K(126720K), 0.3768176 secs]
161.818: [Full GC 126719K->126719K(126720K), 0.3747961 secs]
162.193: [Full GC 126719K->126712K(126720K), 0.3783621 secs]
162.571: [Full GC 126719K->126719K(126720K), 0.3773616 secs]
162.949: [Full GC 126719K->126719K(126720K), 0.3723194 secs]
163.321: [Full GC 126719K->126719K(126720K), 0.3771641 secs]
163.699: [Full GC 126719K->126718K(126720K), 0.3721222 secs]
164.071: [Full GC 126719K->126719K(126720K), 0.3749527 secs]
164.446: [Full GC 126719K->126719K(126720K), 0.3760765 secs]
164.822: [Full GC 126719K->126719K(126720K), 0.3752223 secs]
165.198: [Full GC 126719K->126719K(126720K), 0.3760940 secs]
165.574: [Full GC 126719K->126719K(126720K), 0.3743724 secs]
165.948: [Full GC 126719K->126716K(126720K), 0.3717062 secs]
166.321: [Full GC 126719K->126717K(126720K), 0.3772908 secs]
166.698: [Full GC 126719K->126713K(126720K), 0.3748076 secs]
167.073: [Full GC 126719K->126717K(126720K), 0.3746050 secs]
167.449: [Full GC 126719K->126718K(126720K), 0.3749591 secs]
167.824: [Full GC 126719K->126718K(126720K), 0.3742607 secs]
168.199: [Full GC 126719K->126716K(126720K), 0.3772498 secs]
168.576: [Full GC 126719K->126719K(126720K), 0.3768799 secs]
168.953: [Full GC 126719K->126719K(126720K), 0.3709899 secs]
169.324: [Full GC 126719K->126719K(126720K), 0.3791783 secs]
169.704: [Full GC 126719K->126717K(126720K), 0.3756435 secs]
170.080: [Full GC 126719K->126719K(126720K), 0.3770331 secs]
170.457: [Full GC 126719K->126719K(126720K), 0.3779952 secs]
170.835: [Full GC 126719K->126718K(126720K), 0.3793861 secs]
171.215: [Full GC 126719K->126716K(126720K), 0.3776825 secs]
171.593: [Full GC 126719K->126717K(126720K), 0.3791280 secs]
171.972: [Full GC 126719K->126716K(126720K), 0.3781795 secs]
172.351: [Full GC 126719K->126715K(126720K), 0.3825933 secs]
172.734: [Full GC 126719K->126643K(126720K), 0.3788438 secs]
173.115: [Full GC 126716K->126655K(126720K), 0.3743353 secs]
2010-11-19 13:39:46,137 ERROR [EPLTimerTask] Timer thread caught unhandled exception: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.addEntry(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at com.espertech.esper.view.std.AddPropertyValueView.addProperty(AddPropertyValueView.java:202)
at com.espertech.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java:117)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.view.std.SizeView.update(SizeView.java:95)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:131)
at com.espertech.esper.view.std.GroupByViewReclaimAged.update(GroupByViewReclaimAged.java:163)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.view.window.TimeWindowView.expire(TimeWindowView.java:191)
at com.espertech.esper.view.window.TimeWindowView$1.scheduledTrigger(TimeWindowView.java:73)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:930)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:550)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:503)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:474)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:377)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:212)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:186)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/10 ]

Can only be reproduced in a unidirectional self-join and with a time window staggered on to of a groupwin.

Comment by Thomas Bernhardt [ 06/Dec/10 ]

bug fix in bugfix400 branch





[ESPER-527] memory leak is possible for unbound/unlimited keys used with every-distinct Created: 19/Nov/10  Updated: 19/Jan/11  Resolved: 06/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Nathan Reese Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

"every-distinct" behaves like "every" and restarts the sub-expression when inner sub-expression turns false. So the cleanup is only inner-sub-expression state and not every-distinct state. A memory leak is possible for unbound/unlimited keys used with every-distinct. The example statement below demonstrates the problem

select * from pattern [
every-distinct(event.timestamp) event=MyPojoEvent
where timer:within(xxx)
]

Can a language feature be added to specify the length of time that every-distinct keys live? This could either be an annotation or parameter on every-distinct keyword.



 Comments   
Comment by Thomas Bernhardt [ 06/Dec/10 ]

The changes are in enhancements410 branch.
Every-distinct now accepts an optional expiry_time_period parameter that indicates how long a key may live.

Comment by Thomas Bernhardt [ 06/Dec/10 ]

A simplified example is this statement:
select * from pattern [
every-distinct(event.timestamp, 10 sec) event=MyPojoEvent
]





[ESPER-526] Unidirectional inner join between two named windows when started late (named windows have data) produces too many rows for first result delivery Created: 18/Nov/10  Updated: 19/Jan/11  Resolved: 07/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

To reproduce the problem, the below test should produce 1 row but produces 2 rows.

public void testInnerJoinLateStart() {

epService.getEPAdministrator().createEPL("create schema Product (product string, size int)");
epService.getEPAdministrator().createEPL("create schema Portfolio (portfolio string, product string)");
epService.getEPAdministrator().createEPL("create window ProductWin.win:keepall() as Product");
epService.getEPAdministrator().createEPL("insert into ProductWin select * from Product");
epService.getEPAdministrator().createEPL("create window PortfolioWin.win:keepall() as Portfolio");
epService.getEPAdministrator().createEPL("insert into PortfolioWin select * from Portfolio");

sendProduct("productA", 1);
sendProduct("productB", 2);
sendPortfolio("Portfolio", "productA");

String stmtText = "@Name(\"Query2\") select portfolio, ProductWin.product, size " +
"from PortfolioWin unidirectional inner join ProductWin on PortfolioWin.product=ProductWin.product";
//String stmtText = "@Name(\"Query1\") select portfolio, ProductWin.product, size from Portfolio unidirectional inner join ProductWin on Portfolio.product=ProductWin.product";
EPStatement stmt = epService.getEPAdministrator().createEPL(stmtText);
stmt.addListener(listenerStmtOne);

sendPortfolio("Portfolio", "productB");

EventBean result = listenerStmtOne.assertOneGetNewAndReset();
ArrayAssertionUtil.assertProps(result, new String[]

{"portfolio", "ProductWin.product", "size"}

, new Object[]

{"Portfolio", "productB", 2}

);
}



 Comments   
Comment by Thomas Bernhardt [ 07/Dec/10 ]

change in bugfix400 branch





[ESPER-525] Provide auto-increment column type Created: 17/Nov/10  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

How can I implement an auto increment column in a sliding window or with a create window statement.



 Comments   
Comment by Thomas Bernhardt [ 16/Jan/11 ]

Assigned for version 5.

Awaiting comments for how important this feature is.

Comment by Thomas Bernhardt [ 21/May/12 ]

No comments received, can easily be accomplished via any of the UDF or extension





[ESPER-524] Automatic widening for arithmetic operations that overflow, to be disabled by configuration if desired Created: 13/Nov/10  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

select 100 * 30000000 as foo will result in foo=-1294967296
... which might well catch the unwary and is not SQL like.
You can do "100L * 30000000" or "100d * 30000000" but this is very Javaesque.



 Comments   
Comment by Thomas Bernhardt [ 13/Nov/10 ]

This would put the result type of all arithmetic operations to double (or BigDecimal if applicable).

Comment by Thomas Bernhardt [ 13/Nov/10 ]

Assigned to 5.0 as the change would result in unexpected "double" types as they are currently Java-esqe

{int, long, etc}
Comment by Thomas Bernhardt [ 21/May/12 ]

Not sensible, all ops would become BigDecimal





[ESPER-523] Scheduling service SPI to provide nearest time and statement info Created: 11/Nov/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Provide a way for SPI to retrieve the information that statements have currently started a timer and the duration of this timer and nearest time handle.



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

changes in enhancements410 branch





[ESPER-522] Provide time control event for advancing the system clock by a batch of ticks Created: 11/Nov/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Similar to the existing CurrentTimeEvent, it would be nice if there was a way to advance the system clock by a specified number of ticks without having to send the same number of events.

for example:
epService.getEPRuntime(new CurrentTimeSpanEvent(targetTime, tickResolution))



 Comments   
Comment by Thomas Bernhardt [ 11/Nov/10 ]

It would be nice if this is very efficient especially if the tick resolution is small (1)

Comment by Thomas Bernhardt [ 05/Dec/10 ]

Changes in enhancements410 branch





[ESPER-521] Insert into stream defined by a schema created as a map schema with property type being an event type not populating when inserted from a map schema stream Created: 09/Nov/10  Updated: 19/Jan/11  Resolved: 09/Nov/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA521.jar    
Number of attachments : 1

 Description   

For example, consider the following statements:
epService.getEPAdministrator().createEPL("create schema MyEvent(myId int)");
epService.getEPAdministrator().createEPL("create schema AllMyEvent as (myEvent MyEvent, class String, reverse boolean)");
epService.getEPAdministrator().createEPL("create schema SuspectMyEvent as (myEvent MyEvent, class String)");

EPStatement stmtOne = epService.getEPAdministrator().createEPL("insert into AllMyEvent " +
"select c as myEvent, 'test' as class, false as reverse " +
"from MyEvent(myId=1) c");
stmtOne.addListener(listener);

EPStatement stmtTwo = epService.getEPAdministrator().createEPL("insert into SuspectMyEvent " +
"select c.myEvent as myEvent, class " +
"from AllMyEvent(not reverse) c");

The "stmtTwo" result "myEvent" property shows as a null-value instead of carrying the proper event value.



 Comments   
Comment by Thomas Bernhardt [ 09/Nov/10 ]

We are issuing a cumulative patch for this issue for use with version 4. Please add the patch to the classpath before "esper-4.0.0.jar".

This is a cumulative patch, remove all other patches for version 4 from classpath, if any.

The patch fixes this issue as well as the following issues:
ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable
ESPER-512 EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object
ESPER-514 Allow XML event type update at runtime via ConfigurationOperations (QIQ-175889)
ESPER-516 Insert into stream defined by a schema created as a map schema with property type being an event type not compiling





[ESPER-520] Possible memory leak using @Hint('reclaim_group_aged=xxx') with time windows Created: 08/Nov/10  Updated: 19/Jan/11  Resolved: 09/Nov/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA520-1.jar    
Number of attachments : 1

 Description   

Sample EPL:
@Hint('reclaim_group_aged=5') select * from Event.std:groupwin(string).win:time(10 hours)

The hint instructs the engine to reclaim time windows that haven't been updated for 5 seconds. The time window schedule however is apparently not cleaned up, since when a larger number of time windows gets created they don't get immediately released on reclaim.

Workaround: use keep-all or std:unique window



 Comments   
Comment by Thomas Bernhardt [ 09/Nov/10 ]

We are issuing a cumulative patch for this issue for use with version 4. Please add the patch to the classpath before "esper-4.0.0.jar".

This is a cumulative patch, remove all other patches for version 4 from classpath, if any.

The patch fixes this issue as well as the following issues:
ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable
ESPER-512 EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object
ESPER-514 Allow XML event type update at runtime via ConfigurationOperations (QIQ-175889)
ESPER-516 Insert into stream defined by a schema created as a map schema with property type being an event type not compiling
ESPER-521 Insert into stream defined by a schema created as a map schema with property type being an event type not populating when inserted from a map schema stream

Comment by Thomas Bernhardt [ 13/Nov/10 ]

We are providing an updated patch to also address intersection and union as well as improve the fix for time windows.





[ESPER-519] Fire-and-Forget join on 2 named windows with where-clause filtering on one window's rows returns incorrect result Created: 05/Nov/10  Updated: 19/Jan/11  Resolved: 02/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem occurs when a fire-and-forget query is used to join 2 named windows and the where-clause has additional filter criteria that remove rows (other then the filter criteria providing join cardinality). See "value=1" filter below which does not get applied by the query processor.

For example:

cepAdm.createEPL("create window Win1.win:keepall() (key String, keyJoin String)");
cepAdm.createEPL("create window Win2.win:keepall() (keyJoin String, value double)");

Map event = new HashMap();
event.put("key", "key1");
event.put("keyJoin", "keyJoin1");
cepRT.sendEvent(event, "Win1");

event = new HashMap();
event.put("keyJoin", "keyJoin1");
event.put("value", "5");
cepRT.sendEvent(event, "Win2");

cepRT.executeQuery("select w1.key, w2.value from Win1 w1, Win2 w2 where w1.keyJoin = w2.keyJoin and value = 1").getArray();

The expected result should be empty but I'm still getting a record with a value = 5 when the query has the WHERE clause filtering out on the value.



 Comments   
Comment by Thomas Bernhardt [ 06/Nov/10 ]

Workaround is to use the having-clause as well.





[ESPER-518] NPE in fire-and-forget query against two named windows with group-by and aggregations when named windows are empty Created: 03/Nov/10  Updated: 19/Jan/11  Resolved: 02/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A join against two named windows with group-by and aggregations executed by a fire-and-forget query generates a NPE when the named window(s) are empty.

EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
engine.getEPAdministrator().createEPL("create window Win1.win:keepall() (key String, keyJoin String)");
engine.getEPAdministrator().createEPL("create window Win2.win:keepall() (keyJoin String, value double)");
EventBean[] events = engine.getEPRuntime().executeQuery("select w1.key, sum(value) from Win1 w1, Win2 w2 WHERE w1.keyJoin = w2.keyJoin GROUP BY w1.key").getArray();

java.lang.NullPointerException
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.generateGroupKeys(ResultSetProcessorRowPerGroup.java:441)
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.processJoinResult(ResultSetProcessorRowPerGroup.java:109)
at com.espertech.esper.core.EPPreparedExecuteMethod.execute(EPPreparedExecuteMethod.java:202)
at com.espertech.esper.core.EPRuntimeImpl.executeQuery(EPRuntimeImpl.java:1226)
at com.espertech.esper.regression.TestABC.testit(TestABC.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:108)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:192)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)






[ESPER-517] Error message "IllegalStateException: Event named ''a' not found in event pattern result set" is inaccurate Created: 03/Nov/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following pattern would not make sense.
The construct "not A -> B" would not make sense as "not A" turns true immediately upon start causing the engine to look for B. Thereby there is the "a" tag is not available in a subsequent pattern expression. We can see if we can improve the error message.

every (not a=A) -> B)

The "IllegalStateException" sounds like an internal error message rather then a pattern semantical error message.



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

Change in enhancements410 branch. Consistent with error reporting for other pattern constructs, this is now a runtime error logged at warning level





[ESPER-516] Insert into stream defined by a schema created as a map schema with property type being an event type not compiling Created: 28/Oct/10  Updated: 19/Jan/11  Resolved: 02/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA516.jar    
Number of attachments : 1

 Description   

For example:
epService.getEPAdministrator().createEPL("create schema MyEvent(myId int)");
epService.getEPAdministrator().createEPL("create schema CompositeEvent(c1 MyEvent, c2 MyEvent, rule string)");
epService.getEPAdministrator().createEPL("insert into MyStream select c, 'additionalValue' as value from MyEvent c");
epService.getEPAdministrator().createEPL("insert into CompositeEvent select e1.c as c1, e2.c as c2, '4' as rule " +
"from pattern [e1=MyStream -> e2=MyStream]");

The last statement "insert into CompositeEvent" fails to allow the insert determining that the inserted event is not compatible.



 Comments   
Comment by Thomas Bernhardt [ 28/Oct/10 ]

Workaround: don't define the target schema at all or define as a class.

Comment by Thomas Bernhardt [ 28/Oct/10 ]

We are making a cumulative patch available as attached.

The cumulative patch addresses this issue as well as below issues:
ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable
ESPER-512 EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object
ESPER-514 Allow XML event type update at runtime via ConfigurationOperations (QIQ-175889)





[ESPER-515] Extend time interval grammar to support weeks, months and years Created: 28/Oct/10  Updated: 19/Jan/11  Resolved: 04/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Could the following please be extended to include weeks, months and years?

time-period : [day-part] [hour-part] [minute-part] [seconds-part] [milliseconds-part]
day-part : (number|variable_name) ("days" | "day")
hour-part : (number|variable_name) ("hours" | "hour")
minute-part : (number|variable_name) ("minutes" | "minute" | "min")
seconds-part : (number|variable_name) ("seconds" | "second" | "sec")
milliseconds-part : (number|variable_name) ("milliseconds" | "millisecond" | "msec")

That would be awesome since I have to write lots of patterns that span large time intervals. I just had to write one for 730 days where 2 years would have been much more readable.



 Comments   
Comment by Thomas Bernhardt [ 04/Dec/10 ]

change in enhancements410 branch





[ESPER-514] Allow XML event type update at runtime via ConfigurationOperations (QIQ-175889) Created: 28/Oct/10  Updated: 19/Jan/11  Resolved: 28/Oct/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA514.jar    
Number of attachments : 1

 Description   

Currently XML event types cannot be updated at runtime. It would be useful to allow update of a existing type at runtime.
Also see QIQ-175889



 Comments   
Comment by Thomas Bernhardt [ 28/Oct/10 ]

A cumulative patch that addresses this improvement item is attached. Please include in the classpath before the esper-4.0.0.jar file.
The cumulative patch includes this JIRA and additionally the following JIRA:
ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable
ESPER-512 EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object

Comment by Thomas Bernhardt [ 28/Oct/10 ]

Patch available.
See "replaceXMLEventType" method in ConfigurationOperations.





[ESPER-513] On-Update set Error starting statement: Property 'u.v2' is not available for write access [on com.espertech.esper.support.bean.SupportBean update MyWindow as u set v1=string, u.v2=string] Created: 28/Oct/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When in an on-update statement any property to set is prefixed by the stream alias of the window to be updated, the statement does not compile. For example:

on SupportBean update MyWindow as u set v1=string, u.v2=string

...throws the following exception...
Error starting statement: Property 'u.v2' is not available for write access [on com.espertech.esper.support.bean.SupportBean update MyWindow as u set v1=string, u.v2=string]

Workaround: Don't use a stream prefix for the property to be updated, i.e.:
// works fine
on SupportBean update MyWindow as u set v1=string, v2=string



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

Change available in enhancements410 branch





[ESPER-512] EventBean getUnderlying method when both subscriber and listener are used returns Class and not the underlying object Created: 27/Oct/10  Updated: 19/Jan/11  Resolved: 28/Oct/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA512.jar    
Number of attachments : 1

 Description   

When both a listener and subscriber are registered, the received EventBean instance by the listener returns Object[].class instead of the underlying for the "getUnderlying()" call.



 Comments   
Comment by Thomas Bernhardt [ 27/Oct/10 ]

For example:
EPStatement s = epService.getEPAdministrator().createEPL(myEpl);
s.setSubscriber(new Object() {
@SuppressWarnings("unused")
public void update(Map x)

{log.debug("x:"+x);}


});
s.addListener(new UpdateListener() {
@Override
public void update(EventBean[] newEvents, EventBean[] oldEvents) {
for (EventBean b: newEvents)

{ log.debug(b.getUnderlying()); }


}
});

Comment by Thomas Bernhardt [ 27/Oct/10 ]

Cumulative patch for this issue and below issues:
http://jira.codehaus.org/browse/ESPER-511 Make CurrentTimeEvent and TimerControlEvent Serializable

Please add the patch in front of the classpath before esper-4.0.0.jar.

Approved for use with EsperHA.

Comment by Thomas Bernhardt [ 28/Oct/10 ]

Patch available





[ESPER-511] Make CurrentTimeEvent and TimerControlEvent Serializable Created: 27/Oct/10  Updated: 19/Jan/11  Resolved: 28/Oct/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-4.0.0-JIRA511.jar    
Number of attachments : 1

 Description   

Changing CurrentTimeEvent and TimerControlEvent to implement the Serializable interface allows these events to be sent via adapters.



 Comments   
Comment by Thomas Bernhardt [ 27/Oct/10 ]

We are issuing a patch in attached file that corrects this issue. Please add to the classpath in front of esper-4.0.0.jar.

Comment by Thomas Bernhardt [ 28/Oct/10 ]

Patch available.





[ESPER-510] Support for event array for event objects populated by insert into Created: 23/Oct/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

http://esper.codehaus.org/esper-4.0.0/doc/reference/en/html/event_representation.html#eventrep-insertinto

Hello, I would like to ask. I'd like to catch array of end events for given
start event so if I have sequence:
S1, E1, E2, S2, E3, E4, E5 ...

I need (S1, [E1, E2]), (S2, [E3, E4, E5]), ...

I have statement:

INSERT INTO
FinalEvent
SELECT
S as startEvent
E as endEvent
FROM PATTERN [
every S = startEvent-> E = endEvent (id = S.did )
until timer:interval(10 min)
]

And JAVA class FinalEvent as:

public class FinalEvent

{ private StartEvent startEvent; private EndEvent[] endEvent; ... }

but esper engine call exception: Invalid assignment of column endEvent.

I'd like to ask where's problem, or how to solve it in different way.



 Comments   
Comment by Thomas Bernhardt [ 05/Dec/10 ]

change in enhancements410 branch





[ESPER-509] Documentation bug in subscriber use: "start" and "end" are "updateStart" and "updateEnd" Created: 21/Oct/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This bug affects the documentation pertaining EPL statement subscribers.

They say the names of the two optional functions in the subscriber are 'start' and 'end' when in fact they are 'updateStart' and 'updateEnd' respectively.






[ESPER-508] Sequence Window advance Created: 20/Oct/10  Updated: 20/Oct/10  Resolved: 20/Oct/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: None

Type: Wish Priority: Major
Reporter: visalakshmi Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Number of attachments : 0

 Description   

In the following query every 60 rows are batched and computed average. Instead of observing the next 60 events, I want to take 30 from the previous window and 30 new arriving events. Is it possible in ESPER ?

select avg as meanX from AccelDataEvent.win:length_batch(60)



 Comments   
Comment by Thomas Bernhardt [ 20/Oct/10 ]

Usage queries are best posted to the user mailing list user@esper.codehaus.org
Please see http://esper.codehaus.org/about/esper/mailinglist.html

With "insert into RemovedStream select rstream from Event.win:length(30)" you can select the events that are removed.
Sounds like with a subquery against the RemovedStream one could take avg of both.

Or you could compute the average for 30 events and insert into a new stream, then use "prev" or "prior" to avg again.

Solution patterns also has info on delayed streams.

Comment by Thomas Bernhardt [ 20/Oct/10 ]

Can be addressed with existing constructs.





[ESPER-507] On-Update with subquery against the same named window that is updated produces warning Created: 18/Oct/10  Updated: 05/Dec/10  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following statement can produce the warning:
WARN [ExprSubselectRowNode] Subselect returned more then one row in subselect 't.total', returning null result

@Name("Incremental Update")
on MyEvent c
update MyWindow s
set total = (select t.total from MyWindow t where t.field1 = c.field1) + 1
where s.field1 = c.field1;

Note that the set-clause uses a subselect against the named window currently under update.



 Comments   
Comment by Thomas Bernhardt [ 18/Oct/10 ]

Use the following statement instead:
@Name("Incremental Update")
on MyEvent c
update MyWindow s
set total = total + 1
where s.field1 = c.field1;





[ESPER-506] NullPointerException on an inner join of named window with aggregation and group-by Created: 15/Oct/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am experiencing a weird issue I cannot fully understand. Here is a sample scenario I've written down to illustrate the problem:

I have two event registered with esper:

Event Product:
product: java.lang.String
size: java.lang.String

Event Portfolio:
portfolio: java.lang.String
product: java.lang.String

I have the following EPLs which essentially create two windows to store data received from the two events above:

EPLs:
create window ProductWin.win:keepall() (product string, size double)
insert into ProductWin select product, cast(size,double) as size from Product

create window PortfolioWin.win:keepall() (portfolio string, product string)
insert into PortfolioWin select portfolio, product from Portfolio

Once all of this is set up, I send the follow events to esper (view sendEvent):

Runtime events sent to Esper:
Product

{product=productA; size=1}

Product

{product=productA; size=2}

Portfolio

{portfolio=MyPortfolio; product=productA}

Here is a simple select that joins the two windows and gives me the size of each product entry (two productA entries, one with size 1 and one with size 2)

EPRuntime.executeQuery: select portfolio, size from PortfolioWin inner join ProductWin on PortfolioWin.product=ProductWin.product
MyPortfolio 1.0
MyPortfolio 2.0

What I actually want to do is sum the size by portfolio. I want to essentially get a result of portfolio=MyPortfolio and size=3 (sum of 1 and 2). Here is the query I try:

EPRuntime.executeQuery: select portfolio, sum(size) from PortfolioWin inner join ProductWin on PortfolioWin.product=ProductWin.product group by portfolio

This results in the following error:

INFO [EPRuntimeImpl] Error executing statement: null
java.lang.NullPointerException
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.generateGroupKeys(ResultSetProcessorRowPerGroup.java:441)
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.processJoinResult(ResultSetProcessorRowPerGroup.java:109)
at com.espertech.esper.core.EPPreparedExecuteMethod.execute(EPPreparedExecuteMethod.java:202)
at com.espertech.esper.core.EPRuntimeImpl.executeQuery(EPRuntimeImpl.java:1226)






[ESPER-505] Reference Documation 4.0.0; Table 6.5; duplicety of operator Created: 14/Oct/10  Updated: 19/Jan/11  Resolved: 03/Dec/10

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Improvement Priority: Trivial
Reporter: Katarína Jobbová (Mycroft Mind) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In Table 6.5 is duplicity of quantifier ?. It is in row with meaning "Zero or one match (greedy)." and also with "Zero or one match (reluctant).". One should be ??. Due to description below the Table 6.5 it should be in row with meaning "Zero or one match (reluctant).".



 Comments   
Comment by Thomas Bernhardt [ 03/Dec/10 ]

thanks for the report





[ESPER-504] Consuming join Created: 05/Oct/10  Updated: 17/Jan/11  Resolved: 17/Jan/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Jiri Karpisek (Mycroft Mind) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File ConsumingJoin.epl    
Number of attachments : 1

 Description   

I would like to ask, if it's possible to add feature, which joins the events from 2 different windows and after match it immediately removes/consumes the matched events from the windows, thus they cannot be matched anymore to other events.



 Comments   
Comment by Thomas Bernhardt [ 07/Oct/10 ]

You could join two named windows and use on-delete to delete from both named windows based on the join results inserted into another stream.
Would that work?

Comment by Jiri Karpisek (Mycroft Mind) [ 08/Oct/10 ]

Hello, I've tried it, but it didn't work (maybe I made a mistake). There is a problem, If I had a sequence of events:

A1, A2, B1 and I inner joined A and B (in named window), I got pairs (A1,B1) a (A2,B1) and then was B deleted from named window by "on delete". So the join fired 2 events.

In general the feature what I appreciate in ESPER is, if I have the sequence (from Reference Documentation):

A1 B1 C1 B2 A2 D1 A3 B3 E1 A4 F1 B4

I would like to get pairs (A1,B1), (A2, B3), (A3, B4)

Comment by Thomas Bernhardt [ 08/Oct/10 ]

A join should work well, do you want to provide the statements you used?
You could also use a "std:groupwin" and "prev" to compare the previous event.
A pattern would also work.
Best regards,
Tom

Comment by Jiri Karpisek (Mycroft Mind) [ 11/Oct/10 ]

Hello,
I simplified the statements, so I hope it's readable (if not I can send them whole with full description, but probably not by forum).
I attached 1 file with 4 statements:

1) window creator - create window
2) window feeder - feed the window by events
3) remover - remove events from window
4) pairing statement - pairing by inner join events together. WrapperEvent (wrap the WinEvent) have as property WinEvent called insertedEvent.

Comment by Jiri Karpisek (Mycroft Mind) [ 11/Oct/10 ]

4 statements

Comment by Thomas Bernhardt [ 15/Oct/10 ]

You are saying that when you send the sequence "A1, A2, B1" then A stands for WinEvent and B stands for AnotherEvent?
Do you select the remove stream (defaulted irstream in configs)?
And you are saying you get the pair (A2, B1)?
A unit test would probably be helpful here.
Best regards,
Tom

Comment by Jiri Karpisek (Mycroft Mind) [ 21/Oct/10 ]

Hello, I will try to prepare it for next week

Comment by Jiri Karpisek (Mycroft Mind) [ 12/Nov/10 ]

Hello, I am sorry I haven't time to prepare the jUnit, but it's on my To Do list.

I was thinking about could little different use of every (for example everyAll) in a pattern.

for instance the reference sequence:
A1 B1 C1 B2 A2 D1 A3 B3 E1 A4 F1 B4

everyAll (A -> B) should returns

(A1,B1), (A2, B3), (A3, B4)

this is very often requirement in our application and now we have to solve it by listeners or by filtering events according to records in DB.

Comment by Thomas Bernhardt [ 14/Nov/10 ]

It seems most elegantly be specified via match-recognize:

partition by id
pattern (A B)
define B as B.id = A.id

Can the "id" reoccur? Or should the partition be thrown away when the first pattern matches?

Comment by Jiri Karpisek (Mycroft Mind) [ 15/Nov/10 ]

in that case we haven't id, matching is made by given properties (id is used for simplification), so the situation is that id can reoccur.

if we have sequence A1, A2, B1, B2 we would get (A1,B1), (A2,B1), but we need (A1,B1), (A2,B2)
I need somehow to mark B after match as used and don't allow to match to another A

Comment by Thomas Bernhardt [ 15/Nov/10 ]

It may be helpful to have the complete example if there is no "id" field to understand the complexity of the problem. if an "id" or similar partition can be derived then match-recognize would seem to fit well.

Comment by Thomas Bernhardt [ 17/Jan/11 ]

Closed issue for 4.1 version





[ESPER-503] Incorrect warning logged using @Hint('reclaim_group_aged=2') with std:groupwin grouped data windows Created: 01/Oct/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

According to the documentation, values are given in seconds. So the following hint would reclaim groups with no updates over 2 seconds (checking every 30 seconds):
@Hint('reclaim_group_aged=2,reclaim_group_freq=30')

But when I compile, I get the following warning when I register the EPL:
WARN [GroupByViewFactory] Reclaim max age parameter is less then 100 milliseconds, are your sure?



 Comments   
Comment by Thomas Bernhardt [ 01/Oct/10 ]

The bug is in the parameter checking. The warning can be ignored. The parameter is indeed a number of seconds.

Comment by Thomas Bernhardt [ 05/Dec/10 ]

change in bugfix400 branch





[ESPER-502] NullPointerException in OutputProcessViewDistinctOrAfter.process() and update() methods Created: 30/Sep/10  Updated: 19/Jan/11  Resolved: 05/Dec/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: Michal Oskera (Mycroft Mind) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS release 5.5 (Final) x86_64, JDK: 1.6_21


Number of attachments : 0

 Description   

We've got an NullPointerException in com.espertech.esper.epl.view.OutputProcessViewDistinctOrAfter.process() method at line 134 under very specific circumstances, which are hard to be reproduced in JUnit test.

However, after code inspection there is an obvious reason for that. The call of processJoinResult() may return null value (assigned into newOldEvents), which is not checked before used when respective SELECT statement contains DISTINCT keyword (see line 132). This may also happen in update() method of the same class, where condition at line 96 suggests that newOldEvents variable may be of null value.






[ESPER-501] (.NET) View sharing introduce a missed event for NEsper 3.3 Created: 17/Sep/10  Updated: 10/Apr/11  Resolved: 10/Apr/11

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.4
Fix Version/s: 3.4

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm currently working on an alert framework that monitors evolution of certain variables over time. Basically, I compare the value of a frame (a certain amount of events) to the frame before an throw an alert if it increases or decreases too much.

Here's an example of what I do to monitor the growth of a value over 1% =>

select (select avg(MonitoredValue) as avgNextValue from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null))).win:length(10)),
(select avg(prior(1, MonitoredValue)) as avgPrevValue from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null))).win:length(10)),
(select max(EventTimeStamp) as EventTimeStamp from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null))).win:length(10))
from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null)))
where ((select avg(MonitoredValue) as avgNextValue from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null))).win:length(10))
> (1,01 * (select avg(prior(1, MonitoredValue)) as avgPrevValue from myEvent(((FirstCriterion = 13281)) and ((SecondCriterion = null))).win:length(10))))

It works very well, my only issue is that if I add two (or more) of those statements to my engine, only one statement works well, the others seem to "miss" some events.
For exemple if I send two myEvents with values 10 then 12 (20% growth), with only one statement I have one triggering, but with two only one gets triggered.

=============

I just realized that I was using Nesper 3.3 which was replaced by 3.4...
Anyway, I can't take the risk of changing the version I'm using at this point of the project but I will when I can.
Actually I avoided the problem by disabling the view sharing optimization (ViewResources.IsShareViews) so it can wait for now.

The easiest way to repro would be to copy paste the EPL I sent in two different statements and send two events like this =>
myEvent

{ FirstCriterion = 13281, SecondCriterion = null, MonitoredValue = 10 }

myEvent

{ FirstCriterion = 13281, SecondCriterion = null, MonitoredValue = 14 }

Try it first with one statement, then with both, it will only trigger one in the second case.

Regards,



 Comments   
Comment by Thomas Bernhardt [ 10/Apr/11 ]

Duplicate at http://jira.codehaus.org/browse/ESPER-564





[ESPER-500] Provide event record and replay Created: 10/Sep/10  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 5.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 21/May/12 ]

Not part of core CEP funtionality





[ESPER-499] Enhance Create-Schema syntax to allow for Model-After Created: 10/Sep/10  Updated: 01/Nov/11  Resolved: 01/Nov/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.4

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For named windows the EPL allows this as called model-after syntax:

1 create window aWindow.win:xxx as select * from eventType;
2 insert into aWindow select * from eventType
3 select * from aWindow

For "create schema" the syntax does not allow model-after currently. It would be nice to support:

1 create schema aNewEventType as select * from eventType;
2 insert into aNewEventType as select * from eventType;
3 select * from aNewEventType



 Comments   
Comment by Thomas Bernhardt [ 10/Sep/10 ]

Actually (2) already allocates an implicit event type as it inserts into a new stream therefore (1) is not useful here unless the purpose is to define the stream in advance.

Comment by Thomas Bernhardt [ 01/Nov/11 ]

part of 4.4 release





[ESPER-498] Listener triggered twice when using time_batch and group by Created: 08/Sep/10  Updated: 01/Oct/10  Resolved: 09/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: leo Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP


Number of attachments : 0

 Description   

select symbol from TestEvent.win:time_batch(5 sec) group by symbol

Event though there is only one event arrived, the listener triggered twice within 10 seconds.



 Comments   
Comment by Thomas Bernhardt [ 09/Sep/10 ]

Please post to dev@esper.codehaus.org or user@esper.codehaus.org for discussion.

In the fully-aggregated case the remove stream posts the symbols removed from the batch. If selecting aggregation values you'd see the value go back to null.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-497] IllegalStateException for statement with "prior" against a time window with univariate stats view Created: 08/Sep/10  Updated: 01/Oct/10  Resolved: 26/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.5.0-JIRA497.jar    
Number of attachments : 1

 Description   

Statement:

SELECT * FROM SupportBean.win:time(5 minutes).stat:uni(intPrimitive) where prior(1, average) > 0

Exception received on first event:

2010-09-08_20:30:10.25803 Caused by: java.lang.IllegalStateException: Event not currently in collection, event=MapEventBean eventType=MapEventType typeName=cb5180a8-bb53-48c6-a3f2-1761c78c05b1 propertyNames=[stddevpa, total, datapoints, variance, stddev, average]
2010-09-08_20:30:10.25804 at com.espertech.esper.view.internal.PriorEventBufferSingle.getRelativeToEvent(PriorEventBufferSingle.java:94)
2010-09-08_20:30:10.25805 at com.espertech.esper.view.internal.PriorEventViewFactory$RelativeAccessImpl.getRelativeToEvent(PriorEventViewFactory.java:180)
2010-09-08_20:30:10.25806 at com.espertech.esper.epl.expression.ExprPriorNode.evaluate(ExprPriorNode.java:118)
2010-09-08_20:30:10.25807 at com.espertech.esper.epl.expression.ExprRelationalOpNode.evaluate(ExprRelationalOpNode.java:92)
2010-09-08_20:30:10.25808 at com.espertech.esper.epl.expression.ExprAndNode.evaluate(ExprAndNode.java:58)



 Comments   
Comment by Thomas Bernhardt [ 08/Sep/10 ]

We attach a cumulative patch for this issue, please prepend to classpath and remove any other patches, for use with version 3.5.0.
Please check with us on use with EsperHA.

Cumulative:
(this issue)
ESPER-482 Insert-into to named window that declares a single column with the type being an event-type not allowed
ESPER-480 Create window table syntax does not regard [] array brackets for types
ESPER-476 Preconfigured event type removed when module undeployed
ESPER-474 POJO inheritance for named window insert only considering first-level inheritance

Comment by Thomas Bernhardt [ 26/Sep/10 ]

Fix also in release 4.0

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-496] On-select with stream wildcard and aggregation produces event-per-group and not event-per-row Created: 07/Sep/10  Updated: 26/Sep/10  Resolved: 07/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample queries:

create window MyWindow.win:keepall() as (a string, b int)
insert into MyWindow select v1 as a, v2 as b from MyEvent

// This produces an event-per-group (one event), should produce multiple if multiple events contribute to total of 20
on MyWindow select mwc.* from MyWindow mwc group by a having sum(b) = 20

Workaround:
Specify individual properties or at least one non-aggregated property, such as:

on MyWindow select mwc.b, mwc.* from MyWindow mwc group by a having sum(b) = 20






[ESPER-495] Support XPath attribute node list result casted to string array Created: 05/Sep/10  Updated: 26/Sep/10  Resolved: 06/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample event:

<Event IsTriggering="True">
<Field Name="A" Value="987654321"/>
<Field Name="B" Value="2196958725202"/>
<Field Name="C" Value="1232363702"/>
<Participants>
<Participant>
<Field Name="A" Value="9876543210"/>
<Field Name="B" Value="966607340"/>
<Field Name="D" Value="353263010930650"/>
</Participant>
</Participants>
</Event>

I need to have a statement that matches the value of a field named "A" (which can be both under "Event" and under "Participant".
I added an XPath property:

desc.addXPathProperty("A", "//Field[@Name='A']/@Value", XPathConstants.NODESET, "String[]");

However, the casting to "String[]" always returns an array with the correct number of elements (for 2 "A"s), but all elements in array are null. Do I need to configure anything else?

Without casting to String[], how do I use the property inside a statement? For example, "select * from Event(A=....)?

==========================
I found out why I get a result array of null values. It is because Esper supports the casting to array types of a NODELIST only if the node types are ELEMENT_NODE.

My XPath is an ATTRIBUTE_NODE so it just ignored the node's value.

It can be seen in the XpathPropertyGetter.castToArray method in the source code.



 Comments   
Comment by Thomas Bernhardt [ 06/Sep/10 ]

in 4 branch, for release 4.0





[ESPER-494] Make @Hint("reclaim_group_aged=...") apply to grouped data windows as well Created: 05/Sep/10  Updated: 26/Sep/10  Resolved: 26/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be practical if the @Hint("reclaim_group_aged=age_in_seconds") that applies to group-by state also applies when using grouped data windows via "std:groupby"



 Comments   
Comment by Thomas Bernhardt [ 26/Sep/10 ]

in release 4.0





[ESPER-493] "IllegalStateException" for an aggregation query without group-by and without aggregations in the select clause Created: 31/Aug/10  Updated: 26/Sep/10  Resolved: 01/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following query throws an exception starting:

select *
from SupportBean.std:groupby(string).win:time_length_batch(10 sec, 2)
where intPrimitive>0
having count=2

The exception:

java.lang.IllegalStateException: Unexpected empty group-by expression list
at com.espertech.esper.epl.core.ResultSetProcessorFactory.getProcessor(ResultSetProcessorFactory.java:387)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:1000)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:132)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:563)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:533)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:159)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:114)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:104)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:55)
at com.espertech.esper.regression.view.TestHavingNoGroupBy.testHaving(TestHavingNoGroupBy.java:38)



 Comments   
Comment by Thomas Bernhardt [ 31/Aug/10 ]

Workaround:

create query by including an aggregation function in the select clause, for example;

select string, count
from SupportBean.std:groupby(string).win:time_length_batch(10 sec, 2)
where intPrimitive>0
having count=2

Comment by Thomas Bernhardt [ 31/Aug/10 ]

Scheduled for release 4.0

Comment by Thomas Bernhardt [ 01/Sep/10 ]

fix part of 4.0 release





[ESPER-492] passing a property with null value to a univariate statistics view Created: 20/Aug/10  Updated: 26/Sep/10  Resolved: 23/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 4.0 - requires JDK6

Type: Test Priority: Minor
Reporter: Ronald Kaiser Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File diff     Java Source File TestEsperNullProperty.java     Java Source File UnivariateStatisticsView.java    
Testcase included: yes
Number of attachments : 3

 Description   

As described in http://esper.codehaus.org/esper-3.5.0/doc/reference/en/html/configuration.html , I defined an event-type in a configuration file as follows :
<event-type name="EventType">
<java-util-map>
<map-property name="numeric_property" class="int" />
</java-util-map>
</event-type>

And then, running the test attached, I could get the test throwing a java.lang.NullPointerException.
The UnivariateStatisticsView assumes that the arguments passed to it are Numbers.
If I make a query like:
SELECT average from EventType.win:length(1).stat:uni(numeric_property);
and send an event with a null, the exception is raised.

In order to suit in our software, we would like to make this view (and others) ignore such events badformed – and continue with the calculations of mean, stdeviation, etc, discarting the events with bad formed properties.
Is it a bug or you assume that the events arrive with the properly property types and it's a developers responsability to deal with casting before calling a 'view'?

Thank you in advance.



 Comments   
Comment by Ronald Kaiser [ 20/Aug/10 ]

Attached our UnivariateStatisticsView.java and a diff in order to solve the 'bug'.
Any idea or comment for a better solution?

Comment by Thomas Bernhardt [ 07/Sep/10 ]

Assigned to 4.0 release, downgraded to minor as one could use coalesce





[ESPER-491] ConcurrentModificationException with "prioritized" engine setting for multiple subselects against the same named window Created: 13/Aug/10  Updated: 01/Oct/10  Resolved: 13/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem occurs when the "prioritized" setting is true and a statement consumes multiple streams from a named window by using multiple subselects, and under threading (i.e. timer and/or app threads)

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at com.espertech.esper.epl.expression.SubselectEvalStrategyEqualsIn.evaluate(SubselectEvalStrategyEqualsIn.java:83)
at com.espertech.esper.epl.expression.ExprSubselectInNode.evaluate(ExprSubselectInNode.java:69)
at com.espertech.esper.epl.expression.ExprSubselectNode.evaluate(ExprSubselectNode.java:108)
at com.espertech.esper.epl.expression.ExprOrNode.evaluate(ExprOrNode.java:59)
at com.espertech.esper.epl.view.FilterExprView.filterEvents(FilterExprView.java:81)
at com.espertech.esper.epl.view.FilterExprView.update(FilterExprView.java:51)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:108)
at com.espertech.esper.epl.named.NamedWindowConsumerView.update(NamedWindowConsumerView.java:79)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:183)
at com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:640)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:479)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:376)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:211)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:185)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Thomas Bernhardt [ 13/Aug/10 ]

change in bugfix350 branch

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-490] Package test support classes in com.espertech.esper.support.util for Unit/Regression testing support Created: 05/Aug/10  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.5

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The resulting jar file would be esper-testsupport-<version>.jar.

Work:

  • Classes need some refactoring to become more compliant to the general JUnit/TestNG usage, i.e. assert(expected, result) etc.
  • Add JavaDoc
  • Move classes out of esper/src/test/java/com... into a separate folder
  • Maven build changes
  • Create documentation chapter on test support


 Comments   
Comment by Thomas Bernhardt [ 23/Sep/10 ]

Since the assertion classes have a dependency on JUnit, an separate jar would be required or the dependency on Junit would need to be removed.

Comment by Thomas Bernhardt [ 21/May/12 ]

Exists since 4.5





[ESPER-489] Plug-in loader destroy order should be reverse of creation order Created: 01/Aug/10  Updated: 26/Sep/10  Resolved: 02/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently (3.5) plug-in's are destroyed in the same order they are created. If there is a dependency between plugin's, a reverse destroy order is more suitable.






[ESPER-488] Create "prevtail" function similar to "prev" but indexing back from the tail, similar to prev(count(*) - 2, field) Created: 30/Jul/10  Updated: 26/Sep/10  Resolved: 01/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

assigned to 4.0 release



 Comments   
Comment by Thomas Bernhardt [ 01/Sep/10 ]

In 4.0 we add the "prevtail" function and the "prevcount" and the "prevwindow" function.
In addition the new aggregation functions "last", "first" and "window" correspond to "count" behavior.





[ESPER-487] Custom aggregation functions - pass indicator whether running windowed and allow access to child expressions Created: 30/Jul/10  Updated: 26/Sep/10  Resolved: 07/Sep/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Custom aggregation functions can have now just a single implementation
that will be instantiated by Esper in both cases: windowed and global.

So, please, give some means to custom aggregation functions to expose two implementations.

For example, this can be done by ..
1) stating that the default configuration points, say, to a class containing
windowed implementation.
2) introducing additional attribute to xml config and parameter to config API
with the second class name for "global" implementation.



 Comments   
Comment by Thomas Bernhardt [ 03/Aug/10 ]

> >> Please, give some reasonable means to choose return type of aggregate function.
> >>All standard functions are directly created with the correct type. This depends
> >>on types of syntactically underlying expressions (like in 'sum' or 'max'
> >>function).
> That seems already covered as the AggregationMethod returns type?
>

Yes, but the question is how a particular instance of aggregation function object
can calculate its return type?

Example: predefined MinMaxAggregator obtains its return type via constructor. It's
determined by the type of min/max argument expression. But custom aggregation
function has the only way to report its return type: to get argument types in
'validateMultiParameter' and store one of them in an internal field to be returned
in 'getValueType'.

May be, in the context of issue 487 you've filled in, it will be helpful to create
a generic factory mechanism that will be able to return appropriate instance of
aggregation function object. Parameters could be:

  • windowed or global context
  • AST nodes of underlying expressions
  • something else?

AST nodes will help to choose return type and determine whether the argument is constant.
(Imagine 'nth' implementation returning event with a non-constant index).
Esper already has a bunch of such factory methods incorporated into the single class
'MethodResolutionService'.

Comment by Thomas Bernhardt [ 03/Aug/10 ]

We can provide access to the expression nodes of the child expression(s).

Comment by Thomas Bernhardt [ 07/Sep/10 ]

Patch applied to 4.0 branch for release





[ESPER-486] Initialization of service provider after creation of runtime and admin objects breaks multi-threading Created: 28/Jul/10  Updated: 01/Oct/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperMain2.java    
Number of attachments : 1

 Description   

The following test case never stops if inbound threading is configured.
In the test code, EPSeriviceProvider object is initialized after EPAdministrator and EPRuntime object are obtained from it.

The code starts a bunch of threads each sending the same amount of events with random pauses between each event sending. Currently, it starts 2 thread, each sends 3 events.

Inbound threading is turned on and inbound capacity is set to 4.

When run, the code gets stuck in ArrayBlockingQueue, because no processing thread takes a unit of work to execute.

Variations:

  • If the number of threads is less than the total number of events, then the the test finishes, but still no listener is invoked.
  • If 'engine.initialize()' is moved before creation of 'esper_admin', the code runs fine
  • If outbound threading is configured, behavior remains the same.

The code is:

import java.util.Collections;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.ConfigurationEngineDefaults.Threading;
import com.espertech.esper.client.EPAdministrator;
import com.espertech.esper.client.EPRuntime;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;
import com.espertech.esper.client.time.CurrentTimeEvent;

public class EsperMain2 {

private static class EventSender implements Runnable {
final EPRuntime esper_runtime;
final CyclicBarrier start;
final CountDownLatch stop;
final int events_number;
public EventSender(int events_number, EPRuntime esper_runtime,
CyclicBarrier start, CountDownLatch stop)

{ this.esper_runtime = esper_runtime; this.start = start; this.stop = stop; this.events_number = events_number; }

public void run() {
try {
Random r = new Random(System.currentTimeMillis());
start.await();
char c = 'A';
for (int i = 0; i < events_number; i ++, c ++)

{ String val = Thread.currentThread().getName() + " " + c; sendE(val, esper_runtime); Thread.sleep(Math.round(50 + r.nextDouble() * 200)); }

stop.countDown();
}
catch (Throwable e)

{ e.printStackTrace(); }

}

public static void sendE(String val, EPRuntime esper_runtime)

{ esper_runtime.sendEvent(new CurrentTimeEvent(System.currentTimeMillis())); esper_runtime .sendEvent(Collections.<String, Object>singletonMap("val", val), "E"); }

}

private static class DumpListener implements UpdateListener {

public void update(EventBean[] newEvents, EventBean[] oldEvents)

{ if (newEvents == null || newEvents.length == 0) return; String res = "In update: thread = " + Thread.currentThread().getName() + ", " + " event = " + newEvents[0].get("val"); System.out.println(res); System.out.flush(); }

}

public static void main(String[] args) throws Throwable

{ Configuration config = new Configuration(); Threading threading = config.getEngineDefaults().getThreading(); threading.setThreadPoolInbound(true); threading.setThreadPoolInboundCapacity(4 /* !!! */); // array blocking queue will be of size 4 config.addEventType ("E", Collections.<String, Object>singletonMap("val", String.class)); EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(config); EPAdministrator admin = engine.getEPAdministrator(); EPRuntime esper_runtime = engine.getEPRuntime(); engine.initialize(); /* !!! */ admin.createEPL("select * from E").addListener(new DumpListener()); int num_senders = 2 /* !!! */; CyclicBarrier start = new CyclicBarrier(num_senders + 1); CountDownLatch stop = new CountDownLatch(num_senders); EventSender es = new EventSender(3 /* !!! */, esper_runtime, start, stop); // 6 events sent. 6 > 4 a thus the test will sit on monitors for (int i = 1; i <= num_senders; i ++) new Thread(es, "Sender " + i).start(); start.await(); stop.await(); }

}



 Comments   
Comment by Alexander Monakhov [ 28/Jul/10 ]

I attached the code sample as Jira broke formatting in initial post.

Comment by Thomas Bernhardt [ 04/Aug/10 ]

After "initialize" the administrative and runtime (EPAdministrator and EPRuntime) obtained before the initialze become invalid and should no longer be used.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-485] Support for contained-event syntax on events selected from a named window Created: 21/Jul/10  Updated: 26/Sep/10  Resolved: 03/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Workaround: insert from named window into another stream, i.e.

insert into AnotherStream select * from NamedWindow
select AnotherStream[contained]...



 Comments   
Comment by Thomas Bernhardt [ 03/Aug/10 ]

in branch enhancements400





[ESPER-484] "In" operator in pattern filter against event property of type "Set" not matching Created: 19/Jul/10  Updated: 01/Oct/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

To reproduce:

package arms.esper;

import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.espertech.esper.client.ConfigurationOperations;
import com.espertech.esper.client.EPAdministrator;
import com.espertech.esper.client.EPRuntime;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;

public class EsperMain {

public static boolean contains(Set<?> set, Object obj)

{ return set.contains(obj); }

public static void main(String[] args) {
EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();

EPAdministrator admin = engine.getEPAdministrator();
ConfigurationOperations config = admin.getConfiguration();

config.addImport(EsperMain.class);

Map<String, Object> start_load_type = new HashMap<String, Object>();
start_load_type.put("versions", Set.class);
config.addEventType("StartLoad", start_load_type);

Map<String, Object> single_load_type = new HashMap<String, Object>();
single_load_type.put("ver", String.class);
config.addEventType("SingleLoad", single_load_type);

admin.createEPL(
"select * from \n" +
"pattern [ \n" +
" every start_load=StartLoad \n" +
" -> \n" +
" single_load=SingleLoad(ver in (start_load.versions)) \n" +
" // single_load=SingleLoad(EsperMain.contains(start_load.versions, ver)) \n" +
"]"
).addListener(new UpdateListener() {

public void update(EventBean[] new_events, EventBean[] old_events)

{ if (new_events == null && new_events.length == 0) return; EventBean eb = new_events[0]; System.out.println("Pattern matched!"); }

});

EPRuntime runtime = engine.getEPRuntime();
HashSet<String> versions = new HashSet<String>();
versions.add("Version1");
versions.add("Version2");

runtime.sendEvent(Collections.singletonMap("versions", versions), "StartLoad");
runtime.sendEvent(Collections.singletonMap("ver", "Version1"), "SingleLoad");
}
}



 Comments   
Comment by Thomas Bernhardt [ 19/Jul/10 ]

Workaround is to create a function as the sample above also does.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-483] NPE with "prev" in having-clause and count(*) Created: 19/Jul/10  Updated: 04/Aug/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

select prev(count - 1, value)
from MyEvent.win:time(10 sec)
having prev(count - 1, property) = 'on' and prev(0, property) = 'off'

but it throws this exeception:

Exception in thread "main" java.lang.NullPointerException
at
com.espertech.esper.epl.expression.ExprPreviousNode.evaluate(ExprPreviousNode.java:166)
at
com.espertech.esper.epl.expression.ExprEqualsNode.evaluate(ExprEqualsNode.java:121)
at
com.espertech.esper.epl.expression.ExprAndNode.evaluate(ExprAndNode.java:58)
at
com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getSelectListEvents(ResultSetProcessorRowForAll.java:165)
at
com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processViewResult(ResultSetProcessorRowForAll.java:148)
at
com.espertech.esper.epl.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:71)
at
com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:115)
at
com.espertech.esper.view.window.TimeWindowView.update(TimeWindowView.java:161)
at
com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:70)
at
com.espertech.esper.view.stream.StreamFactorySvcImpl$2.matchFound(StreamFactorySvcImpl.java:166)
at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:1053)
at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:821)
at
com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueueLatchedSpin(EPRuntimeImpl.java:721)
at
com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:677)
at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:425)
at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:279)
at it.tilab.cep.TestClass.main(TestClass.java:111)






[ESPER-482] Insert-into to named window that declares a single column with the type being an event-type not allowed Created: 14/Jul/10  Updated: 01/Oct/10  Resolved: 14/Jul/10

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.5.0-JIRA482.jar    
Number of attachments : 1

 Description   

To reproduce:
create schema EventTypeOne (hsi int)
create schema EventTypeTwo (event EventTypeOne)
create window NamedWidnow.std:unique(event.hsi) as EventTypeTwo
on EventTypeOne as ev insert into NamedWidnow select ev as event

...incorrectly generates an error message that indicates that a String property is being populated from an event.



 Comments   
Comment by Thomas Bernhardt [ 14/Jul/10 ]

We attach a cumulative patch for this issue, please prepend to classpath and remove any other patches, for use with version 3.5.0.
Please check with us on use with EsperHA.

Cumulative:
ESPER-482 (this issue)
ESPER-480 Create window table syntax does not regard [] array brackets for types
ESPER-476 Preconfigured event type removed when module undeployed
ESPER-474 POJO inheritance for named window insert only considering first-level inheritance

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-481] Create-Window with explicit column-types does not support column types that are an event type (documentation bug/improvement) Created: 14/Jul/10  Updated: 26/Sep/10  Resolved: 03/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

for example, the following is not supported in version 3.5:

create schema MySchema (col1 int, col2 int)

create window MyWindow as (col3 MySchema)



 Comments   
Comment by Thomas Bernhardt [ 14/Jul/10 ]

The documentation links are
http://esper.codehaus.org/esper-3.5.0/doc/reference/en/html/epl_clauses.html#named_create_explicit

The documentation links to variable column types but does not state that column types that are event types are not supported.

Comment by Thomas Bernhardt [ 14/Jul/10 ]

Workaround is to create a separate schema and use model-after syntax for creating the named window.

Comment by Thomas Bernhardt [ 03/Aug/10 ]

in branch enhancements400





[ESPER-480] Create window table syntax does not regard [] array brackets for types Created: 07/Jul/10  Updated: 01/Oct/10  Resolved: 07/Jul/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.5.0-JIRA480.jar    
Number of attachments : 1

 Description   

For example, the following EPL...
create window MyWindow.win:keepall() (myvalue string[])
...creates a string (not string-array) type property.



 Comments   
Comment by Thomas Bernhardt [ 07/Jul/10 ]

We attach a cumulative patch for this issue, please prepend to classpath and remove any other patches, for use with version 3.5.0.
Please check with us on use with EsperHA.

Cumulative:
ESPER-480 Create window table syntax does not regard [] array brackets for types
ESPER-476 Preconfigured event type removed when module undeployed
ESPER-474 POJO inheritance for named window insert only considering first-level inheritance

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-479] Support expression in [a..b] bound repeat in patterns Created: 07/Jul/10  Updated: 26/Sep/10  Resolved: 05/Aug/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently, Esper allows to use only constant values in repeat bounds
Would it be useful to let bounds to be determined by some non-constant
expressions like variables or properties of preceding events.

This feature, of course, will require some standard range correctness checks
to be done at runtime.

A simple example follows. There are 'StartLoad' events that indicate starting loading
a bunch of data versions. After that a number of 'SingleLoad' events follow.
There must be the same number of "single loads" as it was prescribed by initial
'StartLoad' event.

EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();

EPAdministrator admin = engine.getEPAdministrator();
ConfigurationOperations config = admin.getConfiguration();

Map<String, Object> start_load_type = new HashMap<String, Object>();
start_load_type.put("total_count", int.class);
config.addEventType("StartLoad", start_load_type);

Map<String, Object> single_load_type = new HashMap<String, Object>();
single_load_type.put("ver", String.class);
config.addEventType("SingleLoad", single_load_type);

Map<String, Object> end_load_type = new HashMap<String, Object>();
end_load_type.put("versions", Set.class);
config.addEventType("EndLoad", end_load_type);

admin.createEPL(
"select * from \n" +
"pattern [ \n" +
" every start_load=StartLoad \n" +
" -> ( \n" +
" [start_load.total_count] \n" +
" single_load=SingleLoad(ver in (start_load.versions)) \n" +
" until \n" +
" end_load=EndLoad(versions = start_load.versions) \n" +
" ) \n" +
"]"
);
}

Now Esper rejects to compile the statement above, saying:

Exception in thread "main" com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near 'start_load' at line 5 column 14, please check the pattern expression within the pattern expression within the from clause [select * from
pattern [
every start_load=StartLoad
-> (
[start_load.total_count]
single_load=SingleLoad(ver in (start_load.versions))
until
end_load=EndLoad(versions = start_load.versions)
)
]]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:29)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:136)
at com.espertech.esper.core.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:98)
at com.espertech.esper.core.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:73)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:103)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:55)
at arms.esper.EsperMain.main(EsperMain.java:32)



 Comments   
Comment by Thomas Bernhardt [ 04/Aug/10 ]

assigned to 4.0 release

Comment by Thomas Bernhardt [ 05/Aug/10 ]

changes in enhancement400 branch





[ESPER-478] On-update when updating a named window with intersection data windows logs error Created: 06/Jul/10  Updated: 01/Oct/10  Resolved: 30/Jul/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Error logged:
ERROR [IntersectView] Intersection view received both insert and remove stream

To reproduce:
epService = EPServiceProviderManager.getDefaultProvider();
String module = "create window nw_BogusEvents.win:time(5 seconds).std:unique(id) as (id long, uses integer);" +
"\n" +
"insert into nw_BogusEvents\n" +
"select current_timestamp() as id, 2 as uses\n" +
"from pattern [ every timer:at(,,,,,) ];" +
"\n" +
"insert into BogusCorrelatedEvents\n" +
"select a1.id - a2.id as id,\n" +
" Math.max(a1.uses, a2.uses) as uses\n" +
"from nw_BogusEvents(uses > 0) as a1,\n" +
" nw_BogusEvents(uses > 0) as a2\n" +
"where a1.id != a2.id;" +
"\n" +
"insert into nw_BogusEvents\n" +
"select *\n" +
"from BogusCorrelatedEvents(uses > 0);" +
"\n" +
"\n" +
"on BogusCorrelatedEvents as c\n" +
"update nw_BogusEvents as u\n" +
"set uses = u.uses - 1\n" +
"where u.uses > 0";
DeploymentResult result = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(module, null, null, null);
Thread.sleep(100000);



 Comments   
Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-477] Make semantics of 'output first' from grouped selects analogous to the one of 'output last' Created: 02/Jul/10  Updated: 26/Sep/10  Resolved: 07/Aug/10

Status: Closed
Project: Esper
Component/s: Core, Documentation
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Major
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Suppose there's a stream of events 'E' each having string attribute 'val'.
It's quite easy to write an EPL statement selecting last unique events for each distinct value of 'val' attr.

select * from E.win:time(1 hour)
group by val
output last every 1 hour

But what if obtaining the first events is required?
The most intuitive way is to replace 'last' with 'first' in output clause.
This should mean the same thing as 'last' (cite from docs for 3.5):

> The last keyword specifies that only groups whose aggregate values
> have been updated with the most recent batch of events should be output.

.. with the only difference that for each group which value had changed, the output row must correspond to the first event from that group appeared during the specified period rather than to the last such event.

The issue is about adding the semantics above to 'output first' clause.



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/10 ]

In enhancements400 branch





[ESPER-476] Preconfigured event type removed when module undeployed Created: 02/Jul/10  Updated: 01/Oct/10  Resolved: 07/Jul/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.5.0-JIRA476.jar    
Number of attachments : 1

 Description   

Assume a type was configured using the config API or XML or runtime API, e.g.
epService.getEPAdministrator().getConfiguration().addEventType("MapType", new HashMap<String, Object>());

...then a module is deployed, e.g.:
String moduleText = "select * from MapType;\n";
DeploymentResult result = epService.getEPAdministrator().getDeploymentAdmin().parseDeploy(moduleText, "uri", "arch", null);

...then the module gets undeployed, e.g:
epService.getEPAdministrator().getDeploymentAdmin().undeployRemove(result.getDeploymentId());

The preconfigured type is no longer available after undeployment. A workaround is to create a single statement outside of the module that references the type.



 Comments   
Comment by Thomas Bernhardt [ 02/Jul/10 ]

We attach a cumulative patch for this issue, please prepend to classpath and remove any other patches, for use with version 3.5.0.
Please check with us on use with EsperHA.

Cumulative:
ESPER-476 this issue
ESPER-474 POJO inheritance for named window insert only considering first-level inheritance

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-475] NPE in configuration while loading auto-import xml tag without import-name attribute Created: 02/Jul/10  Updated: 01/Oct/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: Bug Priority: Trivial
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A typo in config file:

<auto-import import-nmae="java.lang.Integer"/>

Results in NPE:

java.lang.NullPointerException
at com.espertech.esper.client.ConfigurationParser.handleAutoImports(ConfigurationParser.java:418)
at com.espertech.esper.client.ConfigurationParser.doConfigure(ConfigurationParser.java:122)
at com.espertech.esper.client.ConfigurationParser.doConfigure(ConfigurationParser.java:58)
at com.espertech.esper.client.Configuration.configure(Configuration.java:723)

May be some message must be provided in case of error in config file, for example message from validating XML parser.



 Comments   
Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-474] POJO inheritance for named window insert only considering first-level inheritance Created: 30/Jun/10  Updated: 01/Oct/10  Resolved: 30/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.5.0-JIRA474.jar    
Number of attachments : 1

 Description   

class A
class B extends A
class C extends B

create window ABCWin as A

// This fails:
insert into ABCWin select * from C



 Comments   
Comment by Thomas Bernhardt [ 30/Jun/10 ]

Please find the patch jar attached for use with release 3.5.0. Prepend the patch to classpath.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Fixed in 4.0 release





[ESPER-473] Custom marshaller for Spring JMS adapter that returns DOM object results in an unrecognized event Created: 16/Jun/10  Updated: 18/Jun/10  Resolved: 16/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Workaround:
eventAdapterService.adapterForDOM(doc)






[ESPER-472] ClassCastException while sending TimeControlEvent into isolated runtime Created: 15/Jun/10  Updated: 18/Jun/10  Resolved: 16/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When initializing isolated runtime with the following code

epRuntimeIsolated.sendEvent(new TimerControlEvent(ClockType.CLOCK_EXTERNAL));

I get an exception:

java.lang.ClassCastException: com.espertech.esper.client.time.TimerControlEvent
at com.espertech.esper.core.EPRuntimeIsolatedImpl.processTimeEvent(EPRuntimeIsolatedImpl.java:274)
at com.espertech.esper.core.EPRuntimeIsolatedImpl.processEvent(EPRuntimeIsolatedImpl.java:219)
at com.espertech.esper.core.EPRuntimeIsolatedImpl.sendEvent(EPRuntimeIsolatedImpl.java:150)
at arms.esper.wrap.IsolatedEPRuntime.sendEvent(IsolatedEPRuntime.java:12)
at arms.trial.Main1.main(Main1.java:120)






[ESPER-471] Static method called 'join' (reserved keyword) not allowed Created: 11/Jun/10  Updated: 26/Sep/10  Resolved: 03/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Consider the following statement
select LineUtils.join(content, ' ') from GenericEvent

GenericEvent is a placeholder for parser input data and has
the single attribute: String[] content.
I'd like simply to join those parts into a single String.

But while creating the pattern I get:

com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near 'join' (a reserved keyword) at line 2 column 17, please check the select clause [
select LineUtils.join(content, 1, -1, ' ', '') from GenericEvent
]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:29)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:136)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:303)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:144)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at arms.trial.Statements.initStatement(Statements.groovy:60)
at arms.trial.Main1.main(Main1.java:123)

I tried to escape `join` method name. But the result is almost the same:

com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near '(' at line 2 column 23, please check the select clause [ select LineUtils.`join`(content, ' ') from GenericEvent ]

Seems that EPL should allow using its keywords as Java identifiers at least when they are escaped with ``.



 Comments   
Comment by Thomas Bernhardt [ 13/Jun/10 ]

This is assigned to 4.0 to coincide with the ANLTR upgrade in the next major release.

Comment by Thomas Bernhardt [ 03/Aug/10 ]

in branch enhancements400





[ESPER-470] Spring JMS input adapter ack's message before unmarshal Created: 10/Jun/10  Updated: 18/Jun/10  Resolved: 16/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm trying to use the SpringJMSTemplateInputAdapter and I've noticed when I
throw an exception from within my unmarshal method (in a transaction) the
message is never resent, it's like Esper ack'ed the message when it wasn't
supposed to. My config is in the first section below. However, when I
simply change the messageListener in the "listenerContainer" to POJO (non
esper) and throw an exception, messages get redelivered as expected (2nd
config entry). Anyone ever seen this?

<!-- Spring Application Context -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
default-destroy-method="destroy">

<!-- JMS ActiveMQ Connection Factory -->
<bean id="jmsActiveMQFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>

<!-- ActiveMQ destination to use by default -->
<bean id="eventQueue" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg value="ESPER.QUEUE"/>
</bean>

<!-- Spring JMS Template for ActiveMQ -->
<bean id="jmsActiveMQTemplate"
class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref bean="jmsActiveMQFactory"/>
</property>
<property name="defaultDestination">
<ref bean="eventQueue"/>
</property>
</bean>

<!-- Provides listener threads -->
<bean id="listenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="jmsActiveMQFactory"/>
<property name="destination" ref="eventQueue"/>
<property name="messageListener" ref="jmsMessageUnmarshaller"/>
<property name="sessionTransacted" value="true"/>
</bean>

<!-- Default unmarshaller -->
<bean id="jmsMessageUnmarshaller" class="xxx.spd.nh.mom.EventMarshaller"/>
<bean id="genericMarshaller" class="xxx.spd.nh.mom.GenericMarshaller"/>

<!-- Input adapter -->
<bean id="jmsInputAdapter"
class="com.espertech.esperio.jms.SpringJMSTemplateInputAdapter">
<property name="jmsTemplate">
<ref bean="jmsActiveMQTemplate"/>
</property>
<property name="jmsMessageUnmarshaller">
<ref bean="jmsMessageUnmarshaller"/>
</property>
</bean>






[ESPER-469] Using java.sql.Date with renderer returns PropertyAccessException Created: 10/Jun/10  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example:

EPStatement statement = epService.getEPAdministrator().createEPL("select java.sql.Date.valueOf(\"2010-01-31\") as mySqlDate from SupportBean");
epService.getEPRuntime().sendEvent(new SupportBean());

EventBean event = statement.iterator().next();
assertEquals(java.sql.Date.valueOf("2010-01-31"), event.get("mySqlDate"));
EventPropertyGetter getter = statement.getEventType().getGetter("mySqlDate");
assertEquals(java.sql.Date.valueOf("2010-01-31"), getter.get(event));

String result = epService.getEPRuntime().getEventRenderer().renderXML("testsqldate", event);

com.espertech.esper.client.PropertyAccessException: java.lang.reflect.InvocationTargetException
at com.espertech.esper.event.bean.CGLibPropertyGetter.getBeanProp(CGLibPropertyGetter.java:51)
at com.espertech.esper.event.bean.CGLibPropertyGetter.get(CGLibPropertyGetter.java:63)
at com.espertech.esper.event.util.XMLRendererImpl.recursiveRender(XMLRendererImpl.java:264)
at com.espertech.esper.event.util.XMLRendererImpl.renderElementFragment(XMLRendererImpl.java:428)
at com.espertech.esper.event.util.XMLRendererImpl.recursiveRender(XMLRendererImpl.java:395)
at com.espertech.esper.event.util.XMLRendererImpl.renderElementXML(XMLRendererImpl.java:60)
at com.espertech.esper.event.util.XMLRendererImpl.render(XMLRendererImpl.java:45)
at com.espertech.esper.event.util.EventRendererImpl.renderXML(EventRendererImpl.java:119)
at com.espertech.esper.event.util.EventRendererImpl.renderXML(EventRendererImpl.java:100)
at com.espertech.esper.regression.event.TestEventRendererXML.testSQLDate(TestEventRendererXML.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:108)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:192)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: java.lang.reflect.InvocationTargetException
at $java.sql.Date$$FastClassByCGLIB$$40d5de3a.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at com.espertech.esper.event.bean.CGLibPropertyGetter.getBeanProp(CGLibPropertyGetter.java:43)
... 30 more
Caused by: java.lang.IllegalArgumentException
at java.sql.Date.getHours(Date.java:156)
... 33 more






[ESPER-468] IllegalArgumentException while parsing "B until not B" pattern Created: 09/Jun/10  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Alexander Monakhov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Creation of EPL statement "select * from pattern [ B until not B ]" results in the following:

java.lang.IllegalArgumentException: Filter callback to be removed not found
at com.espertech.esper.filter.EventTypeIndexBuilder.remove(EventTypeIndexBuilder.java:129)
at com.espertech.esper.filter.FilterServiceImpl.remove(FilterServiceImpl.java:66)
at com.espertech.esper.pattern.EvalFilterStateNode.stopFiltering(EvalFilterStateNode.java:187)
at com.espertech.esper.pattern.EvalFilterStateNode.quit(EvalFilterStateNode.java:85)
at com.espertech.esper.pattern.EvalMatchUntilStateNode.quit(EvalMatchUntilStateNode.java:246)
at com.espertech.esper.pattern.EvalMatchUntilStateNode.evaluateTrue(EvalMatchUntilStateNode.java:175)
at com.espertech.esper.pattern.EvalNotStateNode.start(EvalNotStateNode.java:67)
at com.espertech.esper.pattern.EvalMatchUntilStateNode.start(EvalMatchUntilStateNode.java:85)
at com.espertech.esper.pattern.EvalRootStateNode.start(EvalRootStateNode.java:72)
at com.espertech.esper.pattern.EvalRootNode.start(EvalRootNode.java:30)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:775)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:130)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:550)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:520)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:159)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:114)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:145)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:96)
at arms.trial.Statements.initStatement(Statements.java:23)
at arms.trial.Main1.main(Main1.java:125)



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Assigned for 3.5 release

Comment by Thomas Bernhardt [ 10/Jun/10 ]

in release 3.5





[ESPER-467] Position markers on parse tree are incorrect Created: 26/May/10  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: Bug Priority: Trivial
Reporter: W Jones Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MacOS X 10.5.8, Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-9M3125)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)


Attachments: Java Source File TestFileLocations.java    
Testcase included: yes
Number of attachments : 1

 Description   

The AST produced by the EPL parser does not produce correct location markers. Both line numbers and column numbers are incorrect. See attached test.



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Assigned to 3.5 release

Comment by Thomas Bernhardt [ 10/Jun/10 ]

Token char positions are not designed to be used for client API, use version 3.5 module instead





[ESPER-466] First-length and first-unique combined to intersection (multiple data windows) to reduce insert stream Created: 10/May/10  Updated: 26/Sep/10  Resolved: 03/Sep/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

As documented in
http://esper.codehaus.org/esper-3.4.0/doc/reference/en/html_single/index.html#epl-from-clause-view-multidatawindow
the insert stream remains the insert stream.

This is slightly inconsistent for the following statement:
insert into f10 select count,symbol as symbol from myEvent.std:firstunique(symbol).win:firstlength(10)
... as the insert stream reflects all arriving events while when using the views alone they do reduce the insert stream



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Assigned to 4.0 release

Comment by Thomas Bernhardt [ 03/Sep/10 ]

Bug fix in release 4





[ESPER-465] Support for XSD Schema events based on plain Apache Xerces and not Sun redistribution Created: 08/May/10  Updated: 02/Sep/10  Resolved: 02/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Esper uses the implementation returned by "DOMImplementationRegistry.newInstance().getDOMImplementation("XS-Loader");" for the current thread but only supports the Sun Xerces redistribution.

[java] Exception in thread "main" com.espertech.esper.client.ConfigurationException: Failed to read schema 'watchme.xsd' : org.apache.xerces.impl.xs.XSImplementationImpl cannot be cast to com.sun.org.apache.xerces.internal.xs.XSImplementation
[java] at com.espertech.esper.core.EPServicesContextFactoryDefault.init(EPServicesContextFactoryDefault.java:240)
[java] at com.espertech.esper.core.EPServicesContextFactoryDefault.createServicesContext(EPServicesContextFactoryDefault.java:69)
[java] at com.espertech.esper.core.EPServiceProviderImpl.doInitialize(EPServiceProviderImpl.java:354)
[java] at com.espertech.esper.core.EPServiceProviderImpl.<init>(EPServiceProviderImpl.java:72)
[java] at com.espertech.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:85)
[java] at com.espertech.esper.client.EPServiceProviderManager.getDefaultProvider(EPServiceProviderManager.java:42)
...
[java] Caused by: com.espertech.esper.client.ConfigurationException: Failed to read schema 'watchme.xsd' : org.apache.xerces.impl.xs.XSImplementationImpl cannot be cast to com.sun.org.apache.xerces.internal.xs.XSImplementation
[java] at com.espertech.esper.event.xml.XSDSchemaMapper.loadAndMap(XSDSchemaMapper.java:51)
[java] at com.espertech.esper.core.EPServicesContextFactoryDefault.init(EPServicesContextFactoryDefault.java:236)
[java] ... 9 more
[java] Caused by: java.lang.ClassCastException: org.apache.xerces.impl.xs.XSImplementationImpl cannot be cast to com.sun.org.apache.xerces.internal.xs.XSImplementation
[java] at com.espertech.esper.event.xml.XSDSchemaMapper.readSchemaInternal(XSDSchemaMapper.java:67)
[java] at com.espertech.esper.event.xml.XSDSchemaMapper.loadAndMap(XSDSchemaMapper.java:43)
==========================



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Assigned to 4.0 release which will require JDK 6

Comment by Thomas Bernhardt [ 02/Sep/10 ]

Version 4 will present a nice error message, documents the limitation and provides the workaround as herein.
Workaround:

// Set JRE DOM registry before loading the configuration
System.setProperty(DOMImplementationRegistry.PROPERTY, DOMXSImplementationSourceImpl.class.getName());
or
System.setProperty(DOMImplementationRegistry.PROPERTY, "com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl");





[ESPER-464] Add an engine-level configuration parameter for default AccessorStyle Created: 17/Apr/10  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.5
Fix Version/s: 3.5

Type: New Feature Priority: Trivial
Reporter: Barry Kaplan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Not all JVM languages use javabean conventions, Scala for example. Hence it would helpful to have an engine-level configuration that allows setting AccessorStyle.PUBLIC as the default for all even types.

(see also http://old.nabble.com/Using-AccessorStyle.PUBLIC-for--all--events--td28277633.html)



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Assigned to 3.5 release





[ESPER-463] Nested properties can not be escaped with ticks Created: 05/Apr/10  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.4.0-JIRA463.jar    
Number of attachments : 1

 Description   

This JIRA is the same as the .NET JIRA-390.

When a nested property matches the name of a reserved keyword, the escape syntax must be used to escape the property:
select nestedproperty.`group`



 Comments   
Comment by Thomas Bernhardt [ 05/Apr/10 ]

The cumulative jar patch file attached also addresses the following JIRAs:

http://jira.codehaus.org/browse/ESPER-460 Added ResultSet to context provided to SQLOutputRowConversion and SQLColumnTypeConversion
http://jira.codehaus.org/browse/ESPER-459 Query rewrite causes miss of event when using in-keyword with set/map/array parameter in simple filter-only query

Comment by Thomas Bernhardt [ 10/Jun/10 ]

Part of 3.5 release





[ESPER-462] Add data window that retains the last event per key and merges all fields Created: 31/Mar/10  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be useful to have a data window that retains the last event per key (or combination thereof) and where all newly arriving events of the same key get merged or updated into the most current event. This is a special case of revision event types where there is only a single event type and all fields are merged.

Synopsis:
Select keyfield, field1, field2 from Event.win:latest(keyfield);

Example:

  • Arrives {keyfield=1, field1=null, field2='b'}
  • Arrives {keyfield=1, field1='a', field2='b'}

    now the insert stream has

    {1, a, b}

    and the remove stream

    {1, null, b}

Can currently be accomplished by revision event types but requires configuration.



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

assigned to 4.0 release

Comment by Thomas Bernhardt [ 21/May/12 ]

see revision event types, or on-merge with named window





[ESPER-461] LIMIT and ORDER BY do not work for patterns Created: 29/Mar/10  Updated: 31/Mar/10  Resolved: 31/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mitch Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File PatternBug.java    
Number of attachments : 1

 Description   

When a pattern runs multiple rows for a match, it is not possible to order or limit the number of rows returned to the listener.

Test code attached.

eg:

select e1.eventID as id1, e2.eventID as id2 from
pattern [ every e1=TestEvent(type='A') ->
e2=TestEvent(type='B')]
order by e1.eventID desc limit 1

Sample input:
eventID=1 type=A
eventID=2 type=A
eventID=3 type=B

sample output rows:

map=

{id1=1, id2=3}

map=

{id1=2, id2=3}

expected only:

rows=1 map={id1=2, id2=3}

This problem does not appear to affect match_recognize.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/10 ]

Cannot be reproduced in version 3.4





[ESPER-460] Added ResultSet to context provided to SQLOutputRowConversion and SQLColumnTypeConversion Created: 27/Mar/10  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: 3.5

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.4.0-JIRA460.jar    
Number of attachments : 1

 Description   

It would be very practical to also have the ResultSet in the context objects provided when column or row mapping an SQL result, for custom column retrieval logic if needed.



 Comments   
Comment by Thomas Bernhardt [ 27/Mar/10 ]

The cumulative patch file attached addresses this issue as well as below. Please add in front of the Esper jar file in your classpath.

ESPER-459 Query rewrite causes miss of event when using in-keyword with set/map/array parameter in simple filter-only query

Comment by Thomas Bernhardt [ 10/Jun/10 ]

In version 3.5 release





[ESPER-459] Query rewrite causes miss of event when using in-keyword with set/map/array parameter in simple filter-only query Created: 25/Mar/10  Updated: 18/Jun/10  Resolved: 25/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Consider the following class, I expect both listeners to write a message, but only the second one writes the message.
Output:
'= any ' query A

package org.test;

import java.util.HashSet;
import java.util.Set;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPPreparedStatement;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;

public class Event
{
public enum Type

{ A, B }

private Type type;

public Event( Type type )

{ this.type = type; }

public Type getType()

{ return type; }

public static void main( String[] args )
{
Configuration configuration = new Configuration();
configuration.addEventType( "Event", Event.class.getName() );
EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider( configuration );

Set<Type> types = new HashSet<Type>();
types.add( Type.A );

// set the "in " query
EPPreparedStatement inPstmt = epService.getEPAdministrator().prepareEPL(
"select * " +
"from Event ev " +
"where ev.type in "
);
inPstmt.setObject( 1, types );

EPStatement inStmt = epService.getEPAdministrator().create( inPstmt );
inStmt.addListener( new UpdateListener()
{
public void update( EventBean[] newEvents, EventBean[] oldEvents )

{ System.out.println( "'in (?)' query " + newEvents[0].get( "type" ) ); }

});

// set the "= any" query
EPPreparedStatement anyPstmt = epService.getEPAdministrator().prepareEPL(
"select * " +
"from Event ev " +
"where ev.type = any "
);
anyPstmt.setObject( 1, types );

EPStatement anyStmt = epService.getEPAdministrator().create( anyPstmt );
anyStmt.addListener( new UpdateListener()
{
public void update( EventBean[] newEvents, EventBean[] oldEvents )

{ System.out.println( "'= any (?)' query " + newEvents[0].get( "type" ) ); }

});

Event eventA = new Event( Type.A );
Event eventB = new Event( Type.B );

epService.getEPRuntime().sendEvent( eventA );
epService.getEPRuntime().sendEvent( eventB );
}
}



 Comments   
Comment by Thomas Bernhardt [ 25/Mar/10 ]

The problem manifests itself in "select * from ABC where condition" simple queries only that are rewritten by the engine. When condition contains "in (var)" and 'var' is a array, map or collection then the condition does not evaluate correctly.

Comment by Thomas Bernhardt [ 25/Mar/10 ]

Changes in branch bugfix340

Comment by Thomas Bernhardt [ 27/Mar/10 ]

Please find a patch generated for this JIRA in post http://jira.codehaus.org/browse/ESPER-460





[ESPER-458] Have TypeWidenerBoxedNumeric support java.lang.Character Created: 15/Mar/10  Updated: 03/Aug/10  Resolved: 03/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Trivial
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Getting the ASCII or Unicode value of a character is simple in Java. The char type is already an integer type, so you can simply use it in most places that you would use an int. To print it out as an integer (since characters are usually printed out as the character and not the integer value), simply cast it into an int.

From http://www.codecodex.com/wiki/Find_the_ASCII_or_Unicode_value_of_a_character



 Comments   
Comment by Thomas Bernhardt [ 15/Mar/10 ]

The idea is to allow assigning an int-values to a Character/char, for properties or variables that are char-type. Is there more or did is this summmary correct?

Comment by Mathias Bogaert [ 15/Mar/10 ]

Actually the opposite. Accept a Character/char for properties or variables that are numeric-type.

Comment by Thomas Bernhardt [ 19/Mar/10 ]

Is there a good EPL statement use case for this?

Comment by Thomas Bernhardt [ 03/Aug/10 ]

Most relational systems don't allow assigning int-types a character without explicit convert, while most programming languages seem to allow. To prevent mistakes lets not allow.





[ESPER-457] ClassCastException when using subscriber to join statement with wildcard-select and distinct Created: 12/Mar/10  Updated: 19/Mar/10  Resolved: 15/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample statement and code to reproduce:

String epl = "select distinct * from " +
"SupportBean(intPrimitive=0) as fooB unidirectional " +
"inner join " +
"pattern [" +
"every-distinct(fooA.string) fooA=SupportBean(intPrimitive=1)" +
"->" +
"every-distinct(wooA.string) wooA=SupportBean(intPrimitive=2)" +
" where timer:within(1 hour)" +
"].win:time(1 hour) as fooWooPair " +
"on fooB.longPrimitive = fooWooPair.fooA.longPrimitive";

EPStatement stmt = epService.getEPAdministrator().createEPL(epl);
stmt.setSubscriber(subscriber);

log.info("Sending event (fooA) starting pattern subexpression...");
sendEvent("E1", 1, 10L);

log.info("Sending event (wooA 1) matching pattern subexpression...");
sendEvent("E2", 2, 10L);

log.info("Sending event (wooA 2) matching pattern subexpression...");
sendEvent("E3", 2, 10L);

log.info("Sending event (fooB) causing join with matched patterns...");
sendEvent("Query", 0, 10L);

assertTrue(subscriber.isInvoked());

com.espertech.esper.client.EPException: java.lang.ClassCastException: java.lang.Class
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:402)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:210)
at com.espertech.esper.regression.view.TestDistinctWildcardJoinPattern.sendEvent(TestDistinctWildcardJoinPattern.java:60)
at com.espertech.esper.regression.view.TestDistinctWildcardJoinPattern.testWildcardJoinPattern(TestDistinctWildcardJoinPattern.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.ClassCastException: java.lang.Class
at com.espertech.esper.event.map.MapEventBeanReader.read(MapEventBeanReader.java:38)
at com.espertech.esper.event.EventBeanUtility.getDistinctByProp(EventBeanUtility.java:492)
at com.espertech.esper.epl.view.OutputProcessViewDistinctOrAfter.process(OutputProcessViewDistinctOrAfter.java:134)
at com.espertech.esper.epl.join.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:53)
at com.espertech.esper.epl.join.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:64)
at com.espertech.esper.core.EPStatementHandle.internalDispatch(EPStatementHandle.java:159)
at com.espertech.esper.core.EPRuntimeImpl.processStatementFilterMultiple(EPRuntimeImpl.java:985)
at com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:840)
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:398)
... 25 more



 Comments   
Comment by Thomas Bernhardt [ 12/Mar/10 ]

As a possible workaround one could use a listener to receive events, as the problem is specific to the use of a subscriber object.

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-456] Hi , I am getting below exception when Iam firing below query: Created: 03/Mar/10  Updated: 04/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 5.0

Type: Bug Priority: Major
Reporter: Sudhakar Reddy Sanapa Reddy Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: 2 days
Time Spent: Not Specified
Original Estimate: 2 days
Environment:

Windows XP,JBoss


Source ID: ESPER - 9999
Number of attachments : 0

 Description   

Hi ,

I am getting below exception when Iam firing below query:

Help :
1. Can we write blocks of EPL similar to pl/sql blocks.
2. Can we pass srteam objects to static methods of Utility classes.
3. Dose Esper support If and else statements in EPL queries.

select trade.customerAccount, case when
((select count from SecurityPosition where customerAccount = trade.customerAccount) > 0) then
(update irstream SecurityPosition set position = AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, position where customerAccount = trade.customerAccount and depo = trade.depotLoc)) else(insert irstream into SecurityPosition( trade.customerAccount as customerAccount,trade.depotLoc as depo , AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, 'N') as position)) from KRITradeBean.win:time(600 sec).std:unique(trade.transactionNum) as trade, SecurityPosition as pos ";

My Esper.cfg.xml:
*****************
<event-type alias="KRITradeBean" class="com.ici.clearedge.framework.esper.streams.KRITradeBean" name="KRITradeBean" />
<event-type alias="SecurityPositionBean" class="com.ici.clearedge.framework.esper.streams.SecurityPositionBean" name="SecurityPositionBean" />

<!-- Import Packages and Classes -->
<auto-import import-name="com.ici.clearedge.framework.esper.util.AggregateUtil"/>

Code Snippet :

logger.debug("Begin of method configureListeners");
EPServiceProvider epService = null;
epService = getEPServiceObject();
String aggregatesQuery = " " +
" select trade.customerAccount, case when " +
" ((select count from " +
" SecurityPosition " +
" where customerAccount = trade.customerAccount) > 0) then " +
" (update irstream SecurityPosition set position = " +
" AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, position " +
" where customerAccount = trade.customerAccount and depo = trade.depotLoc)) " +
" else " +
" (insert irstream into SecurityPosition( " +
" trade.customerAccount as customerAccount, " +
" trade.depotLoc as depo , " +
" AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, 'N') as position)) from " +
" KRITradeBean.win:time(600 sec).std:unique(trade.transactionNum) as trade, SecurityPosition as pos ";
EPStatement aggStatement = epService.getEPAdministrator().createEPL(aggregatesQuery);
CNSTradeListener aggListner = new CNSTradeListener();
aggStatement.addListener(aggListner);
CSVInputAdapterSpec spec = readData();
InputAdapter aggAdapter= = new CSVInputAdapter(epService, spec);
while(true)

{ aggAdapter.start(); Thread.sleep(50000); }

ERROR 10:45:16,471 (AggregatesEventManager.java 95) - Failed to configure listeners
com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near 'update' (a reserved keyword) at line 1 column 121, please check the case expression within the select clause [ select case when ((select count from SecurityPosition where customerAccount = trade.customerAccount) = 0) then (update irstream SecurityPosition set position = AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, position where customerAccount = trade.customerAccount and depo = trade.depotLoc)) else (insert irstream into SecurityPosition( trade.customerAccount as customerAccount, trade.depotLoc as depo , AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, 'N') as position)) from KRITradeBean.win:time(600 sec).std:unique(trade.transactionNum) as trade, SecurityPosition as pos ]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:28)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:133)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:302)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:145)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:97)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.configureListeners(AggregatesEventManager.java:89)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.realTimeEvents(AggregatesEventManager.java:24)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.main(AggregatesEventManager.java:36)
ERROR 10:45:16,471 (AggregatesEventManager.java 26) - Failed to raise real time events
com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near 'update' (a reserved keyword) at line 1 column 121, please check the case expression within the select clause [ select case when ((select count from SecurityPosition where customerAccount = trade.customerAccount) = 0) then (update irstream SecurityPosition set position = AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, position where customerAccount = trade.customerAccount and depo = trade.depotLoc)) else (insert irstream into SecurityPosition( trade.customerAccount as customerAccount, trade.depotLoc as depo , AggregateUtil.getSecurityPosition(trade.tradeDirectionName, trade.failDollars, 'N') as position)) from KRITradeBean.win:time(600 sec).std:unique(trade.transactionNum) as trade, SecurityPosition as pos ]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:28)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:133)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:302)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:145)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:97)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.configureListeners(AggregatesEventManager.java:89)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.realTimeEvents(AggregatesEventManager.java:24)
at com.ici.clearedge.framework.esper.eventmanagers.AggregatesEventManager.main(AggregatesEventManager.java:36)



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/10 ]

Questions are best addressed at user@esper.codehaus.org

It may be best to study the examples and the documentation, else its yes to all questions.





[ESPER-455] Aggregation when used with "prev" in where clause may return an incorrect result. Created: 27/Feb/10  Updated: 26/Sep/10  Resolved: 01/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Bug Priority: Minor
Reporter: Steve Bate Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File FlappingTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

I've attached a unit test to demonstrate a scenario that results in negative results from the count function.



 Comments   
Comment by Thomas Bernhardt [ 27/Feb/10 ]

Assigned to 4.0 release.
We may remove support for "prev" in the where clause when used with aggregations. The issue lies in the remove stream: prev is designed to not return events for a remove stream while aggregations require remove stream events to decrease count. Assigned to 4.0 since in 3.x releases we hold the behavior identical. Alternatively we may have "prev" retain remove stream events as needed when used with aggregation however that would also change 3.x behavior i.e. memory requirements/performance.

Comment by Thomas Bernhardt [ 01/Sep/10 ]

In 4.0 for aggregation queries we disallow "prev" in the where-clause and force use of the new "last(index, expression)" aggregation function, this is more consistent with count aggregation function.





[ESPER-454] Timer thread caught unhandled exception in named window with time_batch Created: 23/Feb/10  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Mark Lin Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX 10.6.2, Java 1.6.0_17


Attachments: Text File TestNamedWindowTimeBatchConcurrentSelect.txt    
Number of attachments : 1

 Description   

When trying to use named window with win:time_batch, Esper will get an unhandled exception after couple minutes.

The EPL used to create named window:
CREATE WINDOW everestDataWindow.win:time_batch(60 sec) as select * from Metric

The EPL to insert data:
INSERT INTO everestDataWindow SELECT * FROM Metric(app='worker')

The on select EPL used to select in named window when Latency event shows up:
on Latency(app='worker') as latency
SELECT *
FROM everestDataWindow as win
WHERE latency.hostname = win.hostname
AND latency.colo = win.colo
AND ( win.name like 'worker.p%.50th' OR
win.name like 'worker.services.p%.99th' OR )

And here's the stack trace:
2010-02-23 17:08:25,678 [com.espertech.esper.Timer-default-0] ERROR com.espertech.esper.timer.EPLTimerTask - Timer thread caught unhandled exception: null
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384)
at java.util.AbstractCollection.toArray(AbstractCollection.java:171)
at com.espertech.esper.view.window.TimeBatchViewRStream.sendBatch(TimeBatchViewRStream.java:207)
at com.espertech.esper.view.window.TimeBatchViewRStream$1.scheduledTrigger(TimeBatchViewRStream.java:290)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:874)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:610)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:491)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:462)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:365)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:210)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:184)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)



 Comments   
Comment by Thomas Bernhardt [ 27/Feb/10 ]

Hi Mark,

what version of Esper is this please?
We have not been able to reproduce, our test case is attached.

Best regards
Tom

Comment by Mark Lin [ 15/Mar/10 ]

Tom,

We are running 3.3.0. However, as of late, I don't see this particular error anymore, however, as number of events start to increase, I am starting to see many of these error. And when they occur, although application doesn't crash, esper no longer process events. The EPL are essentially the same ones I pasted above, the big difference is we are sending 2X events.

2010-03-15 19:52:23,692 [com.espertech.esper.Timer-default-0] ERROR com.espertech.esper.timer.EPLTimerTask - Timer thread caught unhandled exception: 5602
java.lang.ArrayIndexOutOfBoundsException: 5602
at java.util.LinkedList.toArray(LinkedList.java:915)
at com.espertech.esper.view.window.TimeBatchView.sendBatch(TimeBatchView.java:223)
at com.espertech.esper.view.window.TimeBatchView$1.scheduledTrigger(TimeBatchView.java:311)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:909)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:538)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:491)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:462)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:365)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:210)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:184)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Thanks,
Mark

Comment by Mark Lin [ 18/Mar/10 ]

I am very much java newbie, please pardon my immature attempt to debug.

Additional info for this exception, java.lang.ArrayIndexOutOfBoundsException: 5602

Here's the line for TimeBatchView.java:223:

newData = currentBatch.toArray(new EventBean[currentBatch.size()]);

And the small piece in LinkedList.toArray function that caused the exception:

if (a.length < size)
a = (T[])java.lang.reflect.Array.newInstance(
a.getClass().getComponentType(), size);
int i = 0;
int i = 0;
Object[] result = a;
for (Entry<E> e = header.next; e != header; e = e.next)
result[i++] = e.element; //This is the exception line

The exception indicates that an array has been accessed with an illegal index. I am guess there might a case where the linked list grows after array allocation but before the for loop. So I added the code to monitor currentBatch size and a try clause around currentBatch.toArray.

String _name = this.statementContext.getStatementName();
try {
if (! currentBatch.isEmpty())

{ Integer bs = currentBatch.size(); log.debug(_name + " batch size: " + bs); newData = currentBatch.toArray(new EventBean[bs]); }

} catch(Exception e)

{ log.error(_name + " current size: " + currentBatch.size() + " exception: " + e.getMessage()); }

When I eventually reproduce the problem, it did look like list grew before the loop, the exception tells us which index it tried to use.

2010-03-19 01:11:56,556 [com.espertech.esper.Timer-default-0] INFO com.espertech.esper.view.window.TimeBatchView - everestLatencyEvent batch size: 4763
2010-03-19 01:11:56,558 [com.espertech.esper.Timer-default-0] ERROR com.espertech.esper.view.window.TimeBatchView - everestLatencyEvent current size: 4774 exception: 4766

I guess I can make a copy of the currentBatch to ensure it wont grow while doing toArray, but I am afraid to break other things. Or maybe someway to stop updating the batch without losing any event, but I couldn't find that. Any advice?

Thanks,
Mark





[ESPER-453] Repeated Max and Min on Named Window Aggregations Created: 22/Feb/10  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Major
Reporter: Antonio Alegria Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Red Hat Enterprise Linux Server release 5.4

java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)


Number of attachments : 0

 Description   

I have been having a problem with the Min and Max aggregation functions since I upgraded to Esper 3.3.0. I cannot accurately and purposefully reproduce the problem with generated data, but when it is running live what happens is that for several measurement periods the max and min values are repeated, then it changes and repeats again (e.g. max = 0.213, 0.213, 0.213, 1.1, 2, 2, 2, ...) which is incorrect, according with the input data (i checked). Other aggregation functions such as count and avg seem to be working correctly

The funny thing is that this only happens when the aggregation is applied on a named window. If I directly declare the data window in the query there is no problem (see below):

// Window: name string, value long
create window NamedWindow5m.win:time(5 minutes) as select * from Window;

insert into NamedWindow5m
select *
from Window;

// This does not work fine
select max(value), min(value), count
from NamedWindow5m
group by name
output last at(/5,,,,*);

// This works fine
select max(value), min(value), count
from Window.win:time(5 minutes)
group by name
output last at(/5,,,,*);



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/10 ]

In enhancements340 branch

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-452] NPE in correlated subquery in select clause that fetches from named window Created: 21/Feb/10  Updated: 18/Jun/10  Resolved: 21/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following query produces an NPE:

EPServiceProvider provider = EPServiceProviderManager.getDefaultProvider();
provider.getEPAdministrator().getConfiguration().addEventType("SupportBean", SupportBean.class);
provider.getEPAdministrator().getConfiguration().addEventType("ABean", SupportBean_S0.class);
provider.getEPAdministrator().createEPL("create window MyWindow.std:unique(string) as select * from SupportBean");
provider.getEPAdministrator().createEPL("select status.*, (select * from MyWindow where string = ABean.p00) as details" +
" from ABean(p01='good') as status");

java.lang.NullPointerException
at com.espertech.esper.epl.expression.ExprSubselectRowNode.getType(ExprSubselectRowNode.java:44)
at com.espertech.esper.epl.core.SelectExprEvalProcessorStreams.init(SelectExprEvalProcessorStreams.java:232)
at com.espertech.esper.epl.core.SelectExprEvalProcessorStreams.<init>(SelectExprEvalProcessorStreams.java:174)
at com.espertech.esper.epl.core.SelectExprProcessorFactory.getProcessorInternal(SelectExprProcessorFactory.java:123)
at com.espertech.esper.epl.core.SelectExprProcessorFactory.getProcessor(SelectExprProcessorFactory.java:59)
at com.espertech.esper.epl.core.ResultSetProcessorFactory.getProcessor(ResultSetProcessorFactory.java:303)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:871)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:121)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:537)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:507)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:157)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:114)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:146)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:97)
at com.espertech.esper.TestABC.testIt(TestABC.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)



 Comments   
Comment by Thomas Bernhardt [ 21/Feb/10 ]

bug fix in bugfix330 branch





[ESPER-451] Memory leak in pattern with or-operator and permanently false subexpressions Created: 18/Feb/10  Updated: 19/Mar/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.3.0-JIRA451.jar    
Number of attachments : 1

 Description   

Reproduced by the following query:

every s=SupportBean(string='E') ->
(timer:interval(10) and not SupportBean(string='C1'))
or
(SupportBean(string='C2') and not timer:interval(10))

When the 10-second interval passes, the "or" condition turns permanently false however memory allocated for the followed-by does not get released.



 Comments   
Comment by Thomas Bernhardt [ 19/Feb/10 ]

please find the cumulative patch for use with release 3.3 attached.

The patch corrects the following issues:
ESPER-445 Improve performance of match-recognize when large number of intermediate events
ESPER-451 (this issue)

Please place the patch in front of the esper-3.3.0.jar file in the classpath.

Best regards
Tom

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-450] Row-based and/or column-based conversion function for SQL query results Created: 08/Feb/10  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When an SQL result is a byte array, XML doc or other custom format or the column results represent POJO fields, it would be nice to allow registration of a conversion function:
(1) row-based takes all results of the SQL query and returns a POJO
(2) column-based takes a single column result of an SQL query and returns a new single column result



 Comments   
Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-449] Create window fails for syntax providing column names and types explicitly and multiple data windows Created: 03/Feb/10  Updated: 19/Mar/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

See syntax http://esper.codehaus.org/esper-3.3.0/doc/reference/en/html_single/index.html#named_create_explicit

For example, this fails:
create window MyNamedWindowTwo.std:unique(p1).win:time(30) as (p1 String, p2 String)



 Comments   
Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-448] Allow expression as an index to a indexed property Created: 29/Jan/10  Updated: 01/Oct/10  Resolved: 01/Oct/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi,

I have an event MyEvent that exposes a property that is a List<SomeType> called MyList. MyEvent also exposes an int called MyInt.

If I construct EPL where I "select MyList[0] from MyEvent" this is fine. It returns element 0 of the list.

If I construct EPL where I "select MyList[MyInt] from MyEvent" this is NOT fine. It throws an exception.

Have I missed something in the documentation to resolve this - or do I have to know the element in a list before I write my epl?

=================

Looking the NEsper/Esper ANTLR grammar is appears to me that only literals are allowed as indexes for indexed properties. Support for expressions as indexes seems like it would be very useful. As a workaround, you can create a User-Defined Function (UDF) to get the indexed value using a property value as an index.

For example, "select MyFn.GetItem(MyList, MyInt) from MyEvent".



 Comments   
Comment by Alexander Monakhov [ 08/Sep/10 ]

Tom, just FYI.
In the current state 'enhancements400' branch fails to parse
"
select * from
pattern[ every( [1..]E until timer:interval(5 seconds) ) ]
"

Comment by Thomas Bernhardt [ 08/Sep/10 ]

In release 4.0 we are no longer supporting "[1..]" as a syntax, the new syntax is "[1:]" consistent with filter ranges.

Comment by Alexander Monakhov [ 08/Sep/10 ]

I see. Thanks for clarification.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Released with version 4.0 in dot-operator syntax





[ESPER-447] Memory Leak When using XMLEvent Created: 27/Jan/10  Updated: 27/Feb/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Parthasarathy Suryanarayanan Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL5 2.6.18-164.el5, Esper on Spring 2.6 on JBOSS EAP 4.3, -Xms2048m -Xmx5000m Oracle 11


Attachments: Microsoft Word Esper memory leak.doc     XML File issue.esper.cfg.xml    
Number of attachments : 2

 Description   

Set-up:

We are using Esper core 3.1.
We use XMLEvents
We do not look out for patterns across time windows - all the processing is of "point-in-time" nature - confined to the single event alone.
The EPL statements are use simple joins between in the incoming event data and database data - no group by.
Our rate of event flow is very low - only few thouzand events per hour.
The Esper engine is supplied with events from a JMS Listener, which is running inside a spring container.

Issue:

Over a course of 24 ours we see memory leaks inside the application. A heap dump shows a lot of instances of the class "org.apache.xerces.dom.DeferredElementImpl". For example, for a 100K events over a course of 12 hours we see around 1



 Comments   
Comment by Parthasarathy Suryanarayanan [ 27/Jan/10 ]

The last statement should read "For example, for a 100K events over a course of 12 hours we see around 1.1 MM instances of the DeferredElementImpl class. "

Comment by Thomas Bernhardt [ 27/Jan/10 ]

Can you please provide the statements being run or ideally a simple Java class to reproduce?

Comment by Parthasarathy Suryanarayanan [ 28/Jan/10 ]

Tom
We have tried to provide as much details that we could gather right now in the second attachment (Esper memory leak.doc) that I just uploaded.

I have a single EPL statement that is under the test here.

select * from EventNane as ue, <DATABASE_QUERY1>, <DATABASE_QUERY2> where <DATABASE_QUERY1_RESULT>.property=<DATABASE_QUERY2_RESULT.property>=tabB.ALRTPFLID and ue.property=DATABASE_QUERY1_RESULT.property

DATABASE_QUERY1 and DATABASE_QUERY2 have a single-row or very small result sets.

Let me know if you need more information.

Comment by Thomas Bernhardt [ 29/Jan/10 ]

Do you have caching enabled? If you have please try to disable and see if the cache gets too big.
Does the memory leak occur if you send events that have the same property values?
Can you please provide a test class if still experiencing a problem.

Comment by Parthasarathy Suryanarayanan [ 29/Jan/10 ]

Do you have caching enabled? If you have please try to disable and see if the cache gets too big.
==>No. The cache is disabled already.

Does the memory leak occur if you send events that have the same property values?
==>Have not tested it with the same property values. But I am sure that the events have difference values each time mostly.

Can you please provide a test class if still experiencing a problem?
==>Have to extract it out from a huge mess of other code in the application. Will give a try, but not sure when I can get it to you. Meanwhile, changed the event type from XML to java object and the problem seems to go away. (I will attach the screen shots soon). Thanks again.





[ESPER-446] Benchmark throws exception for weighted average sample Created: 25/Jan/10  Updated: 19/Mar/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

1. The benchmark application does not work for me when selecting any of the modes with the stat:weighted_avg view attached. The error is as follows: Exception in thread "main" com.espertech.esper.client.EPStatementException: Error starting statement: Error attaching view to parent view: Invalid view parameter expression 0, the expression returns a constant result value, are you sure? [select 'S0A' as ticker from Market(ticker='S0A').win:length(100).stat:weighted_avg('price', 'volume') ]
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:561)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:507)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:157)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:114)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:146)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:112)
at com.espertech.esper.example.benchmark.server.CEPProvider$EsperCEPProvider.registerStatement(Unknown Source)
at com.espertech.esper.example.benchmark.server.Server.start(Unknown Source)
at com.espertech.esper.example.benchmark.server.Server.main(Unknown Source)



 Comments   
Comment by Thomas Bernhardt [ 25/Jan/10 ]

Workaround or bug fix: Change statement to ...
select 'S0A' as ticker from Market(ticker='S0A').win:length(100).stat:weighted_avg(price, volume)

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-445] Improve performance of match-recognize when large number of intermediate events Created: 17/Jan/10  Updated: 19/Mar/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.3.0-JIRA445.jar     Java Source File TestRowPatternRecognitionPerf.java    
Number of attachments : 2

 Description   

I want to detect an A event (event type = 1), followed by a C event (event type = 3), no matter how many other events occur between them. I used a the following syntax (or thereabout):

select * from event1 where
match recognize (partition by device
(A B*? C)
define
A as A.type = 1
C as C.type = 3)

Then I fed the stream with an A event, a whole lot of B events, and a C event, for a wide range of devices. When the number of B events is very large (>10k) the performance starts to drop.



 Comments   
Comment by Thomas Bernhardt [ 17/Jan/10 ]

Test code attached.

Comment by Thomas Bernhardt [ 17/Jan/10 ]

Bug fix patch attached, please place in front of your classpath.

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-444] Support for SQL GROUP BY WITH ROLLUP Created: 16/Jan/10  Updated: 14/Apr/14  Due: 16/Jun/10  Resolved: 13/Feb/14

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In the syntax "group by xxx, yyy, zzz rollup" the new rollup keyword would cause the engine to aggregate on all levels (root, xxx, xxx/yyy) in addition to aggregate on the level of xxx/yyy/zzz, outputting null values for each key for the aggregation.






[ESPER-443] NEsper Output limited statement fails after ~90mins, eventually leading to Out Of Memory exception Created: 12/Jan/10  Updated: 18/Jun/10  Resolved: 18/Jan/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Darran Hayes Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP
Microsoft .Net 3.5


Number of attachments : 0

 Description   

The following statement fails after a period of time (just after 90mins on my machine, I think):

select irstream Symbol as S, *
from TickEvent.std:unique(Symbol)
group by Symbol
output last every 1 msec
order by Symbol, Version

(Query borrowed and changed from http://jira.codehaus.org/browse/ESPER-419)

After a little debugging I think I've found the culprit. PerformanceObserverWin.MicroTime is overflowing on the return statement:

public static long MicroTime
{
get

{ long time; long freq; QueryPerformanceFrequency(out freq); QueryPerformanceCounter(out time); return (time * 1000000L) / freq; }

}

The return value becomes negative, which causes the timerCallback in the SystemTimerFactory.OnTimerCallback to never be invoked.

I will add an attachment with some test code that should help to recreate the defect later today, if required?

Runtime configuration is:

Configuration configuration = SupportConfigFactory.GetConfiguration();
configuration.EngineDefaults.Threading.IsInternalTimerEnabled = true;
configuration.EngineDefaults.Threading.InternalTimerMsecResolution = 1;
_serviceProvider = EPServiceProviderManager.GetDefaultProvider(configuration);
_serviceProvider.Initialize();
_serviceProvider.EPAdministrator.Configuration.AddEventType(typeof(TickEvent));

Same problem when setting InternalTimerMsecResolution to 100 (default).

Another side-effect of this issue is that when the statement fails, memory consumption starts to increase eventually leading to Out Of Memory Exceptions.



 Comments   
Comment by Darran Hayes [ 12/Jan/10 ]

Also occurs when output limiting is set as "output last every 1 sec" which is our preferable timing, changed to msec for testing purposes.

Comment by Darran Hayes [ 12/Jan/10 ]

Having some doubts about my initial explanation - what I observed was that the comparison:

if (currTime < nextTime)

{ break; }

Always evaluated to true, when the statement began to fail to notify my of events. With nextTime somehow being +ve, and currTime being -ve. Trying to recreate with some conditional breakpoints... Apologies for any confusion.

Comment by Darran Hayes [ 13/Jan/10 ]

Btw, I'm encountering this on 32bit XP

Comment by Darran Hayes [ 13/Jan/10 ]

Apologies for not providing a unit test, quite a tricky one to pin down this...

Additional description of the bug follows:

SystemTimerFactory.OnTimerCallback has the following implementation code:

while (true)
{
currTime = PerformanceObserver.MicroTime;
if (currTime < nextTime)

{ break; }

nextTime += interval;

var callback = timerCallback;
if (callback != null)

{ callback.Invoke(null); }

}
}

Scenario 1: nextTime is initialised to a positive value from PerformanceObserver.MicroTime.

Eventually PerformanceObserver.MicroTime overflows into the negative space and when this happens the evaluation of (currTime < nextTime) is always true until catch up or until PerformanceObserver.MicroTime overflows into a high enough postive value again.

Scenario 2: nextTime is initialised to a negative value from PerformanceObserver.MicroTime.

Eventually nextTime will become a positive value and when PerformanceObserver.MicroTime has started overflowing into the negative space, again a long delay will occur until it reverts.

In my machine, PerformanceObserver.MicroTime spends about 30mins or more in negative space, before flipping, and vice versa.

Without knowing the design constraints or performance requirements of this the PerformanceObserver.MicroTime method, I've provide some candidate solutions here:

return (long)(((double)time * 1000000D) / (double)freq); // need to check double precision and performance cost of this approach, but it seems to be extremely accurate and never overflows.

or:

return time / (freq / 1000000L); // doesn't overflow, but is far less accurate than using doubles.

Darran

Comment by Aaron Jackson [ 18/Jan/10 ]

Conversion to decimal eliminates the overflow that occurs during computation.





[ESPER-442] NEsper: StockTicker example properties names are not correct Created: 11/Jan/10  Updated: 18/Jun/10  Resolved: 18/Jan/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Setting the engine to do case-insensitive evaluation of property names fixes the problem.



 Comments   
Comment by Aaron Jackson [ 18/Jan/10 ]

Fixed case of names in the example. Validated that the test functions and executes the sample properly.





[ESPER-441] NEsper : Qos_SLA example fails Created: 11/Jan/10  Updated: 27/Feb/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The single quotes in the AverageLatencyMonitor query should be removed.



 Comments   
Comment by Thomas Bernhardt [ 27/Feb/10 ]

fixed in nesper 3.2.1





[ESPER-440] NEsper: NamedWindowQuery example fails due to number precision Created: 08/Jan/10  Updated: 27/Feb/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

XP Pro 32 bit


Number of attachments : 0

 Description   

The random doubles created for the sensor values will not match the SensorWindow fire-and-forget query because .NET rounds the number when the EPL string is formatted. StackOverflow has some related info:

http://stackoverflow.com/questions/1421520/formatting-doubles-for-output-in-c

They say .NET rounds to 15 digits while formatted, but I was seeing 12 digits rounding. I modified the random number generation to...

double temperature = Math.Round(random.NextDouble()*10 + 80, 12);

and this fixed the problem. Before the change, it failed (almost) every time depending on the specific random number generated for the first event.

Other minor suggestions:

  • Since the example uses logging extensively, it would be useful to add a log4net config
  • The log.Error in the Main function would be more useful if the exception were passed as the
    second argument so the stack trace would be logged.


 Comments   
Comment by Thomas Bernhardt [ 27/Feb/10 ]

fixed in nesper 3.2.1





[ESPER-439] NEsper: MatchMaker example fails Created: 08/Jan/10  Updated: 27/Feb/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The reference to the event bean key "user" should be "User" in HandleFactoryEvents.

The matchAlertListener must be initialized in the MatchMakingMonitor(MobileUserBean) constructor. This listener reference is later used in the delegate defined in SetupPatterns (resulting in a NullReferenceException).

It seems the locateOther pattern should be destroyed before the new one is created in SetupPatterns. Otherwise, the patterns remain active and cause later assertion failures.



 Comments   
Comment by Thomas Bernhardt [ 27/Feb/10 ]

fixed in nesper 3.2.1





[ESPER-438] .NET - Exception while parsing TicksFalloffStatement query Created: 08/Jan/10  Updated: 18/Jun/10  Resolved: 18/Jan/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

com.espertech.esper.client.EPStatementException was unhandled
Message="Error starting statement: Non-aggregated property 'cnt' in the HAVING clause must occur in the
group-by clause [select feed, avg(cnt) as avgCnt, cnt as feedCnt from TicksPerSecond.win:time(10 sec)
group by feed having cnt < avg(cnt) * 0.75 ]"
Source="NEsper"
Expression="select feed, avg(cnt) as avgCnt, cnt as feedCnt from TicksPerSecond.win:time(10 sec)
group by feed having cnt < avg(cnt) * 0.75 "

I added the "cnt" property to the group by clause and it fixed the problem.



 Comments   
Comment by Steve Bate [ 08/Jan/10 ]

This is in the NEsper MarketDataFeed example code. Sorry, I should have put that in the title of the issue.

Comment by Aaron Jackson [ 18/Jan/10 ]

Verified bug, fixed as prescribed, validated that fix worked as expected.





[ESPER-437] NEsper does not support using a nonstatic instance method as an EPL property Created: 07/Jan/10  Updated: 18/Jun/10  Resolved: 18/Jan/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ResolveMethodAsEventPropertyTest.cs    
Number of attachments : 1

 Description   

For example...

public class TestData
{
public int GetValue()

{ return 1; }

}

The EPL "select value from TestData" parsing fails (also tried "select Value from ..."). This works in the Java Esper 3.2 build.

The NEsper error is...

com.espertech.esper.client.EPStatementException: Error starting statement: Property named 'value' is not valid in any stream [select value from TestData]



 Comments   
Comment by Steve Bate [ 08/Jan/10 ]

Attached an NUnit test case demonstrating the issue.

Comment by Aaron Jackson [ 18/Jan/10 ]

Issue was in MagicType resolution of properties. Method now resolves synthetic properties of type GetXXX()





[ESPER-436] .NET Fully qualified event type class name resolution fails in some cases Created: 07/Jan/10  Updated: 27/Feb/10  Resolved: 27/Feb/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Steve Bate Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP Pro. Visual Studio 2008


Number of attachments : 0

 Description   

This seems to be partially a .NET bug but it affects NEsper behavior.

In some cases, the assembly.GetType() call in TypeHelper.ResolveType will return a System.Type with the incorrect FullName property. For example, I have two event classes TestData and A, defined in a namespace
called NEsperTests. The TestData class is properly resolved to NEsperTests.TestData, but the A class is resolved to A. This is incorrect since A is also defined in the NEsperTests namespace.

The result is that subsequent events are not matched against the EPL since other parts of the code are apparently able to fully resolve the A class name. (I'm still investigating how this happens...)

For example, inside EventTypeIndex.FindType() the argument to the function is...

{BeanEventType type=A}
[com.espertech.esper.events.bean.BeanEventType]: {BeanEventType type=A}

DeepSuperTypes:

{com.espertech.esper.client.EventType[1]}
Name: "NEsperTests.A"
PropertyDescriptors: {com.espertech.esper.client.EventPropertyDescriptor[1]}
PropertyNames: {string[1]}
SuperTypes: {com.espertech.esper.client.EventType[1]}

UnderlyingType:

{Name = "A" FullName = "NEsperTests.A"}

(Notice the fully qualified FullName)

But the _eventTypes map key is...

{BeanEventType type=A}
[com.espertech.esper.events.bean.BeanEventType]: {BeanEventType type=A}

DeepSuperTypes:

{com.espertech.esper.client.EventType[1]}
Name: "A"
PropertyDescriptors: {com.espertech.esper.client.EventPropertyDescriptor[0]}
PropertyNames: {string[0]}
SuperTypes: {com.espertech.esper.client.EventType[1]}

UnderlyingType:

{Name = "A" FullName = "A"}

This causes the runtime to believe the event is an unknown type. If I fully qualify the type name in the EPL then this problem is avoided.

I don't know if this is only a problem with 1 character long class names or not.



 Comments   
Comment by Steve Bate [ 07/Jan/10 ]

It appears the second path that resolves the correct NEsperTests.A class name uses event.GetType() (rather than TypeHelper.ResolveType) in EventAdapterServiceImpl.AdapterForObject().

More environment details: I'm running these as NUnit-compatible unit tests in Resharper 4.5. It's possible the reflective assembly-based type resolution is not working correctly in this environment. Just a wild guess...

Comment by Steve Bate [ 07/Jan/10 ]

Also, NEsper 2.1.0 didn't have this issue.

Comment by Steve Bate [ 08/Jan/10 ]

This may be a false alarm although the behavior is a bit surprising. I found that there was another class "A" defined elsewhere and existing the global namespace (global::A vs NEsperTests.A). The EPL parser was apparently finding the global "A" as it scanned assemblies and therefore that didn't match NEsperTests.A when events were sent.

Comment by Aaron Jackson [ 18/Jan/10 ]

I'm adding a few unit tests to simulate this behavior. Given the area you identified, it's also quite possible that caching that was added as part of 3.2 is coming into play as well. I'm starting by reviewing the type resolution capabilities which should be straight forward.

Comment by Thomas Bernhardt [ 27/Feb/10 ]

fixed in nesper 3.2.1





[ESPER-435] MultiKey hashcode should be improved Created: 04/Jan/10  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Minor
Reporter: Artur Biesiadowski Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello, fix ESPER-391 should be ported to java version of Esper. Current choice of hashcode algorithm is really bad - never xor similar hashcodes together. At the moment, ("espera", "esperb") is getting same hashcode as ("esperc", "esperd") which is the same as ("espere", "esperf") - this is just example I have found with one minute of playing around.



 Comments   
Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-434] Length window not considered for first event Created: 19/Dec/09  Updated: 20/Dec/09  Resolved: 19/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Axel Mueller Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux miraculix 2.6.28-16-generic #57-Ubuntu SMP Wed Nov 11 09:49:32 UTC 2009 x86_64 GNU/Linux
jdk1.6.0_10-x64


Testcase included: yes
Number of attachments : 0

 Description   

Consider the following EPL:

select * from StockTick(symbol='AAPL').win:length(2) having avg(price) > 6.0

AFAIK this should trigger an event if the average price of 2 ticks exceeds 6.
This works well except for the first tick. If the first tick exceeds 6 an event is generated without considering the second tick. The following self-contained code (taken from one of the examples) should illustrate it:

import com.espertech.esper.client.*;
import java.util.Random;
import java.util.Date;

public class exampleMain {

public static class Tick {
String symbol;
Double price;
Date timeStamp;

public Tick(String s, double p, long t)

{ symbol = s; price = p; timeStamp = new Date(t); }

public double getPrice()

{return price;}

public String getSymbol()

{return symbol;}

public Date getTimeStamp()

{return timeStamp;}

@Override
public String toString()

{ return "Price: " + price.toString() + " time: " + timeStamp.toString(); }

}

private static Random generator = new Random();

public static void generateRandomTick(EPRuntime cepRT)

{ double price = (double) generator.nextInt(10); generateRandomTick(price, cepRT); }

public static void generateRandomTick(double price, EPRuntime cepRT)

{ long timeStamp = System.currentTimeMillis(); String symbol = "AAPL"; Tick tick = new Tick(symbol, price, timeStamp); System.out.println("Sending tick:" + tick); cepRT.sendEvent(tick); }

public static class CEPListener implements UpdateListener {

public void update(EventBean[] newData, EventBean[] oldData)

{ System.out.println("Event received: " + newData[0].getUnderlying()); }

}

public static void main(String[] args)

{ EPRuntime cepRT = getEPRuntime(); System.out.println("*** The event should be triggered by the second tick ***"); generateRandomTick(4, cepRT); generateRandomTick(9, cepRT); generateRandomTick(3, cepRT); System.out.println(); cepRT = getEPRuntime(); System.out.println("*** A single tick should not trigger an event due to win:length(2) ***"); generateRandomTick(9, cepRT); System.out.println("... but the event is generated !?!?"); }

private static EPRuntime getEPRuntime()

{ Configuration cepConfig = new Configuration(); cepConfig.addEventType("StockTick", Tick.class.getName()); EPServiceProvider cep = EPServiceProviderManager.getProvider("myCEPEngine", cepConfig); EPRuntime cepRT = cep.getEPRuntime(); EPAdministrator cepAdm = cep.getEPAdministrator(); EPStatement cepStatement = cepAdm.createEPL("select * from " + "StockTick(symbol='AAPL').win:length(2) " + "having avg(price) > 6.0"); cepStatement.addListener(new CEPListener()); return cepRT; }

}



 Comments   
Comment by Axel Mueller [ 19/Dec/09 ]

I should have read the documentation fully before (confusion between current window length and maximum window length). After the first tick only one tick is in the window event though the (maximum) window length is 2.





[ESPER-433] Support variable remove/destroy Created: 15/Dec/09  Updated: 18/Dec/09  Resolved: 15/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

stmt1: create variable x ....
destroy stmt1
stmt2: create variable x ...

fails - that is the x variable is not cleaned up fully (even with no statement refering to it).



 Comments   
Comment by Thomas Bernhardt [ 15/Dec/09 ]

changes are in bugfix320 branch





[ESPER-432] Dangling meta character in regexp hangs the engine Created: 14/Dec/09  Updated: 18/Dec/09  Resolved: 15/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Critical
Reporter: Pedro Teixeira Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestRegexpExpression.java    
Testcase included: yes
Number of attachments : 1

 Description   

Creating the following stmt:

select * from SupportBean where string regexp "any"

will (correctly) raise an java.util.regex.PatternSyntaxException,
but all subsequent calls to the EPServiceProvider are blocked.

It seems a locking issue, but I was not able to find it.



 Comments   
Comment by Thomas Bernhardt [ 14/Dec/09 ]

Please provide test case, cannot reproduce.

Comment by Pedro Teixeira [ 15/Dec/09 ]

Thomas, I already had attached a unit test with the issue. Does it pass for you?

Comment by Pedro Teixeira [ 15/Dec/09 ]

jira removed the asterix surrounding "any" from the EPL.
The exception happens when typing regexp "[asterix]any[/asterix]"

Comment by Thomas Bernhardt [ 15/Dec/09 ]

Resolved in release 3.2 bugfix branch





[ESPER-431] 20-stream join hangs query optimizer Created: 14/Dec/09  Updated: 18/Dec/09  Resolved: 14/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sample:

StringWriter buf = new StringWriter();
buf.append("select * from ");

String delimiter = "";
for (int i = 0; i < 20; i++)

{ buf.append(delimiter); buf.append("S0(id=" + i + ").std:lastevent() as s_" + i); delimiter = ", "; }

EPStatement stmt = epService.getEPAdministrator().createEPL(buf.toString());



 Comments   
Comment by Thomas Bernhardt [ 14/Dec/09 ]

Workaround is to use subqueries.

Comment by Thomas Bernhardt [ 14/Dec/09 ]

in 3.3 release





[ESPER-430] PlugInProjectionExpression should allow more than one expression Created: 11/Dec/09  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.3
Fix Version/s: 3.4

Type: Bug Priority: Major
Reporter: Pedro Teixeira Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ESPER-430.patch     Text File ESPER-430.patch    
Number of attachments : 2

 Description   

"select customAgg(foo, barr) from Movies" is a valid EPL but when converted to an object model and then back to EPL, it becomes:
"select customAgg(foo) from Movies".

Perhaps it is just a matter of changing PlugInProjectionExpression.toEPL



 Comments   
Comment by Pedro Teixeira [ 11/Dec/09 ]

I've started working on a patch... let's see if it works

Comment by Pedro Teixeira [ 11/Dec/09 ]

The test case in this patch would benefit from someone suggesting a less fragile assertion.

Comment by Pedro Teixeira [ 11/Dec/09 ]

Changing Expressions facade also.

Comment by Thomas Bernhardt [ 04/Mar/10 ]

Thanks for the patch.

Changes are in enhancements340 branch

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-429] Replace "childNodeType" with "parameterType" in section 12.2.3 Created: 10/Dec/09  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 3.2
Fix Version/s: 3.4

Type: Bug Priority: Trivial
Reporter: Pedro Teixeira Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Attachments: File esper-429.diff    
Number of attachments : 1

 Description   

replace "childNodeType" with "parameterType" in the following extract in section 12.2.3:

public void validateMultiParameter(Class[] parameterType,
boolean[] isConstantValue,
Object[] constantValue) {
super.validateMultiParameter(childNodeType, isConstantValue, constantValue);
if ((childNodeType[0] != Integer.class) || (childNodeType[1] != Integer.class))

{ throw new IllegalArgumentException("Expected integer bounds"); }

}



 Comments   
Comment by Pedro Teixeira [ 10/Dec/09 ]

patch for doc

Comment by Thomas Bernhardt [ 04/Mar/10 ]

Thanks for the patch!

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-428] EsperIO / CSV - support for timedelta column Created: 09/Dec/09  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO/CSV could support a timedelta colum similar to the optional timestamp column

header1, ..., timedelta
value1, ..., 3 sec
value2, ..., 2 min
value3, ..., 0

meaning
send value1 event 3 sec after the previous event (adapter start as this is the first event)
send value2 event 2 min after the previous event (value1)
send value3 right after value2 event

etc.
The timedelta unit could be of same syntax as what is supported for time windows.



 Comments   
Comment by Thomas Bernhardt [ 21/May/12 ]

Can be derived by Excel transformation from timestamp





[ESPER-427] EsperIO / support for merged CSV files Created: 09/Dec/09  Updated: 26/Sep/12

Status: Open
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: Esper wishlist

Type: New Feature Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO/CSV could support merged CSV rather than using multiple files and an AdapterCoordinator
One could come up with a format like

EventType:column1, column2, .......
value1, value2, ...
valueA, valueB, ...

OtherEventType: otherColumnX
valueX
....

This would require to detect an EventType header row ('...:') in the middle of the file.






[ESPER-426] EsperIO / update dependencies Apache commons bean and Spring core Created: 09/Dec/09  Updated: 26/Sep/10  Resolved: 01/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO could update its Apache commons beans dependency to 1.8.2. Currently 1.7.0
Same for Spring 2.0.5 to 2.5.6



 Comments   
Comment by Thomas Bernhardt [ 18/Dec/09 ]

Dependency updates planned for 4.0 release

Comment by Thomas Bernhardt [ 01/Sep/10 ]

In 4.0 all dependent jars are updated to the newest version for Esper and EsperIO.
Spring is on 3.0.4





[ESPER-425] EsperIO / CSV - add support for nested properties Created: 07/Dec/09  Updated: 18/Dec/09  Resolved: 18/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Say an event defined with a class like this, with a nested class for point property
class Loc
String name
Point point

with class Point (int x, int y)

the CSV input adatper is not able to deal with a file like below to emit Loc event with a created Point - as it seems there is no nested property support:
header row: name, point.x, point.y

EsperIO / CSV should be improved as it is common practice to use rich (vs flat) events.
Support for at least one level of nested property should be good enough to begin with.
Same should be supported for nested maps.



 Comments   
Comment by Thomas Bernhardt [ 18/Dec/09 ]

in 3.3 release





[ESPER-424] Self-join and order-by incorrect order Created: 05/Dec/09  Updated: 18/Dec/09  Resolved: 07/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive attachments_2009_12_05.zip    
Number of attachments : 1

 Description   

Confirmed the problem, unit test attached.

Appears to occur for a join case.



 Comments   
Comment by Thomas Bernhardt [ 06/Dec/09 ]

This problem is related to incorrect interpretation of the order-by expression as an alias related to an expression in the select clause.

Workaround is to rename the select clause item to a different property name then used in the order by.

select c1.event_criteria_id as ecid,
c1.priority as C1priority, <<=== changed alias here
c2.priority as prio, cast(count, int) as cnt from ...

Comment by Thomas Bernhardt [ 07/Dec/09 ]

in branch bugfix320





[ESPER-423] Warning logged if Java event class is an interface with an attribute of a particular type and the actual event bean class returns a subclass of that attribute in the method footprint Created: 27/Nov/09  Updated: 04/Aug/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 5.0

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esperIssue.jar    
Number of attachments : 1

 Description   

Esper employs byte code generation for fast access to event properties. When byte code generation is unsuccessful, the engine logs a warning and uses Java reflection to obtain property values instead.

A known limitation is that when an interface has an attribute of a particular type and the actual event bean class returns a subclass of that attribute, the engine logs a warning and uses reflection for that property.

Sample files are attached



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/09 ]

Workaround is to have the implementation match the footprint of the interface.

For example:

public interface TradeEvent

{ public Instrument getInstrument(); }

public class TradeEventImpl implements TradeEvent {
// Note this returns "Equity" not "Instrument"
public Equity getInstrument()

{ return equity; }
}

Workaround:
public Instrument getInstrument() { return equity; }
Comment by Thomas Bernhardt [ 27/Nov/09 ]

Sample warning logged:
828 [main] WARN com.espertech.esper.event.bean.PropertyHelper - .getAccessors Unable to obtain CGLib fast method implementation, msg=Cannot find method public abstract trade.Instrument trade.HasInstrument.getInstrument()

Comment by Thomas Bernhardt [ 04/Aug/10 ]

Minor issue in very uncommon scenario without runtime impact. Bug fix would require cglib code change.





[ESPER-422] Isolation -> merge to engine keep last event Created: 24/Nov/09  Updated: 27/Nov/09  Resolved: 27/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alexis Agahi Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX Java HotSpot(TM) Client VM (build 1.5.0_20-141, mixed mode, sharing)


Attachments: Java Source File TimerIsoTest.java    
Testcase included: yes
Number of attachments : 1

 Description   

When merging statement from isolated context to engine, it seems that it keep last sent event in isolated context even if the time window has expire.
It seems as if the last event sent in isolated runtime has the same time as the one sent in engine.

See attached unit test.



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/09 ]

test adjust time back: new CurrentTimeEvent(t-60*1000));





[ESPER-421] Case-when throws NullPointerException when condition returns null Created: 21/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In below query, when "p.value" returns a null value, such as when p.value is a boxed integer and not initialized, the NPE is thrown.
Instead the sub-expression should be false and the case-expression should continue.

Sample query:

insert into Posdata
select p.account as account,
c.client as client,
p.value as value,
(case when p.value>0 then p.value else 0 end) as positiveValue,
(case when p.value<0 then p.value else 0 end) as negativeValue,
from PosUpdate as p unidirectional , AccountToClient c
where p.account=c.account

[11/20/09 13:24:01.904 ERROR] InboundUnitSendMap Unexpected error
processing Map event: java.lang.NullPointerException
com.espertech.esper.client.EPException: java.lang.NullPointerException
at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl
.java:402)
at
com.espertech.esper.core.thread.InboundUnitSendMap.run(InboundUnitSendMa
p.java:43)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at
com.espertech.esper.epl.expression.ExprCaseNode.evaluateCaseSyntax1(Expr
CaseNode.java:256)
at
com.espertech.esper.epl.expression.ExprCaseNode.evaluate(ExprCaseNode.ja
va:111)
at
com.espertech.esper.epl.core.SelectExprInsertEventBean.manufacture(Selec
tExprInsertEventBean.java:311)
at
com.espertech.esper.epl.core.SelectExprEvalProcessor.process(SelectExprE
valProcessor.java:405)
at
com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExp
rResultProcessor.java:58)
at
com.espertech.esper.epl.core.ResultSetProcessorHandThrough.getSelectEven
tsNoHaving(ResultSetProcessorHandThrough.java:140
)
at
com.espertech.esper.epl.core.ResultSetProcessorHandThrough.processJoinRe
sult(ResultSetProcessorHandThrough.java:63)
at
com.espertech.esper.epl.view.OutputProcessViewDirect.process(OutputProce
ssViewDirect.java:109)
at
com.espertech.esper.epl.join.JoinExecutionStrategyImpl.join(JoinExecutio
nStrategyImpl.java:53)
at
com.espertech.esper.epl.join.JoinExecStrategyDispatchable.execute(JoinEx
ecStrategyDispatchable.java:64)
at
com.espertech.esper.core.EPStatementHandle.internalDispatch(EPStatementH
andle.java:147)
at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRu
ntimeImpl.java:1034)
at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java
:824)
at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl
.java:398)



 Comments   
Comment by Thomas Bernhardt [ 22/Nov/09 ]

In release 3.3





[ESPER-420] Group-by with wildcard-select may present wrong value for non-aggregated and non-grouped properties Created: 10/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem is related to http://jira.codehaus.org/browse/ESPER-419.

This problem affects queries that have a select clause that selects wildcard plus one or more aggregations, and that use "group by". The value of non-aggregated and non-grouped properties in this case can be incorrect.

The following sample query reproduces the issue:
select *, min(temp) as minTemp from TemperatureSensorEvent.win:length(2) group by device

The value for device and minTemp are correct but the value for say an "id" property is not correct.

Workaround is to select at least one non-aggregated non-grouped property:
select id as myid, *, min(temp) as minTemp from TemperatureSensorEvent.win:length(2) group by device



 Comments   
Comment by Thomas Bernhardt [ 22/Nov/09 ]

Release 3.3





[ESPER-419] Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group Created: 06/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The difference in output is between the following two statements:

// outputs last event (not per symbol)
select * from ABC group by symbol output last every 2 sec

// outputs last value per symbol
select symbol, price from ABC group by symbol output last every 2 sec

Test code:
EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
Map<String, Object> type = new HashMap<String, Object>();
type.put("symbol", String.class);
type.put("price", Integer.class);
engine.getEPAdministrator().getConfiguration().addEventType("ABC", type);
EPStatement stmt = engine.getEPAdministrator().createEPL("select * from ABC group by symbol output last every 2 sec");
SupportUpdateListener listener = new SupportUpdateListener();
stmt.addListener(listener);

Map<String, Object> event = new HashMap<String, Object>();
event.put("symbol", "IBM");
event.put("price", 10);
engine.getEPRuntime().sendEvent(event, "ABC");

event = new HashMap<String, Object>();
event.put("symbol", "ATT");
event.put("price", 11);
engine.getEPRuntime().sendEvent(event, "ABC");

event = new HashMap<String, Object>();
event.put("symbol", "IBM");
event.put("price", 100);
engine.getEPRuntime().sendEvent(event, "ABC");

Thread.sleep(3000);
EventBean[] events = listener.getNewDataListFlattened();
for (EventBean out : events)

{ System.out.println(out.get("symbol") + " " + out.get("price")); }

 Comments   
Comment by Thomas Bernhardt [ 06/Nov/09 ]

Workaround is to list individual properties, or to add the group-by property, i.e.
select symbol as s, * from ABC group by symbol output last every 2 sec

Comment by Thomas Bernhardt [ 22/Nov/09 ]

In release 3.3





[ESPER-418] Statement fails to compile if the statement only has a where-clause and uses an alias Created: 04/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello

I am using version 3.2.0 of Esper and have found what appears to be a bug in
the way that the EPL is being compiled.

I am using a very simple POJO as a test object with the following fields all
with respective getter and setters.

public class SimpleEvent
{
private String uuid;
private Integer sourceId;
private Integer protocolId;
}

The following statement fails to register because it cannot find
"A0.sourceId"

select * from Event as A0 where A0.sourceId = 3

The problem appears to be in the optimization that is done in
StatementLifecycleSvcImpl.compile(...) at line 784.

the comment is as follows
// If not using a join and not specifying a data window, make the
where-clause, if present, the filter of the stream

What it is doing is if there are no joins and no windows defined it assumes
that it can move the where clause up and use it as a filter. It does this
naively here

810: FilterStreamSpecRaw streamSpec = (FilterStreamSpecRaw)
spec.getStreamSpecs().get(0);
811:
streamSpec.getRawFilterSpec().getFilterExpressions().add(whereClause);

the problem is that by simple copying that up you end up with the following
query.

select * from Event( A0.sourceId = 3 ) as A0

this optimization makes the statement invalid because it is trying to
reference that A0 before it is defined.

In order to be able to make that level of optimization it would have to
check whether or not any of the properties in the where clause is referenced
by an alias and then if it is either remove the reference to the alias or
not make the optimization in that case. However otherwise this prevents
what should be a valid statement from being able to compile.

I have included a simple test case that will show the problem. it attempts
to register 3 queries. Two valid queries that are similar and the above
query.

"select * from Event where sourceId = protocolId" //passes - because
there is no stream name
"select * from Event as E_A1 where E_A1.sourceId = E_A1.protocolId"
//FAILS
"select * from Event.win:length(4) as E_A1 where E_A1.protocolId =
E_A1.sourceId" //passes - because there is a window defined



 Comments   
Comment by Thomas Bernhardt [ 04/Nov/09 ]

Sample code:

EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
Map<String, Object> type = new HashMap<String, Object>();
type.put("sourceId", int.class);
engine.getEPAdministrator().getConfiguration().addEventType("ABC", type);
engine.getEPAdministrator().createEPL("select * from ABC as s1 where s1.sourceId = 3");

==> fails to compile

Comment by Thomas Bernhardt [ 04/Nov/09 ]

Workaround is to remove the stream alias:
select * from ABC where sourceId = 3

It is confirmed that inspection/optimization of query execution causes this problem.

Comment by Thomas Bernhardt [ 22/Nov/09 ]

In release 3.3





[ESPER-417] support annotations in statement object model Created: 03/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Improvement Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Esper416and417.java    
Testcase included: yes
Number of attachments : 1

 Description   

The statement object model does not compile annotation and this limitation does not seem documented.
It could be augmented to provide annotations as well in the statement object model.
See example test case that demonstrate it doesn't (last assertion)



 Comments   
Comment by Thomas Bernhardt [ 22/Nov/09 ]

In release 3.3





[ESPER-416] statement name provided by API does not overrides annotation provided name Created: 03/Nov/09  Updated: 18/Dec/09  Resolved: 22/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Esper416and417.java    
Testcase included: yes
Number of attachments : 1

 Description   

Unlike what documentation says:
" If your application is also providing a statement name through the API, the statement name provided through the API overrides the annotation-provided statement name. "

The statement name is always the annotation provided one - unless none provided.
See test case.

Fix required in StatementLifeCycleSvcImpl:133 to skip annotation if optStatementName != null



 Comments   
Comment by Thomas Bernhardt [ 22/Nov/09 ]

Release 3.3





[ESPER-415] statement object model fails on every-distinct Created: 03/Nov/09  Updated: 18/Dec/09  Resolved: 21/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Esper415.java    
Testcase included: yes
Number of attachments : 1

 Description   

every-distinct fails to be compiled into the statement object model.

See test case.

java.lang.IllegalArgumentException: Could not map pattern expression node of type EvalEveryDistinctNode
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapPatternEvalFlat(StatementSpecMapper.java:1677)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapPatternEvalRecursive(StatementSpecMapper.java:1684)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapPatternEvalDeep(StatementSpecMapper.java:1703)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapFrom(StatementSpecMapper.java:567)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmap(StatementSpecMapper.java:96)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:237)



 Comments   
Comment by Alexandre Vasseur [ 03/Nov/09 ]

test case

Comment by Thomas Bernhardt [ 21/Nov/09 ]

Reassigned to 3.3 release, in eha3.3 branch.





[ESPER-414] In some scenario, createEPL fails with IllegalStateException vs EPException Created: 02/Nov/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The following - when compiled with no event defined at all (which is a mistake but can happen in some bulk compile scenario) - fails in the 3rd statement with an IllegalStateException and ideally should fail with an EPException:

@Name("A")
create window SomeEventWindow.std:unique(x) (x int);

@Name("B")
create window non_exist_NW.std:unique(id) as select * from NonEvent;

@Name("C")
on pattern [every step=SomeEventWindow]
delete from non_exist_NW as event
where step.x = 1;

This stands in
com.espertech.esper.epl.named.NamedWindowServiceImpl.getProcessor(NamedWindowServiceImpl.java)
Can that one fails with an EPException instead?



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

In release 3.3





[ESPER-413] Please add sources jars for Esper in Maven repository Created: 01/Nov/09  Updated: 20/Apr/11  Resolved: 19/Apr/11

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 3.2
Fix Version/s: 4.2

Type: Task Priority: Major
Reporter: Dave Syer Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Please add sources jars for Esper in Maven repository. The newest Maven deployments do not have source attachments (e.g. http://repo1.maven.org/maven2/com/espertech/esper/3.2.0/).



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/09 ]

Assigned to release 3.3

Comment by Thomas Bernhardt [ 18/Dec/09 ]

Sources are available from download page; not sure what format Maven expects for sources?

Comment by Thomas Bernhardt [ 30/Jul/10 ]

Source are available from Subversion

Comment by Jacques Morel [ 25/Sep/10 ]

Add this to your pom and maven will automatically add a sources-jar to your artifacts deployment:

 <plugin>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
       <execution>
          <goals>
             <goal>jar</goal>
             <!--<goal>test-jar</goal>-->
          </goals>
       </execution>
    </executions>
 </plugin>

Please reopen this!
In this day and age of maven friendly IDEs that downloads binaries and sources/javadocs automatically, not providing sources or javadoc eliminates a key advantage of deploying your artifacts in maven.

Thanks

Comment by Thomas Bernhardt [ 26/Sep/10 ]

Assigned to 4.1 release

Comment by Daniel Mueller [ 07/Feb/11 ]

I would appreciate to have this fixed as well. Makes it so much easier to explore the source code of dependencies within the major IDEs (eg. in m2eclipse, you can just tick 'download sources' within the maven configuration panel, and then sources get downloaded and attached to dependencies directly.

Here's the description on Maven's homepage: http://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html

Thanks

Comment by Thomas Bernhardt [ 19/Feb/11 ]

Assigned to 4.2 release - thanks for the link and patience

Comment by Thomas Bernhardt [ 19/Apr/11 ]

in release 4.2

Comment by Jacques Morel [ 19/Apr/11 ]

Thanks for taking the time to do something not really in your main stream of work! It really helps!

Comment by Daniel Mueller [ 20/Apr/11 ]

Much appreciated to fix this one! Thanks





[ESPER-412] Out of memory while using group by Created: 27/Oct/09  Updated: 27/Oct/09  Resolved: 27/Oct/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ben Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello,

I am evalutaing esper and I am getting out of memory when using 'group by'. This out of memory issues is stopping us from using esper. We would like to use esper. Please help me with this issue.

I have an Order event as defined below.

Order
{
int orderId;
String symbol;
int totalFilledQuantity;
double price;
}

I can get multiple order event updates for the same order. orderId is the key by which order updates are combined.

My query to calculate customer position is

select symbol,
sum(totalFilledQuantity) as totalFilled,
sum(price*filledQuantity) as totalValue
from Order group by symbol

Input Expected Output
orderid=1, symbol=IBM, totalfilledQuantity=0, price=null (new) IBM totalFilled=0
orderid=1, symbol=IBM, totalfilledQuantity=10, price=10 (upd) IBM totalFilled=10
orderid=1, symbol=IBM, totalfilledQuantity=20, price=10 (upd) IBM totalFilled=20
orderid=2, symbol=MSFT, totalfilledQuantity=0, price=null (new) MSFT totalFilled=0
orderid=2, symbol=MSFT, totalfilledQuantity=10, price=10 (upd) MSFT totalFilled=10
orderid=3, symbol=IBM, totalfilledQuantity=0, price=null (new) IBM totalFilled=20
orderid=3, symbol=IBM, totalfilledQuantity=10, price=10 (upd) IBM totalFilled=30

Actual Output
IBM 0
IBM 10
IBM 30 (not correct)
MSFT 0
MSFT 10
IBM 30 (not correct)
IBM 40 (not correct)

This is not working because I am not using Revision type. Is that correct? Or is there any other solution without using revision?

I tried using revisions

ConfigurationRevisionEventType configRev = new ConfigurationRevisionEventType();
configRev.addNameBaseEventType("Order");
configRev.setKeyPropertyNames(new String[]

{"orderId"}

);
configRev.setPropertyRevision(ConfigurationRevisionEventType.PropertyRevision.MERGE_EXISTS);
config.addRevisionEventType("OrderRevisions", configRev);

epService.getEPAdministrator().createEPL("create window AllPositions.win:keepall() as OrderRevisions");
epService.getEPAdministrator().createEPL("insert into AllPositions select * from Order");

String expression = "select symbol, sum(totalFilledQuantity) as totalFilled, sum(price*filledQuantity) as totalValue from AllPositions group by symbol");
EPStatement statement = epService.getEPAdministrator().createEPL(expression);

statement.addListener(new UpdateListener()
{
public void update(EventBean[] newEvents, EventBean[] oldEvents)

{ EventBean event = newEvents[0]; System.out.println("symbol=" + event.get("symbol") + " total=" + event.get("totalFilled")); }

});

This gives me the expected results. But when I send 50000 order updates per two seconds and if there are 1000000 unique orders, I am getting out of memory with 1G max memory. It looks like the memory is keep on increasing because it keeps all updates in memory instead of keeping only the merged events per symbol.

win:keepall() may also be a culprit. But if I remove keepall(), the data output is not correct.

Also keepall() is needed, so that I can do a query later on asking for all symbols and their totalFilled.

Is this the correct way to use esper or am I using it incorrectly?

Can you tell us how we can get the expected results and also create a window were we can keep the latest values per symbol to query later on.

Thanks
Ben



 Comments   
Comment by Thomas Bernhardt [ 27/Oct/09 ]

Can you please provide a test class, or let us know:

  • statement
  • configuration
  • test data fed

Right approach seems simple std:unique(orderId)

Revision event types can also merge and only keep the versions required for a complete picture of properties, but don't seem required here.





[ESPER-411] Operands of expression passed the wrong way round in patterns Created: 21/Oct/09  Updated: 18/Dec/09  Resolved: 27/Nov/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Major
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Test.java    
Number of attachments : 1

 Description   

In the pattern:
[ every e1=TestEvent -> e2=TestEvent(e1.quantity > e2.quantity) ]
the two quantities are passed to the inequality expression the wrong way round, meaning the pattern fires in exactly the wrong places.

Any operation on the quantities changes the behaviour eg:
e2=TestEvent(e1.quantity + 0 > e2.quantity + 0)
behaves as expected.

Have attached test class (with main()) which shows the problem. Not tested pre 3.2.
TestEvent is a POJO, and the error occurs if quantity is an int or a float- not tested others.
I dont think it matters what the expression operator is.



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/09 ]

Assigned to 3.3

Comment by Thomas Bernhardt [ 27/Nov/09 ]

A workaround is to formulate as [ every e1=TestEvent -> e2=TestEvent(quantity < e1.quantity) ]

Comment by Thomas Bernhardt [ 27/Nov/09 ]

in release 3.3





[ESPER-410] Support for {n} repetition of regex in match_recognize Created: 21/Oct/09  Updated: 23/Nov/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: None

Type: Wish Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

Deprioritized.





[ESPER-409] Order-by clause not applied when pattern delivers multiple result rows for single incoming event Created: 21/Oct/09  Updated: 18/Dec/09  Resolved: 27/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.2.0-JIRA409.jar    
Number of attachments : 1

 Description   

Example statement:
select a.string from pattern [every a=SupportBean(string like 'A%') -> b=SupportBean(string like 'B%')] order by a.string desc

Sending A1, A2, B1 should deliver strings A2, A1 but delivers strings A1, A2.

test method:
epService.getEPAdministrator().getConfiguration().addEventType("SupportBean", SupportBean.class);
SupportUpdateListener listener = new SupportUpdateListener();
String stmtText = "select a.string from pattern [every a=SupportBean(string like 'A%') -> b=SupportBean(string like 'B%')] order by a.string desc";
EPStatement stmtOne = epService.getEPAdministrator().createEPL(stmtText);
stmtOne.addListener(listener);

epService.getEPRuntime().sendEvent(new SupportBean("A1", 1));
epService.getEPRuntime().sendEvent(new SupportBean("A2", 2));
epService.getEPRuntime().sendEvent(new SupportBean("B", 3));

EventBean[] received = listener.getNewDataListFlattened();
assertEquals(2, received.length);
ArrayAssertionUtil.assertPropsPerRow(received, "a.string".split(","), new Object [][] "A2"}, {"A1");



 Comments   
Comment by Thomas Bernhardt [ 24/Oct/09 ]

We have issued a cumulative service pack (esper-3.2.0-JIRA409.jar) release as attached. Please use in front of the Esper jar file and make sure to remove prior issued patch files.

The patch is cumulative and also includes fixes to:

ESPER-398 Escape syntax for quote and double quote not working
ESPER-396 Unbound stream and aggregating/grouping by unlimited key (i.e. timestamp) configurable state drop

Make sure to review the JIRA issues above.

Comment by Thomas Bernhardt [ 27/Nov/09 ]

In release 3.3 or use attached jar





[ESPER-408] Support multiple crontab schedules in output rate limiting or support pattern in output rate limiting Created: 20/Oct/09  Updated: 23/Nov/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: None

Type: Wish Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

Can easily be accomplished via a variable:
create variable boolean outputVariable;
on pattern[....crontab....timer...] set outputVariable = true
select * from ABC output when outputVariable = true set outputVariable = false





[ESPER-407] last() aggregator (undocumented) incorrectly mapped to count() Created: 20/Oct/09  Updated: 18/Dec/09  Resolved: 18/Dec/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The last() aggregator appears to compile OK using createEPL() but is reported to listeners incorrectly as 'count()'.

Doing a prepared query produces an exception:

EPPreparedStatement eps = admin.prepareEPL("select last(id) from TEST");

java.lang.IllegalArgumentException: Could not map expression node of type ExprLastNode
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapExpressionFlat(StatementSpecMapper.java:1452)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapExpressionDeep(StatementSpecMapper.java:791)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmapSelect(StatementSpecMapper.java:651)
at com.espertech.esper.epl.spec.StatementSpecMapper.unmap(StatementSpecMapper.java:94)
at com.espertech.esper.core.EPAdministratorImpl.prepareEPL(EPAdministratorImpl.java:190)



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/09 ]

Assigned to 3.3

Comment by Thomas Bernhardt [ 18/Dec/09 ]

Release 3.3





[ESPER-406] OutOfMemory : StatementMetrics not cleaned up after statement destroyed Created: 13/Oct/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Frederic Tardif Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

winxp jdk1.6


Attachments: Text File esper-406-patch.txt     Java Source File EsperTest.java     PNG File StatementMetricHandle-footprint.png     PNG File StatementMetricHandle-HeapDump.png    
Testcase included: yes
Number of attachments : 4

 Description   

If I run a simple program (EsperTest.java) which loops 300K times by:

  • creating a statement
  • sending it
  • printing the update through the listener
  • destroying statement

it rapidly runs out of memory (see StatementMetricHandle.png memory/CPU graphs attached) with a big footprint of StatementMetricHandle.

I thought that statistics engine was turned off by default, so why is there so many Metrics handle?



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/09 ]

Workaround: assign a statement name.

Comment by Thomas Bernhardt [ 14/Oct/09 ]

Scheduled for release 4.0

Comment by Frederic Tardif [ 14/Oct/09 ]

thanks for the workaround. It seems to work.

Comment by Frederic Tardif [ 15/Oct/09 ]

unfortunately, even by assigning a statement name, StatementMetricRepository would continue to put in a map the postfix names of the created statements, still ending-up as a OutOfMemory.

attached esper-406-patch.txt which ensures that StatementMetrics are not computed when stated as disabled in the config

Comment by Alexandre Vasseur [ 16/Oct/09 ]

Just a note: you are running with a 64Mb heap which is very small. As a workaround to delay the issue use a larger heap with -Xmx JVM option
There is definitely a bug here but the vast majority of use cases are not creating and destroying that many statements within a short lifetime

Comment by Thomas Bernhardt [ 23/Nov/09 ]

In release 3.3





[ESPER-405] Equals operator on object types in expressions should support inheritance Created: 10/Oct/09  Updated: 18/Dec/09  Resolved: 21/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Wish Priority: Minor
Reporter: Frederic Tardif Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

winxp jdk6 esper-3.2


Attachments: Text File esper-405-patch.txt     Java Source File EsperTestConcreteObject.java     Java Source File EsperTestObject.java    
Testcase included: yes
Number of attachments : 3

 Description   

As you can see in the attached example, if I define a statement like: select * from MyEvent where key = ? for which MyEvent.Key returns an interface, since the parameter given to the prepared statement is obviously a concrete object of this type, I hit a statement compilation error:

Exception in thread "main" com.espertech.esper.client.EPStatementException: Unexpected error compiling statement: java.lang.IllegalStateException:Coercion type class java.lang.Object not numeric [select * from EsperTestObject$MyEvent where (key = EsperTestObject$MyObjectKey@1df5a8f)]
at com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:841)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:180)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:153)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.create(EPAdministratorImpl.java:226)
at com.espertech.esper.core.EPAdministratorImpl.create(EPAdministratorImpl.java:231)
at EsperTestObject.start(EsperTestObject.java:18)
at EsperTestObject.main(EsperTestObject.java:56)

I know this has already been discussed in ESPER-114, but I find really counter intuitive that you can only compare object of the exact same type. IMHO, if object comparison is supported in the statement, it should not narrow the normal behavior of java.



 Comments   
Comment by Thomas Bernhardt [ 10/Oct/09 ]

Esper has support for instanceOf, in Java the "=" would also not compile?

Comment by Frederic Tardif [ 10/Oct/09 ]

Not sure that I have explained myself clearly. In java, I can always do obj1.equals(obj2) even if obj1 is hidden behind an interface and obj2 would be known as the concrete class. Indeed we can apply equals on whatever objects...

And I cannot see how the instanceof can help at this point since anyway the objects used to filter are presented under an Interface and I might not even know at runtime what are their implementation. The idea is to ensure that the statement is triggered if the "getKey()" of the MyEvent sent 20K times to esper is the same object as the one which parametrized the statement, whatever its concrete class (by doing obj1.equals(obj2) ) .

If we simplify a bit my example (attached EsperTestConcreteObject.java) by removing the IKey interface to compare directly the concrete classes and not the interface (MyKey instead of IKey) , Esper would do the correct filtering and trigger my statement (as defined in ESPER-114). Why Esper do not support inheritance when compiling its statement? At the end whatever the object defined in the statement, it is just a matter of doing a java equality test on it.

I know I could bypass this by defining a custom method:
select * from MyEvent(Equality.eq(key, ?))

And that would obviously work but it makes the statement a bit clumsy.

Comment by Thomas Bernhardt [ 12/Oct/09 ]

In Java, one can perform "string.equals(integer)" without any type safety so since Esper provides full type safety the straight equals is not an option.

What we can do is enhance the engine to look at user objects and determine if there is an "extends" or "implements" relationship and in such case allow "equals" to take place.

Scheduled for 4.0 release.

Comment by Frederic Tardif [ 13/Oct/09 ]

Thanks, that would already be much more coherent with what we are used to see in java.

I see that you plan to fix this in version 4 of Esper, do you have any timeline for this release? Is there a possible patch in the meantime.

Comment by Frederic Tardif [ 13/Oct/09 ]

Just for tracking sake, I have add a comment in ESPER-404 which relates on this ticket.

Comment by Frederic Tardif [ 15/Oct/09 ]

Patch attached to enable "= operator" in statements on objects using inheritance

Comment by Thomas Bernhardt [ 21/Nov/09 ]

Assigned to release 3.3, in enh3.3 branch





[ESPER-404] Statement resources not cleaned up after statement destroy keeping last event Created: 09/Oct/09  Updated: 18/Dec/09  Resolved: 21/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Frederic Tardif Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

winxp jdk1.6


Attachments: Java Source File Equality.java     Java Source File EqualsStatementLoadTest.java     PNG File EqualsStatementLoadTest.png     Java Source File EsperTest.java     PNG File EsperTest-profile.png    
Testcase included: yes
Number of attachments : 5

 Description   

I notice quite a lot of leak with the objects defined within the statements of my application. To nail it down, I have tried with a very simple example (sending 20K times an object and being notified back on a defined statement (Select * from MyEvent)). The listing is attached in the email.

Once the 20K notifications completed and the initial statement destroyed, I can still see on the profiler 1 instance of a "MyEvent" retained by StatementResultImpl (see image attached). Since the EPStatement.destory() javadoc states that "Destroy the statement releasing all statement resources.", I would have expected that nothing anymore would keep an allocation on any of MyEvent object.

Is that the desirable behavior?

Thanks
Frédéric



 Comments   
Comment by Thomas Bernhardt [ 12/Oct/09 ]

Changed to minor.

Comment by Thomas Bernhardt [ 12/Oct/09 ]

scheduled for 4.0

Comment by Frederic Tardif [ 13/Oct/09 ]

Now this minor leak sorted out, my usage of Esper unfortunately exploit it in an awkward way, causing the leak to explode.

I don't know if that should be referred as another ticket, but it shows a bit criticality perspective on both ESPER-404 and ESPER-405.

As you can see in the example EqualsStatementLoadTest.java attached above, I have an application for which sessions register and destroy many time statements (using preparedstatement: [select * from MyEvent(Equality.eq(key, ?))]. Since Esper does not yet support inheritance when filtering on equaled objects, the statements are made against a custom eq(obj1, obj2) method defined in equality.java also attached (that's where this ticket meets ESPER-405).

When I run a scenario which does 20K times the register of a new statement, the trigger of the listener against the sent event and the destroy of the statement, I end up with a "random" instances of leaking events as identified previously in the ticket (see EqualsStatementLoadTest.png attached).

If the statement would not use a custom method to filter equality of the object but instead use a normal Esper = filtering [select * from MyEvent(key = ?)], only one instance of the MyEvent would remain at the end (which is a more acceptable leak...)

Comment by Thomas Bernhardt [ 21/Nov/09 ]

Assigned to 3.3 release, in branch enhancements330





[ESPER-403] First-unique data window used with named window causes on-delete to misbehave Created: 09/Oct/09  Updated: 19/Mar/10  Resolved: 04/Mar/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.4

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestFirstUniqueWithOnDelete.java    
Number of attachments : 1

 Description   

See attached test case, the on-delete returns two rows and should only return a single row.



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

This change will be made in release 4.0 as it will mean a minor change in remove/insert stream of first-unique, and therefore as its altering first-unique behavior will need to be done in a major release.

Comment by Thomas Bernhardt [ 27/Feb/10 ]

As it is more important to use to keep exactly the same behavior in the engine between each minor release 3.x, this change is assigned to 4.0 (JDK6).

Comment by Dan DI Spaltro [ 28/Feb/10 ]

Is there a patch for this, right now I think this problem is causing my application to OOM, since I think its retaining multiple events beyond the first unique and deletes don't seem to be actually erasing the reference.

Comment by Thomas Bernhardt [ 04/Mar/10 ]

Assigned to 3.4 release, bug fix is in enhancements340 branch

Comment by Thomas Bernhardt [ 19/Mar/10 ]

in release 3.4





[ESPER-402] Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread) Created: 28/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File TestCoModificationException.java    
Number of attachments : 1

 Description   

Can be reproduced as below.

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.

public void testIt()

{ EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class); engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class); engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class); String pattern = " insert into NumberOfWaitingCalls(calls)\n" + " select count(*)\n" + " from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" + " (not CallFinished(id=call.id) and\n" + " not CallPickedUp(id=call.id))]"; engine.getEPAdministrator().createEPL(pattern); engine.getEPRuntime().sendEvent(new SupportBean_A("A1")); engine.getEPRuntime().sendEvent(new SupportBean_B("B1")); engine.getEPRuntime().sendEvent(new SupportBean_C("C1")); }

 Comments   
Comment by Thomas Bernhardt [ 28/Sep/09 ]

Note no multiple threads required, it is a question of stopping AND-operator child nodes and removing nodes from the active list in the same loop, single thread.

Comment by Thomas Bernhardt [ 30/Sep/09 ]

i received the ConcurrentMoficationException using esper 3.1.0 for the
following simple pattern. will there a quick patch for this exception?
what is the alternative to achieve the same output from the following
pattern? thanks!

pattern:
every a=A -> (not b=B(a.stringAttr=b.stringAttr) and not
c=C(a.stringAttr=c.stringAttr)) and timer:interval(10)

events:
event[A0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[B0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[A1]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[C0]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[A2]: longAttr(0),doubleAttr(0), stringAttr(111), timeAttrInMilli(0)

Comment by Thomas Bernhardt [ 12/Oct/09 ]

schedule for 4.0 release

Comment by Thomas Bernhardt [ 23/Nov/09 ]

Bug fix in release 3.3





[ESPER-401] EsperIO / JMS - wrong doc Created: 28/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO JMS fails if following doc with
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsOutputAdapter' defined in class path resource [jms-spring1.xml]: Cannot resolve reference to bean 'subscriptionOne' while setting bean property 'subscriptionMap' with key [<subscriptionOne>]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'subscriptionOne' defined in class path resource [jms-spring1.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'eventTypeAlias' of bean class [com.espertech.esperio.jms.JMSSubscription]: No property 'eventTypeAlias' found

Must be changed in doc to use eventTypeName in Spring xml as per Esper 3.0 and after refactoring of the client api.






[ESPER-400] Documentation fix: "7.2. Logical And Comparsion Operators" => Comparison Created: 25/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Trivial
Reporter: Guillaume Perrot Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Local reference documentation (the one provided in the downloaded archive), single html edition.


Number of attachments : 0

 Description   

"7.2. Logical And Comparsion Operators" => Comparison






[ESPER-399] Provide analog of prev function that behaves as aggregate Created: 24/Sep/09  Updated: 18/Dec/09  Resolved: 18/Dec/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.3

Type: Improvement Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GZip Archive aggregator_examples.tar.gz    
Number of attachments : 1

 Description   

If you use the prev function along with aggregates in a group by, then it will be treated the same as if a non aggregated value had been selected from the event - so one row is returned for every event in the view. This does not seem intuitive to me- for example, prev(0, price) returns the same price for events in a window and so should behave the same as max(price).

AFAIK there is currently no convenient way of getting properties of the first or last events out of a window along with a set of aggregates. If the prev function can't be changed then it would be nice to have an analogue.



 Comments   
Comment by Thomas Bernhardt [ 28/Sep/09 ]

Can you please provide an example statement, example input and output?
Properties of the last are prev(count - 1, price) and prev(1, price).

Comment by Mitch [ 29/Sep/09 ]

OK, I guess this only occurs in pretty specific circumstances. Here is an example:

MyEvent has row (a uid), quantity and colour and the listener outputs row count along with all rows it receives:

case 1 with aggregates only:
select colour, avg(quantity) from MyEvent.std:groupby(colour).win:length_batch(3) group by colour
1 100 blue
2 101 red
3 102 blue
4 103 red
5 104 blue
new=1 map=

{colour=blue, avg(quantity)=102.0}

Now suppose we wanted to know the row number at the point the aggregate was computed. My guess was to do the following:

case 2 with prev:
select prev(0, row), colour, avg(quantity) from MyEvent.std:groupby(colour).win:length_batch(3) group by colour
1 100 blue
2 101 red
3 102 blue
4 103 red
5 104 blue
new=3 map=

{colour=blue, avg(quantity)=102.0, prev(0,row)=1}

new=3 map=

{colour=blue, avg(quantity)=102.0, prev(0,row)=3}

new=3 map=

{colour=blue, avg(quantity)=102.0, prev(0,row)=5}

Multiple rows were returned when I was hoping for only the last one. Output clauses do not help. With sequential row ids I am using the workaround of max(id) but this is not pretty or general.

Use case: knowing the uid at the point aggregates are computed is handy for doing joins and for reporting.

Comment by Mitch [ 29/Sep/09 ]

What I am trying to get across is that in a temporal context it makes perfect sense to have 'aggregates' like first() and last() which would be meaningless in ordinary SQL. Unless I am missing a trick I dont think esper provides this.

Comment by Thomas Bernhardt [ 12/Oct/09 ]

You will find that Esper 3.2 allows the "last()" function for aggregation, it is not currently documented and supported, subject to change.
Scheduled for 4.0 release.

Comment by Thomas Bernhardt [ 12/Oct/09 ]

Alternatively consider your own plug-in aggregation function.

Comment by Mitch [ 12/Oct/09 ]

Thanks. There are a bunch of general purpose temporal aggregates I can think of- Ill see how I get on implementing them.

Comment by Thomas Bernhardt [ 12/Oct/09 ]

If would be great if you can attach them here when done, is possible with test code.

Comment by Mitch [ 15/Oct/09 ]

Attached shows three new temporal aggregators in action:

leaving() returns true if events have started leaving view.
rate(timestamp) computes event rates
rate(timestamp,value) computes accumulated quantity rate (turnover)
nth(value,position) is aggregate analogue of prev()

There are five examples in all.

The src files are not part of a package- (compile with javac *.java) after uncommenting epl in TestEsper.java
Apologies for not using a test framework.

Comment by Mitch [ 20/Oct/09 ]

The built in last() aggregator has a serious bug in 3.2 so I don't recommend its use yet- especially not in a prepared statement. It seems its expression name is incorrectly mapped to "count".

So if you do "select last(eventID) from TestEvent" it actually gets reported to the listener as count(eventID).

Comment by Mitch [ 20/Oct/09 ]

filed as http://jira.codehaus.org/browse/ESPER-407

Comment by Thomas Bernhardt [ 18/Dec/09 ]

In release 3.3

Comment by Mitch [ 18/Dec/09 ]

I'm guessing you missed aggregate examples (as you did ask).





[ESPER-398] Escape syntax for quote and double quote not working Created: 22/Sep/09  Updated: 18/Dec/09  Resolved: 28/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File epl_clauses.html     Java Archive File esper-3.2.0-JIRA398.jar    
Number of attachments : 2

 Description   

select * from Events where text='A\'B'

This statement is expected to search for events having text = A'B.

But when we send such events, they are not getting selected. It is expecting text = A\'B.



 Comments   
Comment by Thomas Bernhardt [ 22/Sep/09 ]

Attached please find the cumulative service pack that addresses the following issues:
ESPER-398 Escape syntax for quote and double quote not working
ESPER-396 Unbound stream and aggregating/grouping by unlimited key (i.e. timestamp) configurable state drop

The patch file is cumulative and replaces esper-3.2.0-JIRA396.jar.

PLEASE REVIEW the attached documentation, 4.2.4. Escaping Strings, and determine whether the patch is appropriate. The patch may affect your escape syntax for example in regular expressions.





[ESPER-397] Add UTC current timestamp function returing millisecond since Created: 18/Sep/09  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The keyword current_timestamp returns the time in local time. Can I propose that we add current_timestamp_utc an upcoming release. While timestamps can be converted between timezone's using static methods, I think it would be useful if the two most common formats are readily and easily available through keyword.



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

Can someone provide a function to convert from engine date to UTC?

Comment by Thomas Bernhardt [ 21/May/12 ]

can easily be provided by UDF, not adding function to core language





[ESPER-396] Unbound stream and aggregating/grouping by unlimited key (i.e. timestamp) configurable state drop Created: 17/Sep/09  Updated: 18/Dec/09  Resolved: 21/Sep/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File epl_clauses.html     Java Archive File esper-3.2.0-JIRA396.jar    
Number of attachments : 2

 Description   

This improvement is for handling the case when there is no data window and aggregation and grouping by an expression that creates an unlimited number of keys, i.e. a timestamp value. Sample query:
select timestamp, avg(price) from MyEvent group by timestamp

Since for unbound streams (no data window) the engine cannot determine when the aggregation state should be dropped for a certain timestamp, we we provide a @Hint to instruct how long aggregation state may be held.

Example new query:
// Hint to remove aggregation state after 10 sec for any aggregation state that has not been updated in the last 10 seconds (as always relative to given engine time)
@Hint('reclaim_group_sec=10')
select timestamp, avg(price) from MyEvent group by timestamp



 Comments   
Comment by Thomas Bernhardt [ 21/Sep/09 ]

Patch and updated documentation attached, see 4.6.2.1. Hints Pertaining to Group-By





[ESPER-395] Documentation error lastevent without parenthesis Created: 17/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

under 4.14. Subqueries:

select assetId, (select zone from ZoneClosed.std:lastevent) as lastClosed from RFIDEvent

should be

select assetId, (select zone from ZoneClosed.std:lastevent()) as lastClosed from RFIDEvent






[ESPER-394] ClassCastException Created: 17/Sep/09  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

10:11:56.484 [com.espertech.esper.Inbound-SIMULATION-0] ERROR c.e.e.c.t.InboundUnitSendMap - Unexpected error processing Map event: java.lang.ClassCastException
com.espertech.esper.client.EPException: java.lang.ClassCastException
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:402) [esper-3.2.0.jar:na]
at com.espertech.esper.core.thread.InboundUnitSendMap.run(InboundUnitSendMap.java:43) [esper-3.2.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_12]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_12]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_12]
java.lang.ClassCastException: null



 Comments   
Comment by Mathias Bogaert [ 17/Sep/09 ]

Unfortunately, this is all I get in my logger. No idea where it comes from, need to analyze further.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

Please collect useful information before creating a JIRA.

Is the exception thrown by your listener code?
You can turn on logging - exception origins can be found in the log file.
What statement?





[ESPER-393] Stream name alias not available for use in where-clause Created: 16/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When providing an alias, such as "evt" below, the alias works fine in the select-clause but does not compile the statement if used in the where-clause:

// works fine
select MyUtils.myFunction(evt) from MyEvent as evt

// does not compile
select * from MyEvent as evt where MyUtils.myFunction(evt)



 Comments   
Comment by Thomas Bernhardt [ 16/Sep/09 ]

Doc ref:
http://esper.codehaus.org/esper-3.2.0/doc/reference/en/html_single/index.html#epl-from-clause

Change implementation note (FilterStreamSpecRaw.java)
StreamTypeService streamTypeService = new StreamTypeServiceImpl(new EventType[]

{eventType}

, new String[]

{super.getOptionalStreamName()}

, context.getEngineURI());





[ESPER-392] Nested properties with keywords can not be escaped with ticks Created: 15/Sep/09  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

see http://jira.codehaus.org/browse/ESPER-390






[ESPER-391] .NET LinkedHashSet performance or hash distribution poor on large join Created: 10/Sep/09  Updated: 18/Dec/09  Resolved: 14/Sep/09

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Aaron Jackson Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Issuing the query below causes a geometric expansion of tests within the LinkedHashSet<T>. Approximately 10 calls to EPRuntime.Send resulted in the following expansion of calls:

100.00 % Join - 15381* ms - 10 calls - com.espertech.esper.epl.join.JoinSetComposerImpl.Join(EventBean [] [], EventBean [] [])
99.95 % Lookup - 15373* ms - 49 calls - com.espertech.esper.epl.join.ExecNodeQueryStrategy.Lookup(EventBean [], ICollection<MultiKey<EventBean>>)
98.88 % Add - 15208* ms - 112902 calls - com.espertech.esper.compat.LinkedHashSet<T>.Add(T)
98.85 % set_Item - 15204* ms - 112902 calls - com.espertech.esper.compat.LinkedHashMap<K, V>.set_Item(K, V)
67.66 % set_Item - 10407* ms - 91226 calls - com.espertech.esper.compat.BaseMap<K, V>.set_Item(K, V)
67.63 % set_Item - 10401* ms - 91226 calls - System.Collections.Generic.Dictionary<TKey, TValue>.set_Item(TKey, TValue)
67.60 % Insert - 10397* ms - 91226 calls - System.Collections.Generic.Dictionary<TKey, TValue>.Insert(TKey, TValue, Boolean)
65.87 % Equals - 10131* ms - 11160530 calls - System.Collections.Generic.ObjectEqualityComparer<T>.Equals(T, T)
63.45 % Equals - 9759* ms - 11160530 calls - com.espertech.esper.collection.MultiKey<T>.Equals(Object)
60.52 % AreEqual - 9308* ms - 11160530 calls - com.espertech.esper.compat.ArrayHelper.AreEqual(Array, Array)
6.89 % GetValue - 1060 ms - 27119382 calls - System.Array.GetValue(Int32)
1.49 % Equals - 229 ms - 13559691 calls - System.Object.Equals(Object, Object)
1.02 % Equals - 156 ms - 11160530 calls - System.Object.Equals(Object)

      • Query ***

Insert into MA
Select
MASource1.Symbol,
avg(MASource1.Value) as MA10,
avg(MASource2.Value) as MA20,
avg(MASource3.Value) as MA30,
avg(MASource4.Value) as MA40,
avg(MASource100.Value) as MA100
From
StockTick.win:length(10) MASource1,
StockTick.win:length(20) MASource2,
StockTick.win:length(30) MASource3,
StockTick.win:length(40) MASource4,
StockTick.win:length(100) MASource100



 Comments   
Comment by Aaron Jackson [ 14/Sep/09 ]

Added FIFOHashSet to .NET collections. FIFOHashSet improves performance of ordered set mechanics, but also provides better detail about hash distribution. Analysis revealed that distribution across hash buckets was performing poorly and a change was made to MultiKey to address the hashing scheme.

Old algorithm:

For item in list: hash = hash ^ item.hashCode

New algorithm:

For item in list: hash = 391 * hash ^ item.hashCode

Results before adjustments to hashcode:

Hashtable chains were over 10k elements long in some cases which yielded long search times and far too many comparisons.

Results after adjustments to hashcode

Hashtable chains never exceeded 32 elements long and performance improved greatly.





[ESPER-390] .NET Nested properties can not be escaped with ticks Created: 10/Sep/09  Updated: 18/Dec/09  Resolved: 14/Sep/09

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Aaron Jackson Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Nested properties that are escaped using a tick string will throw an exception indicating a reserved keyword. The problem occurs because the property is processed properly during the first pass where the ticks are stripped. Subsequent parsing of the property passes the unticked property name into the ANTLR parser which yields the exception. Example:

select `timestamp.Hour` from MyTimeEvent

The CompileEPL() will succeed, but the Start() method will fail which trying to process the property.



 Comments   
Comment by Aaron Jackson [ 14/Sep/09 ]

Added feature to PropertyParser that escapes keywords that are contained within a property when it is parsed. This ensures that the reserved keywords pass properly through the ANTLR parser when they are resubmitted.

Added unit tests to ensure that escaped nested property feature works as advertised and verified that other unit tests were not affected by these changes. One unit test changed to reflect different error text when submitted.





[ESPER-389] startAllStatements() starts rules in unpredictable order Created: 08/Sep/09  Updated: 18/Dec/09  Resolved: 23/Nov/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: 3.3

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, sun jdk 1.6.0_14


Number of attachments : 0

 Description   

Stopping all rules and then restarting them can cause unpredictable results including Exceptions The following snippet produces
"java.lang.IllegalStateException: A named window by name 'MYWIN' does not exist". On my system this happens about 50% of the time when the compiled application is executed.

EPStatement statement1 = admin.createEPL("create window MYWIN.win:length(3) as select * from MyEvent");
EPStatement statement2 = admin.createEPL("insert into MYWIN select * from MyEvent");
EPStatement statement3 = admin.createEPL("select * from MYWIN");
admin.stopAllStatements();
admin.startAllStatements();

Shouldn't the compilation order be preserved when restarting rules?






[ESPER-388] Provide option to auto-remove event type when all statements referencing a type are destroyed Created: 08/Sep/09  Updated: 18/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.5

Type: Improvement Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

destroy() and destroyAll() do not remove implicit event types created by insert statements. I am not aware of any method of removing event types from an engine once they are created which can make it difficult to manage statements. The following snippet shows the problem, throwing: EPStatementException: Error starting statement: Event type named 'FOO' has already been declared with differing column name or type information

EPStatement statement = admin.createEPL("insert into FOO select x from MyEvent");
admin.destroyAllStatements();
statement2 = admin.createEPL("insert into FOO select x, y from MyEvent");

It could be argued that 'FOO' has to be preserved for other statements in the case that a destroy() method is called on a single statement. However it would be much more helpful if Event types were removed when no longer referenced. And destroyAll() should surely do just what it implies.

This is causing a problem because it seems there is no robust way of loading arbitrarily modified rules without restarting the engine.



 Comments   
Comment by Thomas Bernhardt [ 08/Sep/09 ]

Removal of an event type :
ConfigurationOperations# boolean removeEventType(String name, boolean force)

Checking if an event type is referenced:
ConfigurationOperations#boolean isEventTypeExists(String eventTypeName)

Comment by Mitch [ 08/Sep/09 ]

I concur its not a bug (though could usefully have been warning in API doc). Thanks for the info on how to remove event types. However auto remove superior as obviates need for applications to track event types.

Comment by Thomas Bernhardt [ 23/Nov/09 ]

Assigned to release 5.

Comment by Thomas Bernhardt [ 10/Jun/10 ]

Feature include in 3.5 module





[ESPER-387] Create window with insert fails with NullReferenceException Created: 03/Sep/09  Updated: 04/Sep/09  Resolved: 04/Sep/09

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 3.1
Fix Version/s: 3.2

Type: Bug Priority: Minor
Reporter: Aaron Jackson Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Testcase included: yes
Number of attachments : 0

 Description   

Creating a window with a select an insert statement (as shown in TestNamedWindowInsertFrom.TestInsertWhereOMStaggered) throws NullReferenceException. Failure occurs because statementSpec.CreateWindowDesc.InsertFromWindow is null.

InsertFromWindow is not set during the constructor and as such defaults to null. However, StatementLifecycleSvcImpl.compile does not set the value because the stream is already compiled.

The following is a unit test that demonstrates the issue:

public void testBroken()

{ EPStatement statement = epService.getEPAdministrator().createEPL( "create window testWindow3.win:keepall() as select * from com.espertech.esper.support.bean.SupportBean insert where (IntPrimitive = 10)"); statement.destroy(); }

 Comments   
Comment by Thomas Bernhardt [ 04/Sep/09 ]

Changed to .NET in title and NEsper component

Comment by Thomas Bernhardt [ 04/Sep/09 ]

This also occurs in the java version.

Version 3.2 will present the following error:
"A named window by name 'com.espertech.esper.support.bean.SupportBean' could not be located, use the insert-keyword with an existing named window [create window testWindow3.win:keepall() as select * from com.espertech.esper.support.bean.SupportBean insert where (intPrimitive = 10)]"

Comment by Thomas Bernhardt [ 04/Sep/09 ]

in 3.2 release





[ESPER-386] "Output when" with variables fails when multiple statements refer to same variable Created: 02/Sep/09  Updated: 03/Sep/09  Resolved: 02/Sep/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example:
@Name('Statement1') select * from AEvent output when myvar = true
@Name('Statement2') select * from AEvent output when myvar = true

When the "myvar" variable turns true only a one statement actually outputs, the other statement will wait for the next event rather then output.



 Comments   
Comment by Thomas Bernhardt [ 02/Sep/09 ]

in 3.2





[ESPER-385] NPE thrown on removeAllListeners for destroyed statement Created: 28/Aug/09  Updated: 03/Sep/09  Resolved: 28/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

After destroying a statement and calling removeAllListeners(), an NPE gets thrown.

The method should not throw an exception when removing all listeners if the statement is destroyed, however the remove operation has no effect on destroyed statements.



 Comments   
Comment by Thomas Bernhardt [ 28/Aug/09 ]

in 3.2 release





[ESPER-384] Allow return multiple columns on a corelated subselect Created: 26/Aug/09  Updated: 24/Nov/09  Resolved: 24/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 5.0

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hello,

I am using an inner select in order to add output. For example:
select A.assetId as assetId,
(select locationReportId
from stream1.std:unique(assetId)
where assetId = patternresult.A.assetId) as locationReportId
from pattern [.....] as patternresult

Now, using the same inner select, I want to add to output parameters. Of course I can do it using two selects:
select A.assetId as assetId,
(select locationReportId
from stream1.std:unique(assetId)
where assetId = patternresult.A.assetId) as locationReportId,
(select status
from stream1.std:unique(assetId)
where assetId = patternresult.A.assetId) as status
from pattern [.....] as patternresult

But I want to be more efficient, and to extract these two parameter at the same time, for example:
select A.assetId as assetId,
(select locationReportId, status
from stream1.std:unique(assetId)
where assetId = patternresult.A.assetId) as (locationReportId, status)
from pattern [.....] as patternresult

Is it possible?
I tried several options with no success.



 Comments   
Comment by Thomas Bernhardt [ 26/Aug/09 ]

the EPL currently follows the SQL standard and that does not allow multiple results in the subselect. I agree it would be helpful to allow multiple selected values as it would make the query easier to read and increase efficiency.

As a workaround, it is possible to use an array in the subselect and thereby return a single column, i.e.
select (select

{col1, col2}

as myarray from ...) from ...

Best regards,
Tom

Comment by Thomas Bernhardt [ 24/Nov/09 ]

This features request is for discussion, and tentatively assigned to release 5:

  • it is against SQL standards
  • there are good solutions to select multiple values such as array or application object
  • a join could be used instead (unidirectional for example)

It is unclear how the multiple columns would behave when returned. For example:
select (select price, symbol) as value from StockTick.std:lastevent()) from Position w

What should the "value" column be, a nested type? Or should above statement not compile?





[ESPER-383] Add feature to allow JDBC queries to use java.util.Date parameters Created: 24/Aug/09  Updated: 03/Sep/09  Resolved: 02/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Raptor Audio Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File PollExecStrategyDBQuery.java.diff    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

Some JDBC drivers silently convert java.util.Date objects into java.sql.Timestamps (Mysql) and others don't (Oracle). Please add a check for java.util.Date types before calling preparedStatement.setObject. in the file PollExecStrategyDBQuery.java.

This will add flexibility within Esper to use existing Java Event POJO's (containing java.util.Date's) as part of PreparedStatement substitution parameters. A patch has been provided that implements this functionality.



 Comments   
Comment by Thomas Bernhardt [ 02/Sep/09 ]

in 3.2 branch





[ESPER-382] ConcurrentModificationException for named window select/insert/delete Created: 16/Aug/09  Updated: 03/Sep/09  Resolved: 28/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-3.1.0-JIRA382.jar    
Number of attachments : 1

 Description   

com.espertech.esper.client.EPException: java.util.ConcurrentModificationException
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:354)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:341)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:190)
at com....
at com...
at com...
at java.lang.Thread.run(Thread.java:619)

Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at com.espertech.esper.epl.named.LookupStrategyIndexed.lookup(LookupStrategyIndexed.java:60)
at com.espertech.esper.epl.named.NamedWindowOnExprBaseView.update(NamedWindowOnExprBaseView.java:82)
at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:70)
at com.espertech.esper.view.stream.StreamFactorySvcImpl$2.matchFound(StreamFactorySvcImpl.java:155)
at com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:981)
at com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:776)
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:350)

... 6 more



 Comments   
Comment by Thomas Bernhardt [ 20/Aug/09 ]

We are working on reproducing this exception. It is reported to occur with multiple similar named windows under a certain configuration that is being narrowed down.

Comment by Thomas Bernhardt [ 20/Aug/09 ]

This problem affects users that

  • create multiple named windows
  • use multiple on-select to query each named window
  • use the same filter in each on-select
  • use multiple threads to insert, delete and on-select from each named window

The problem stems from the engine attempting to re-use the stream for the on-select triggering event based on the same filter, thereby acquiring the wrong lock when querying named windows.

Comment by Thomas Bernhardt [ 20/Aug/09 ]

Attached esper-3.1.0-JIRA382.jar addresses this issue. Place in classpath IN FRONT of esper-3.1.0.jar





[ESPER-381] Correct documentation for 10.3 XML Configuration File Created: 31/Jul/09  Updated: 03/Sep/09  Resolved: 31/Jul/09

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.1
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Charles Openshaw Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The event-type and auto-import nodes in the documentation 10.3 should occur outside the esper-configuration node

<?xml version="1.0" encoding="UTF-8"?>
<esper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.espertech.com/schema/esper"
xsi:schemaLocation="
http://www.espertech.com/schema/esper
http://www.espertech.com/schema/esper/esper-configuration-2.0.xsd">
<event-type alias="StockTick" class="com.espertech.esper.example.stockticker.event.StockTick"/>
<event-type alias="PriceLimit" class="com.espertech.esper.example.stockticker.event.PriceLimit"/>
<auto-import import-name="org.mycompany.mypackage.MyUtility"/>
<auto-import import-name="org.mycompany.util.*"/>
</esper-configuration>

should become:

<?xml version="1.0" encoding="UTF-8"?>
<esper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.espertech.com/schema/esper"
xsi:schemaLocation="
http://www.espertech.com/schema/esper
http://www.espertech.com/schema/esper/esper-configuration-2.0.xsd">
</esper-configuration>

<event-type alias="StockTick" class="com.espertech.esper.example.stockticker.event.StockTick"/>
<event-type alias="PriceLimit" class="com.espertech.esper.example.stockticker.event.PriceLimit"/>
<auto-import import-name="org.mycompany.mypackage.MyUtility"/>
<auto-import import-name="org.mycompany.util.*"/>

Without this change the method com.espertech.esper.client.ConfigurationParse.DoConfigure(Configuration configuration, XmlNode rootNode ) does not evaluate these nodes.



 Comments   
Comment by Charles Openshaw [ 31/Jul/09 ]

Sorry my bad, I was mixing up my App.Config file and my esper.cfg.xml file in an early test project of mine.

Apologies.

Charlie





[ESPER-380] Auto-detect TimesTen driver for Oracle metadata SQL access workaround Created: 30/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java.sql.SQLException: Driver not capable
at com.timesten.jdbc.JdbcOdbcPreparedStatement.getMetaData(JdbcOdbcPreparedStatement.java:1863)
at com.espertech.esper.epl.db.DatabasePollingViewableFactory.getPreparedStmtMetadata(DatabasePollingViewableFactory.java:491)
at com.espertech.esper.epl.db.DatabasePollingViewableFactory.createDBStatementView(DatabasePollingViewableFactory.java:123)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:602)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:113)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:517)

Currently it auto-detects the oracle driver.



 Comments   
Comment by Thomas Bernhardt [ 30/Jul/09 ]

For a statement that includes the "metadatasql" marker, we can also look into defaulting to sample.

Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-376] Restriction in element not parsing to right type for XSD-backed event type Created: 22/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When I declare an event field of type "xs:decimal" in XSD file in the following way, everything is fine:

<xs:element name="orderAmount" type="xs:decimal"/>

But when I use restriction-based XSD syntax:

<xs:element name="orderAmount">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>

Esper recognizes "orderAmount" field as Integer type, and fails to parse following XML snippet:

<orderAmount>253.23</orderAmount>

I think the problem is in
com.espertech.esper.event.xml.toReturnType(SchemaItem) method:
simple.getTypeName() returns null in the restriction-based case, so the switch...case block returns Integer.class.



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-375] Contained event selection for certain XML creates ClassCastException Created: 22/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

"Contained-Event Selection" in Esper 3.1.0, i have found a bug. Even a simple statement like:

select * from EventPageVisit[page.boxList.box]

throws an exception:
----------------------------
2009-07-21 14:40:14
com.espertech.esper.epl.property.PropertyEvaluatorAccumulative
populateEvents
SEVERE: Unexpected error evaluating property expression for event of type 'EventPageVisit' and property 'page.boxList.box': java.lang.Boolean cannot be cast to [Lcom.espertech.esper.client.EventBean;
java.lang.ClassCastException: java.lang.Boolean cannot be cast to [Lcom.espertech.esper.client.EventBean;
at
com.espertech.esper.epl.property.PropertyEvaluatorAccumulative.populateEvents(PropertyEvaluatorAccumulative.java:74)
at
com.espertech.esper.epl.property.PropertyEvaluatorAccumulative.getAccumulative(PropertyEvaluatorAccumulative.java:58)
at
com.espertech.esper.epl.property.PropertyEvaluatorSelect.getProperty(PropertyEvaluatorSelect.java:30)
at com.espertech.esper.view.stream.StreamFactorySvcImpl
$1.matchFound(StreamFactorySvcImpl.java:135)
at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:981)
at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:776)
----------------------------

Fix diff:

Index: esper/src/main/java/com/espertech/esper/event/xml/DOMNestedPropertyGetter.java
===================================================================
— esper/src/main/java/com/espertech/esper/event/xml/DOMNestedPropertyGetter.java (wersja 1758)
+++ esper/src/main/java/com/espertech/esper/event/xml/DOMNestedPropertyGetter.java (kopia robocza)
@@ -128,7 +128,7 @@

for (int i = 0; i < domGetterChain.length - 1; i++)
{

  • value = domGetterChain[i].getValueAsNode(node);
    + value = domGetterChain[i].getValueAsNode(value);

if (value == null)
{



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-374] com.espertech.esper.filter.InSetOfValuesConstant throws a NullpointerException in equals method when the constant is null Created: 21/Jul/09  Updated: 07/Aug/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Michael Chan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Caused by: java.lang.NullPointerException
at com.espertech.esper.filter.InSetOfValuesConstant.equals(InSetOfValuesConstant.java:56)
at java.util.Arrays.deepEquals(Arrays.java:3797)
at com.espertech.esper.filter.FilterSpecParamIn.equals(FilterSpecParamIn.java:130)
at com.espertech.esper.filter.FilterSpecCompiled.equalsTypeAndFilter(FilterSpecCompiled.java:186)
at com.espertech.esper.filter.FilterSpecCompiled.equals(FilterSpecCompiled.java:145)
at java.util.HashMap.get(HashMap.java:305)
at com.espertech.esper.collection.RefCountedMap.get(RefCountedMap.java:64)
at com.espertech.esper.view.stream.StreamFactorySvcImpl.createStream(StreamFactorySvcImpl.java:105)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:554)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:113)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:517)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:483)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:153)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)



 Comments   
Comment by Michael Chan [ 21/Jul/09 ]

Suggested fix:

Replace:

return other.constant.equals(this.constant);

with:

if (other.constant == null)

{ return this.constant == null; }

else

{ return other.constant.equals(this.constant); }
Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-373] NPE in output rate limiting using SODA Created: 18/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File esper-373.diff     Java Source File TestOutputLimitClause.java    
Number of attachments : 2

 Description   

I was trying to control a EPL programatically and set an output clause like this "output every 1 sec".

The documentation of version 3.0.0 and 3.0.1 leads to a old way of doing this (item 9.9.4):
model.setOutputLimitClause(OutputLimitClause.create(10, OutputLimitUnit.SECONDS));

I guess this should be changed. Then I tried again using java doc. This sample code illustrates how I did it:

EPStatementObjectModel obj = getAdmin().compileEPL(query);
OutputLimitClause obj = OutputLimitClause.create(OutputLimitSelector.LAST, 1);
obj.objsetUnit(OutputLimitUnit.TIME_PERIOD);
model.setOutputLimitClause(obj);
LOG.debug("epl: " + model.toEPL());

This code results in a nullpointer exception:

12:34:07,894 WARN [org.springframework.remoting.support.RemoteInvocationTraceInterceptor] Processing of JmsInvokerServiceExporter remote call resulted in fatal exception: net.intelie.holmes.core.client.CoreFacade.checkQuery java.lang.NullPointerException
at com.espertech.esper.client.soda.OutputLimitClause.toEPL(OutputLimitClause.java:361)
at com.espertech.esper.client.soda.EPStatementObjectModel.toEPL(EPStatementObjectModel.java:341)
(...)

The reason was that a have chosen a TIME_PERIOD unit and did not set a TimePeriodExpression. Then I got a nullpointer, when I try to generate a string from the TimePeriodExpression (line 361) .I guess that this should be more safely threated at OutputLimitClause, checking also if TimePeriodExpression is not null.

I have managed to get the code running using:
model.setOutputLimitClause(OutputLimitClause.create(OutputLimitSelector.LAST, Expressions.timePeriod(null, null, null, 1, null)));



 Comments   
Comment by Ricardo Clemente [ 23/Jul/09 ]

A patch for the documentation and the class OutputLimitClause.

A unit test for the modifications.

Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-372] Enhance ourput rate limiting to allow discard of events until time period passed Created: 15/Jul/09  Updated: 03/Sep/09  Resolved: 08/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In order to get consistent results for a complete 60 second window is it
possible to supress the output of the following statement to provide values
only when the sliding 60 second window has completed it's first full 60
seconds?

select instrumentId, sum(tradeSize) as value, 'volume.60' as type
from TradeInformation.win:time(60 seconds)
group by instrumentId
output snapshot every 1 seconds



 Comments   
Comment by Thomas Bernhardt [ 08/Aug/09 ]

in 3.2 branch





[ESPER-371] Using Esper 3.1.1, a POJO type of float isn't supported in the statements Created: 08/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Brett Miller Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File RelationalOpEnum.java    
Number of attachments : 1

 Description   

My POJO object uses types of 'float' but I'm getting the following error:

Unsupported type for relational op compare, type class java.lang.Float

Occurring at com.espertech.esper.type.RelationalOpEnum.getComputer(RelationalOpEnum.java:126)

Upon examination of the code, com.espertech.esper.type.RelationalOpEnum.getComputer Does not support a type of Float.

Here is my statement:
select * from dtStockTick.std:lastevent() as base,
dtStockInd(symbol='trin').std:lastevent() as trin,
dtStockInd(symbol='JI2T.Z').std:lastevent() as tran
where base.time between 35100 and 55800
and base.last > base.open
and (trin.last > 0.1 and trin.last < 0.75)
and base.beta <57
and ( base.l2RatioWMA>1.25 or base.l2ShallowRatio > 1)
and base.percentChange>.001
and base.last > base.sma3_5
and base.delay < 300

I used a type 'float' instead of type 'double' for all of my floating point values.

Here is the stack (excluding my classes)
java.lang.IllegalArgumentException: Unsupported type for relational op compare, type class java.lang.Float
at com.espertech.esper.type.RelationalOpEnum.getComputer(RelationalOpEnum.java:126)
at com.espertech.esper.epl.expression.ExprRelationalOpNode.validate(ExprRelationalOpNode.java:81)
at com.espertech.esper.epl.expression.ExprNode.getValidatedSubtree(ExprNode.java:94)
at com.espertech.esper.epl.expression.ExprNode.getValidatedSubtree(ExprNode.java:89)
at com.espertech.esper.core.EPStatementStartMethod.validateNodes(EPStatementStartMethod.java:1048)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:731)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:113)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:517)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:483)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:153)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)

Brett



 Comments   
Comment by Brett Miller [ 08/Jul/09 ]

Here is the change that I made to support a type of 'float' in the statements.

Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-370] Exception compiling pattern with repeat operator and filter using repeated property within the repeat operator itself Created: 08/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

ok, so when I have the following query "select a from pattern [ every
[2](a=Event() -> b=Event(eventID=a[0].eventID))]" I get the following error,
any thoughts why this is happening
Exception in thread "main" com.espertech.esper.client.EPException:
java.lang.ClassCastException: com.espertech.esper.event.bean.BeanEventBean
at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:354)
at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:341)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:190)
at cat.dds.nh.Driver.testRepeat2(Driver.java:46)
at cat.dds.nh.Driver.main(Driver.java:33)
Caused by: java.lang.ClassCastException:
com.espertech.esper.event.bean.BeanEventBean
at
com.espertech.esper.filter.FilterSpecParamEventPropIndexed.getFilterValue(FilterSpecParamEventPropIndexed.java:93)
at
com.espertech.esper.filter.FilterSpecCompiled.getValueSet(FilterSpecCompiled.java:114)
at
com.espertech.esper.pattern.EvalFilterStateNode.startFiltering(EvalFilterStateNode.java:174)
at
com.espertech.esper.pattern.EvalFilterStateNode.start(EvalFilterStateNode.java:69)
at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollowedByStateNode.java:111)
at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterStateNode.java:85)
at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterStateNode.java:143)
at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:981)
at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:776)
at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:350)
... 4 more



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-369] Using User Defined function in where clause Created: 08/Jul/09  Updated: 06/Aug/09  Resolved: 06/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Test Priority: Major
Reporter: shreekanth vankamamidi Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows Vista, JDK 1.5.0


Number of attachments : 0

 Description   

Hi All,

I was trying to invoke a User defined java function from EPL query, but it doesn't work, it simply ignores but where as if it is in select columns it works...

sample:

User Defined Method: FinanceUtils.getBasic(int salary)

Select FinanceUtils.getBasic(a.salary) from EmployeeEvent a ===> this works

but

Select * from EmployeeEvent a where FinanceUtils.getBasic(a.salary) > 3000 ===> this doesnot works
and returns complete list... however it validates compilation errors..

This is just a sample, actual requirement is more complex..

so can anyone please let me know if it is a limitation or i am doing any thing wrong

Regards,
Shreekanth



 Comments   
Comment by Thomas Bernhardt [ 08/Jul/09 ]

Cannot reproduce, please attache a small test class.





[ESPER-368] XML schema property plus XPath with the same property name produce incorrect result if schema and XPath typing don't match Created: 03/Jul/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Assume a schema that has xs:all:

<xs:element name="event-page-visit">
<xs:annotation>
<xs:documentation>Event of visiting a page</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="sessionId"/>
<xs:element name="customerId" minOccurs="0"/>
<xs:element name="url"/>
<xs:element name="method"/>
</xs:all>
</xs:complexType>
</xs:element>

Assume a event definition that is:
<event-type name="PageVisitEvent">
<xml-dom root-element-name="event-page-visit" schema-resource="xschema-events.xsd">
<xpath-property property-name="url" xpath="/event-page-visit/url" type="string"/>
</xml-dom>
</event-type>

Assume a over-simplfied pattern such as:
select a.url as sesja from pattern [ every a=PageVisitEvent(url='page4') ]

The "url" property matches the event but fails to output in the select clause, as its treated as a fragment, ie. a XML backed type by itself.



 Comments   
Comment by Thomas Bernhardt [ 03/Jul/09 ]

workarounds: remove xs:all

Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-367] OutOfMemory issue Created: 26/Jun/09  Updated: 03/Sep/09  Resolved: 01/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ravi Peddinti Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

VM: 64bit SUN JDK1.6 on windows 2003 on 16 (Intel Xeon 2.40Gz) CPU server


Attachments: Java Source File TestMemoryUsage.java    
Number of attachments : 1

 Description   

We are evaluating an Esper based application with Esper in embedded mode. Our application reads messages sent through a socket and converts them into hashmap and sends the data to Esper. We currently are running one EPL in esper engine. But it consumes all the memory and throws an OutOfMemoryException after some time. The query and other details are down below.

This problem is recreatable with a test program. Garbage collector fails to reclaim all unused the heap, and eventually after some time the JVM goes out of memory. We are including the test program, which is similar in query and data feed.

Query:
select IP, ReportTime, count as IPCount
from TLHitEvent.win:time_batch(60 sec)
group by IP, ReportTime
order by desc IPCount
limit 10

Event Type (TLHitEvent): MAP

Event Fields:
IP - IP address as string
ReportTime - Time in minutes
There are another 20 fileds which are part of the same event type TLHitEvent

Data details:
Size - between 2K to 8K
Frequency - around 1000/sec.

VM: 64bit SUN JDK1.6 on windows 2003 on 16 CPU server

JVM parameter tried (various combinations):
-server
-Xms5048m
-Xmx5048m
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:-UseGCOverheadLimit
-XX:GCTimeRatio=10
-XX:ParallelGCThreads=6

Listeners: tried with and without listeners

Esper Version: tried both 3.0.0 and 3.1.0



 Comments   
Comment by Ravi Peddinti [ 29/Jun/09 ]

It seems order by clause is causing the problem. Without it memory usage is very less and NOT increasing gradually till it goes out of memory.

Comment by Thomas Bernhardt [ 31/Aug/09 ]

The ReportTime property in the group-by clause is a timestamp value, thereby creating an unlimited number of groups. We will make a change for version 3.2 to handle unlimited number of groups correctly for group-by in combination with a data window, and document unbound stream cases and output all/last cases that may still present a problem as timestamps as group criteria can create unlimited state without the engine being able to tell apart.

Comment by Thomas Bernhardt [ 01/Sep/09 ]

change in 3.2 branch





[ESPER-366] Missing export of package com.espertech.esper.event.property Created: 18/Jun/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jochen Mader Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The OSGi-export in esper-3.1.0.jar doesn't contain com.espertech.esper.event.property.



 Comments   
Comment by Thomas Bernhardt [ 22/Jun/09 ]

The OSGi Manifest of esper 3.1.0 has com.espertech.esper.event.property
missing.

While working the esper jar into our build process I found a couple of
packages being exported which are nowhere to be found in the jars:
com.espertech.esper.view.stat.olap,
com.espertech.esper.indicator.jmx,
com.espertech.esper.indicator.pretty,
com.espertech.esper.emit

Comment by Thomas Bernhardt [ 07/Aug/09 ]

in 3.2 branch





[ESPER-365] import EPL built in annotation by default Created: 17/Jun/09  Updated: 04/Sep/09  Resolved: 04/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.2

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

@Name("first statement") insert into CountS select count(*) as cnt, id from MyEvent.win:keepall()

requires explicit import
configuration.addImport("com.espertech.esper.client.annotation.*");

I think those should not require an explicit import
Although I agree one wouldn't then be able to use its own annotation whose name would be an Esper reserved one
(should deal with defaults somewhat like java.lang / java.util auto import?)

otherwise fails with
Exception in thread "main" com.espertech.esper.client.EPStatementException: Failed to process statement annotations: Failed to resolve @-annotation class: Could not load class by name 'Name', please check imports [@Name("first statement") insert into CountS select count(*) as cnt, id from MyEvent.win:keepall()]
at com.espertech.esper.epl.annotation.AnnotationUtil.compileAnnotations(AnnotationUtil.java:43)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:173)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:152)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)



 Comments   
Comment by Thomas Bernhardt [ 31/Jul/09 ]

I think by default they don't require an import.
Only if one starts adding additional imports then the annotation import disappears.

Comment by Alexandre Vasseur [ 04/Sep/09 ]

Please refine behavior

It is very common that one may add its own import.
If doing so then mandates that one add the c.e.e.client.annotation package this is a bug.

I think by default they should always be auto imported as first or last priority.

Comment by Thomas Bernhardt [ 04/Sep/09 ]

The change is in 3.2 release.

Comment by Alexandre Vasseur [ 04/Sep/09 ]

It seems the behavior is:

  • when no import is added to a configuration by user, default imports are in place
  • as soon as user add an import, default imports are entirely removed.

The following will find user' @Name but will fail to find default @Description
Configuration cf = new Configuration();
cf.addImport(Esper365.Name.class);
EPServiceProvider ep = EPServiceProviderManager.getDefaultProvider(cf);
EPStatement stmt = ep.getEPAdministrator().createEPL("@Name(x='foo') @Description('desc') select * from java.lang.Object");

I would like the following behavior:

  • default imports always in place, and always last in the resolve process
    This might be a rare occurence, but I want to avoid that a change in the configuration (f.e. add an import in some v2 of a user application) breaks past behavior (ie mandates user to add all default import explicitly - this default import list possibly changing from release to release)
Comment by Thomas Bernhardt [ 04/Sep/09 ]

For release 3.2, the default client annotation package remains there even after static configuration of additional imports.

For other packages (Math) the default behavior is to clear imports when the first user import is added, so as to allow the override order. Dynamic import add is still an add.
The static import behavior we can change between major release and not minor ones, i.e. open new JIRA for 4.0





[ESPER-364] [PATCH] XMPP input adapter Created: 17/Jun/09  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: G2P Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File 0001-Add-a-pubsub-connector-implemented-with-su-smack.patch     Text File 0002-PubSubBridge-is-now-also-an-OutputAdapter.patch     Text File 0003-Serialize-events-as-XML.patch     Text File 0004-More-queries.patch    
Patch Submitted:
Yes
Number of attachments : 4

 Description   

I've added an XMPP PubSub esperio input adapter based on smack and su-smack.

Here is a patch, I'll do more iterations given feedback.

It includes a main method that runs the code. That method assumes a local jabber server where the correct account exists; I'm not sure how to improve testability.



 Comments   
Comment by G2P [ 09/Sep/09 ]

OutputAdapter support

Comment by G2P [ 09/Sep/09 ]

XML serialisation support.

Comment by G2P [ 09/Sep/09 ]

Demo comments and extra queries.

Comment by G2P [ 09/Sep/09 ]

I'm not planning to work on this anymore, but I had written a working output adapter as well. Everything is attached, although the schema must be changed for testing.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

Will document as solution pattern.

Comment by G2P [ 17/Sep/09 ]

Go ahead.





[ESPER-363] support limit clause for on select Created: 16/Jun/09  Updated: 03/Sep/09  Resolved: 03/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.2

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The on...select ... should support the limit clause

on DeliveryRequest
insert into Stuff
select * from GPSLocation limit 1

It sounds rather trivial to bring the change in the EPL grammar
Any comments on side effects or good reason for keepin such a limitation?

The following fails:

create window GPSLocationW.std:unique(driver) as select * from GPSLocation

insert into GPSLocationW select * from GPSLocation

select d.* from
DeliveryRequest d unidirectional,
GPSLocationW g

on DeliveryRequest
insert into Stuff
select * from GPSLocation limit 1

18:21:52,828 DEBUG [ParseHelper] Error parsing statement [on DeliveryRequest insert into Stuff select * from GPSLocationW limit 1 ]
java.lang.RuntimeException: MissingTokenException(inserted [@-1,0:0='<missing EOF>',<-1>,1:64] at limit)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.displayRecognitionError(EsperEPL2GrammarParser.java:530)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:204)
at org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:624)
at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.startEPLExpressionRule(EsperEPL2GrammarParser.java:682)
at com.espertech.esper.core.EPAdministratorImpl$3.invokeParseRule(EPAdministratorImpl.java:59)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:107)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:299)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:142)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:109)
Caused by: MissingTokenException(inserted [@-1,0:0='<missing EOF>',<-1>,1:64] at limit)
at org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:623)
... 8 more
Exception in thread "main" com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near 'limit' (a reserved keyword) expecting end of input but found 'limit' at line 1 column 64 [on DeliveryRequest insert into Stuff select * from GPSLocationW limit 1 ]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:28)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:117)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:299)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:142)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:109)






[ESPER-362] error "Iteration over a unidirectional join is not supported" at statement start in a stream to window join Created: 16/Jun/09  Updated: 03/Sep/09  Resolved: 03/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: 3.2

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When registering a statement that does a stream to named window join, using the stream as unidirectional join, it fails with
"Iteration over a unidirectional join is not supported"
Exception in thread "main" java.lang.UnsupportedOperationException: Iteration over a unidirectional join is not supported
at com.espertech.esper.epl.join.JoinSetComposerStreamToWinImpl.staticJoin(JoinSetComposerStreamToWinImpl.java:150)
at com.espertech.esper.epl.join.JoinPreloadMethodImpl.preloadAggregation(JoinPreloadMethodImpl.java:61)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:792)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:113)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:517)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:483)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:153)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:109)

despite this is not an iteration
and that it seems to me that a fix would be to implement the JoinSetComposerStreamToWinImpl.staticJoin() to return empty
return new java.util.HashSet<MultiKey<EventBean>>()

Are there any side effects with such a fix, or good reason for the error ?

create window GPSLocationW.std:unique(driver) as select * from GPSLocation

insert into GPSLocationW select * from GPSLocation

select d.* from
DeliveryRequest d unidirectional,
GPSLocationW g






[ESPER-361] win:time().std:firstunique() is not behaving as expected Created: 09/Jun/09  Updated: 11/Jun/09  Resolved: 11/Jun/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ARajeshBabu Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu8.04,java 1.5


Attachments: Java Source File OrderEvent.java     Zip Archive Test.zip    
Number of attachments : 2

 Description   

there is a behavioral difference in specifying an expiry policy for the std.firstunique() window from esper2.3



 Comments   
Comment by Alexandre Vasseur [ 09/Jun/09 ]

Please provide more information - for example exact EPL statement and sample input events

Comment by ARajeshBabu [ 10/Jun/09 ]

EPL Statement - "INSERT INTO OE_UNQ select * from OrderEvent.win:time(10 sec).std:firstunique(itemName) retain-intersection"

and pls find the attached OrderEvent.java file

Comment by ARajeshBabu [ 10/Jun/09 ]

OrderEvent.java file

Comment by Thomas Bernhardt [ 10/Jun/09 ]

Between major releases, i.e. 2.x to 3.x, please review migration instructions at
http://docs.codehaus.org/display/ESPER/Migrating+Esper+2.x+to+3.0

We keep the behavior of all statements as constant as we can between major releases, however for version 3 the behavior when using multiple data windows has changed (to become more consistent) and we have reviewed this change with users through all communication channels.

Comment by ARajeshBabu [ 11/Jun/09 ]

Even i tried with std:firstunique().win:time() but the output is not as expected as with 2.3

Comment by Thomas Bernhardt [ 11/Jun/09 ]

There is a flag in the configuration that enables backward-compatibilty for multiple staggered data windows. I'd recommend to review whether union or intersection semantics are expected before using the flag.

Comment by ARajeshBabu [ 11/Jun/09 ]

Pls check the attached zip which contains sample code and see the difference in the output of the two but putting the respective jars in the classpath

Comment by Thomas Bernhardt [ 11/Jun/09 ]

Your 3.1 code still have the retain-intersection keyword.





[ESPER-360] Esper's Maven 2 artifacts are not correctly uploaded as a result its dependencies do not get picked up during runtime. Created: 08/Jun/09  Updated: 17/Jun/09  Resolved: 17/Jun/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: anshul Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Number of attachments : 0

 Description   

Esper's 3.1.0 artifacts are not uploaded correctly to the maven repository
http://repo1.maven.org/maven2/com/espertech/esper/3.1.0/

The issues are

  1. The pom file is named esper-3.1.0.pom.xml instead of esper-3.1.0.pom
  2. The sha1 checksum files are missing.

As a result during a maven build, we get checksum failures when downloading the artifacts. And we get failures as the antlr classes are not added to the classpath because the pom file does not get downloaded.

Having esper artifacts correctly uploaded will greatly enhance our ability to use it. The upload of artifacts for 3.0.0 is a good point of reference on what's needed for the 3.1.0 artifacts.



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/09 ]

Fixed, version 3.0 was fine but 3.1 was not.
May take a while to propagate.

Comment by anshul [ 15/Jun/09 ]

The pom file is now correctly named and has the signature files but the esper-3.1.0.jar file does not have a corresponding signature file.

Moreover, the maven-metadata.xml file only refers to 3.1.0 version. It does not refer to the older versions. This does not negatively impact us as we depend on 3.1.0 version but it might impact others who depend on older versions.

Do you folks use the maven deploy plugin to deploy these artfiacts.

Comment by Thomas Bernhardt [ 17/Jun/09 ]

fixed, next time we'll give the Maven deploy a try again but last release it woudn't work





[ESPER-359] addStatement with replay from namedwindow(s) Created: 05/Jun/09  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When using statement add/remove at runtime, that could be nice to be able to replay a named window (or more than one) so as to initialize the statement (different from a addlistener with replay)

Here is a use case:
An application is receiving GPS sensor events
The app is keeping track of the last position per device in a named window - say PositionW
A frontend allow users to add / remove zone to do geofencing (enter / exit zone) alerts
When a zone is added one or more statement such as below is added
every a=PositionW(Geo.outside(....) -> b=PositionW(id=a.id, Geo.inside(....) ..... // enter zone
As the statement gets created, the statement does not take into account that a known (say outside zone) position of device D is in PositionW named window.
When device D moves inside zone, the statement does not match.
One cannot artificially resend named window events (using an ad-hoc query and sendEvent) as this would trigger other existing statements

It would be a great feature to have a
createEPL(....., some named window name (one or many) to catch up from)
that would then load up the statement internals by replaying the named window

As extra requirements to discuss:

  • should it be stamped named window (one that would expose f.e a timestamp property) that keep track of event internal received time, so that it can replay with proper time in its own isolation
  • should it replay ignoring time (assuming current time, and mixing the named windows (if many) events one by one)
  • should it support a custom listener that would catch up such statement output
    createEPL(...., some named window name(s), catchUpListener)
  • should it be allowed further on after statement creation
    createEPL(...)
    stmt.catchUp(namedwindow(s), catchUpListener) // or use any attached listener ?
  • should it be provided without named window, simply passing a collection of events to replay


 Comments   
Comment by Thomas Bernhardt [ 03/Sep/09 ]

Use isolation service provider in 3.2

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-358] UDF - support arrays of primitives Created: 05/Jun/09  Updated: 04/Sep/09  Resolved: 04/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Improvement Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Esper358.java    
Number of attachments : 1

 Description   

UDF don't support arrays of primitive(or boxed) types - the method resolver fails to look up those.
Example:
select * from GPS where Geo.inside(lat, lng,

{1, 2, 3, 4}

)

UDF: Geo.inside(double lat, double lng, double[ ] polygonLatLng)

A workarond for now is to use a String argument and do a string split and parse in the UDF
select * from GPS where Geo.inside(lat, lng, "1, 2, 3, 4")



 Comments   
Comment by Thomas Bernhardt [ 03/Sep/09 ]
{1,2,3,4}

has the type "Integer[]" and not the type "int[]"as EPL allows null values.

Comment by Alexandre Vasseur [ 04/Sep/09 ]

please look attached test case

Comment by Alexandre Vasseur [ 04/Sep/09 ]

see attached

Comment by Thomas Bernhardt [ 04/Sep/09 ]

In the statement "select TestStaticFunctions.udfInteger(integers) from Ev"
the property "integers" is of type "Integer" and is attempted to be passed to a method accepting "Integer[]"
that should fail?

Also in "select Esper358.udfInteger(ints) from Ev" an "int[]" is passed to a method accepting "Integer[]", we don't to auto-boxing for arrays sticking with Java conventions.

Comment by Alexandre Vasseur [ 04/Sep/09 ]

my mistake - test case was broken.
So 2 key points:

  • boxing / unboxing of arrays is not supported in UDF as it is not supported in Java
  • a {1, 2}

    is an array of Integer[ ]





[ESPER-357] Univariate statistics derived properties refers to stdev and stdevpa Created: 02/Jun/09  Updated: 03/Sep/09  Resolved: 07/Aug/09

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.2, 2.3, 3.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

esper_reference.pdf refers to stdev and stdevpa (which I dont think they have been since beta) throughout instead of stddev and stddevpa. I think the html is the same.



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/09 ]

fix in 3.2 branch





[ESPER-356] Round-off artifacts in time:win output with 'avg' aggregation Created: 27/May/09  Updated: 03/Sep/09  Resolved: 31/Aug/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jason Rosenberg Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GZip Archive esper-roundoff-big-decimal-test-case.tar.gz     GZip Archive esper-roundoff-test-case.tar.gz    
Number of attachments : 2

 Description   

I've attached a simple test-case to reproduce this issue. As far as I know this issue has been with us since Esper 2.0 at least, and is currently still happening in 3.1.0.

Using a time:win sliding window, and using an avg() aggregation function, residual values tend to remain in the output long after all non-zero inputs have left the time window.

The attached test-case reproduces the case I am seeing. We have an input stream that generally has all 0's, except every once in a while there is a blip of 2 or 3 non-zero events....Everything works as expected, until the blip passes out of the time window, and the input returns to all zeroes. At that point the output gets stuck at very small but non-zero values, e.g. 1x10^-18, etc....

I expect this is due to rounding, perhaps the avg aggregation is only updating the previous residual value each time a value enters or leaves the window, instead of doing a full average calculation with all the values remaining in the window....If so, this optimization is producing incorrect results, in this case.....

Jason



 Comments   
Comment by Alexandre Vasseur [ 02/Jun/09 ]

Esper' avg() is generating double precisions numbers and as per IEEE standards Tom quoted, and double are internally represented as binary fractions which can lead to loss of precision. This is unrelated to how Esper works.

For example the following will fail (same input data as your test case) while you seem to assume it should end up with sum == 0
public void testDoubleJDK() {
double sum = 0;
for(double sample:samples)

{ sum += sample; }

for(double sample:samples)

{ sum -= sample; }

assertEquals(0, sum);//will fail
}

You may read more about this in this thread for example
http://www.velocityreviews.com/forums/t139008-java-double-precision.html

If you do want to deal with BigDecimal - you should likely consider writing a custom aggregator using BigDecimal.add/substract, following the com.espertech.esper.epl.aggAvgAggregator source.
See here for such extensibility
http://esper.codehaus.org/esper-3.1.0/doc/reference/en/html/extension.html#custom-aggregation-function

Comment by Jason Rosenberg [ 02/Jun/09 ]

Actually no....

If all values in 'samples' are 0.0, then your test code works fine. If you add 10 0.0's, and then subtract 10 0.0's, you get 0.0. My test-case clearly shows, that if you start off with all 0's, it works fine, then after intervening non-zeroes, followed by a return to all 0's, it never recovers, and permanently shows a residual history.

I probably mis-named this issue, because it's not really a round-off error in calculating the average per se, it's a problem with the residual after previous activity calculation. The problem (and I think it's significant), is the that the time:win is allowing history no longer present in the window to influence the output. This is certainly against any SQL-like semantics.

The problem really is that there's an optimization, which is not valid in this case, to keep a moving residual rather than the correct calculation over the actual values currently in the window.

Probably a simple improvement, would be to track also the min and max in the window, and if the avg is ever greater than the max or less than min, as occurs in this case, then force the value to the min or max....Since the min/max is apparently easier to track accurately.

Using BigDecimal in no way solves this issue. It only makes the residual smaller (e.g. 10^-54 instead of 10^-18). I did try it for fun....

Jason

Comment by Jason Rosenberg [ 30/Jun/09 ]

Added a test case which uses BigDecimal everywhere instead of double....

This time, it gets a runtime exception (perhaps this is actually a different issue, seems the ArithmeticException should be handled in this case):

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
at java.math.BigDecimal.divide(BigDecimal.java:1514)
at com.espertech.esper.epl.agg.BigDecimalAvgAggregator.getValue(BigDecimalAvgAggregator.java:74)
at com.espertech.esper.epl.agg.AggregationServiceGroupAllImpl.getValue(AggregationServiceGroupAllImpl.java:56)
at com.espertech.esper.epl.expression.ExprAggregateNode.evaluate(ExprAggregateNode.java:135)
at com.espertech.esper.epl.core.SelectExprEvalProcessor.process(SelectExprEvalProcessor.java:416)
at com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:53)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getSelectListEvents(ResultSetProcessorRowForAll.java:155)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getIterator(ResultSetProcessorRowForAll.java:190)
at com.espertech.esper.epl.view.OutputProcessView.iterator(OutputProcessView.java:156)
at com.espertech.esper.core.EPStatementImpl.iterator(EPStatementImpl.java:215)
at ning.esperutils.MiniEsperEngine.getNumberFromEPL(MiniEsperEngine.java:56)
at ning.esperutils.MiniEsperEngine.getAverage(MiniEsperEngine.java:69)
at ning.esperutils.MiniEsperEngineTest.testBigDecimalAverageRoundOffInTimeWindow(MiniEsperEngineTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
at org.testng.TestNG.run(TestNG.java:708)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

Comment by Thomas Bernhardt [ 31/Aug/09 ]

Recomputing a new aggregation value based on all datapoints in a data window every time a data point enters and leaves a data window does not seem a good suggestion, Jason.

One workaround is to use a round function in the select clause to round to the desired precision. A second workaround is to use on-select and named window.

IEEE double precision or BigDecimal precision are the same for any SQL-based database and its Java API.





[ESPER-355] Maven2 metadata not updated Created: 26/May/09  Updated: 04/Jun/09  Resolved: 04/Jun/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.1
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The Maven central repository doesn't have the correct Maven2 Metadata information.

See http://mirrors.ibiblio.org/pub/mirrors/maven2/com/espertech/esper/maven-metadata.xml. This causes the dependencies to not be picked up correctly.



 Comments   
Comment by Thomas Bernhardt [ 04/Jun/09 ]

Updated on Codehaus repo, should synchronize to the link





[ESPER-354] Upgrade to Antlr 3.1.3 Created: 26/May/09  Updated: 26/Sep/10  Resolved: 01/Sep/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 4.0 - requires JDK6
Fix Version/s: 4.0 - requires JDK6

Type: Improvement Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

See http://www.antlr.org/wiki/display/ANTLR3/ANTLR+3.1.2+Release+Notes and http://www.antlr.org/wiki/display/ANTLR3/ANTLR+3.1.3+Release+Notes



 Comments   
Comment by Thomas Bernhardt [ 23/Nov/09 ]

This will skip release 3.3 and go into release 4.0 as it updates a dependent jar file.

Comment by Thomas Bernhardt [ 01/Sep/10 ]

Release 4.0 will use latest ANTLR 3.2





[ESPER-353] Detecting absence of event Created: 24/Apr/09  Updated: 25/Apr/09  Resolved: 25/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: saravanan Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP


Number of attachments : 0

 Description   

I used the below statement to find the absence of "Terminal" event. But even when after sending the Terminal event, update method of listener is invoked.

select 'terminal 1 is offline' from pattern
[every timer:interval(2 sec) ->
(timer:interval(5 sec) and not Terminal]

Code Snippet:-

Configuration config = new Configuration();
config.addEventType("Terminal", Terminal.class);

// Get an engine instance
esperEngine = EPServiceProviderManager.getDefaultProvider(config);

EPStatement statement = null;
String stmt = "select 'terminal 1 is offline' from pattern " +
"[every timer:interval(2 sec) -> (timer:interval(5 sec) and not Terminal)] " ;

statement = esperEngine.getEPAdministrator().createEPL(stmt);
statement.addListener(new UpdateListener(){
public void update(EventBean[] newEvent, EventBean[] oldEvent)

{ System.out.println("Event reached me") ; }

});

Terminal lTerminal = new Terminal() ;
lTerminal.setId("123") ;
esperEngine.getEPRuntime().sendEvent(lTerminal);

try

{ Thread.sleep(15000) ; }

catch (InterruptedException e)

{ // TODO Auto-generated catch block e.printStackTrace(); }

 Comments   
Comment by Thomas Bernhardt [ 25/Apr/09 ]

The pattern:
every timer:interval(2 sec) -> (timer:interval(5 sec) and not Terminal)]

...waits for 2 seconds, then waits for 5 seconds and detects the absence of a Terminal event during the last 5 seconds.

Your example sends the TerminalEvent at 0 (zero) seconds, therefore it will be ignored as the initial 2 seconds haven't passed.





[ESPER-352] "default" named engine and unamed engine should be same Created: 21/Apr/09  Updated: 11/May/09  Resolved: 11/May/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EPServiceProviderManager.getDefaultEPServiceProvider()
and
EPServiceProviderManager.getEPServiceProvider("default")

should return the same engine, having "default" beeing the default unnamed engine reserved name.



 Comments   
Comment by Alexandre Vasseur [ 11/May/09 ]

fix in 3.1





[ESPER-351] Possible memory leak in Esper GroupBy view Created: 20/Apr/09  Updated: 24/Apr/09  Resolved: 24/Apr/09

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: toli kuznets Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Picture 2.png     Java Source File TestMemoryLeak.java    
Testcase included: yes
Number of attachments : 2

 Description   

There seems to be a situation where a simple "group by" query results in an OutOfMemory exception.
This happens in 2.3 and 3.0 code, although from our own trials we noticed that this happened much faster in 3.0

if you put a basic select * from trade.std:groupby(symbol).win:length(1) query in, and send 1 million events in, the Esper engine runs out of memory.

Here's the example of the unit test (also attached)

    public void testMemoryLeak() throws Exception {
        Configuration config = SupportConfigFactory.getConfiguration();
        config.addEventType("trade", SupportMarketDataBean.class.getName());
        EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config);
        epService.initialize();

        String stmtStr = "select * from trade.std:groupby(symbol).win:length(1)";
        epService.getEPAdministrator().createEPL(stmtStr);

        for (int i = 0; i < 1000000; i++) {
            epService.getEPRuntime().sendEvent(new SupportMarketDataBean("IBM_" + i, 10.23, (long) i, "feed"));
        }
    }

It could be that we are not using the query in an efficient manner, but my expectation would be that Esper should be able to handle this.
See the screenshot from YourKit profiler with the code path.



 Comments   
Comment by Thomas Bernhardt [ 21/Apr/09 ]

It appears that the code above creates an unlimited (1M) number of groups and one data window per group....is that intended?

Comment by toli kuznets [ 22/Apr/09 ]

Thomas,
didn't realize that what the query was doing. I saw this in our use cases and was trying to create a minimal reproducible use case in a unit test, and have clearly created a wrong example.

I'll work on reproducing this again with a better example that shows our use case and follow up.
thanks for clarifying.

Comment by toli kuznets [ 24/Apr/09 ]

I can't seem to reproduce this behaviour anymore - so this is likely a user error.
I'm closing this for now, and if i encounter this again I will reopen with better use cases and reproduction steps and unit tests.





[ESPER-350] Timer-Within should evaluate to permanently false allowing every to restart the expression Created: 17/Apr/09  Updated: 16/May/09  Resolved: 17/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In the expression:
every ( A -> (B where timer:within(5 sec) ) )

When no B event arrives after an A event, its desirable the "every" restarts the subexpression looking for the next A followed by B within 5 sec.



 Comments   
Comment by Thomas Bernhardt [ 17/Apr/09 ]

in release 3.1





[ESPER-349] Exception barrier to lock taken missing from filter processing potentially causing deadlock after an exception occurs Created: 16/Apr/09  Updated: 16/May/09  Resolved: 17/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[ESPER-348] XML event type fails to be configured with XSD on Java 6 Created: 10/Apr/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

User reported the following works with java 1.5_18 but fails with java 6

Stack trace:
Exception in thread "main" com.espertech.esper.client.EPException: Could not find root element declaration in schema for element name 'test'
at com.espertech.esper.event.xml.SchemaUtil.findRootElement(SchemaUtil.java:244)
at com.espertech.esper.event.xml.SchemaXMLEventType.<init>(SchemaXMLEventType.java:62)
at com.espertech.esper.event.EventAdapterServiceImpl.addXMLDOMType(EventAdapterServiceImpl.java:531)
at com.espertech.esper.core.EPServicesContextFactoryDefault.init(EPServicesContextFactoryDefault.java:235)
at com.espertech.esper.core.EPServicesContextFactoryDefault.createServicesContext(EPServicesContextFactoryDefault.java:65)
at com.espertech.esper.core.EPServiceProviderImpl.initialize(EPServiceProviderImpl.java:284)
at com.espertech.esper.core.EPServiceProviderImpl.<init>(EPServiceProviderImpl.java:66)
at com.espertech.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:82)
at com.trend.tmtm.TestEsperXML.TestEsperXML.run(TestEsperXML.java:23)
at com.trend.tmtm.TestEsperXML.TestEsperXML.main(TestEsperXML.java:29)

My schema.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="com.test.esper"
targetNamespace="com.test.esper"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="test">
<xs:complexType>
<xs:sequence>
<xs:element name="srcip" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="type" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Source code:
package com.trend.tmtm.TestEsperXML;

import java.net.URL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.ConfigurationEventTypeXMLDOM;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;

public class TestEsperXML {
private static final Log log = LogFactory.getLog(TestEsperXML.class);

public void run()

{ Configuration configuration = new Configuration(); URL schemaURL = this.getClass().getClassLoader().getResource("schema.xsd"); ConfigurationEventTypeXMLDOM cfgV = new ConfigurationEventTypeXMLDOM(); cfgV.setRootElementName("test"); cfgV.setSchemaResource(schemaURL.toString()); configuration.addEventType("TestEvent", cfgV); EPServiceProvider epService = EPServiceProviderManager.getProvider("TestEsperXML", configuration); // <== Exception here! log.debug("Success!"); }

public static void main(String[] args)

{ TestEsperXML tester = new TestEsperXML(); tester.run(); }

}

I'm useing Eclipse 3.4.2, M20090211-1700 on Windows XP SP3
If I use jre 1.5.0_18, it works.
If I use jre6, it throws exception.



 Comments   
Comment by Alexandre Vasseur [ 10/Apr/09 ]

I can confirm the issue, also works for java 1.5_11

Seems that a change was done in
com.sun.org.apache.xerces.internal.xs.XSTypeDefinition.COMPLEX_TYPE constant between Java 5 and Java 6.
Java 5, value is 13
Java 6, value is 15 - as per XML Schema API spec - http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/idl-definitions.html

Cannot find reference of Java 5 bug in Sun bug database
Cannot find reference of bug in Xerces
But for some reason, svn shows the constant value change back years ago
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/xs/XSTypeDefinition.java?view=log (compare oldest one with more recent one)

This creates incompatibility for Esper 3 to run equally on Java 5 and Java 6
Must find a workaround to avoid checking against this constant or actually using a lazy resolution of the constant value
f.e. reflection in a static initializer block, instead of direct reference, so that to not have javac hardcode the value in Esper bytecode
com.espertech.esper.event.xml.XSDSchemaMapper.map(...)
if (decl.getTypeDefinition().getTypeCategory() != XSTypeDefinition.COMPLEX_TYPE)

{ continue; }
Comment by Alexandre Vasseur [ 10/Apr/09 ]

workaround for Java 6 users: recompile Esper from source with Java 6 for a Java 6 target JVM
(or at least the faulty class com.espertech.esper.event.xml.XSDSchemaMapper)

Note to dev: requires global check to see if there are other places where similar failure could happen

Comment by Thomas Bernhardt [ 15/Apr/09 ]

Proposed fix is:

private static final int JAVA5_COMPLEX_TYPE = 13;
private static final int JAVA5_SIMPLE_TYPE = 14;
private static final int JAVA6_COMPLEX_TYPE = 15;
private static final int JAVA6_SIMPLE_TYPE = 16;

private static boolean isComplexTypeCategory(short typeCategory)

{ return (typeCategory == XSTypeDefinition.COMPLEX_TYPE) || (typeCategory == JAVA5_COMPLEX_TYPE) || (typeCategory == JAVA6_COMPLEX_TYPE); }

private static boolean isSimpleTypeCategory(short typeCategory)

{ return (typeCategory == XSTypeDefinition.SIMPLE_TYPE) || (typeCategory == JAVA5_SIMPLE_TYPE) || (typeCategory == JAVA6_SIMPLE_TYPE); }
Comment by Thomas Bernhardt [ 15/Apr/09 ]

in release 3.1





[ESPER-347] NullPointer with time_batch and START_EAGER with named window Created: 01/Apr/09  Updated: 16/May/09  Resolved: 14/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Here you go:

java.lang.NullPointerException
at
com.espertech.esper.view.window.TimeBatchViewRStream.scheduleCallback(TimeBatchViewRStream.java:265)
at
com.espertech.esper.view.window.TimeBatchViewRStream.<init>(TimeBatchViewRStream.java:85)
at
com.espertech.esper.view.window.TimeBatchViewFactory.makeView(TimeBatchViewFactory.java:119)
at
com.espertech.esper.view.ViewServiceHelper.instantiateChain(ViewServiceHelper.java:104)
at
com.espertech.esper.view.ViewServiceImpl.createViews(ViewServiceImpl.java:222)
at
com.espertech.esper.core.EPStatementStartMethod.startCreateWindow(EPStatementStartMethod.java:334)
at
com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:104)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:497)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:463)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:134)
at
com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:110)
at
com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at
com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)
at
org.rifidi.edge.epcglobal.aleread.RifidiECSpec.start(RifidiECSpec.java:278)






[ESPER-346] NullPointerException in on-select with aggregation and empty window Created: 01/Apr/09  Updated: 16/May/09  Resolved: 14/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Doing the following causes a NullPointer exception if the window I am
selecting from is empty (and only then). Once again I am not sure if I
am doing something wrong or if it is a bug:

on pattern[timer:interval(2000 msec)]
select count(eve),eve from mywin as eve

Stacktrace:
java.lang.NullPointerException
at com.espertech.esper.epl.core.SelectExprEvalProcessor
$3.evaluate(SelectExprEvalProcessor.java:259)
at
com.espertech.esper.epl.core.SelectExprEvalProcessor.process(SelectExprEvalProcessor.java:378)
at
com.espertech.esper.epl.core.SelectExprResultProcessor.process(SelectExprResultProcessor.java:60)
at
com.espertech.esper.epl.core.ResultSetProcessorRowForAll.getSelectListEvents(ResultSetProcessorRowForAll.java:155)
at
com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processJoinResult(ResultSetProcessorRowForAll.java:102)
at
com.espertech.esper.epl.named.NamedWindowOnSelectView.handleMatching(NamedWindowOnSelectView.java:92)
at
com.espertech.esper.epl.named.NamedWindowOnExprBaseView.update(NamedWindowOnExprBaseView.java:85)
at
com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:70)
at com.espertech.esper.core.EPStatementStartMethod
$1.matchFound(EPStatementStartMethod.java:155)
at
com.espertech.esper.pattern.EvalRootStateNode.evaluateTrue(EvalRootStateNode.java:101)
at
com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:49)
at
com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:50)
at
com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:801)
at
com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:531)
at
com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:408)
at
com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:375)
at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:287)
at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:151)
at
com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:125)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors
$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask
$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Thomas Bernhardt [ 14/Apr/09 ]

Failed to reproduce.





[ESPER-345] NPE is thrown when evaluating statement with 'OR' in its having-clause. Created: 31/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Alexander Friese Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File esper-stack.txt    
Number of attachments : 1

 Description   

It seems that there is a null-check missing in the evaluate method in ExprOrNode.

This causes the statement to throw a NPE (see attached file for details) as soon as no more events arrive:
"select objectType, count as objectCount, avg(speed) as avgSpeed from CarDataEvent.win:time_batch(5 sec) group by objectType having avg(speed) < 83 or avg(speed) > 132 "

If I use AND instead of OR, there is no NPE thrown. The ExprAndNode class has such a null check in its evaluate method.



 Comments   
Comment by Thomas Bernhardt [ 13/Apr/09 ]

Assigned to 3.1

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in release 3.1





[ESPER-344] Pattern cleanup incomplete causing memory leaks Created: 31/Mar/09  Updated: 16/May/09  Resolved: 17/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Esper344.java    
Number of attachments : 1

 Description   

user reports...

I think I have found and corrected two sorts of serious memory leaks
affecting pattern subexpression termination. Using periodic memory dumps I
can see that the heap gets overwhelmed by instances of TimerWithinGuard,
EvalGuardStateNode and a few other Java objects. I have a pattern detection
in place along these lines: every A -> B where timer:within(TIME). The B
instances are very rare while the A instances are quite common so many
concurrent subexpressions are active. The timer purge cannot remove the
active subexpressions and they stay in the heap forever.

I believe there are two problems in the 3.0.0 release. The first is related
to "final private Guard guard;" in EvalGuardStateNode and "final private
Quitable quitable;" in TimerWithinGuard. When the timer expires,
scheduledTrigger(ExtensionServicesContext) is run on TimerWithinGuard which
does not (and cannot, due to "final") set quittable to null. Neither the
method guardQuit() in EvalGuardStateNode set the "guard" field to null. This
results in parent and child nodes holding circular references to each other
as they are never collected by GC. The fix involves removing "final" in both
classes and adding

guard = null;

to the end of guardQuit() in EvalGuardStateNode, and of

quitable = null;

to the end of scheduledTrigger(ExtensionServicesContext) in
TimerWithinGuard.

The second problem is that when a timer expires, the parent of
EvalGuardStateNode, which happens to be EvalFollowedByStateNode, still gets
to keep the reference to the child EvalGuardStateNode in the "nodes" field.
This is fixed by adding

this.getParentEvaluator().evaluateFalse(this);

to the end of guardQuit() in EvalGuardStateNode.

I have also added

for( int i=0; i<handles.getArray().length; i++ )
handles.getArray()[i] = null;

in the "finally" block of processSchedule() of EPRuntimeImpl before the lock
is released.

With these corrections, my tests run fine and the memory leaks are gone.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/09 ]

Needs to be confirmed

Comment by Alexandre Vasseur [ 07/Apr/09 ]

test case
run with -Xms128m -Xmx128m

On hotspot, use visualvm to check heap and do heap dumps
Fails after less than 5min

Comment by Alexandre Vasseur [ 07/Apr/09 ]

confirmed

I believe only what is described as "the second problem" is required to be fixed.
Circular ref can be handled by GC
EPRuntimeImpl thread local handles is by designed not explicitly cleaned up but only overriden

Comment by Thomas Bernhardt [ 17/Apr/09 ]

Change to evaluateFalse is good and will be in release 3.1.
All other changes are not required.





[ESPER-343] Esper shouldn't log ExprValidationException Created: 25/Mar/09  Updated: 16/May/09  Resolved: 17/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In StatementLifecycleSvcImpl on line 798, ExprValidationException is logged. While I'm not against logging, the exception is converted into a EPStatementException and thrown so upper layers can catch/log it.






[ESPER-342] TimeSourceService is an implementation, make it an interface Created: 23/Mar/09  Updated: 16/May/09  Resolved: 14/May/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm trying to extend TimeSourceService to have it return millis in a specific time zone. This seems not possible since TimeSourceService is an implementation.






[ESPER-341] Variable used with XML no-schema event in same statement creates ambigous property exception Created: 19/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a variable is resolved by the engine in the same statement as a XML-representation event type that is not backed by a schema, the variable name is always ambiguous.

This only affects all XML event types that are no backed by a schema, since such event type allows undefined properties to exist.

The error output is
com.espertech.esper.epl.expression.ExprValidationException: The variable by name 'var_in_valve_open is ambiguous to a property of the same name
com.espertech.esper.epl.expression.ExprVariableNode.validate(ExprVariableNode.java:62)



 Comments   
Comment by Thomas Bernhardt [ 30/Mar/09 ]

Workaround is to assign a schema.

Assigned to 3.1 release

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-340] Lost of precision using BigDecimal for arithematic operation Created: 11/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Minor
Reporter: gobreak Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The "avgRate" of the following statement outputs a result of "Double" type which may cause the lost of precision as all the operants are "BigDecimal"s.

"select accountId, instrumentDisplayCode , sum(amount) as sumAmount, (sum(rate * amount)/sum(amount)) as avgRate, max(lastUpdateTime) as lastUpdateTime from TradeTxnEvent group by accountId, instrumentDisplayCode "

TradeTxnEvent .class:
public class TradeTxnEvent {

private Long tradeId;

private String accountId;

private String instrumentDisplayCode;

private BigDecimal rate;

private BigDecimal amount;

private TradeSide tradeSide;

private Date lastUpdateTime;

public String getAccountId()

{ return accountId; }

public void setAccountId(String accountId)

{ this.accountId = accountId; }

public BigDecimal getAmount()

{ return amount; }

public void setAmount(BigDecimal amount)

{ this.amount = amount; }

public String getInstrumentDisplayCode()

{ return instrumentDisplayCode; }

public void setInstrumentDisplayCode(String instrumentDisplayCode)

{ this.instrumentDisplayCode = instrumentDisplayCode; }

public Date getLastUpdateTime()

{ return lastUpdateTime; }

public void setLastUpdateTime(Date lastUpdateTime)

{ this.lastUpdateTime = lastUpdateTime; }

public BigDecimal getRate()

{ return rate; }

public void setRate(BigDecimal rate)

{ this.rate = rate; }

public Long getTradeId()

{ return tradeId; }

public void setTradeId(Long tradeId)

{ this.tradeId = tradeId; }

public TradeSide getTradeSide()

{ return tradeSide; }

public void setTradeSide(TradeSide tradeSide)

{ this.tradeSide = tradeSide; }

public TradeTxnEvent() {
}

public TradeTxnEvent(Long tradeId, String accountId, String instrumentDisplayCode, BigDecimal rate, BigDecimal amount, TradeSide tradeSide, Date lastUpdateTime)

{ this.tradeId = tradeId; this.accountId = accountId; this.instrumentDisplayCode = instrumentDisplayCode; this.rate = rate; this.amount = amount; this.tradeSide = tradeSide; this.lastUpdateTime = lastUpdateTime; }

}



 Comments   
Comment by Thomas Bernhardt [ 30/Mar/09 ]

Assigned to 3.1 release

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in release 3.1





[ESPER-339] Parse error when using "every" in combination with repeat Created: 10/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The simple pattern

every [5] Random

doesn't work: Incorrect syntax near '[' at line 1 column 6, please check the pattern expression [every [5] Random].



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/09 ]

Workaround is
every ([5] Random)

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-338] .NET Nesper: client/IntializerTransform.xlst missing from Nesper 2.1 zip file, Nesper.csproj will not build as a result. Created: 09/Mar/09  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 2.1
Fix Version/s: 3.1

Type: Improvement Priority: Major
Reporter: George M Coles Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows?


Attachments: File InitializerTransform.xslt    
Number of attachments : 1

 Description   

I try to build the project and get the following error

Error 91 Unable to copy file "client\InitializerTransform.xslt" to "obj\Release\com.espertech.esper.client.InitializerTransform.xslt". Could not find file 'client\InitializerTransform.xslt'.



 Comments   
Comment by Charles Openshaw [ 30/Jul/09 ]

I've attached the a copy of the file for those wanting to build the project.

You need to save it to the following directory:

\NEsper-2.1\src\NEsper\client

Comment by Thomas Bernhardt [ 17/Sep/09 ]

NEsper release 3.0 and 3.1 fix this issue.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-337] .NET Nesper Binary distribution of com.espertech.esper.client.Configuration does not expose AddPlugInView publicly, source distribution does. Created: 09/Mar/09  Updated: 05/Aug/10  Resolved: 05/Aug/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 5.0
Fix Version/s: 3.4

Type: Improvement Priority: Minor
Reporter: George M Coles Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all


Number of attachments : 0

 Description   

I wrote a custom view and realize that I cannot configure it using the Config api. I am using the 2.1 binary distribution of Nesper which seems to be out of sync with the src of 2.1 version of Nesper. It would be convenient for me to be able to use the binary, and not have to build this from source.






[ESPER-336] pluginloader stop not properly called - issue with EPserviceProviderManager.getProvider("existing") Created: 09/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File A20090304.java    
Number of attachments : 1

 Description   

Pluginloader.stop relies on configSnapshot.

Assume the stop sequence is:
epService = EPServiceProviderManager.getProvider(someKnownUri)
epService.destroy()
// will call pluginloader.stop based on its configsnapshot

Problem is that the getProvider(someKnownUri) does as follow:
delegate to getProvider(someKnownUri, config = new Configuration())
if known runtime
if runtime.destroy, rebuild it from the given config
else set its config to config // the config of the someKnowUri is thus entirely reset
return provider
// pluginloader is thus empty
provider.destroy()

The question comes down to if someone should rely on EPServiceProviderManager.getProvider(someKnownUri) to grab back an existing already configured engine.
If this is designed this way, this is not correctly implemented. Each call with reinit the config for the next initialize() call

// EPServiceProviderManager call

public static EPServiceProvider getProvider(String providerURI, Configuration configuration) throws ConfigurationException
{
if (runtimes.containsKey(providerURI))
{
EPServiceProviderImpl provider = runtimes.get(providerURI);
if (provider.isDestroyed())

{ provider = new EPServiceProviderImpl(configuration, providerURI); runtimes.put(providerURI, provider); }

else

{ provider.setConfiguration(configuration); //////***** Why that? }

return provider;
}
......



 Comments   
Comment by Alexandre Vasseur [ 12/Mar/09 ]

test case

Comment by Alexandre Vasseur [ 12/Mar/09 ]

must change EPServiceProviderImpl.destroy
use engine.getServices().getConfigSnapshot().getPluginLoaders()
instead of configSnapshot.getPluginLoaders()
to get the pluginloaders to be destroyed

Comment by Thomas Bernhardt [ 15/Apr/09 ]

The problem and suggested fix is correct.
The test case is not:

ep = EPServiceProviderManager.getProvider(EPServiceProviderSPI.DEFAULT_ENGINE_URI__QUALIFIER);
...should be...
EPServiceProvider ep = EPServiceProviderManager.getProvider(null);

The EPServiceProviderSPI.DEFAULT_ENGINE_URI__QUALIFIER value is for use in EPL, such as
"select default.astream.aproperty from AEvent as astream"
i.e. as EPL allows prefixing properties by engine name and stream name (above example assumes default provider = null URI)

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-335] pluginloader stop called after engine runtime destroy Created: 09/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

PluginLoader.stop() are called after engine runtime.destroy() has been called.
For plugin who calls to the engine runtime as background tasks - this can create NPE.
I 'd suggest to stop plugins before destroying the runtime. A plugin could then ensure that its stop() is blocking up until all its background tasks are completed properly.



 Comments   
Comment by Thomas Bernhardt [ 15/Apr/09 ]

agree, in 3.1 branch

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-334] PluginLoader reentrancy on Configuration Created: 05/Mar/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When using a plugin loader, the init() method is called while the engine is beeing configured.
If the plugin loader behavior triggers creation of other engines (f.e. dealing with deployment units), the first engine to which the plugin loader instance is attached is not yet visible in the internals - which makes it hard to share configurations.

Workaround: schedule a timer in init() to perform post-configuration tasks.
We could also add a postInit() to the interface that would be called only after the engine is fully registered (that is epserviceprovider.runtimes map contains the engine instance)



 Comments   
Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-333] Pattern followed-by expression to detect when no subexpressions are alive and indicate permanently false so "every" can restart Created: 02/Mar/09  Updated: 16/May/09  Resolved: 17/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A(a=1) A(a=0) A(a=2) B1 A(a=3) A(a=0) B2 A(a=4) A(a=5) B3
I need to get

{ A2, B1}

and

{ A4, B3 }

selected.

Suppose the following pattern:
every ( A -> (B and not C) )

The followed-by expression does not automatically turn permanently false when A0 arrives, thereby "every" does not restart the expression. If a sub-expression to a followed-by expression turns permanently false then the whole followed-by expression is not necessarily permanently false, however in your case it is.

For example, consider the pattern:
(every A) -> (B and not C)
...when C arrives, the followed-by expression is not permanently false.

In this pattern:
A -> (B and not C)
...when C arrives, the followed-by expression is permanently false.

Currently a followed-by does not turn permanently false since there can be subexpressions within the followed by that may still turn true. What we can do as an improvement is to automatically detect, in a follow-by, that all subexpressions ended and thus allow the followed-by to turn permanently false, allowing the "every" to restart.

As a workaround, one could use the following pattern and simply in the listener take the first match only.
every A(a>0) -> (B and not A(a=0))



 Comments   
Comment by Thomas Bernhardt [ 17/Apr/09 ]

in release 3.1





[ESPER-332] NullPointerException in on-select with having clause for timer excution Created: 26/Feb/09  Updated: 16/May/09  Resolved: 14/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi,

I have a problem with a statement. Fist I create a named window like this:

create window MyWindow.win:keepall() as ID from EventStream

Now I want to know, which ID's are in the window:

on pattern [ every timer:interval(1 min)] select ID from MyWindow having count(ID) > 0

the problem is, that after a 1 minute after program start, esper logs permanently this nullpointerexception: [1]
(The named window is clear). If I comment out the statement above, all works fine.
Is that a bug or do I anything wrong?

Thanks for help,
Maik

[1]
09:37:22,526 ERROR [EPLTimerTask] Timer thread caught unhandled exception: null
java.lang.NullPointerException
at com.espertech.esper.epl.named.NamedWindowOnSelectView.handleMatching(NamedWindowOnSelectView.java:93)
at com.espertech.esper.epl.named.NamedWindowOnExprBaseView.update(NamedWindowOnExprBaseView.java:85)
at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:70)
at com.espertech.esper.core.EPStatementStartMethod$1.matchFound(EPStatementStartMethod.java:155)
at com.espertech.esper.pattern.EvalRootStateNode.evaluateTrue(EvalRootStateNode.java:101)
at com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryStateNode.java:189)
at com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:49)
at com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:50)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:833)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:459)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:408)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:375)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:287)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:151)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:125)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Alexandre Vasseur [ 06/Mar/09 ]

What is update listener code?
Although unrelated, common mistake in those statement is as follow:

select * from Foo output last every 10 seconds
// update listener:
for (EventBean e : newEvents)

{ // NPE as newEvents is null if no event were sent. ...}
Comment by Thomas Bernhardt [ 30/Mar/09 ]

Assigned to 3.1 release





[ESPER-331] Runtime exception barrier for listener and subscriber Created: 20/Feb/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The listener and subscriber dispatches need an exception barrier that continues the dispatch and logs errors



 Comments   
Comment by Thomas Bernhardt [ 30/Mar/09 ]

Assigned to 3.1 release

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in rel 3.1





[ESPER-330] Esper 3.0's pom-file could not be found in repo1.maven.org Created: 20/Feb/09  Updated: 16/May/09  Resolved: 21/Feb/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: Bug Priority: Minor
Reporter: Robert Radkiewicz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Maven


Number of attachments : 0

 Description   

In http://repo1.maven.org/maven2/com/espertech/esper/3.0.0/ there is no file named "esper-3.0.0.pom", but a file "pom.xml". Maven can't find this file. So Esper itself is loaded, but the dependencies are not.



 Comments   
Comment by Alexandre Vasseur [ 21/Feb/09 ]

We had an issue in our main repo that is now fixed.
You may need to wait mirror repo to be updated though

Comment by Alexandre Vasseur [ 21/Feb/09 ]

if you want to use our repo: http://repository.codehaus.org/com/espertech/esper/
Refer to maven doc on how to configure alternative repo.





[ESPER-329] .NET Nesper : Use a standard version of log4net Created: 18/Feb/09  Updated: 03/Sep/09  Resolved: 24/Aug/09

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 2.1
Fix Version/s: 3.0

Type: Improvement Priority: Major
Reporter: elro Assignee: Aaron Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It seems that NEsper is using a "custom" version of log4net library.

The log4net assembly from the NEsper distribution has the following properties:

  • name: log4net
  • version: 1.2.10
  • public key: a48193f4f98f3dcd

The standard log4ent has the following properties:

  • name: log4net
  • version: 1.2.10
    -public key: 1b44e1d426115821

In a project, if a third parties bind the standard log4net assembly, the NEsper can't bind the custom version.

Thx



 Comments   
Comment by Aaron Jackson [ 24/Aug/09 ]

NEsper 3 was released with a release version of the log4net binaries as shipped by the apache log4net team.





[ESPER-328] Aggregation function nested created NPE in Timer thread Created: 17/Feb/09  Updated: 16/May/09  Resolved: 15/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Minor
Reporter: Aaron Whiteside Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File L20090219.java    
Number of attachments : 1

 Description   

Simple single thread feeding events in...

Single query

select event\.failure\.exception as exception, avg(count) as average from MapMessage(type='FAILED').win:time(3600 seconds) group by event\.failure\.exception output every 10 seconds

After the first 2-3 events are feed into the system, it goes into a tight loop printing this error over and over...

17/02/2009 18:28:28 ERROR run(EPLTimerTask.java:65) EPLTimerTask - Timer thread caught unhandled exception: null
java.lang.NullPointerException
at com.espertech.esper.epl.agg.AggregationServiceGroupByImpl.getValue(AggregationServiceGroupByImpl.java:103)
at com.espertech.esper.epl.expression.ExprAggregateNode.evaluate(ExprAggregateNode.java:135)
at com.espertech.esper.epl.agg.AggregationServiceGroupByImpl.applyEnter(AggregationServiceGroupByImpl.java:66)
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.processOutputLimitedView(ResultSetProcessorRowPerGroup.java:864)
at com.espertech.esper.epl.view.OutputProcessViewPolicy.continueOutputProcessingView(OutputProcessViewPolicy.java:160)
at com.espertech.esper.epl.view.OutputProcessViewPolicy$1.continueOutputProcessing(OutputProcessViewPolicy.java:231)
at com.espertech.esper.epl.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:163)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:833)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:459)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:408)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:375)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:287)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:151)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:125)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
17/02/2009 18:28:28 ERROR run(EPLTimerTask.java:65) EPLTimerTask - Timer thread caught unhandled exception: null
java.lang.NullPointerException
at com.espertech.esper.epl.agg.AggregationServiceGroupByImpl.getValue(AggregationServiceGroupByImpl.java:103)
at com.espertech.esper.epl.expression.ExprAggregateNode.evaluate(ExprAggregateNode.java:135)
at com.espertech.esper.epl.agg.AggregationServiceGroupByImpl.applyEnter(AggregationServiceGroupByImpl.java:66)
at com.espertech.esper.epl.core.ResultSetProcessorRowPerGroup.processOutputLimitedView(ResultSetProcessorRowPerGroup.java:864)
at com.espertech.esper.epl.view.OutputProcessViewPolicy.continueOutputProcessingView(OutputProcessViewPolicy.java:160)
at com.espertech.esper.epl.view.OutputProcessViewPolicy$1.continueOutputProcessing(OutputProcessViewPolicy.java:231)
at com.espertech.esper.epl.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:163)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleSingle(EPRuntimeImpl.java:833)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:459)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:408)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:375)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:287)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:151)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:125)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Aaron Whiteside [ 17/Feb/09 ]

seems the NPE is caused by the avg(count( * )) if I remove avg() I no longer receive the NPE

Its either invalid syntax or a bug... either way probably shouldn't be getting the NPE.

Comment by Alexandre Vasseur [ 19/Feb/09 ]

select avg(count(*)) from ....
is a parsable statement although not sure we support nested aggregations

the bug comes from the group by

Comment by Aaron Whiteside [ 19/Feb/09 ]

and the solution?

Comment by Alexandre Vasseur [ 19/Feb/09 ]

seems there is no workaround
requires a patch

Comment by Alexandre Vasseur [ 19/Feb/09 ]

test case

Comment by Thomas Bernhardt [ 19/Feb/09 ]

Nested aggregation functions are supported, big fix required

Comment by Thomas Bernhardt [ 15/Apr/09 ]

in release 3.1





[ESPER-327] Nullpointer when parsing statement Created: 16/Feb/09  Updated: 01/Apr/09  Resolved: 01/Apr/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.1

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Statement: select avg(feedTurbidity.value) as avgFeedTurbidity from FeedTurbidity.win:time(3 hours) as feedTurbidity where avgFeedTurbidity > 0.02

java.lang.NullPointerException
at com.espertech.esper.epl.expression.ExprRelationalOpNode.validate(ExprRelationalOpNode.java:67) [esper-3.0.0.jar:na]
at com.espertech.esper.epl.expression.ExprNode.getValidatedSubtree(ExprNode.java:93) [esper-3.0.0.jar:na]
at com.espertech.esper.filter.FilterSpecCompiler.validateDisallowSubquery(FilterSpecCompiler.java:195) [esper-3.0.0.jar:na]
at com.espertech.esper.filter.FilterSpecCompiler.validateAndDecompose(FilterSpecCompiler.java:210) [esper-3.0.0.jar:na]
at com.espertech.esper.filter.FilterSpecCompiler.makeFilterSpec(FilterSpecCompiler.java:88) [esper-3.0.0.jar:na]
at com.espertech.esper.epl.spec.PatternStreamSpecRaw.handleFilterNode(PatternStreamSpecRaw.java:281) [esper-3.0.0.jar:na]
at com.espertech.esper.epl.spec.PatternStreamSpecRaw.compile(PatternStreamSpecRaw.java:105) [esper-3.0.0.jar:na]
at com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:792) [esper-3.0.0.jar:na]
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:158) [esper-3.0.0.jar:na]
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:133) [esper-3.0.0.jar:na]
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:110) [esper-3.0.0.jar:na]
at com.espertech.esper.core.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:130) [esper-3.0.0.jar:na]
at com.espertech.esper.core.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:104) [esper-3.0.0.jar:na]
at com.processtrend.service.RuleServiceImpl.createRuleStatements(RuleServiceImpl.java:82) [RuleServiceImpl.class:na]
at com.processtrend.service.RuleServiceImpl$$EnhancerByGuice$$d962a891.CGLIB$createRuleStatements$0(<generated>) [guice-2.0.jar:na]
at com.processtrend.service.RuleServiceImpl$$EnhancerByGuice$$d962a891$$FastClassByGuice$$2f5a4115.invoke(<generated>) [guice-2.0.jar:na]
at com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [guice-2.0.jar:na]



 Comments   
Comment by Mathias Bogaert [ 16/Feb/09 ]

Doh. That statement above is wrong. The nullpointer belongs to the following statement:

every event=GsmSignalQuality(value < 5)

Comment by Alexandre Vasseur [ 19/Feb/09 ]

cannot reproduce
what is the type of GsmSignalQuality.value ?
care to provide a test case ?





[ESPER-326] Prepared On-Demand Query on named window returns incorrect count(*) Created: 11/Feb/09  Updated: 11/Feb/09  Resolved: 11/Feb/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Bug Priority: Major
Reporter: pccwhk Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Statement are as follows:

// create and define named window
create window OrderWindow.win:keepall() as select this as orderEvent from OrderEvent

// populate the event into named window
insert into OrderWindow select this as orderEvent from OrderEvent

Code using the On Demand Query:
EPOnDemandPreparedQuery prepared = epService.getEPRuntime().prepareQuery("select count as orderCount from OrderWindow");
EventBean[] result = prepared.execute().getArray();
if (result != null) {
Long count = (Long) result[0].get("orderCount");
return count;
}

I created an order window to store all the orders received. Then I created an on-demand query to query the number of OrderEvent in the named window.

The result is not correct.

For example, when there is 2 order events. First call will return 2 correctly.

However, when I call it again, it will become 4. The third time to call will return 6 and so on.

The count will be keep increasing with the number of call ...



 Comments   
Comment by pccwhk [ 11/Feb/09 ]

More Information:

If I use On-Demand Query instead of the the prepared on Demand Query, I can get the correct number of count, no matter how many times I call the query.

EventBean[] result = epService.getEPRuntime().executeQuery("select count as orderCount from OrderWindow").getArray();
if (result != null)

{ Long count = (Long) result[0].get("orderCount"); return count; }
Comment by Thomas Bernhardt [ 11/Feb/09 ]

in release 3.0





[ESPER-325] Add EPStatement createPattern(String pattern, java.lang.Object userObject) Created: 10/Feb/09  Updated: 11/Feb/09  Resolved: 10/Feb/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Wish Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Would be nice not to need to specify a name for the statement, just the pattern and userObject.






[ESPER-324] EPServiceStateListener exposes EPServiceProviderImpl Created: 09/Feb/09  Updated: 11/Feb/09  Resolved: 09/Feb/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EPServiceProviderImpl is exposed in the interface EPServiceStateListener.






[ESPER-323] Timer thread caught unhandled exception: null Created: 31/Jan/09  Updated: 11/Feb/09  Resolved: 09/Feb/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Bug Priority: Major
Reporter: ARajeshBabu Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 3 days
Time Spent: Not Specified
Original Estimate: 3 days
Environment:

Ubuntu and JDK 1.5.0


Attachments: Text File Error.log    
Number of attachments : 1

 Description   

009-01-25 23:42:02,104 - ERROR - EPLTimerTask.java::65 - Timer thread caught unhandled exception: null
java.lang.NullPointerException
at com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollowedByStateNode.java:88)
at com.espertech.esper.pattern.EvalOrStateNode.evaluateTrue(EvalOrStateNode.java:89)
at com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:49)
at com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:50)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:691)
at (EPRuntimeImpl.java:445)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:335)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:302)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:214)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:117)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:100)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:675)



 Comments   
Comment by ARajeshBabu [ 31/Jan/09 ]

at 'if (index == (numChildNodes - 1))' of EvalFollowedByStateNode.evaluateTrue
as index turned out to be null value

Comment by Thomas Bernhardt [ 31/Jan/09 ]

Can you please provide the EPL statement and, if possible, a test case?

Comment by Alexandre Vasseur [ 31/Jan/09 ]

Are you using the entire service pack atop 2.3?

Comment by ARajeshBabu [ 01/Feb/09 ]

RP_UNQ --INSERT INTO RP_UNQ SELECT * FROM Event.win:time(30sec).std:firstunique(source_ip,source_name,eventCategory,eventGroupName,severity)

RP_UNQ_TM --INSERT INTO RP_UNQ_TM SELECT * FROM Event.win:time(30 sec).std:firstunique
(source_ip,source_name,eventCategory,eventGroupName,severity,sysUpTime)

EPL -Statement --SELECT * FROM pattern[ every ( ld = RP_UNQ_TM(eventCategory ='Fault',eventGroupName='LinkStatus',severity='Critical') )
-> (timer:interval (10 sec ) or ( eve1 = RP_UNQ_TM ( source_ip = ld.source_ip , source_name in [ ld.source_name , 'Node'], eventCategory = ld.eventCategory, eventGroupName in ['ServerStartup' , 'LinkStatus'] ,severity in ['Minor' , 'Clear'] )))
-> (timer:interval(10 sec ) or ( eve2 = RP_UNQ_TM ( source_ip = ld.source_ip , source_name in [ ld.source_name , 'Node'], eventCategory = ld.eventCategory, eventGroupName in ['ServerStartup' , 'LinkStatus'] ,severity in ['Minor' , 'Clear'] ) )) ]

Comment by ARajeshBabu [ 01/Feb/09 ]

Alexandre:- No I haven't used any service pack on top of 2.3, can u tell me the usage

Comment by Thomas Bernhardt [ 02/Feb/09 ]

Can you please let us know the sequence of events that causes the problem, we have not been able to reproduce . The problem appears due to the pattern statement followed-by operator however there is no sequence of events known to produce the problem.

Below is a reference method that can be used for testing, the statement was slightly simplified.

public void testJIRA323()

{ Configuration config = new Configuration(); config.getEngineDefaults().getThreading().setInternalTimerEnabled(false); EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config); epService.initialize(); epService.getEPAdministrator().getConfiguration().addEventType("SupportBean", SupportBean.class); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(0)); sendTimer(1000,epService); String stmt = "SELECT * FROM pattern[ every ( ld = SupportBean(string='S'))\n" + " -> (timer:interval(10 sec) or (eve1 = SupportBean(string='E1'))\n" + " -> (timer:interval(10 sec) or (eve2 = SupportBean(string='E2')) )) ]"; epService.getEPAdministrator().createEPL(stmt); epService.getEPRuntime().sendEvent(new SupportBean("S", 1)); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(5000)); epService.getEPRuntime().sendEvent(new SupportBean("E1", 2)); epService.getEPRuntime().sendEvent(new SupportBean("E2", 2)); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(11000)); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(15000)); }
Comment by ARajeshBabu [ 02/Feb/09 ]

even i tested with same kind of setup , with that it works pretty fine.

At this point of time i will not be able to provide u with a test scenario as different threads will send events to the Engine

Comment by ARajeshBabu [ 02/Feb/09 ]

pls find the attached log

Comment by Thomas Bernhardt [ 02/Feb/09 ]

Great, thanks for the log, that really helped.
We have release 3 upcoming and will include the bug fix in that release.





[ESPER-322] Support for UDF chained invocation and nested/indexed/mapped property syntax Created: 15/Jan/09  Updated: 01/Oct/10  Resolved: 01/Oct/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.0 - requires JDK6

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Example:

public class Address {
int length;
int offset;
public int getLength();
public int getOffset();
public static makeAddress(int length, int offset){
return new Address(length, offset);
}

Now I can phrase a query like:

"Select event.getBits(Address.makeAddress(10,15)) from MyEvent as event"

which is what I wanted. Now what would be nice is if I could do something like this:

Select event.getBits(Address.makeAddress(10,15)).someOtherBeanProperty from MyEvent as event



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/09 ]

(user reports) I would like to achieve is something like this:

select * from MyEvent where (MyClass.MyFunction("MyVariable")[1] > 3.0)

Comment by Thomas Bernhardt [ 31/Mar/09 ]

Assigned to release 4 for priorization

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Released with version 4.0





[ESPER-321] stat:linest has more derived properties than what documented Created: 13/Jan/09  Updated: 11/Feb/09  Resolved: 29/Jan/09

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

stat:linest(...) gives me an output event as follow when I dump it using the event type reflection API

and this is not what is documented.
Should those be hidden or documented?

underlying = datapoints=2 sumX=210.0 sumXSq=22050.0 sumY=208.33333333333331 sumYSq=21702.777777777777 sumXY=21875.0
XAverage = 105.0 ,type java.lang.Double
XStandardDeviationPop = 0.0 ,type java.lang.Double
XStandardDeviationSample = 0.0 ,type java.lang.Double
XSum = 210.0 ,type java.lang.Double
XVariance = 0.0 ,type java.lang.Double
YAverage = 104.16666666666666 ,type java.lang.Double
YIntercept = NaN ,type java.lang.Double
YStandardDeviationPop = 0.8333333333349098 ,type java.lang.Double
YStandardDeviationSample = 1.1785113019798086 ,type java.lang.Double
YSum = 208.33333333333331 ,type java.lang.Double
YVariance = 1.3888888888941437 ,type java.lang.Double
n = 2 ,type java.lang.Long
slope = NaN ,type java.lang.Double
sumXSq = 22050.0 ,type java.lang.Double
sumXY = 21875.0 ,type java.lang.Double
sumYSq = 21702.777777777777 ,type java.lang.Double






[ESPER-320] Pass explicit null value to user-defined function fails to start statement Created: 13/Jan/09  Updated: 11/Feb/09  Resolved: 13/Jan/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

is it possible to pass null value to user defined function (java) ?

select Helper.staticMethod(field, 0, null, true) from SomeStream

gives

2009-01-12 16:40:12,500 DEBUG [EventTF ] StatementLifecycleSvcImpl: (
StatementLifecycleSvcImpl.java:465) .start Error starting view

com.espertech.esper.epl.expression.ExprValidationException

at com.espertech.esper.epl.expression.ExprStaticMethodNode.validate(
ExprStaticMethodNode.java:164)

at com.espertech.esper.epl.expression.ExprNode.getValidatedSubtree(
ExprNode.java:93)

at com.espertech.esper.epl.core.ResultSetProcessorFactory.getProcessor(
ResultSetProcessorFactory.java:103)

at com.espertech.esper.core.EPStatementStartMethod.startSelect(
EPStatementStartMethod.java:673)

at com.espertech.esper.core.EPStatementStartMethod.start(
EPStatementStartMethod.java:110)

at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(
StatementLifecycleSvcImpl.java:450)

at com.espertech.esper.core.StatementLifecycleSvcImpl.start(
StatementLifecycleSvcImpl.java:416)

at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(
StatementLifecycleSvcImpl.java:134)

at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(
StatementLifecycleSvcImpl.java:110)

at com.espertech.esper.core.EPAdministratorImpl.create(
EPAdministratorImpl.java:216)

at com.espertech.esper.core.EPAdministratorImpl.create(
EPAdministratorImpl.java:221)



 Comments   
Comment by Thomas Bernhardt [ 13/Jan/09 ]

Will be in 3.0 release





[ESPER-319] Allow subselects in the filter of a pattern Created: 12/Jan/09  Updated: 18/Dec/09  Resolved: 25/Nov/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 3.3

Type: New Feature Priority: Minor
Reporter: Matthieu Labour Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It might be interesting to allow subselect in the filter of a pattern

Example:

select quote2 as quote from pattern [every (quote1=BarData(ticker='MSFT', time
stamp > 1111834800000, closePx < (select ma from SMA20Stream(ticker='MSFT').std:lastevent()))) -> (quote2=BarData(ticker='MSFT', closePx > 23))]



 Comments   
Comment by Thomas Bernhardt [ 13/Jan/09 ]

Workaround is to use a variable or put the subselect in the where-clause+insert-into.

Comment by Thomas Bernhardt [ 31/Mar/09 ]

Assigned to release 4 for prioritization

Comment by Thomas Bernhardt [ 25/Nov/09 ]

In release 3.3





[ESPER-318] Replace the term "alias" for event types with the term "name" Created: 07/Jan/09  Updated: 11/Feb/09  Resolved: 18/Jan/09

Status: Closed
Project: Esper
Component/s: Core, Documentation
Affects Version/s: None
Fix Version/s: 3.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This is a minor change to public interfaces in a few places. It is therefore assigned to Esper 3.0.

For example:
configuration.addEventTypeAlias(String eventTypeAlias, Class eventClass)
...becomes...
configuration.addEventType(String eventTypeName, Class eventClass)






[ESPER-317] current_timestamp does not behave properly when accessed from getter API Created: 05/Jan/09  Updated: 11/Feb/09  Resolved: 29/Jan/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

// works
select current_timestamp() as t0, * from SupportBean
e.get("t0"); // in update listener

// fails (also fails with current_timestamp)
select current_timestamp(), * from SupportBean
e.get("current_timestamp()");

It behave as if current_timestamp was an event property (thus handle thru lazy parsing in PropertyParser) and not the build-in function

The exception is
Caused by: com.espertech.esper.event.PropertyAccessException: Failed to parse property name 'current_timestamp()'
at com.espertech.esper.event.property.PropertyParser.parse(PropertyParser.java:71)
at com.espertech.esper.event.BeanEventType.getPropertyType(BeanEventType.java:89)
at com.espertech.esper.event.BeanEventType.isProperty(BeanEventType.java:100)
at com.espertech.esper.event.WrapperEventType.getGetter(WrapperEventType.java:106)
at com.espertech.esper.event.WrapperEventBean.get(WrapperEventBean.java:44)
at list.L20081208.update(L20081208.java:42)
at com.espertech.esper.core.StatementResultServiceImpl.execute(StatementResultServiceImpl.java:194)
at com.espertech.esper.core.UpdateDispatchViewBase.execute(UpdateDispatchViewBase.java:75)
at com.espertech.esper.core.UpdateDispatchFutureSpin.execute(UpdateDispatchFutureSpin.java:85)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServiceImpl.java:57)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.java:31)
at com.espertech.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:809)
... 21 more
Caused by: NoViableAltException(70!=[1176:1: keywordAllowedIdent : (i1= IDENT | AT | COUNT | ESCAPE | EVERY_EXPR | SUM | AVG | MAX | MIN | COALESCE | MEDIAN | STDDEV | AVEDEV | EVENTS | TIMEPERIOD_SECONDS | TIMEPERIOD_MINUTES | FIRST | LAST | UNIDIRECTIONAL | UNTIL | PATTERN | SQL | METADATASQL | PREVIOUS | PRIOR | WEEKDAY | LW | INSTANCEOF | CAST | SNAPSHOT | VARIABLE | WINDOW | LEFT | RIGHT | OUTER | FULL | JOIN -> ^( IDENT[identifier] ) );])
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.keywordAllowedIdent(EsperEPL2GrammarParser.java:23165)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.eventPropertyIdent(EsperEPL2GrammarParser.java:22694)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.eventPropertyAtomic(EsperEPL2GrammarParser.java:22392)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.eventProperty(EsperEPL2GrammarParser.java:22255)
at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.startEventPropertyRule(EsperEPL2GrammarParser.java:657)
at com.espertech.esper.event.property.PropertyParser.parse(PropertyParser.java:67)
... 32 more



 Comments   
Comment by Alexandre Vasseur [ 05/Jan/09 ]

simple test case: modify JUnit TestTimestampExpr.java

String stmtText = "select current_timestamp, current_timestamp as t0, " +
" current_timestamp() as t1, " +
" current_timestamp + 1 as t2 " +
" from " + SupportBean.class.getName();

assertEquals(Long.class, selectTestCase.getEventType().getPropertyType("current_timestamp"));

Comment by Alexandre Vasseur [ 07/Jan/09 ]

ExprTimeStampNode.toExpressionString always resolve to current_timestamp() which affects the ResultSetProcessorFactory

test only fails with
select current_timestamp ...
e.get("current_timestamp")

but works when "current_timestamp()" is used.

Comment by Alexandre Vasseur [ 07/Jan/09 ]

I would suggest to deprecate use of
select current_timestamp from Foo

given that current_timestamp() is a built in function.

The recommended way should be

select current_timestamp() from Foo
// e.eget('current_timestamp()")

and

select current_timestamp() as t0 from Foo
// e.eget('t0")

rather than tracking all the way down if () was used or not.

Comment by Thomas Bernhardt [ 29/Jan/09 ]

Fixed; Property accessors were corrected as part of event type changes in 3.0
No need to deprecate, I think its more convenient to be able to treat this as an implicit property as well as a function.





[ESPER-316] XML DOM-backed events transpose properties that are DOM-subtrees to a new stream Created: 17/Dec/08  Updated: 11/Feb/09  Resolved: 31/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
relates to ESPER-314 Esper XML represented events - need c... Closed
Number of attachments : 0

 Description   

I was wondering how to allowed EPL to access attributes on an XML message
that had been inserted into a stream. The specific example I have is:

1. An event alias is defined using the XML schema using
addEventTypeAlias('stream1', ConfigurationEventTypeXMLDOM schema1)
for this example, the schema describes a number of items, including a
'person' who has a number of attributes, for example, 'name'

2. EPL statement inserts a portion of the events from the schema defined
stream into a new stream
insert into stream2 select person from stream1

3. An additional EPL statement queries attributes from objects in stream2
select name from stream2



 Comments   
Comment by Thomas Bernhardt [ 17/Dec/08 ]

for XML DOM-backed events we do not have support in Esper 2.3 for transposing properties that represent DOM-subtrees to a new stream for schema-aware querying

Comment by Alexandre Vasseur [ 17/Dec/08 ]

relates to ESPER-314 when doing
insert into S select book[1] from Books
select id from S // not supported as S is of type map

{"book[1]" --> Node}

and Node does not get transposed





[ESPER-315] Publish Esper sources Created: 17/Dec/08  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Improvement Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

http://blogs.reucon.com/srt/2007/02/28/attach_sources_to_your_maven_artifacts.html

<build>
<plugins>
...
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
...
</build>



 Comments   
Comment by Thomas Bernhardt [ 02/Jan/09 ]

We will continue to publish source separate from the jar.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-314] Esper XML represented events - need clarification Created: 16/Dec/08  Updated: 11/Feb/09  Resolved: 31/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 2.3, 3.0

Type: Task Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ESPER-314-esper-2.3.patch    
Issue Links:
Related
is related to ESPER-316 XML DOM-backed events transpose prope... Closed
Number of attachments : 1

 Description   

Dealing with XML represented events needs more doc.

Note 1
Beehavior is slightly different when using XML schema or not.

  • If no XML Schema is provided there is a lazy auto lookup XPath resolution of selected event properties as String type. Indexed event properties is supported (althouh a bug exist - see next section)
  • If XML Schema is used the lazy auto lookup becomes typesafe from the XSD defined type (Double, element with unbounded maps to indexed event properties etc)

bug 1
When no schema is used and an XML <books>/<book> model is used for element unbounded sequence,
the implicit indexed property book[0].id seems to resolve to Xpath books/book[position()=0]/id while it should be position() = 1 in SimpleXMLPropertyParser.makeProperty

bug 2
In both cases, a select * and a eventType.getPropertyNames() call from the listener does not returns the implicit property names.
This likely requires documentation as it might be counter intuitive if one does discovery of event property in the listener code.
There is another bug when using schema with an NPE due to SchemaXMLEventType overriding doListPropertyNames to return null instead of an empty array.

Note 2
When piping with
insert into B select * ...
insert into B select a.*
the derived B type is to be more clearly documented.



 Comments   
Comment by Alexandre Vasseur [ 16/Dec/08 ]

Some improvement
xmlConfig.addXpathProperty( "books", "/bookstore/book", XPathConstants.NODESET);
is supported but one cannot write the equivalent XML based configuration

Should we support NODESET binding at all anyway?

Comment by Alexandre Vasseur [ 16/Dec/08 ]

updated report

Comment by Alexandre Vasseur [ 16/Dec/08 ]

Details on bug 1

ConfigurationEventTypeXMLDOM d = new ConfigurationEventTypeXMLDOM();
// NO CALL // d.setSchemaResource("id.xsd");
d.setRootElementName("books");
ep.getEPAdministrator().getConfiguration().addEventTypeAlias("Books",d);

select book[0].id from Books
// fails (returns empty String)

schema is

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="books">
<xs:complexType>
<xs:sequence>
<xs:element name="book" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:int"/>
</xs:sequence>
<xs:attribute name="sku" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

One single event is

<books>
<book sku="ABC">
<id>123</id>
</book>
<book sku="DEF">
<id>456</id>
</book>
</books>

Comment by Alexandre Vasseur [ 16/Dec/08 ]

Details on bug 2

(same schema and event xml)

ConfigurationEventTypeXMLDOM d = new ConfigurationEventTypeXMLDOM();
d.setSchemaResource("id.xsd"); // WITH SCHEMA
d.setRootElementName("books");
ep.getEPAdministrator().getConfiguration().addEventTypeAlias("Books",d);

in listener code this will throw an NPE

newEvents[0].getEventType().getPropertyNames()

Comment by Thomas Bernhardt [ 19/Dec/08 ]

I think we should go a step further in the next release and accomodate the EventPropertyGetter as we do for nestable maps and for Class.
The reasons

  • faster then XPath
  • can be made typesafe via additional config, or via schema, or via interpretation of a sample document
  • allows fragments (version 3 fragments allow full transpose of properties and array properties)
Comment by Alexandre Vasseur [ 05/Jan/09 ]

Patch for Esper 2.3 for bug1 (faulty xpath indexed when implicit xpath to EPL on indexed properties is used) and bug 2 (NPE on using event type API)
Please consider for the next Esper 2.3 service pack
Please ensure it gets propagated to Esper 3.0 refactoring

Comment by Alexandre Vasseur [ 05/Jan/09 ]

Here is a changelog of the provided patch

  • ExprIdentNode swallows exception message (cosmetic)
  • SchemaXMLEventType propertyNames NPE
    Implicit XPath properties are unknow hence property names should return empty string array as BaseXMLEventType
  • SimpleXMLPropertyParser does not handles indexed xpath properties properly
    xpath index starts at 1 while EPL index starts at 0
Comment by Alexandre Vasseur [ 05/Jan/09 ]

changed fix version to 2.3 since patch is provided





[ESPER-313] using last | snapshot in output...when statement causes parsing error Created: 11/Dec/08  Updated: 11/Feb/09  Resolved: 15/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Alex Lapins Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 1.6.0_10, running in JBoss 2.3 on Windows XP


Attachments: Text File ESPER-313.patch    
Number of attachments : 1

 Description   

The following statement:
SELECT *
FROM BlPosition as b,
BlFnSa as f,
LongShortTotal as tot
where tot.pk = 1 and f.fnSa = b.fnsacode
GROUP BY symbol, stcode, basketid, brcode
output last when SendToClient = true

where the streams are named windows produces an error. When you remove "last" from the ouput clause, it works fine (although, obviously not in the way I need it to). Same behavior occurs when I try to use "snapshot". It looks like if you manually specify the output type rather than using the default, it assumes that what is coming next is a time interval, not a when + expression.

Here's the full error:
2008-12-11 11:12:04,110 INFO [com.espertech.esper.epl.parse.ParseHelper] Error walking statement [SELECT * FROM BlPosition as b, BlFnSa as f, LongShortTotal as tot where tot.pk = 1 and f.fnSa = b.fnsacode GROUP BY symbol, stcode, basketid, brcode output last when SendToClient = true]
java.lang.IllegalStateException: Expected identifier but received type '134'
at com.espertech.esper.epl.parse.EPLTreeWalker.getOnTriggerSetAssignments(EPLTreeWalker.java:565)
at com.espertech.esper.epl.parse.ASTOutputLimitHelper.buildOutputLimitSpec(ASTOutputLimitHelper.java:79)
at com.espertech.esper.epl.parse.EPLTreeWalker.leaveOutputLimit(EPLTreeWalker.java:1329)
at com.espertech.esper.epl.parse.EPLTreeWalker.leaveNode(EPLTreeWalker.java:252)
at com.espertech.esper.epl.generated.EsperEPL2Ast.outputLimitExpr(EsperEPL2Ast.java:3586)
at com.espertech.esper.epl.generated.EsperEPL2Ast.selectExpr(EsperEPL2Ast.java:1590)
at com.espertech.esper.epl.generated.EsperEPL2Ast.eplExpressionRule(EsperEPL2Ast.java:406)
at com.espertech.esper.epl.generated.EsperEPL2Ast.startEPLExpressionRule(EsperEPL2Ast.java:339)
at com.espertech.esper.core.EPAdministratorImpl$4.invokeWalkRule(EPAdministratorImpl.java:67)
at com.espertech.esper.epl.parse.ParseHelper.walk(ParseHelper.java:47)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:296)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:226)
at com.gweiss.weissview.aggregation.server.DbNamedWindowManager.createJoinWindow(DbNamedWindowManager.java:141)
at com.gweiss.weissview.aggregation.server.DetailStoredProc.Execute(DetailStoredProc.java:162)
at com.gweiss.weissview.aggregation.server.RecapStoredProc.Execute(RecapStoredProc.java:54)
at com.gweiss.weissview.aggregation.server.BLEngineSubscriptionService.startSubscription(BLEngineSubscriptionService.java:197)
at com.gweiss.weissview.aggregation.server.BLEngineSubscriptionService.startQuery(BLEngineSubscriptionService.java:384)
at com.gweiss.weissview.aggregation.server.flex.AggregationRTMPAdapter.processMessage(AggregationRTMPAdapter.java:103)
at com.gweiss.weissview.aggregation.server.flex.AggregationRTMPAdapter.invoke(AggregationRTMPAdapter.java:75)
at flex.messaging.services.MessageService.serviceMessage(MessageService.java:262)
at flex.messaging.services.MessageService.serviceMessage(MessageService.java:204)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882)
at flex.messaging.endpoints.RTMPConnection.handleTCCommand(RTMPConnection.java:722)
at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1021)
at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:514)
at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:123)
at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:778)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
2008-12-11 11:12:04,110 ERROR [com.espertech.esper.core.EPAdministratorImpl] .createEPL Error validating expression
java.lang.IllegalStateException: Expected identifier but received type '134'
at com.espertech.esper.epl.parse.EPLTreeWalker.getOnTriggerSetAssignments(EPLTreeWalker.java:565)
at com.espertech.esper.epl.parse.ASTOutputLimitHelper.buildOutputLimitSpec(ASTOutputLimitHelper.java:79)
at com.espertech.esper.epl.parse.EPLTreeWalker.leaveOutputLimit(EPLTreeWalker.java:1329)
at com.espertech.esper.epl.parse.EPLTreeWalker.leaveNode(EPLTreeWalker.java:252)
at com.espertech.esper.epl.generated.EsperEPL2Ast.outputLimitExpr(EsperEPL2Ast.java:3586)
at com.espertech.esper.epl.generated.EsperEPL2Ast.selectExpr(EsperEPL2Ast.java:1590)
at com.espertech.esper.epl.generated.EsperEPL2Ast.eplExpressionRule(EsperEPL2Ast.java:406)
at com.espertech.esper.epl.generated.EsperEPL2Ast.startEPLExpressionRule(EsperEPL2Ast.java:339)
at com.espertech.esper.core.EPAdministratorImpl$4.invokeWalkRule(EPAdministratorImpl.java:67)
at com.espertech.esper.epl.parse.ParseHelper.walk(ParseHelper.java:47)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:296)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:226)
at com.gweiss.weissview.aggregation.server.DbNamedWindowManager.createJoinWindow(DbNamedWindowManager.java:141)
at com.gweiss.weissview.aggregation.server.DetailStoredProc.Execute(DetailStoredProc.java:162)
at com.gweiss.weissview.aggregation.server.RecapStoredProc.Execute(RecapStoredProc.java:54)
at com.gweiss.weissview.aggregation.server.BLEngineSubscriptionService.startSubscription(BLEngineSubscriptionService.java:197)
at com.gweiss.weissview.aggregation.server.BLEngineSubscriptionService.startQuery(BLEngineSubscriptionService.java:384)
at com.gweiss.weissview.aggregation.server.flex.AggregationRTMPAdapter.processMessage(AggregationRTMPAdapter.java:103)
at com.gweiss.weissview.aggregation.server.flex.AggregationRTMPAdapter.invoke(AggregationRTMPAdapter.java:75)
at flex.messaging.services.MessageService.serviceMessage(MessageService.java:262)
at flex.messaging.services.MessageService.serviceMessage(MessageService.java:204)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882)
at flex.messaging.endpoints.RTMPConnection.handleTCCommand(RTMPConnection.java:722)
at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1021)
at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:514)
at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:123)
at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:778)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)

This is a pretty big issue for us, since we're doing a high performance application, and the output gates communication to the client. We're not able to properly tune output performance unless we can rate limit using "last".



 Comments   
Comment by Alexandre Vasseur [ 12/Dec/08 ]

Test case:

public void testA()

{ Configuration configuration = new Configuration(); configuration.addEventTypeAlias("SupportBean", SupportBean.class); configuration.addVariable("vv", boolean.class, true); EPServiceProvider ep = EPServiceProviderManager.getDefaultProvider(configuration); EPStatement epStatement = null; //works epStatement = ep.getEPAdministrator().createEPL("select * from SupportBean.win:length(10) output when vv = true"); //fails epStatement = ep.getEPAdministrator().createEPL("select * from SupportBean.win:length(10) output all when vv = true"); }

It happens that with output all, vv is considered to be an EVENT_PROP_EXPR

Comment by Alexandre Vasseur [ 12/Dec/08 ]

bug in ASTOutputLimitHelper to handle the tree when there is non default output control

Comment by Alexandre Vasseur [ 12/Dec/08 ]

proposed patch to properly handle
output all when

Tom - I leave it up to you for validation and commit
Needs test case coverage
Needs shipment as a new service pack on 2.3

Comment by Thomas Bernhardt [ 15/Dec/08 ]

Cumulative service pack is available that fixes the below issues.

Download from http://dist.codehaus.org/esper/esper-2.3.0-JIRA313.jar

Fixed issue ESPER-313 Using last | snapshot in output...when statement causes parsing error
Fixed issue ESPER-312 NullPointerException in group-by query with only a count in the having-clause and no other agg functions
Fixed issue ESPER-310 Safe iterator on unidirectional join not releasing lock
Fixed issue ESPER-309 Named window model-after for Map-event types incompatible with insert of Map type
Fixed issue ESPER-305 escape char parsing
Fixed issue ESPER-304 impossible to get properties of events when a listener and a subscriber are added to a statement
Fixed issue ESPER-303 Pooled DB connection obtained and returned even on cache hit
Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working





[ESPER-312] NullPointerException in group-by query with only a count(*) in the having-clause and no other agg functions Created: 08/Dec/08  Updated: 11/Feb/09  Resolved: 15/Dec/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Affects a query that has a all of the following

  • count in the having-clause
  • group-by
  • no other clauses have any other aggregation functions.

For example:

select * from SupportBean(intPrimitive = 3).win:time(10 sec) as e1 group by intPrimitive having count >= 5

>>>> select
>>>> *
>>>> from
>>>> Event(field = 1).win:time(10 sec) as e1
>>>> Group by
>>>> Source
>>>> having
>>>> count(e1) >= 5
>>>>
>>>> upon the first event being sent into the esper engine I am receiving
>>>> the
>>>> following exception.
>>>>
>>>> com.espertech.esper.client.EPException: java.lang.NullPointerException
>>>> at
>>>> com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:305)
>>>> at
>>>> com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:292)
>>>> at
>>>> com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:135)
>>>> at perecep.esper.ThresholdTest.sendEvents1(ThresholdTest.java:53)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>> at
>>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>>> at
>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>>> at
>>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:4



 Comments   
Comment by Thomas Bernhardt [ 09/Dec/08 ]

Workaround is to add count to the select-clause

Comment by Thomas Bernhardt [ 15/Dec/08 ]

Cumulative service pack is available that fixes the below issues.

Download from http://dist.codehaus.org/esper/esper-2.3.0-JIRA313.jar

Fixed issue ESPER-313 Using last | snapshot in output...when statement causes parsing error
Fixed issue ESPER-312 NullPointerException in group-by query with only a count in the having-clause and no other agg functions
Fixed issue ESPER-310 Safe iterator on unidirectional join not releasing lock
Fixed issue ESPER-309 Named window model-after for Map-event types incompatible with insert of Map type
Fixed issue ESPER-305 escape char parsing
Fixed issue ESPER-304 impossible to get properties of events when a listener and a subscriber are added to a statement
Fixed issue ESPER-303 Pooled DB connection obtained and returned even on cache hit
Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working





[ESPER-311] Publish current statement results to listener upon listener-add and atomically Created: 06/Dec/08  Updated: 13/Feb/09  Resolved: 07/Jan/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

a feature that may be useful is to have the possibility to send a snapshot (last output of a statement) to a new listener added to an existing statement

actually

EPStatement st = adm.createEPL ("select a.* from A as a");

st.addListener(listener);

epService.getEPRuntime().sendEvent(new EventA(),"A"); // listener will receive the event

...

st.addListener(listener2); // listener2 may be interested in the last event from the statement st

=========

hmm, if my understanding of iterators is correct, I need to write the code to iterate on st to get the last event before to create the second listener, create the second listener, feed it with this event, and then add it do a statement and I need to ensure I do this in a correct thread

I think that quasi-standard feature of publish-subscribe systems where a new subscriber receives a snapshot on subscription is a better choice

=========
I'd like to see if it makes sense to automatically publish current statement results to a new listeners at the time the listener is added.

I presume the idea is that the operation is atomic: at the time a listener is added it receives past results as well as new events, where in the new events include all events that occur after iterator results are delivered without loss?

We could add a method such as "public void addListenerWithReplay(UpdateListener listener)" if there is a good use for this.

Can you say whether you need atomicity? Can you please describe the use case?

============
yes, atomic

an example from stock trading domain:

statement computes some values that are based on the last price, statement is started at the opening of the market, results of this statement is used by a trading automaton, which is not started before the creation of the statement

if the stock is not liquid (few transactions) automaton will not have information from the satement till the first transaction after the start occurs and will stay in invalid state (no price)



 Comments   
Comment by Thomas Bernhardt [ 06/Dec/08 ]

Do we like the approach with a new method provided by EPStatement:
/**

  • Add an update listener replaying current statement results to the listener.
  • <p>
  • Current statement results are the events returned by the iterator or safeIterator methods.
  • <p>
  • Delivers the current statement results via a single invocation to the update method passing
  • an array of events as new data, or null if there are no current statement results.
  • <p>
  • Note: this is a blocking call, delivery is atomic: Events occurring during iteration and
  • delivery to the listener are guaranteed to be delivered in a separate call and not lost.
  • The listener implementation should minimize long-running or blocking operations.
    */
    public void addListenerWithReplay(UpdateListener listener)
Comment by Thomas Bernhardt [ 07/Jan/09 ]

In major300 branch for 3.0 release

Comment by Mathias Bogaert [ 13/Feb/09 ]

Could you also add addStatementAwareListenerWithReplay ?





[ESPER-310] Safe iterator on unidirectional join not releasing lock Created: 05/Dec/08  Updated: 11/Feb/09  Resolved: 06/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Luca Papaleo Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

if you use safeIterator method of EPStatement on a statement that use an unidirectional join, you get an UnsupportedOperationException ("Iteration over a unidirectional join is not supported"): your thread holds a lock that you can never release because you don't have an iteretor object on which invoke the close method.

Actually you'll get the same problem whenever safeIterator method throws an exception.



 Comments   
Comment by Thomas Bernhardt [ 06/Dec/08 ]

Fixed by cumulative service pack http://dist.codehaus.org/esper/esper-2.3.0-JIRA311.jar to be prepended to classpath, change log is
Fixed issue ESPER-310 Safe iterator on unidirectional join not releasing lock
Fixed issue ESPER-309 Named window model-after for Map-event types incompatible with insert of Map type
Fixed issue ESPER-305 escape char parsing
Fixed issue ESPER-304 impossible to get properties of events when a listener and a subscriber are added to a statement
Fixed issue ESPER-303 Pooled DB connection obtained and returned even on cache hit
Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working





[ESPER-309] Named window model-after for Map-event types incompatible with insert of Map type Created: 04/Dec/08  Updated: 11/Feb/09  Resolved: 06/Dec/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File L20081203.java    
Number of attachments : 1

 Description   

We'r having trouble using named windows and Map type events.
If I use standard java classes as events there is no problem but using the map types throws an exception.
Let me exemplify:
create window MyWindow.loader:batch(50) as MyMapEventType
insert into MyWindow select * from MyMapEventType

throws:
Error starting view: Event type named 'MyWindow' has already been declared with differing column name or type information: Type 'MyWindow' is not compatible [insert into MyWindow select * from MyMapEventType]
Strangely if I replace MyMapEventType by a standard java class all is well. Also the documentation states that this is supported so, am I doing something wrong?



 Comments   
Comment by Thomas Bernhardt [ 04/Dec/08 ]

The workaround is to list the individual columns in the insert-into statement, when using model-after in the create window with Map event types.

This problem affects Map-event types only when using wildcard-selects, insert-into evaluation does not properly match/convert types.

Comment by Alexandre Vasseur [ 05/Dec/08 ]

test case

Comment by Thomas Bernhardt [ 06/Dec/08 ]

Fixed by cumulative service pack http://dist.codehaus.org/esper/esper-2.3.0-JIRA311.jar to be prepended to classpath, change log is
Fixed issue ESPER-310 Safe iterator on unidirectional join not releasing lock
Fixed issue ESPER-309 Named window model-after for Map-event types incompatible with insert of Map type
Fixed issue ESPER-305 escape char parsing
Fixed issue ESPER-304 impossible to get properties of events when a listener and a subscriber are added to a statement
Fixed issue ESPER-303 Pooled DB connection obtained and returned even on cache hit
Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working





[ESPER-307] Spring integration Created: 29/Nov/08  Updated: 07/Jan/09  Resolved: 07/Jan/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Ming Fang Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive Esper-Spring-1.0-project.zip    
Number of attachments : 1

 Description   

Add ability for Esper to be created and configured in a Spring xml file.
Attached prove of concept project.



 Comments   
Comment by Alexandre Vasseur [ 29/Nov/08 ]

Thanks for the prototype - very much appreciated.

Can you comment on what is/are the most important features of such an integration:

  • beeing able to write EPL in XML
  • having event listeners be Spring beans
  • for lifecycle support of Spring
  • for all stuff that can be added around Spring beans (remoting, jmx-ing, aop and DI)
  • for beeing able to have inlined scripts in XML as you demonstrate in your groovy based proto
  • beeing able to bind statement and its listener(s) in XML
  • use of custom Spring namespace (not demonstrated in your contribution but could be interesting)

Having EPL and listeners in XML somewhat leads us to an Event Processing Network definition of some form, and this requires careful thinking as it is a wider scope. If the goal is simply to have Esper / Spring integration, your contribution demonstrates there is no real need for Esper deep down integration to get it working and that this would mostly fit into a doc + best practices + examples.

Comment by Ming Fang [ 29/Nov/08 ]

I'm not thinking of 'deep' integration; Just to make Esper more IOC friendly so that it fits nicely with Spring.
Once inside a Spring context then many of the benefits comes with it, many of which are needed to integrated with other parts of a system.
Even though this can be addressed with doc, I think it's better to be included in Esper.

Comment by Thomas Bernhardt [ 07/Jan/09 ]

This will be added to solution patterns because of the dependency on Spring and Groovy (JDK6)





[ESPER-306] Single backslash in string constant fails to parse Created: 26/Nov/08  Updated: 26/Nov/08  Resolved: 26/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When specifying a string constant the single backslash causes the parse to fail.

For example:

String regexpExpr = "select * from MyEvent where string = '<backslash><backslash>w*'";
EPStatement selectTestCase = epService.getEPAdministrator().createEPL(regexpExpr);

results in an exception:

com.espertech.esper.epl.parse.EPStatementSyntaxException: Incorrect syntax near '*' at line 1 column 43, please check the where clause [select * from MyEvent where string = '\w*']
at com.espertech.esper.epl.parse.EPStatementSyntaxException.convert(EPStatementSyntaxException.java:168)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:123)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:289)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:132)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)
at com.espertech.esper.regression.view.TestLikeRegexpExpr.testLikeRegexStringAndNull(TestLikeRegexpExpr.java:60)



 Comments   
Comment by Thomas Bernhardt [ 26/Nov/08 ]

As one workaround, one can use prepared statements and the substitution parameter.
Or if using regexp, one may want to use like instead.

Comment by Thomas Bernhardt [ 26/Nov/08 ]

duplicate to 305





[ESPER-305] escape char parsing Created: 26/Nov/08  Updated: 11/Feb/09  Resolved: 30/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Testcase included: yes
Number of attachments : 0

 Description   

Sounds like the EPL parser does not like escaped chars, such as a \w in a regexp


w fails to parse (it should I think)
\\\\w maps to a regexp
w hence does not match what is expected

public class L20081125 extends TestCase implements UpdateListener {

public void testObjectPreparedStatement()

{ Configuration configuration = new Configuration(); configuration.addEventTypeAlias("SupportBean", SupportBean.class); EPServiceProvider ep = EPServiceProviderManager.getDefaultProvider(configuration); EPStatement epStatement = ep.getEPAdministrator().createEPL( "select * from SupportBean as s0 where s0.string regexp '\\wAB.-'|| java.lang.Integer.toString(s0.intPrimitive)" ); epStatement.addListener(this); System.out.println(epStatement.getText()); ep.getEPRuntime().sendEvent(new SupportBean("ABC-123", 000)); ep.getEPRuntime().sendEvent(new SupportBean("ABC-123", 123)); }

public void update(EventBean[] newEvents, EventBean[] oldEvents)

{ System.out.println("L20081125.update"); }

public static void main(String[] args)

{ TestRunner.run(L20081125.class); }

}



 Comments   
Comment by Thomas Bernhardt [ 26/Nov/08 ]

When specifying a string constant the single backslash causes the parse to fail.

For example:

String regexpExpr = "select * from MyEvent where string = '<backslash><backslash>w*'";
EPStatement selectTestCase = epService.getEPAdministrator().createEPL(regexpExpr);

results in an exception:

com.espertech.esper.epl.parse.EPStatementSyntaxException: Incorrect syntax near '*' at line 1 column 43, please check the where clause [select * from MyEvent where string = '\w*']
at com.espertech.esper.epl.parse.EPStatementSyntaxException.convert(EPStatementSyntaxException.java:168)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:123)
at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:289)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:132)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)
at com.espertech.esper.regression.view.TestLikeRegexpExpr.testLikeRegexStringAndNull(TestLikeRegexpExpr.java:60)

Comment by Thomas Bernhardt [ 26/Nov/08 ]

The problem only occurs for cases with a single slash.

Two possible workarounds:

  • declare a variable value and use that variable in the expression in questions
  • or use prepared statements and set a substitution parameter to the string
Comment by Thomas Bernhardt [ 30/Nov/08 ]

Cumulative service pack made available at http://dist.codehaus.org/esper/esper-2.3.0-JIRA305.jar

Prepend the jar file to your classpath before the Esper jar file.





[ESPER-304] impossible to get properties of events when a listener and a subscriber are added to a statement Created: 25/Nov/08  Updated: 11/Feb/09  Resolved: 30/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mikhail Kotliar Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

esper 2.3.0, java version "1.6.0_07", windows 2000 sp4


Attachments: Java Source File ListenerSubscriberErrorTest.java     Text File out.txt    
Testcase included: yes
Number of attachments : 2

 Description   

impossible to get properties of events when a listener and a subscriber are added to a statement



 Comments   
Comment by Mikhail Kotliar [ 25/Nov/08 ]

events are processed by the following getter (com.espertech.esper.event.WrapperEventType from the line 135):

Bar.java
            else if (underlyingMapType.isProperty(property))
            {

            EventPropertyGetter getter = new EventPropertyGetter()

            {

                public Object get(EventBean event)

                {

                    if(!(event instanceof WrapperEventBean))

                    {

                        throw new PropertyAccessException("Mismatched property getter to EventBean type");

                    }

                    WrapperEventBean wrapperEvent = (WrapperEventBean) event;

                    Map map = wrapperEvent.getUnderlyingMap();

                    return underlyingMapType.getValue(property, map);

                }

 

                public boolean isExistsProperty(EventBean eventBean)

                {

                    return true; // Property exists as the property is not dynamic (unchecked)

                }

            };

            propertyGetterCache.put(property, getter);

            return getter;

 

but the type of event is not WrapperEventBean, it is of type com.espertech.esper.event.NaturalEventBean , its structure is

Comment by Thomas Bernhardt [ 30/Nov/08 ]

Cumulative service pack made available at http://dist.codehaus.org/esper/esper-2.3.0-JIRA305.jar

See ESPER-305





[ESPER-303] Pooled DB connection obtained and returned even on cache hit Created: 22/Nov/08  Updated: 11/Feb/09  Resolved: 30/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The pooled DB configuration when used with a cache, and when the cache is filled and no database access is required, does still obtains a connection from the pool and return it.

Example:

EPL: (actual EPL used.)
select vol.*
from com.espertech.esper.client.metric.EngineMetric as engin,
sql:dev ["select * from VOLUME"] as vol
CONFIG:
<database-reference name="dev">
<datasourcefactory-connection
...
</datasourcefactory-connection>
<connection-lifecycle value="pooled" />
<lru-cache size="10" />
<connection-settings read-only="true" />
<metadata-origin value="sample" />
</database-reference>
LOG:
18:54:47,261 INFO [ConnectionCache] .makeNew Obtaining new connection and statement
18:54:47,277 INFO [ConnectionCache] .close Closing statement and connection
20 3 401 2008-08-11 XVTX01
20 3 402 2008-08-11 XVTX02
18:54:50,261 INFO [ConnectionCache] .makeNew Obtaining new connection and statement
18:54:50,277 INFO [ConnectionCache] .close Closing statement and connection
20 3 401 2008-08-11 XVTX01
20 3 402 2008-08-11 XVTX02
18:54:53,261 INFO [ConnectionCache] .makeNew Obtaining new connection and statement
18:54:53,261 INFO [ConnectionCache] .close Closing statement and connection
20 3 401 2008-08-11 XVTX01



 Comments   
Comment by Thomas Bernhardt [ 30/Nov/08 ]

Cumulative service pack made available at http://dist.codehaus.org/esper/esper-2.3.0-JIRA305.jar





[ESPER-302] expose last version in maven repo Created: 06/Nov/08  Updated: 08/Nov/08  Resolved: 08/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Wish Priority: Major
Reporter: Frederic Tardif Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is there gonna be a process to ensure that the latest jar-artifacts of esper are correctly deployed in public maven repository? For the moment, there is only the version 1.11.0 which has a correct pom and jar...

It is a bit misleading because there are show in the repository index, but they point to a distribution-zip without pom instead of a normal jar accompanied by the project-object -model

see thread for details:
http://www.nabble.com/Esper-in-maven-repository-tt16178134.html#a16674677






[ESPER-301] Time batch view documentation incorrectly shows reference point as optional with flow control keywords Created: 04/Nov/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Minor
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Page 109 of 2.2 documentation shows a sample statement:

select * from MyEvent.win:time_batch(10 sec, "FORCE_UPDATE, START_EAGER")

This statement is not actually allowed; TimeBatchViewFactory will only allow flow control keywords as the third argument, and the second argument, if any, must be the reference point. Either the code should be changed to allow this mode of operation or the documentation should be updated.



 Comments   
Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-300] IndexOutOfBoundsException in TimeBatchViewFactory Created: 04/Nov/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

com.espertech.esper.view.window.TimeBatchViewFactory contains the code:

if (viewParameters.size() == 3)

{ processKeywords(viewParameters.get(3), errorMessage); }

which will always produce an IndexOutOfBoundsException. It also prevents the proper use of the flow control parameters on the time batch view.



 Comments   
Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-299] Need to pass context classloader to CGLib Created: 02/Nov/08  Updated: 08/Nov/08  Resolved: 04/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSGi (Equinox 3.3)


Number of attachments : 0

 Description   

Running Esper under Equinox, using a bundled form like the SpringSource-wrapped form (see http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.com.espertech.esper&version=2.2.0&searchType=bundlesByName&searchQuery=esper). antlr, org.antlr, org.antlr.stringtemplate, log4j, cglib-nodep are all in their own wrapped bundles.

Esper's very good about using the Thread's context class loader for most things, but when it creates CGLib classes it uses FastClass.create(Class), instead of FastClass.create(ClassLoader,Class). Consequently CGLib uses the classloader that loaded the class passed in.

Under OSGi, the thread's context classloader will have access to both the class being passed in AND CGLib (through buddy classloading or some other mechanism). However the classloader for the class itself will not have access to CGLib - so a NoClassDefFoundError (for FastClass itself!) occurs within CGLib when attempting to define the class out of the byte array.

In short, I am no expert on CGLib but I believe that Esper ought to pass the thread's context class loader to it. Replacing all calls to FastClass.create(clazz) with FastClass.create(Thread.currentThread().getContextClassLoader(), clazz) ought to do the trick.

(Also see related comment on ESPER-272 regarding the requirement to put "Eclipse-BuddyPolicy: dependent" in the bundle manifest.)



 Comments   
Comment by Alexandre Vasseur [ 03/Nov/08 ]

Good catch on cglib - we need to look at that one in more details.

Please note that the Spring Source bundle repository is the entire sole responsibility of Spring Source. Their approach of dumb and bare OSGification has lots of shortcomings - such as the one you spotted here on manifest, or f.e. the fact that they export 50+ packages while completely ignoring which one is part of the client or extension API (vs internals)
We are considering providing our own OSGI bundle with proper manifest.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-298] JUnit dependency in POM should be marked <scope>test</scope> Created: 02/Nov/08  Updated: 08/Nov/08  Resolved: 04/Nov/08

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I don't believe JUnit is required to compile the main part of Esper, only the tests. The JUnit dependency in the POM should be marked with <scope>test</scope> so it is not issued as a transitive dependency. (If it is required to compile the main part of Esper, then it should be marked with <optional>true</optional> instead, since it is clearly possible to run Esper without JUnit on the classpath.)

Believe the MySQL connector should also be marked with <optional>true</optional>.



 Comments   
Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-297] Detect dead database connection and retry Created: 20/Oct/08  Updated: 08/Nov/08  Resolved: 03/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A user has reported that she is using a join with an SQL result from an Oracle database connection, and that connection is shaky.
In order to create a new connection when the current one dies, she would like to have a simpler way to handle errors.
The current way of using a DataSource provided by an application server, or from any JNDI directory, is awkward.



 Comments   
Comment by Thomas Bernhardt [ 20/Oct/08 ]

What we could do is add a configuration that causes Esper to close the connection and obtain a new one and retrying the JDBC call once.

Esper can also provide a DataSourceFactory interface that an application can implement instead of going through JNDI.

Comment by Alexandre Vasseur [ 24/Oct/08 ]

I think the current behavior has its roots in the ConnectionCache. I assume closing the connection instead of keeping it in a cache would have some impact.
If we compare to app server, there is usually a connection pool (not cache), with sanitizing logic that can be configured in many ways among:

  • test on reserve (thru sql select * from dual kind of query or custom one provided)
  • test on release
  • trust grace period (if it was tested no longer than x, then don't test)
  • background testing
  • min/max pool size and idle timeout
  • waiter delay
  • etc
    I believe that would be the ideal design target.
    See f.e. http://e-docs.bea.com/wls/docs100/jdbc_admin/jdbc_datasources.html#wp1195919 for some example from the app server land.
    Or also Apache commons DBCP http://commons.apache.org/dbcp/configuration.html that does similar things and would be easy to integrate for an end user (not sure it is a good choice to end up as core esper dependency - see the release history)
    By adding this, there is a need for richer configuration (api and xml) as well.
Comment by Thomas Bernhardt [ 03/Nov/08 ]

in release 2.3

Comment by Thomas Bernhardt [ 03/Nov/08 ]

The ConnectionCache is not used for pooled connections.
Apache DBCP provides nice connection pool settings and support for the DBCP data source factory has been added.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-296] EPL 'not like' expressions in prepared statements lose negation Created: 18/Oct/08  Updated: 08/Nov/08  Resolved: 02/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Mitch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The reference manual states that EPL supports:
test_expression [not] like pattern_expression
but the negation is lost from prepared statements, leading to incorrect events being processed.
Happens in filters or where clauses as followin gsnipped shows

com.espertech.esper.client.EPPreparedStatement eps = admin.prepareEPL("select * from TEST(created not like 'foo%')");
com.espertech.esper.client.EPStatement statement = admin.create(eps);
System.out.println("negation lost!: " + statement.getText());



 Comments   
Comment by Mitch [ 20/Oct/08 ]

This also occurs with test_expression [not] regexp pattern_expression
Forgot to mention obvious workaround: use "not test_expression like pattern_expression"

Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release

Comment by Thomas Bernhardt [ 02/Nov/08 ]

in release 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-295] Time window onto a unique window not working Created: 14/Oct/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Torsten Curdt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Using this query:

<code>
select event.id as id, Utils.resolveIdToTitle(id) as title, count as count from event(type='interval').std:unique(dateTime,sessionId).win:time(1 hour) group by id order by count desc limit 10
</code>

The engine seems to fall down:

<code>
[2008/10/14 14:41:36.593] ERROR [java.lang.System] Exception in thread "Thread-6" [2008/10/14 14:41:36.594] ERROR [java.lang.System] com.espertech.esper.client.EPException: java.lang.UnsupportedOperationException: Time win
dow does not accept event removal[2008/10/14 14:41:36.594] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:242
)
[2008/10/14 14:41:36.594] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:229)[2008/10/14 14:41:36.594] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:152)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] Caused by: java.lang.UnsupportedOperationException: Time window does not accept event removal
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.collection.TimeWindow.remove(TimeWindow.java:106)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.view.window.TimeWindowView.update(TimeWindowView.java:116)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:99)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.view.std.UniqueByPropertyView.update(UniqueByPropertyView.java:166)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:53)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.view.stream.StreamFactorySvcImpl$1.matchFound(StreamFactorySvcImpl.java:132)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:770)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:635)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:238)
[2008/10/14 14:41:36.596] ERROR [java.lang.System] ... 5 more
</code>



 Comments   
Comment by Torsten Curdt [ 14/Oct/08 ]

(Hm ... why can't I edit my own jira issue?)

Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-294] Pattern problem in 'every' operator not restarting a false sub-expression. Created: 07/Oct/08  Updated: 08/Nov/08  Resolved: 09/Oct/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: shikha aggarwal Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi,

Below is the requirement which I am trying to achieve through ESPER.

When an event with status of "Pending" is recieved, it should keep checking within the next 20 sec for an event of status of "Approved, The Transaction ID of the transaction with the status "Pending" and "Approved" should be the same.
If a Transaction event of status "Approved" is received within 20 seconds of another Transaction event of status "Pending" with the same Transaction ID, nothing occurs. If, however, the transaction event of status "Approved" is not received within the cutoff time, an alert request is sent to the Alerts Engine.

The expression that I have written for the same is -
select * from pattern [every a=TransactionApprovedEvent(status='Pending')->"(not TransactionApprovedEvent(status='Approved',eventTransactionId=a.eventTransactionId) and timer:interval(20 sec))]";

as per the documentation, My expectation is that for every event a where status is pending the subexpression should be evaluated to check if an event of status approved in recveed where the transaction id matched with the event a transaction Id and it should do that for 20 seconds.

However , this only workd for the first time. Here is the test events that I am firing -

BaseEvent tranEvent = new TransactionApprovedEvent("Transaction1", "1",1,1,"Pending",3L);
send(tranEvent);
BaseEvent tranEvent1 = new TransactionApprovedEvent("Transaction2", "2",2,2,"Pending",3L);
send(tranEvent1);
BaseEvent tranEvent3 = new TransactionApprovedEvent("Transaction3", "5",5,3,"Pending",3L);
send(tranEvent3);

Here send function send to the Esper EPRuntme.send the transaction Id is the third field in the Transaction Approved Event(here 1,2,5). All the three events are fired together without any time lag.

At ESPER Rumtime, only the first even is logged i.e. Transaction1 , none of the others get logged.

Thanks
Shikha



 Comments   
Comment by Thomas Bernhardt [ 09/Oct/08 ]

Don't forget the engine delivers an array of events all at once. Thereby if you send 3 events and the time slot is the same, they'll be indicated back in one batch.

Comment by shikha aggarwal [ 09/Oct/08 ]

I am not sure if I understand this correct , even if the engine executes them as batch, after 20 seconds it should fire thrice to the listener indicating that none of the events Transaction1,transaction2 or Transaction 3 which are pending events are followed by approved. However the engine fires for only one which is not correct.

Comment by shikha aggarwal [ 09/Oct/08 ]

Thanks Tom, I think I understand what you mean by batch event delivery. I

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-293] No array property support for Map event type unless array part of POJO Created: 03/Oct/08  Updated: 08/Nov/08  Resolved: 02/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I've tried the syntax but it doesn't seem to work for Nested maps of arrays...for example, the following code results
in the exception:

HashMap<String, Object> prop = new HashMap<String, Object>();
prop.put("route", String[].class);
prop.put("id", Integer.class);

epService.getEPAdministrator().getConfiguration().addEventTypeAliasNestable("RouteIn",
prop);
epService.getEPAdministrator().createEPL("select route[1] from
RouteIn", "test");

I've tried lots of variations on the definition of 'route' such as using
ArrayList etc.... when I use a pojo instead of the nested map, it works
fine.... any suggestions?



 Comments   
Comment by Thomas Bernhardt [ 07/Oct/08 ]

(further question raised as below and copied from mailing list)

How do I define an array in a nested map,
when the field is another nested map? For instance, I'd like to translate my
pojos to nested maps, so in the first example I have

HashMap<String, Object> prop = new HashMap<String, Object>();
prop.put("route", String[].class);
prop.put("id", Integer.class);

Now, if route is actually an array of POJOs, I'd put in something like:
prop.put("route", RoutePOJO[].class);

But if I want to keep pojos out of this and define RoutePOJO as a Map... how
do I declare an array...?

HashMap<String, Object> routeMap = new HashMap<String, Object>();
routeMap.put("id", Integer.class); // this simply defines our pojo

HashMap<String, Object> prop = new HashMap<String, Object>();
prop.put("route", routeMap[].class); // I'd like this to be an
array of Route pojos defined using maps
prop.put("id", Integer.class);

We have a particular interest in using nested maps to represent pojos, so
any help on this aspect would be appreciated.

Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release

Comment by Thomas Bernhardt [ 02/Nov/08 ]

in 2.3 release

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-292] esper_reference.pdf : Figure 3.4. is incorrect Created: 02/Oct/08  Updated: 08/Nov/08  Resolved: 02/Nov/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Trivial
Reporter: Mikhail Kotliar Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Reference Documentation, Version: 2.2.0, Figure 3.4. Output example for a statement with where-clause , page 17 in pdf, W5 event should not be notified to listeners



 Comments   
Comment by Thomas Bernhardt [ 02/Oct/08 ]

You are right, great find. Thanks for the info

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-291] Delivery to observer failes with NPE if custom view posts null insert and remove stream Created: 01/Oct/08  Updated: 08/Nov/08  Resolved: 01/Oct/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The stack trace is as folows

2008-09-30 10:28:11,068 ERROR [com.espertech.esper.timer.EPLTimerTask] Timer thread caught unhandled exception: java.lang.NullPointerException
com.espertech.esper.client.EPException: java.lang.NullPointerException
at com.espertech.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:793)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:305)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:214)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:117)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:100)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at com.espertech.esper.core.ResultDeliveryStrategyImpl.execute(ResultDeliveryStrategyImpl.java:99)
at com.espertech.esper.core.StatementResultServiceImpl.execute(StatementResultServiceImpl.java:186)
at com.espertech.esper.core.UpdateDispatchViewBase.execute(UpdateDispatchViewBase.java:75)
at com.espertech.esper.core.UpdateDispatchFutureSpin.execute(UpdateDispatchFutureSpin.java:85)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServiceImpl.java:57)
at com.espertech.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.java:31)
at com.espertech.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:789)



 Comments   
Comment by Thomas Bernhardt [ 01/Oct/08 ]

code changes are in branch bugfix220

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-290] FIX adapter not documented Created: 23/Sep/08  Updated: 08/Nov/08  Resolved: 04/Nov/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

2.2 changelog says "# Added JMS text message marshaller and unmarshallers for Fix (Fix is a standard financial interchange format)"
but there 's nothing in the doc (Esper or EsperIO)

See interest here
http://magmasystems.blogspot.com/2008/09/colin-is-building-cep-app.html



 Comments   
Comment by Thomas Bernhardt [ 04/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-289] add wso2 slideware to site slide section Created: 23/Sep/08  Updated: 02/Nov/08  Resolved: 02/Nov/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add this to the site past presentation section
http://www.slideshare.net/prabathsiriwardena/complex-event-processing-with-esper-and-wso2-esb/



 Comments   
Comment by Alexandre Vasseur [ 23/Sep/08 ]

Also this one
http://www.slideshare.net/pizak/fast-soa-with-apache-synapse

Comment by Thomas Bernhardt [ 02/Nov/08 ]

Site changes released





[ESPER-288] Write-only property of POJO event shows up in property name list Created: 18/Sep/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Take an event that has a write-only property, such as
public class SupportBeanWriteOnly {
public void setSide(String buySell)

{ ... }

}

The property "side" shows up in the list of property names for the event.

Assigned to 2.3 as this change would slightly change public runtime interface.



 Comments   
Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-287] Improve startup performance for large numbers of statements with the same filter property Created: 17/Sep/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Improvement Priority: Minor
Reporter: Morgan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperFilterStartupTest.java    
Number of attachments : 1

 Description   

I would like the option of using the filter approach with one statement per ticker, but once you get to 100k statements the startup time gets prohibitive. Looks like the problem is that the FilterSpecCompiled.hashCode is based on the propertyNames of the filter. So if the same property name is used all the entries get added to the same bucket in the HashMap and the get and put operations slow.

Is there a way to improve the hashCode of FilterSpecCompiled?



 Comments   
Comment by Thomas Bernhardt [ 18/Sep/08 ]

You can disable view sharing which reuses streams and views among statements.

By setting:
configuration.getEngineDefaults().getViewResources().setShareViews(false);
...the statement creation under the conditions of the test speed up significantly.

We will still look into how we can improve the lookup speed with view sharing enabled (the default).

Comment by Thomas Bernhardt [ 18/Sep/08 ]

Assigned to release 2.3
Solution would include changing the hashCode method of FilterSpecCompiled to use the FilterSpecParam.hashCode instead, and to change each FilterSpecParam implementation to ensure hashCode and equals are based on the same fields.

Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release

Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-286] Map inheritance event type processes first derived event only for queries against supertype events Created: 17/Sep/08  Updated: 08/Nov/08  Resolved: 17/Sep/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.2.0-JIRA286.jar    
Number of attachments : 1

 Description   

The issue manifests if a Map inheritance is configured, for example using XML as follows:
<event-type alias="BaseEvent">
<java-util-map>
<map-property name="Param1" class="string"/>
<map-property name="Param2" class="long"/>
</java-util-map>
</event-type>
<event-type alias="DerivedEvent">
<java-util-map supertype-aliases="BaseEvent">
</java-util-map>
</event-type>

When two or more DerivedEvent event are sent into the engine, only the first derived event is processed by the engine for any statement matching the supertype.

So for example:
epService.getEPRuntime().sendEvent(event1, "DerivedEvent"); // event1 being a Map
epService.getEPRuntime().sendEvent(event2, "DerivedEvent"); // event2 being a Map
...only the first event "event1" gets processed for queries against BaseEvent..

Therefore if the query is...
select * from BaseEvent
...then only "event1" is received.



 Comments   
Comment by Thomas Bernhardt [ 17/Sep/08 ]

A unit test showing the problem is below.

import com.espertech.esper.client.*;
import com.espertech.esper.event.EventBean;
import junit.framework.TestCase;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;

import javax.xml.parsers.DocumentBuilderFactory;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

// TODO - remove me
public class TestMapEventNSN extends TestCase
{
private EPServiceProvider epService;

protected void setUp() throws Exception

{ String configXml = "<esper-configuration> <event-type alias=\"BaseEvent\">\n" + " <java-util-map>\n" + " <map-property name=\"Param1\" class=\"string\"/>\n" + " <map-property name=\"Param2\" class=\"long\"/>\n" + " </java-util-map>\n" + " </event-type>\n" + " <event-type alias=\"DerivedEvent\">\n" + " <java-util-map supertype-aliases=\"BaseEvent\">\n" + " </java-util-map>\n" + "</event-type>\n" + "</esper-configuration>"; Configuration configuration = new Configuration(); configuration.configure(getDocument(configXml)); epService = EPServiceProviderManager.getDefaultProvider(configuration); }

public void testMapDerived()

{ String statementText = "select * from BaseEvent"; EPStatement statement = epService.getEPAdministrator().createEPL(statementText); MyListener listener = new MyListener(); statement.addListener(listener); Map event = new HashMap(); event.put("id", "E1"); epService.getEPRuntime().sendEvent(event, "DerivedEvent"); assertEquals(1, listener.getEvents().size()); event = new HashMap(); event.put("id", "E2"); epService.getEPRuntime().sendEvent(event, "DerivedEvent"); assertEquals(2, listener.getEvents().size()); }

private Document getDocument(String xml) throws Exception

{ InputSource source = new InputSource(new StringReader(xml)); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware(true); return builderFactory.newDocumentBuilder().parse(source); }

public static class MyListener implements UpdateListener
{
private List<EventBean> events = new ArrayList<EventBean>();

public void update(EventBean[] newEvents, EventBean[] oldEvents)
{
for (int i = 0; i < newEvents.length; i++)

{ events.add(newEvents[i]); }

}

public List<EventBean> getEvents()

{ return events; }

}
}

Comment by Thomas Bernhardt [ 17/Sep/08 ]

Cumulative bug fix for Esper 2.2 attached. The jar file should be in the classpath before the "esper-2.2.0.jar" file.

Fixes the following issues:

  • Fixed issue ESPER-286 Map inheritance event type processes first derived event only for queries against supertype events
  • Fixed issue ESPER-282 Memory leak in grouped data window when combined with weighted-avg view
  • Fixed issue ESPER-281 On-Select with Insert-Into throws NPE if no data selected from named window
  • Fixed issue ESPER-280 isVariantStreamExists throws nptr
  • Fixed issue ESPER-277 Add route methods for routing Maps, XML and plug-in event representation events
  • Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working
  • Fixed issue ESPER-275 Identifiers that are scientific notation numbers don't cause a parser error
  • Fixed issue ESPER-274 Strange exception using median collection
Comment by Thomas Bernhardt [ 17/Sep/08 ]

Bug fix applied to bugfix220 branch and service pack provided.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-285] Correlation and Linest stats view within groupby problem Created: 15/Sep/08  Updated: 08/Nov/08  Resolved: 18/Sep/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Morgan Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File EsperStatViewTest.java    
Number of attachments : 1

 Description   

I'm seeing some inconsistencies with using groupby with various stats views. I think its a bug, but it might just be that I'm new to esper. I'd like the groupby property(ies) to be available in the event so they can be referenced later.

1) Univariate statistics - select * from Market.std:groupby(ticker).win:length(1000000).stat:linest(price, volume)
The 6 new properties are in the new event in addition to the group by property ticker

2) Weighted Avg - select * from Market.std:groupby(ticker).win:length(1000000).stat:weighted_avg(price, volume)
The new property is in the new event, but the groupby property ticker is not.

3) Regression - select * from Market.std:groupby(ticker).win:length(1000000).stat:linest(price, volume)
Property named 'dataPoints' is not a valid property name for this type
at com.espertech.esper.event.BeanEventBean.get(BeanEventBean.java:49)
at com.espertech.esper.view.std.AddPropertyValueView.addProperty(AddPropertyValueView.java:204)
at com.espertech.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java:117)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:99)
at com.espertech.esper.view.stat.BaseBivariateStatisticsView.update(BaseBivariateStatisticsView.java:114)

3) Correlation - select * from Market.std:groupby(ticker).win:length(1000000).stat:correl(price, volume)
Property named 'dataPoints' is not a valid property name for this type
at com.espertech.esper.event.BeanEventBean.get(BeanEventBean.java:49)
at com.espertech.esper.view.std.AddPropertyValueView.addProperty(AddPropertyValueView.java:204)
at com.espertech.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java:117)
at com.espertech.esper.view.ViewSupport.updateChildren(ViewSupport.java:99)
at com.espertech.esper.view.stat.BaseBivariateStatisticsView.update(BaseBivariateStatisticsView.java:114)



 Comments   
Comment by Thomas Bernhardt [ 16/Sep/08 ]

To 2) I cannot reproduce this issue

3) and 3) There is no such property "dataPoints" provided, see docs at http://esper.codehaus.org/esper-2.2.0/doc/reference/en/html_single/index.html#view-stat-correl for provided values

Comment by Morgan [ 17/Sep/08 ]

OK, I figured out the problem with the weighted average view is that I was using it in conjunction with the merge view. Merge is listed as a workaround for http://jira.codehaus.org/browse/ESPER-282 Since its undocumented I'm not sure if it should work in combination.

There are still issues with the linest and correl views. I'll attach a test case

Comment by Morgan [ 17/Sep/08 ]

junit test

Comment by Thomas Bernhardt [ 18/Sep/08 ]

The statement:
select * from Market.std:groupby(ticker).win:length(1000000).std:merge(ticker).stat:weighted_avg(price, volume)
...above computes weighted average considering, per-ticker, the last 1M Market events, computing the weighted average for such events and not per ticker.

Moving the merge view to a different spot give a different behavior:
select * from Market.std:groupby(ticker).win:length(1000000).stat:weighted_avg(price, volume).std:merge(ticker)
...above computes weighted average per ticker, considering, per-ticker, the last 1M Market events.

Comment by Thomas Bernhardt [ 18/Sep/08 ]

bug fix in branch bugfix220

Comment by Thomas Bernhardt [ 18/Sep/08 ]

We do still need to document the merge view and can still improve performance by removing some unnecessary mapping.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-284] Write a comparison agains Cayuga Created: 12/Sep/08  Updated: 20/Oct/08  Resolved: 20/Oct/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Wish Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

http://www.cs.cornell.edu/database/cayuga/

Would be cool to see some of their example 'statements' implemented using Esper. E.g.

"Notify me whenever the price of a stock has been increasing for the past 10 minutes followed by a 3 minute duration when the price is constant."

Which in Cayuga is expressed as:

SELECT *
FROM FILTER

{DUR >= 3min}

(
FILTER

{DUR >= 10 min}

(S FOLD

{Name=$1.Name, Price > $.Price, }

S)
FOLD

{Name=$1.Name, Price = $1.Price, }

S)



 Comments   
Comment by Thomas Bernhardt [ 12/Sep/08 ]

This is the third time I'm looking at Cayuga and in summary while some use cases look rather elegantly addressed with the language, the FOLD is hard to understand, and the use cases seemed picked for easy to address.

Can you explain the above query please and what a FOLD operation means on a stream?

Comment by Thomas Bernhardt [ 20/Oct/08 ]

No further interest encountered





[ESPER-283] Add user object support to EPStatement Created: 12/Sep/08  Updated: 08/Nov/08  Resolved: 03/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: New Feature Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add user object support to EPStatement:

  • add public Object getUserObject() to EPStatement interface and implementation
  • change the createXXX methods in EPAdministrator to accept an Object as 'user object', e.g.: EPStatement createPattern(String onExpression, String statementName, Object userObject)


 Comments   
Comment by Mathias Bogaert [ 12/Sep/08 ]

I meant add createXXX methods that accept an Object as 'user object.

Comment by Thomas Bernhardt [ 03/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-282] Memory leak in grouped data window when combined with weighted-avg view Created: 11/Sep/08  Updated: 18/Sep/08  Resolved: 12/Sep/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm wondering why there such a big performance difference in using a
group by view vs individual queries? A quick check sees at least
double memory usage and 2x worse performance.

I looked at the Esper benchmark example and found it generated a
statement for each ticker with a filter.

The example replaces the $ with an ticker
select * from Market(ticker='$').win:length(1000).stat:weighted_avg('price',
'volume')

instead of creating 1 statement with
select * from Market.std:groupby(ticker).win:length(1000).stat:weighted_avg('price',
'volume')

However, I don't want to have to pre-register all the assets. Very
slow startup if you have a large number of tickers. Plus you need to
know all the tickers in advance. Is there a way I can get close to
the "filter" performance without creating all those statements?



 Comments   
Comment by Thomas Bernhardt [ 11/Sep/08 ]

The workaround is to add an explicit merge using std:merge as follows...

select * from Market.std:groupby(ticker).win:length(1000).std:merge(ticker).stat:weighted_avg('price','volume')

There is still some optimizations we can implement to the grouped data window.

Comment by Alexandre Vasseur [ 12/Sep/08 ]

std:merge is not documented in Esper 2.2.0 although in there.

Comment by Alexandre Vasseur [ 12/Sep/08 ]

It is important to remember that the one statement per ticker (and 1000 statements) was choosen in the benchmark to showcase the best performance and lowest latency. (ie million event / second with sub millisecond latency goal). Early statement / event type / filtering matching is more performant than groupby
Also, keep in mind that statement level and/or view level locking happens. It is very fine grained but one statement for 1000 symbol might cause more locking contention as well - depending on the workload.

Comment by Thomas Bernhardt [ 12/Sep/08 ]

This bug affects the weighted average view and not other derived-value views.

Comment by Thomas Bernhardt [ 12/Sep/08 ]

Changes made in bugfix220 branch

Comment by Morgan [ 17/Sep/08 ]

I would like the option of using the filter approach with one statement per ticker, but once you get to 100k statements the startup time gets prohibitive. Looks like the problem is the FilterSpecCompiled.hashCode is based on the propertyNames of the filter. So if the same property name is used all the entries get added to the same bucket in the HashMap and the get and put operations slow.

Is there a way to improve the hashCode of FilterSpecCompiled?

Comment by Thomas Bernhardt [ 18/Sep/08 ]

Duplicate to http://jira.codehaus.org/browse/ESPER-287





[ESPER-281] On-Select with Insert-Into throws NPE if no data selected from named window Created: 07/Sep/08  Updated: 08/Nov/08  Resolved: 07/Sep/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This affects an on-select clause that selects from a named window and that employs the insert-into clause to populate a stream. When the on-select finds no data evaluating the named window query the result is below exception:

com.espertech.esper.client.EPException: java.lang.NullPointerException
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:242)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:229)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:117)
at com.espertech.esper.regression.epl.TestNamedWindowSelect.sendSupportBean_A(TestNamedWindowSelect.java:507)
at com.espertech.esper.regression.epl.TestNamedWindowSelect.testInsertIntoWildcard(TestNamedWindowSelect.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.NullPointerException
at com.espertech.esper.epl.named.NamedWindowOnSelectView.handleMatching(NamedWindowOnSelectView.java:97)
at com.espertech.esper.epl.named.NamedWindowOnExprBaseView.update(NamedWindowOnExprBaseView.java:85)
at com.espertech.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:53)
at com.espertech.esper.view.stream.StreamFactorySvcImpl$1.matchFound(StreamFactorySvcImpl.java:132)
at com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRuntimeImpl.java:770)
at com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:635)
at com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.java:238)
... 25 more



 Comments   
Comment by Thomas Bernhardt [ 07/Sep/08 ]

Fix in branch bugfix 2.2

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-280] isVariantStreamExists throws nptr Created: 27/Aug/08  Updated: 08/Nov/08  Resolved: 07/Sep/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Critical
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java.lang.NullPointerException
at com.espertech.esper.core.ConfigurationOperationsImpl.isVariantStreamExists(ConfigurationOperationsImpl.java:363)
at com.hydrodesk.aquavisor.service.PlantServiceImpl$3$1.updateInternal(PlantServiceImpl.java:343)

The code just does an instance check, no null check:

public boolean isVariantStreamExists(String name)

{ return valueAddEventService.getValueAddProcessor(name).getValueAddEventType() instanceof VariantEventType; }

Doh!



 Comments   
Comment by Thomas Bernhardt [ 28/Aug/08 ]

Can we have a statement that triggers this error? Or better yet a JUnit TestCase please

Comment by Thomas Bernhardt [ 07/Sep/08 ]

Bug fix available in branch bugfix220

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-279] Upgrade to ANTLR 3.1 Created: 27/Aug/08  Updated: 11/Feb/09  Resolved: 02/Jan/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0

Type: Task Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Final version was released 8-12-08:

http://antlr.org/wiki/display/ANTLR3/ANTLR+3.1+Release+Notes

Performance quote: "about 15% speed improvement in overall ANTLR exec time. Memory footprint seems to be about 50% smaller."



 Comments   
Comment by Thomas Bernhardt [ 12/Sep/08 ]

Assigned for 2.3

Comment by Thomas Bernhardt [ 02/Jan/09 ]

In release 3.0





[ESPER-278] Have Esper sort strings use java.text.Collator instead of using String.compareTo() Created: 25/Aug/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Improvement Priority: Minor
Reporter: anshul Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Number of attachments : 0

 Description   

Esper currently sorts strings (when processing EPL order by clauses) using String.compareTo() that will result in sub-optimal sort orders for non-ascii characters.
It will make sense to enable esper to use to java's Collator instead, to sort strings.

See email thread:
http://markmail.org/message/o53ud2us7i5jn7nr?q=list:org%2Ecodehaus%2Eesper%2Euser



 Comments   
Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release

Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3 as an optional engine-wide setting to use Collator for string-type properties

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-277] Add route methods for routing Maps, XML and plug-in event representation events Created: 23/Aug/08  Updated: 08/Nov/08  Resolved: 08/Sep/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

per user request:

The route() API is not symmetric with the sendEvent() API, ie. there's no way to route Maps or XML events. Looking at the EPRuntimeImpl code, it appears any data, sent via route(), that is not an EventBean, is interpreted as a POJO event. Is there any easy way to route a map with an event type alias. Seems like I can post an EventBean that wraps the map... is there an easy way to create an event bean for the map using the client API? Can I get a reference to EventAdapterService instance from the client API somehow?



 Comments   
Comment by Thomas Bernhardt [ 23/Aug/08 ]

To 2., yes the route(Object) indeed needs to provide additional methods it currently does not provide.

Since an EventSender can send custom event representations, the additional route methods would be:
route(Map map, String eventTypeAlias)
route(Node node)
EventSender getRouteEventSender(String eventTypeAlias)
EventSender getRouteEventSender(URI[] uris)

Comment by Thomas Bernhardt [ 08/Sep/08 ]

In branch bugfix220

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-276] NullPointerException reported when enabling metrics reporting but still working Created: 22/Aug/08  Updated: 11/Feb/09  Resolved: 06/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A user reports the following nullpointerexception being reported upon startup, however the exception does not impact operation:

09:40:30,566 DEBUG [Configuration] Configuring from resource: esper-config.xml
09:40:30,691 INFO [MetricReportingPath] Metrics reporting has been enabled, this setting takes affect for all engine instances at engine initialization time.
09:40:31,175 DEBUG [TimerServiceImpl] .startInternalClock Starting internal clock daemon thread, resolution=100
09:40:31,191 ERROR [EPLTimerTask] Timer thread caught unhandled exception: null
java.lang.NullPointerException
at com.espertech.esper.epl.metric.MetricReportingServiceImpl.scheduleExecutions(MetricReportingServiceImpl.java:257)
at com.espertech.esper.epl.metric.MetricReportingServiceImpl.processTimeEvent(MetricReportingServiceImpl.java:112)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:299)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:214)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:117)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:100)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)



 Comments   
Comment by Thomas Bernhardt [ 07/Sep/08 ]

Bug fix in branch bugfix220

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 22/Nov/08 ]

There appears an additional issue, also not affecting the actual metrics reporting however being reported in the log file:

12:03:55,166 INFO [MetricReportingPath] Metrics reporting has been enabled, this setting takes affect for all engine instances at engine initialization time.
12:03:58,573 DEBUG [TimerServiceImpl] .startInternalClock Starting internal clock daemon thread, resolution=100
12:03:58,713 ERROR [EPLTimerTask] Timer thread caught unhandled
exception: null
java.lang.NullPointerException
at
com.espertech.esper.epl.metric.MetricReportingServiceImpl.scheduleExecut
ions(MetricReportingServiceImpl.java:264)
at
com.espertech.esper.epl.metric.MetricReportingServiceImpl.processTimeEve
nt(MetricReportingServiceImpl.java:114)
at
com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.ja
va:362)
at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:2
77)
at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:135)
at
com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:
115)
at
com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.acc
ess$101(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
Periodic(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
(Unknown Source)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)

Comment by Thomas Bernhardt [ 06/Dec/08 ]

Fixed by cumulative service pack http://dist.codehaus.org/esper/esper-2.3.0-JIRA311.jar to be prepended to classpath, change log is
Fixed issue ESPER-310 Safe iterator on unidirectional join not releasing lock
Fixed issue ESPER-309 Named window model-after for Map-event types incompatible with insert of Map type
Fixed issue ESPER-305 escape char parsing
Fixed issue ESPER-304 impossible to get properties of events when a listener and a subscriber are added to a statement
Fixed issue ESPER-303 Pooled DB connection obtained and returned even on cache hit
Fixed issue ESPER-276 NullPointerException reported when enabling metrics reporting but still working





[ESPER-275] Identifiers that are scientific notation numbers don't cause a parser error Created: 20/Aug/08  Updated: 08/Nov/08  Resolved: 07/Sep/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example the statement:
insert into 7Event select * from MyEvent
...results in no parser exception and the stream name "ent" (ignoring the "7Ev" string part) plus an error printed into standard err by the parser (ANTLR).



 Comments   
Comment by Thomas Bernhardt [ 20/Aug/08 ]

The error printed by the parser is:
line 1:14 required (...)+ loop did not match anything at character 'v'

Comment by Thomas Bernhardt [ 07/Sep/08 ]

In branch bugfix220

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-274] Strange exception using median collection Created: 20/Aug/08  Updated: 08/Nov/08  Resolved: 12/Sep/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java.lang.IllegalStateException: Value not found in collection
at com.espertech.esper.collection.SortedDoubleVector.remove(SortedDoubleVector.java:83)
at com.espertech.esper.epl.agg.MedianAggregator.leave(MedianAggregator.java:52)
at com.espertech.esper.epl.agg.AggregationServiceGroupAllImpl.applyLeave(AggregationServiceGroupAllImpl.java:45)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processOutputLimitedView(ResultSetProcessorRowForAll.java:480)
at com.espertech.esper.epl.view.OutputProcessViewPolicy.continueOutputProcessingView(OutputProcessViewPolicy.java:160)
at com.espertech.esper.epl.view.OutputProcessViewPolicy$1.continueOutputProcessing(OutputProcessViewPolicy.java:231)
at com.espertech.esper.epl.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:188)
at com.espertech.esper.core.EPRuntimeImpl.processStatementScheduleMultiple(EPRuntimeImpl.java:685)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:445)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:335)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:302)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:214)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:117)

I might have send a combination of null and zero as values, causing this behavior.



 Comments   
Comment by Thomas Bernhardt [ 20/Aug/08 ]

We'd need to have a statement and optimally a sequence of events that reproduce this problem please. Our regression tests don't reproduce this issue.

Comment by Mathias Bogaert [ 22/Aug/08 ]

I found the problem: it's caused due to Double.NaN.

From the javadoc: If <code>d1</code> and <code>d2</code> both represent Double.NaN, then the equals method returns <code>true</code>, even though Double.NaN==Double.NaN has the value false.

The SortedDoubleVector uses if ((index == -1) || (values.get(index) Unable to render embedded object: File (= value))) not found.

Comment by Mathias Bogaert [ 22/Aug/08 ]

Jira has some rendering issues. values.get(index) doesn't use equals, and thus Double.NaN is evaluated to false, causing the exception (seel line 81 of SortedDoubleVector).

Comment by Mathias Bogaert [ 27/Aug/08 ]

More debugging revealed that the other AggregationMethods cope fine with Double.Nan values.

Comment by Thomas Bernhardt [ 07/Sep/08 ]

Would you have a suggestion for the bug fix for this issue?

Comment by Thomas Bernhardt [ 12/Sep/08 ]

In bugfix220 branch for release 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-273] Send event before EPServiceProvider.destroy() Created: 20/Aug/08  Updated: 03/Nov/08  Resolved: 03/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: New Feature Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In order for listeners to cleanup themselves (and release any resources they might hold), a simple 'destroy'-event that can be listened for (every event=EPServiceProviderDestroyEvent) could be sent to the runtimes that are shutting down. Or perhaps the more common approach: EPRuntime.addStateListener(EPRuntimeStateListener listener) containing onEPRuntimeStarted(EPRuntime runtime), onEPRuntimeDestroyRequested(EPRuntime runtime) (invoked before the actual destroy).

Also; perhaps also add an EPAdministrator.addStatementStatelistener(StatementStateListener listener) (contains onStatementStart(EPStatement statement) and onStatementStop(EPStatement statement) ?



 Comments   
Comment by Thomas Bernhardt [ 03/Nov/08 ]

In release 2.3





[ESPER-272] Add OSGi support to MANIFEST.MF Created: 17/Aug/08  Updated: 08/Nov/08  Resolved: 04/Nov/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: New Feature Priority: Minor
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add OSGi attributes to MANIFEST.MF to allow Esper/EsperIO to be used directly as an OSGi bundle.

In environments where Esper is being deployed as part of an OSGi container such as Eclipse Equinox, Apache Felix, or Knopflerfish, it is required to repackage Esper while adding OSGi-specific attributes to MANIFEST.MF specifying a bundle name, version, imports/dependencies, and exported packages. It would be ideal if Esper shipped with these attributes pre-defined. Additional attributes in MANIFEST.MF should be the only modifications necessary.

Paraphrase of Wikipedia: OSGi implements a complete and dynamic component model, something that is missing in standalone Java/VM environments. Applications or components (coming in the form of bundles for deployment) can be remotely installed, started, stopped, updated and uninstalled without requiring a reboot; management of Java packages/classes is specified in great detail. Life cycle management is done via APIs which allow for remote downloading of management policies. The service registry allows bundles to detect the addition of new services, or the removal of services, and adapt accordingly.

Some excellent tutorials on OSGi and tutorials can be found at http://neilbartlett.name/blog/osgi-articles/ and http://neilbartlett.name/blog/osgibook/ . Also, of course, http://en.wikipedia.org/wiki/OSGi is a good starting point.



 Comments   
Comment by Thomas Bernhardt [ 18/Aug/08 ]

From your description the OSGi container would then also need to have the dependent bundles deployed separately (i.e. log4j, apache commons, cglib, antlr), unless the dependent jars are shipped with the Esper OSGi jar itself. In your use case, are you planning to deploy dependent bundles separatly and the Esper OSGi jar would import these?

Maven has a nice bundle generator that could be used since the Esper build system is based on Maven.

Comment by John Stoneham [ 18/Aug/08 ]

A bundle can technically have any classpath, and contain internal JARs. Framework implementations generally know how to pull classes from JARs within JARs; however, this is not recommended practice. (It also generally means that the shipped version has to be exploded if you are to compile against it, since IDEs generally do NOT support JARs within JARs.) So it means a possible deployment model is that the Esper bundle JAR also included internal JARs containing these dependencies, or a "dependencies" JAR containing them, etc.

However what you suggested is the recommended practice. Most people shipping OSGi applications will already have some of these bundles deployed; the Esper bundle simply needs to specify its version dependencies in its MANIFEST.MF. When they don't have the bundle, they will either go find it if one is being published, or attempt to create OSGi metadata for it themselves, just as we will be doing currently with Esper.

Encouragingly, the folks at Spring-DM (OSGi extensions for the Spring framework) have created a Maven repository full of pre-OSGified bundles. It is technically supported only for Spring-DM's use but they continue to publicize it. See http://www.springsource.com/repository/app/faq for more information. Apache Felix has a bunch of bundles as well: http://felix.apache.org/site/apache-felix-commons.html Also, http://blog.springsource.com/main/2008/02/18/creating-osgi-bundles/ has a link to several repositories of OSGIfied bundles.

Comment by Thomas Bernhardt [ 20/Oct/08 ]

Assigned to 2.3 release

Comment by John Stoneham [ 02/Nov/08 ]

Having tried this out myself by wrapping each of the dependencies in a bundle, as well as Esper itself: because Esper needs reflective access to classes based on its configuration, classloading under OSGi is tricky. Using the thread's context classloader for all things - including calls to CGLib (see ESPER-299) - is the appropriate start, and can in many circumstances solve the problem. This does, however, require the user to set the Thread's context classloader before and after every call to Esper (at least any call that might cause it to load classes - which can include sendEvent()). Further this classloader needs to be passed to all dependent libraries (and that's assuming they all use it correctly) such as CGLib.

An easier way to handle all this, at least under the Equinox OSGi implementation, is to include "Eclipse-BuddyPolicy: dependent" in the bundle manifest. This will cause the classloader to also be able to load classes from any bundle that depends on Esper. (If those bundles have the same line in their manifest, then their dependencies will be accessible, etc.) This line is proprietary to Equinox, but would help at least some users get Esper running more easily.

I also found that I needed to add this line to CGLib's bundle manifest. I'm not sure if it's because of an Esper issue or a CGLib issue. May require some investigation.

Comment by Thomas Bernhardt [ 04/Nov/08 ]

in 2.3, including FastClass.create(Thread.currentThread.context loader)

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-271] EsperIO core relies on beanutil for just one method call Created: 09/Aug/08  Updated: 14/Oct/11  Resolved: 14/Oct/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO core relies on apache common Beanutil for just one method call. We should simplify this
com.espertech.esperio.SendableBeanEvent#SendableBeanEvent

there seem to be a dep. between core EsperIO and Spring as well for some spring.BeanUtil call
com.espertech.esperio.csv.CSVInputAdapter#constructPropertyTypes

  • so there is room to federate
    Although I don't see any reason why EsperIO/CSV should dep. on Spring (only JMS is)

Further on, EsperIO deps. are not documented



 Comments   
Comment by Thomas Bernhardt [ 14/Oct/11 ]

EsperIO CSV adapter will need this one call for populating beans





[ESPER-270] Property name order not always reflecting select clause order for getPropertyNames Created: 08/Aug/08  Updated: 15/Aug/08  Resolved: 08/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Shouldn't this always give the same output (for the same statement)?
>
> final EventType type = statement.getEventType();
> final String[] propertyNames = type.getPropertyNames();
>
> for (int p = 0; p < propertyNames.length; p++)

{ > System.out.println(propertyNames[p]); > }

 Comments   
Comment by Torsten Curdt [ 09/Aug/08 ]

Hmm ...where is the fix?

I've tried the 2.2.0 branch. But still the same behavior

This is actually a real blocker for us. Any pointers to the code?

Comment by Thomas Bernhardt [ 09/Aug/08 ]

We have merged to trunk already. Release of Esper 2.2 is tomorrow.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-269] User-define method with dot in parameter generates property not found Created: 08/Aug/08  Updated: 15/Aug/08  Resolved: 08/Aug/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

> Geometry object to the esper service. Now when I build the WKT (well known
> text format - representing a geometry as simple text strings) I encountered
> a strange problem. The String looks like "POLYGON(12.0 12.0, 20.0 12.0, 20.0
> 20.0, 12.0 20.0, 12.0 12.0)". Now when I am trying to register the statement
>
> select * from stream where
> SpatialMethods.intersects(SpatialMethods.fromWKT("POLYGON(12.0 12.0, 20.0
> 12.0, 20.0 20.0, 12.0 20.0, 12.0 12.0)"), geometry)
>
> geometry is a Geometry object of the event. Esper says it can not find the
> static function fromWKT. Now it is getting strange. When I cut the numbers
> at its decimals, resulting in "POLYGON(12 12, 20 12, 20 20, 12 20, 12 12)",
> the statement is registered succesful. Is there any way to handle it with
> dots? I can not accept this loss of accuracy.



 Comments   
Comment by Thomas Bernhardt [ 08/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-268] User-defined function reports runtime errors through the stack Created: 07/Aug/08  Updated: 15/Aug/08  Resolved: 08/Aug/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

com.espertech.esper.client.EPException: Method 'pow' of class 'Math' reported an exception: java.lang.NullPointerException
at com.espertech.esper.epl.expression.ExprStaticMethodNode.evaluate(ExprStaticMethodNode.java:207)
at com.espertech.esper.epl.expression.ExprMathNode.evaluate(ExprMathNode.java:84)
at com.espertech.esper.epl.expression.ExprMathNode.evaluate(ExprMathNode.java:84)
at com.espertech.esper.epl.agg.AggregationServiceGroupAllImpl.applyEnter(AggregationServiceGroupAllImpl.java:27)
at com.espertech.esper.epl.core.ResultSetProcessorRowForAll.processOutputLimitedView(ResultSetProcessorRowForAll.java:451)
at com.espertech.esper.epl.view.OutputProcessViewPolicy.continueOutputProcessingView(OutputProcessViewPolicy.java:149)
at com.espertech.esper.epl.view.OutputProcessViewPolicy$1.continueOutputProcessing(OutputProcessViewPolicy.java:220)
at com.espertech.esper.epl.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:189)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:442)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:331)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:298)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:215)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:118)
at com.hydrodesk.aquavisor.StartupListener.contextInitialized(StartupListener.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at $java.lang.Math$$FastClassByCGLIB$$17c5625c.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at com.espertech.esper.epl.expression.ExprStaticMethodNode.evaluate(ExprStaticMethodNode.java:193)
... 37 more

I'm guessing it's because I'm sending in a null value in a Math.pow expression, but the NPTR shouldn't appear?



 Comments   
Comment by Thomas Bernhardt [ 08/Aug/08 ]

The runtime exception should instead be caught and logged, return value is null.

Comment by Thomas Bernhardt [ 08/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-267] Allow SenderThreadPool to be constructed with an ExecutorService for EsperIO sender Created: 06/Aug/08  Updated: 15/Aug/08  Resolved: 07/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Next to having a constructor that accepts a thread pool size, also allow for a ExecutorService to be passed in.



 Comments   
Comment by Thomas Bernhardt [ 07/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-266] Instrumentation assumes JVM and OS that supports CpuTime calls Created: 05/Aug/08  Updated: 06/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.2

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Was reading (with great interest) through the FishEye commits, and my eye caught something: the code is calling getCurrentThreadCpuTime() without checking if the JVM and OS support this (though calling isThreadCpuTimeSupported() and isCurrentThreadCpuTimeSupported()).






[ESPER-265] Switch to SLF4J Created: 04/Aug/08  Updated: 05/Feb/11  Resolved: 30/Jul/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 5.0

Type: Wish Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

http://www.slf4j.org/

Hibernate, Jetty, Spring-OSGI, Wicket, Tapestry have all switched, because of performance and quality. Please consider switching as well.



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/08 ]

Unless execution path logging is turned on via configuration, there is currently no LOG4J code on the event and timer execution paths as of Esper 2.0.
Can you please let us know where you see a performance impact because of logging? What are the quality improvements the slf4j would bring us specifically if you have any in mind?

Comment by Thomas Bernhardt [ 30/Jul/10 ]

Staying with log4j as there is no performance impact as execution path logging is well separated out

Comment by Holger Hoffstätte [ 30/Jul/10 ]

Thomas, please reconsider (sorry for not pitching in earlier).

Switching away from a direct log4j dependency has numerous benefits. log4j has many problems with OSGi, and the direct dependency makes switching to a different backend - and consequently consistent configuration & operations - much more difficult. Switching to slf4j either directly or via the commons-logging interfaces will still allow you to use log4j as backend. Not sure why anybody would want to do that, as logback is quite superior in a number of ways.

A potential performance benefit could be that slf4j also allows for logging without the overhead of argument evaluation, as it directly supports format strings: log.debug("foo is: {}", aFoo) and here aFoo.toString() is not invoked unless the DEBUG level is really active.

slf is being adopted everywhere for good reasons. Please don't hesitate to ask on the list if you have more questions. Thanks

Comment by Thomas Bernhardt [ 30/Jul/10 ]

Esper has no direct dependency on log4j, its only direct dependency is commons-logging. Does that clear your concerns?

Comment by Holger Hoffstätte [ 30/Jul/10 ]

Yes, in that case all is well. Thanks!

Comment by Thomas Bernhardt [ 30/Jul/10 ]

Thanks for your comment and confirmation.

Comment by Tomas Fecko [ 05/Feb/11 ]

Hi,
ok I found this when I was searching about how to make esper log through the slf4j...

let's forget the performance and all that stuff, what I want to do, is embedd esper in my app to give it a try and when no logging facade is available in esper, I'm forced to use what esper offers...

If you log through the slf4j, you can let user decide which logger he wants to use - and that's the main benefit of slf4j.

so I don't get bothered by this:

log4j:WARN No appenders could be found for logger (com.espertech.esper.core.EPServiceProviderImpl).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

when no log4j.properties is available...

Comment by Holger Hoffstätte [ 05/Feb/11 ]

Tomas, as Thomas Bernhardt already said the only direct dependency is on the commons-logging interfaces, so all you have to do is replace that jar with jcl-over-slf4j as described in http://www.slf4j.org/legacy.html. You can then redirect slf4j to any backend you want - nop, logback, jul (eek), whatever.





[ESPER-264] Unidirectional keyword with aggregation posts lifetime-cumulative results rather then join-current cumulative results Created: 30/Jul/08  Updated: 15/Aug/08  Resolved: 07/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The problem is not in the sum function but the number of events.

I modified my query so that I just got the count of events for each
invocation:
insert into test select count as num
from pattern [every timer:at(*/1,*,*,*,*)] unidirectional,
CurrentEvents(measurement='x').std:unique(name) a,
PreviousEvents(measurement='x').std:unique(name) b
where a.name = b.name

I should have gotten 3 each time it ran. I got 3 on after the first minute.
However I got 6 after the second, 9 after the third ...

I thought std:unique(name) would limit the events to the last one for each
name but based on my results I must be doing something wrong.



 Comments   
Comment by Thomas Bernhardt [ 30/Jul/08 ]

This problem affects the 'unidirectional' keyword when aggregation functions are used in the same statement. Results posted by the statement are incorrectly cumulative in respect to when the statement started. This can be a correct result when used with certain join criteria and data windows.

The aggregation results should be cumulative in respect to the current join results.

There are several workarounds:

  • use the distinct keyword, i.e. count(distinct key)
  • don't use unidirectional, and use "output snapshot"
  • Esper 2.2 adds to the output clause the "at" keyword allowing a crontab-like schedule
Comment by Thomas Bernhardt [ 07/Aug/08 ]

In release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-263] add boolean ConfigurationOperations.isVariantStreamExists(String variantStreamName) Created: 22/Jul/08  Updated: 15/Aug/08  Resolved: 28/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Would be nice to have boolean ConfigurationOperations.isVariantStreamExists(String variantStreamName)



 Comments   
Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-262] Treat BigDecimal (and BigInteger ?) like other numeric types. Created: 16/Jul/08  Updated: 15/Aug/08  Resolved: 27/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Graham Miller Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Number of attachments : 0

 Description   

Currently, if you issue the following query:

select bd1, bd2 from AnEvent where bd1 > bd2

And AnEvent has properties bd1 and bd2 which are of type BigDecimal, you will get:

com.espertech.esper.client.EPStatementException: Error validating expression: Implicit conversion from datatype 'BigDecimal' to numeric is not allowed [select bd1, bd2 from AnEvent where bd1 > bd2]
at com.espertech.esper.core.EPStatementStartMethod.validateNodes(EPStatementStartMethod.java:781)
at com.espertech.esper.core.EPStatementStartMethod.startSelect(EPStatementStartMethod.java:606)
at com.espertech.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:101)
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:396)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:362)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:119)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:96)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:122)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:93)
...

It would be nice if this worked. Even better would be if things like statistics worked on BigDecimals, but on that front I'd actually be ok with (explicit) conversion to double...



 Comments   
Comment by Thomas Bernhardt [ 17/Jul/08 ]

Assigned to 2.2

Comment by Thomas Bernhardt [ 27/Jul/08 ]

in Esper 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-261] Allow reserved keywords in Java class package names Created: 16/Jul/08  Updated: 15/Aug/08  Resolved: 28/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently a package name such as
com.event.order.by.select.from.prior.having.or.and.MyEvent

fails to parse the statement.

The workaround is to declare an alias for affected class or auto-import the package.



 Comments   
Comment by Thomas Bernhardt [ 28/Jul/08 ]

Esper 2.2 outputs improved error messages if a Java package name contains a reserved keyword.
Reserved keywords are still not allowed in the syntax as package names as the parse stage does get impacted in performance as each literal is checked against a set of reserved keywords. The tradeoff is to not allow reserved keywords in the package name, since there are convenient workarounds available and error messages now point out any offending keyword misuse.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-260] Make EventTypeAliases removable at Runtime Created: 16/Jul/08  Updated: 08/Nov/08  Resolved: 02/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3

Type: Wish Priority: Major
Reporter: Lukas Plewniak Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be very helpfull for me if at least MapTypeAliases would be removeable. I want to create OutputAdapter, which i can plug in at runtime and which are listening to special MapEvents. As I want to be able to remove these Adapter at Runtime without destroying other running statements, I need a feature wich removes Eventtypes (at least for Maps, XML would be great too).

For Example:

INSERT INTO startwebservice
SELECT 'html.com:4343' as url, e as parameterobject
FROM...

With having startwebservice added as MapEventAlias at Adapter startup.

The Adapter would listen to the Type and react on any incoming Event. Registrating the Adapter at Runtime does already work. All I need now is a method for removing the EventType. In this UseCase it is no problem automaticly destroying all Statements inserting or listening on this type, it would be even helpfull.

Lukas



 Comments   
Comment by Thomas Bernhardt [ 02/Nov/08 ]

in 2.3 release

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-259] Enhance order-by and/or output rate limiting for ordered and batched result sets to output top or bottom N rows Created: 11/Jul/08  Updated: 15/Aug/08  Resolved: 30/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Major
Reporter: Torsten Curdt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The output clause does not have a limit to reduce the number of events.

Right one would have to use two statements to get the sorted top n from a query.

insert into UriCount select event.uri as uri, count as count from event.win:time(1 hour) group by uri
select * from UriCount.ext:sort(count, true, 10) output every 5 seconds

I personally would prefer something along the lines of

select event.uri as uri, count as count from event.win:time(1 hour) group by uri sorted by count limited to 10 output every 5 seconds

http://archive.esper.codehaus.org/user/B8A7E8AB-F0E7-4733-831B-2F96925DB4A5%40vafer.org



 Comments   
Comment by Thomas Bernhardt [ 11/Jul/08 ]

The syntax for output rate limiting is currently:
output [all | first | last | snapshot] every output_rate [minutes | seconds | events]

When using order-by and output rate limiting, it can be preferable to output only the top N or bottom N rows according to sort order.

How about adding a "top" and "bottom" keyword:
output [all | first | last | snapshot] every output_rate [minutes | seconds | events] [ top|bottom X rows]

The the query would look as follows:
select event.uri as uri, count as count from event.win:time(1 hour) group by uri order by count output every 5 seconds top 10 rows

Comment by Torsten Curdt [ 11/Jul/08 ]

Sound fine to me. Was just thinking of the mysql 'limit' clause.

Comment by Thomas Bernhardt [ 15/Jul/08 ]

By adding an optional "limit" clause after the "order by" clause, the iterator (poll API) would also benefit from this syntax. Therefore we may want to leave the output clause as is and add a limit clause just as MySQL/Oracle/Postgres support.

Example, see original example by Thorsten:
select event.uri as uri, count as count from event.win:time(1 hour) group by uri order by count limit 10 output every 5 seconds

The syntax of limit is:
LIMIT <number of rows>
LIMIT <range low endpoint>, LIMIT <range high endpoint>

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-258] Extension points for esperio Created: 30/Jun/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ext5.patch    
Number of attachments : 1

 Description   

See http://archive.esper.codehaus.org/dev/9aface870806231426jc975c15m2bafcce053afc824@mail.gmail.com



 Comments   
Comment by Jerry Shea [ 30/Jun/08 ]

A couple of changes:
1. I've refactored out CSVInputAdapter.createMapFromRow into a strategy - AbstractTypeCoercer. The basic implementation - BasicTypeCoercer keeps existing functionality. I've added a new one too - BasicTypeCoercerDateFormat which can understand dates formatted as dates, not just (long) millisecond values. To do this I had to do a little more refactoring on CSVInputAdapter - resolveTimestamp also had implicit knowledge of timestamps being longs
2. Introduced an AbstractSender class which acts as a shim in between esperio and esper. I've attached a sample impl. (SenderThreadPool) which sends events to esper using a thread pool

Comment by Thomas Bernhardt [ 15/Jul/08 ]

For incorporation in 2.2 release

Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-257] Esperio beans input to support subset of beans properties in input CSV Created: 30/Jun/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File beans.patch    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

Minor change to prevent exception being thrown when we specify explicit properties for CSV file. If we have a bean that contains properties a,b,c, then this allows us to have an input file containing only a and b or b and c.



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-256] It would be really useful for CSVInputAdapter to have a row count so we can tell how many rows it has processed Created: 30/Jun/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File rowCount.patch    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

I've added a rowCount member and an accessor. We find this very useful...



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-255] java.lang.NullPointerException at com.espertech.esper.pattern.EvalAndStateNode.evaluateTrue Created: 24/Jun/08  Updated: 15/Jul/08  Resolved: 15/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL 64 bit, Sun JDK 1.6.05


Number of attachments : 0

 Description   

I haven't managed to build a test case to reproduce this yet I'm afraid but thought I would post it here in case anyone has any ideas. Stack trace is:

java.lang.NullPointerException  at com.espertech.esper.pattern.EvalAndStateNode.evaluateTrue(EvalAndStateNode.java:88)  at com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:48)        at com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:49)   at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:421)        at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:310)       at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:277)      at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:203)  at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:111)     at 

The offending line is:
List<MatchedEventMap> eventList = eventsPerChild.get(fromNode);

Events are being posted to the engine on multiple threads.



 Comments   
Comment by Jerry Shea [ 24/Jun/08 ]

Fix formatting....

java.lang.NullPointerException  at com.espertech.esper.pattern.EvalAndStateNode.evaluateTrue(EvalAndStateNode.java:88)
  at com.espertech.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:48)
  at com.espertech.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:49)
  at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:421)
  at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:310)
  at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:277)
  at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:203)
  at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:111)
  at ....




[ESPER-254] Iterating over joins that join by polling execution (database or method joins) Created: 15/Jun/08  Updated: 15/Aug/08  Resolved: 15/Jul/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Heiko Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am trying to iterate over a polling join for getting data from a database, as described in the userguide. However, when I invoke the iterator API on it fails with the following exception:

java.lang.ArrayIndexOutOfBoundsException: 0
at com.espertech.esper.epl.join.JoinSetComposerImpl.staticJoin(JoinSetComposerImpl.java:149)
at com.espertech.esper.epl.join.JoinExecutionStrategyImpl.staticJoin(JoinExecutionStrategyImpl.java:53)
at com.espertech.esper.epl.view.OutputProcessView.iterator(OutputProcessView.java:145)
at com.espertech.esper.core.EPStatementImpl.iterator(EPStatementImpl.java:193)

Here's an example statement:

String epl = "insert into NewQuotes" +
" select symbol, price from" +
" pattern [every timer:interval(1 sec)], "+
" sql:mysql1['select * from quotes']";

Quotes is a really simple stockquote schema.
I can successfully create the EPStatement, but the iterator fails.

There is another unit test that uses the exact same esper instance and successfully joins data into a stream.
So it cannot be a wrong DB setup or such.



 Comments   
Comment by Heiko [ 15/Jun/08 ]

I've tried both creating an Iterator directly on the statement that was create through EPAdministrator.createEPL(epl) and adding a StatementAwareUpdateListener, which then creates the iterator when being updated. Both tests fail with the same exception.

Comment by Thomas Bernhardt [ 17/Jun/08 ]

We do not have support in Esper 2.1 for polling (iterating) over join statements in which one stream is a polling execution (database or method). We'll add the limitation to the documentation which is not clear on this subject.

Assigned to release 2.2

Comment by Thomas Bernhardt [ 15/Jul/08 ]

In branch 2.2 enhancements

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-253] target source_zip is zipping esper source files instead of esperio Created: 11/Jun/08  Updated: 15/Aug/08  Resolved: 15/Aug/08

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 2.2
Fix Version/s: 2.2

Type: Bug Priority: Trivial
Reporter: sbailliez@gmail.com Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Looking at
https://svn.codehaus.org/esper/esper/trunk/build.xml

In the target source_zip

the last zipfileset is selecting esper source tree instead of esperio, so the line

<zipfileset prefix="$

{name}-${version}/esperio/src/main/java" dir="esper/src/main/java" includes="**"/>

should be:

<zipfileset prefix="${name}

-$

{version}

/esperio/src/main/java" dir="esperio/src/main/java" includes="**"/>



 Comments   
Comment by Thomas Bernhardt [ 15/Aug/08 ]

Fixed the ant task





[ESPER-252] Package source code as jar files in distribution Created: 11/Jun/08  Updated: 15/Aug/08  Resolved: 15/Aug/08

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Wish Priority: Trivial
Reporter: sbailliez@gmail.com Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Would you mind packaging the source code for esper and esperio as part of the distribution.

I put all 3rd party libraries into an ivy repository which contains jars and source code as jar file as well, source code is not shipped as is, so it's a bit of pain to having to checkout the release tag and jar the sources. thanks.



 Comments   
Comment by Alexandre Vasseur [ 11/Jun/08 ]

we want to keep the dist small
why ivy would need the src?

Comment by sbailliez@gmail.com [ 12/Jun/08 ]

no relation with ivy, I was just giving an example of what I do with 3rd party libs.

I have over hundred 3rd party libs in our repository and esper is the only one where sources are not immediately available either within the distrib or within another source distrib and where I have to do a checkout of the sources. it's not the end of the world which is why I opened the jira as 'wish' but it stands apart on that.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

Added to distribution directory and to release guides, link to be added to site





[ESPER-251] Named window with underlying event as a property and insert-into from pattern requires self-property in select clause Created: 07/Jun/08  Updated: 11/Feb/09  Resolved: 18/Dec/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.2
Fix Version/s: 3.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Here's the window creation :
create window Alert7Window.win:time(1 day) as select ticker as alertId, this from LastTickEvent
insert into Alert7Window select '7' as alertId, stream0.quote as this from pattern [(every quote=LastTickEvent(ticker='MSFT')) where timer:within(1 days)].std:lastevent() stream0,
pattern [(every index=LastTickEvent(ticker='NSDQ')) where timer:within(1 days)].std:lastevent() stream1 where stream0.quote.lastPx > stream1.index.lastPx

The insert-into does not detected that the inserted-into stream contains the underlying rather then the transposed event and an exception is thrown:

com.espertech.esper.client.EPStatementException: Error starting view: Event type named 'Alert7Window' has already been declared with differing column name or type information [insert into Alert7Window select '7' as alertId, stream0.quote as this from pattern [(every quote=SupportBean) where timer:within(1 days)].std:lastevent() stream0, pattern [(every index=SupportBean) where timer:within(1 days)].std:lastevent() stream1 where stream0.quote.intPrimitive > stream1.index.intPrimitive]
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:404)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:362)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:119)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:96)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:122)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:93)
at com.espertech.esper.regression.epl.TestInsertIntoTransposePattern.testThisAsColumn(TestInsertIntoTransposePattern.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

The problem was introduced with Esper 2.1 in the form of http://jira.codehaus.org/browse/ESPER-204
Depending on how the receiving stream is defined there is a need to either transpose (preserving event type) or use the underying event (this case).

The workaround is to use :
select '7' as alertId, stream0.quote.this as this .......



 Comments   
Comment by Thomas Bernhardt [ 08/Nov/08 ]

Release 2.3 provides better error messages however remains to require the workaround, assigned to 3.0

Comment by Thomas Bernhardt [ 18/Dec/08 ]

in major300 branch





[ESPER-250] Custom aggregation function provided by static inner class not possible Created: 05/Jun/08  Updated: 15/Aug/08  Resolved: 27/Jul/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm implementing some aggregation function classes as static inner classes. Unfortunately these are not accepted by esper because of some regex test which rejects names containing '$'. I'll work around this, but wanted to report this unnecessary restriction. Searching the code this seems to be in the 2.0 codebase as well.

Thanks,

.charlie

Exception in thread "main" net.esper.client.ConfigurationException: Error configuring engine: Invalid class name for aggregation 'Utils.RangeAggregation$Sum'

at net.esper.core.EPServicesContextFactoryDefault.makeEngineImportService(EPServicesContextFactoryDefault.java:217)

at net.esper.core.EPServicesContextFactoryDefault.createServicesContext(EPServicesContextFactoryDefault.java:50)

at net.esper.core.EPServiceProviderImpl.initialize(EPServiceProviderImpl.java:186)

at net.esper.core.EPServiceProviderImpl.<init>(EPServiceProviderImpl.java:42)

at net.esper.client.EPServiceProviderManager.getProvider(EPServiceProviderManager.java:72)

at com.ml.ets.apptk.services.esper.EsperEngine.<init>(EsperEngine.java:38)

at Utils.main(Utils.java:98)

Caused by: net.esper.eql.core.EngineImportException: Invalid class name for aggregation 'qsa.utils.RangeAggregation$Sum'

at net.esper.eql.core.EngineImportServiceImpl.addAggregation(EngineImportServiceImpl.java:74)

at net.esper.core.EPServicesContextFactoryDefault.makeEngineImportService(EPServicesContextFactoryDefault.java:212)

... 8 more



 Comments   
Comment by Thomas Bernhardt [ 05/Jun/08 ]

Workaround is to not use a static inner class. Assigned to 2.2 release

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-249] Enhance TimeBatchView with FORCE_UPDATE, START_EAGER keywords Created: 31/May/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP SP2, Sun Java 6


Attachments: Text File timeBatch.keywords.patch    
Number of attachments : 1

 Description   

Patch to add FORCE_UPDATE, START_EAGER keywords to TimeBatchView (they were already implemented in TimeLengthBatchView).

Also implemented in TimeBatchViewRStream.

This is a pretty straightforward change. In order to de-duplicate TimeBatchViewFactory and TimeLengthBatchViewFactory I moved common parameter processing functionality into a new subclass - TimeBatchViewFactoryParams



 Comments   
Comment by Thomas Bernhardt [ 31/May/08 ]

Assigned for adding to 2.2

Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-248] Syntax for repeated matching until end of pattern detection Created: 22/May/08  Updated: 15/Aug/08  Resolved: 15/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.1.0-JIRA248.jar    
Number of attachments : 1

 Description   

(read bottom to top)
===

We might want to add both minimum and maximum boundaries for both time and number of events (as discussed in the "multiple case accumulating query" thread).

Maybe we could write
match [from x [to y] ] [alias=]expression until [alias=]expression
x and y being numbers, x>=0 and y>x

I guess we can keep the timer:within guard to handle the time (we might want to add it a minimum time ie timer:within(minTime, maxTime).

====

The repeat match until looks quite good to me. The synopsis could indeed be
match [alias=]expression until [alias=]expression

A very interesting feature would be to specify the maximum (and/or minimum?) time between each event, eg
(match A until B) where timer:within(1 min) => the statement stops if no B event is received within 1 minute
match A until B where timer:within(1 min) => the statement stops if no A or B event is received within 1 minute (ie each time a new A event is received the timer is reset).

Another feature could also be to specify the maximum (and/or minimum?) number of A events.

As for how to write an observer, it would help to add an example that filters events, because the at and interval observers only work on a timer, and the MyFileExistsObserver sample only check for a file existence.

=====

This sounds like a "repeat match until" situation. A syntax could make life easier, I agree. We could allow to write:
b=B-> match t=T until e=E

That seems like a nice concise syntax. The synopsis would be:
match expression until expression

Thus one could also write:
match (A or B) until (C or D)

====

the custom plug-in observer would certainly for work for this,

ok i'll look closely at the custom observer to see how to do this.

and so would simply repeating the followed-by, such as B-> ( (T0 -> E) or (T0 -> T1 -> E) or ...repeated for Tn...)

Indeed it would work, but it's not very practical. Also we might have something more complex than just "-> E" so we might need to write B -> ((T -> E -> F -> ... -> Z) or (T -> T -> E -> F -> ... -> Z) or ...)

I don't think the suggested syntax as below is good as it seems to conflict with filter syntax. We could add a syntax to the pattern language to make such a case easier to address if there is need.

I totally agree that the way I wrote it is quite confusing. We might write it like guards and windows, something like
MyEvent(MyField>15).eventNumber(from, to)

it sounds to me that if you keep a state flag in your listener, you can easily select all B E and T with 3 "select * from X" statements bind those 3 to the same listener, and switch on/off the flag in the listener. I don't see the value add in adding things in the EPL unless there is some more correllation or filtering.

I agree it might be possible to write a specific query, but if we have several complex queries, that may use several times a sequence of events like that, it really becomes a mess to write.



 Comments   
Comment by Thomas Bernhardt [ 24/May/08 ]

If we have
match [from x [to y] ] expression1 until expression2
then we can use aliases in expression2 as we always do, but if we use aliases in expression1, those aliases wouldn't point to events but to list of events.

For example
match from 2 to 5 a=A until b=B
"a" would be a list containing the A events.

match from 2 to 5 (a=A -> d=D) until b=B
both "a" and "d" would be lists (of the same size) of A and D events.

That way we'd always be able to know which events have been used by a rule.

Comment by Thomas Bernhardt [ 30/May/08 ]

An additional suggestion has come in:

If that would be a regexp with + and * wildcards that would look something like A -> B+
One could also have use case for A -> B+[min occur, max occur]

Comment by Alexandre Vasseur [ 30/May/08 ]

Could also be
A -> B.repeat:count(exactCount)
A -> B.repeat:count(minmax, maxcount)
A -> B.repeat:custom()
// boolean customRepeater(EventBean curent, List<EventBean> accumulatedSoFar) {
.... // return true to keep accum, next time invoke accumulatedSoFar will contain current
// or stop the acum : return false

ie a custom accumulator

Comment by Henning Störk [ 05/Jun/08 ]

Personally I'd really like to be able to use expressions like this:
A -> (C or D).repeat:count(2, 5) -> B

I could totally live with
A -> (C or D)+[2, 5] -> B
as well though.

Comment by Thomas Bernhardt [ 05/Jun/08 ]

The regular expression and the .repeat:count() syntax both suffer from not providing an explicit boundary to the repeating expression, while the "match..until" proposal does.

For example, the expression "A.repeat.count(2,5)" or "A+[2,5]" does not make sense as its undefined whether the pattern should fire after 2, 3, 4 or 5 events (unbound case). Only in the case of "A.repeat.count(2)" or "A+[2,2]" would the pattern alone make sense since now the boundary is well defined and the pattern fires only if exactly 2 occurances of A happened.

The "match..until" appears more natural:

// match any number of A for 10 seconds
match A until timer:interval(10 sec)

// match A until B occurs
match A until B

// match exactly 5 A (until not allowed since bound to 5 occurances)
match 5 A

// match at least 2 A until B occurs
match from 2 A until B

// match between 2 and 5 A until B occurs
match from 2 to 5 A until B

// match A until B occurs but only within 1 minute from the start of the statement
(match A until B) where timer:within(1 min)

// match A until no A arrives within 1 minute
match A until (every (timer:interval(1 minute) and not A))

(A and B stand for any other expession in above examples)

Comment by Thomas Bernhardt [ 07/Jun/08 ]

The range matches needed to be clarified. The new notation (replacing from/to) is:
[ lower.. | ..upper | lower..upper | num ]

// this expression turns true when expression A turned true at least twice, and only thereafter expression B turns true
// if expression A does not turn true at least twice before expression B turns true, the expression is permanently false
// after expression A turns true the 10th time the expression A stops
// state returned by pattern is an array of tagged events as specified in expression A (2 to 10) and tags as specified in expression B
match [2..10] A until B

// this expression turns true when expression A turned true 5 times
// state returned by pattern is an array of tagged events as specified in expression A (exactly 5)
match [5] A

// this expression turns true when expression B turns true
// if expression A does not turn true there is no effect
// after expression A turns true the 5th time the expression A stops
// state returned by pattern is an array of tagged events as specified in expression A (0 to 5) and tags as specified in expression B
match [..5] A until B

// this expression turns true when expression A turned true at least twice, and only thereafter expression B turns true
// if expression A does not turn true at least twice before expression B turns true, the expression is permanently false
// state returned by pattern is an array of tagged events as specified in expression A (2 to unlimited) and tags as specified in expression B
match [2..] A until B

...wherein A and B are any sub-expressions

Comment by Thomas Bernhardt [ 12/Jun/08 ]

We have made a preview of this feature available for comments:
The documentation can be found at http://esper.codehaus.org/esper-2.2.0/doc/reference/en/html/event_patterns.html
The attached jar file incorporates this feature and is not cumulative, and should not be in use with other service packs of the project.

Comment by Thomas Bernhardt [ 15/Jul/08 ]

In release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-247] Cast function for String to Int conversion returns null Created: 22/May/08  Updated: 15/Aug/08  Resolved: 02/Jun/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.1.0-JIRA247.jar    
Number of attachments : 1

 Description   

I've created properties for the map event I will be using:

properties.put("SIZE", "string");
config.addEventTypeAlias("md", properties);

my EPL statement is very simple:

stmt = "select SIZE, cast(SIZE,int) as test from md";

My listener is printing out the details:
System.out.println("Event Type :" + x[0].getEventType());
System.out.println("SIZE :" + x[0].get("SIZE"));
System.out.println("Test :" + x[0].get("test"));

and the cast always returns null:

package cep;
import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;
import com.espertech.esper.client.EPStatement;
import com.espertech.esper.client.EPAdministrator;
import java.util.HashMap;
public class EventProcessor {
private HashMap<String,String> md;
private static EPServiceProvider epService;
private static EPAdministrator admin;
private static EPStatement statement;
public static void main(String args[])

{ HashMap<String,String> map = new HashMap(); map.put("SIZE","400"); EventProcessor e = new EventProcessor(); e.sendEvent(map); }

public EventProcessor()

{ HashMap map = new HashMap(); map.put("SIZE",String.class); Configuration config = new Configuration(); config.addEventTypeAlias("md", map); epService = EPServiceProviderManager.getDefaultProvider(config); admin = epService.getEPAdministrator(); String stmt = "select SIZE, cast(SIZE, int) as test from md"; statement = admin.createEPL(stmt); statement.addListener(new Listen()); }

public void sendEvent(HashMap map)

{ epService.getEPRuntime().sendEvent(map, "md"); }

}

package cep;
import com.espertech.esper.client.UpdateListener;
import com.espertech.esper.event.EventBean;

public class Listen implements UpdateListener{

public void update(EventBean[] x, EventBean[] y)

{ System.out.println("Event Type :" + x[0].getEventType()); System.out.println("Size :" + x[0].get("SIZE")); System.out.println("Test :" + x[0].get("test")); }

}



 Comments   
Comment by Thomas Bernhardt [ 24/May/08 ]

Assigned to 2.2

Comment by Thomas Bernhardt [ 02/Jun/08 ]

Cumulative service pack patch attached which patches this issue. Changelog is:

esper-2.1.0-JIRA247

  • Fixed issue ESPER-247 Cast function for String to Int conversion returns null
  • Fixed issue ESPER-246 Unique-view incorrectly posts remove stream data for shared state under view sharing conditions
  • Fixed issue ESPER-241 Predefined variant types not supporting dynamic event types
Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-246] Unique-view incorrectly posts remove stream data for shared state under view sharing conditions Created: 21/May/08  Updated: 15/Aug/08  Resolved: 21/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.1.0-JIRA246.jar    
Number of attachments : 1

 Description   

If a query likes following is registered:
select irstream * from TestEvent.std:unique('id') where name='eins'
...and then another query (same event type and filter)...
select irstream * from TestEvent.std:unique('id') where id = 1

If the oldEvent object in the 1st query also satisfies the 2nd query, then the oldEvent object of 2nd query is the same as that in the 1st query, even thought the old event was sent before the 2nd query is registered.



 Comments   
Comment by Thomas Bernhardt [ 21/May/08 ]

The problem is due to Esper sharing views between statements for efficient processing, and the decision to share the view is made incorrectly in this case.

Cumulative service pack jar to be posted shortly.

Comment by Thomas Bernhardt [ 21/May/08 ]

One workaround is turn turn off view sharing, a global setting available via configuration - engine settings.

Comment by Thomas Bernhardt [ 21/May/08 ]

Cumulative service pack fixes the following issues:

  • Fixed issue ESPER-241 Predefined variant types not supporting dynamic event types
  • Fixed issue ESPER-246 Unique-view incorrectly posts remove stream data for shared state under view sharing conditions
Comment by Thomas Bernhardt [ 21/May/08 ]

Note that this problem exhibits only if event type alias and filter are the same between two or more statements, and only for the std:unique view.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-245] Allow Map type definition to take type name in addition to type Created: 19/May/08  Updated: 27/Jul/08  Resolved: 27/Jul/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi I'm new to the product and have a really simple question that I cannot seem to figure out.

I've created properties for the map event I will be using:

properties.put("SIZE", "string");
config.addEventTypeAlias("md", properties);

my EPL statement is very simple:

stmt = "select SIZE, cast(SIZE,int) as test from md";

My listener is printing out the details:
System.out.println("Event Type :" + x[0].getEventType());
System.out.println("SIZE :" + x[0].get("SIZE"));
System.out.println("Test :" + x[0].get("test"));

and the cast always returns null:

Event Type :MapEventType typeName=03b2c568c0a8016a00349471ad4fc6b7 propertyNames=[test, SIZE]
SIZE :6
Test :null
Why is the cast not working? The map I'm sending to esper engine is a HashMap<String,String>.



 Comments   
Comment by Thomas Bernhardt [ 19/May/08 ]

the addEventTypeAlias method takes Map<String, Class>, so put("SIZE", String.class) would be more appropriate.
However to prevent mistakes, the method may interpret a String as class ane or primitive type name as an improvement.

Comment by Thomas Bernhardt [ 27/Jul/08 ]

Feature already pesent

Comment by Thomas Bernhardt [ 27/Jul/08 ]

Cast function problem with JIRA 247





[ESPER-244] EPServiceProviderManager.getProviderURIs should return Set<String>, why array? Created: 18/May/08  Updated: 24/May/08  Resolved: 24/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently EPServiceProviderManager.getProviderURIs returns a String array, which isn't too easy to work with (no Collection semantics). Better to return a Set<String> (but wrapping it with Collections.unmodifiableSet).



 Comments   
Comment by Thomas Bernhardt [ 24/May/08 ]

String[] is less confusing as a null value is possible for default providers. In sets one typically doesn't expect one.





[ESPER-243] Swallowing InterruptedException in EPServiceProviderImpl Created: 18/May/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

try
{
Thread.sleep(100);
}
catch (InterruptedException ex)
{
// No logic required here
}

The catch should have:

// Restore the interrupted status
Thread.currentThread().interrupt();



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-242] EPServiceProviderManager runtimes should be ConcurrentHashMap Created: 18/May/08  Updated: 15/Aug/08  Resolved: 06/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently using Collections.synchronizedMap(new HashMap<String, EPServiceProviderImpl>()) which is suboptimal.



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/08 ]

in release 2.2

Comment by Mathias Bogaert [ 06/Aug/08 ]

You also need to use the putIfAbsent: see http://dmy999.com/article/34/correct-use-of-concurrenthashmap

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-241] Predefined variant types not supporting dynamic event types Created: 18/May/08  Updated: 15/Aug/08  Resolved: 18/May/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: Bug Priority: Critical
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.1.0-JIRA241.jar    
Number of attachments : 1

 Description   

VAEVariantProcessor.validateEventType does not account for dynamically registered event types such as Map events. I'm not too sure about this, since I'm receiving no exception on my first registered variant type, but the second one always throws EPStatementException: Error starting view with the message from VAEVariantProcessor.



 Comments   
Comment by Thomas Bernhardt [ 18/May/08 ]

Could you please provide a sequence of actions to reproduce this error, or perhaps a unit test?
Event types must be registered first to take part in the variant stream.

Comment by Mathias Bogaert [ 18/May/08 ]

Example:

Map<String, Class> types = new HashMap<String, Class>();
types.put("someprop", String.class);
epService.getEPAdministrator().getConfiguration().addEventTypeAlias("MyEvent", types);
epService.getEPAdministrator().getConfiguration().addEventTypeAlias("MySecondEvent", types);

ConfigurationVariantStream variant = new ConfigurationVariantStream();
variant.addEventTypeAlias("MyEvent");
variant.addEventTypeAlias("MySecondEvent");
epService.getEPAdministrator().getConfiguration().addVariantStream("MyVariant", variant);

epService.getEPAdministrator().createEPL("insert into MyVariant select * from MyEvent");
epService.getEPAdministrator().createEPL("insert into MyVariant select * from MySecondEvent");

gives

com.espertech.esper.client.EPStatementException: Error starting view: Selected event type is not a valid event type of the variant stream 'MyVariant' [insert into MyVariant select * from MySecondEvent]
at com.espertech.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:404)
at com.espertech.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:362)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:119)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:96)

Comment by Thomas Bernhardt [ 18/May/08 ]

To attach bug fix patch.

Comment by Thomas Bernhardt [ 18/May/08 ]

Attached patch esper-2.1.0-JIRA241 fixes this issue.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-240] Output limit clause to support absolute crontab-like times Created: 17/May/08  Updated: 15/Aug/08  Resolved: 17/Jul/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I currently have a statement, which I limit to fire every 30 minutes,
like this:
select * from EventStream.win:length(1) where x>100 group by symbol
output last every 30 minutes

But I would rather prefer it to hit at certain times of the day (e.g.
every full/half of an hour), something more like this:
select * from EventStream.win:length(1) where x>100 group by symbol
output last every (/10, *, *,,*)

So basically the same syntax, you already use for the timer:at observer.



 Comments   
Comment by Thomas Bernhardt [ 17/May/08 ]

As a workaround, it's possible to use a variable for the output rate limiting, therefore the on-set could be used to temporarily bump the output clause, something like:
// every 5 minutes and 0 seconds set variable to zero
on pattern[every timer:at(*/5, *, *, *, *, 0)] set OutputLimitVar = 0
// every 5 minutes and 1 seconds set variable to a large value
on pattern[every timer:at(*/5, *, *, *, *, 1)] set OutputLimitVar = 1000000 // to reset
// use variable
select * from EventStream.win:length(1) where x>100 group by symbol output last every OutputLimitVar seconds

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-239] esperio - memory leak in AdapterCoordinatorImpl Created: 16/May/08  Updated: 15/Aug/08  Resolved: 17/May/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Allan Richards Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esperio-2.1.0-JIRA239.jar    
Number of attachments : 1

 Description   

I have been hitting memory limits when using large input files. Have tracked this down to esperio maintaining a copy of all input events in the map AdapterCoordinatorImpl::eventsFromAdapters. It is not clear to me that this is required. Suggest changing replaceFirstEventToSend as below:

protected void replaceFirstEventToSend()

{ log.debug(".replaceFirstEventToSend"); SendableEvent event = eventsToSend.first(); eventsToSend.remove(event); addNewEvent(eventsFromAdapters.get(event)); eventsFromAdapters.remove(event); // <-- remove the sent event from eventsFromAdapters pollEmptyAdapters(); }

Jerry has run this change through the esperio test suit and it passes.



 Comments   
Comment by Allan Richards [ 16/May/08 ]

..and now with improved formatting:

 
	protected void replaceFirstEventToSend()
	{
		log.debug(".replaceFirstEventToSend");
		SendableEvent event = eventsToSend.first();
		eventsToSend.remove(event);
		addNewEvent(eventsFromAdapters.get(event));
		eventsFromAdapters.remove(event);
		pollEmptyAdapters();
	}
Comment by Jerry Shea [ 17/May/08 ]

This is actually the root cause of why debug log statements (ESPER-197) were slow.

Comment by Thomas Bernhardt [ 17/May/08 ]

Thanks for the bug fix!

The JIRA patch file esper-2.1.0-JIRA239 attached contains the change.

Comment by Thomas Bernhardt [ 18/May/08 ]

Renamed to esperio-2.1.0-JIRA239

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-238] Custom view returning null event not caught. Created: 15/May/08  Updated: 17/May/08  Resolved: 17/May/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Allan Richards Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When a custom view's update is naughty and does this:
EventBean[] newResults = new EventBean[1];
newResults[0] = null; // !
updateChildren(newResults, null);

The esper engine is likely to blow up, as below:
Error java.lang.NullPointerException
at com.espertech.esper.event.CGLibPropertyGetter.get(CGLibPropertyGetter.java:24)
at com.espertech.esper.event.WrapperEventType$1.get(WrapperEventType.java:98)
at com.espertech.esper.event.EventBeanUtility.getPropertyArray(EventBeanUtility.java:246)
at com.espertech.esper.event.EventBeanUtility.getMultiKey(EventBeanUtility.java:259)
at com.espertech.esper.epl.join.table.PropertyIndexedEventTable.getMultiKey(PropertyIndexedEventTable.java:72)
at com.espertech.esper.epl.join.table.PropertyIndexedEventTable.add(PropertyIndexedEventTable.java:123)
at com.espertech.esper.epl.join.table.PropertyIndexedEventTable.add(PropertyIndexedEventTable.java:89)
at com.espertech.esper.epl.join.JoinSetComposerImpl.join(JoinSetComposerImpl.java:93)
at com.espertech.esper.epl.join.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:41)
at com.espertech.esper.epl.join.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:62)
at com.espertech.esper.core.EPStatementHandle.internalDispatch(EPStatementHandle.java:115)
at com.espertech.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:431)
at com.espertech.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:310)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:277)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:203)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:111)
at com.espertech.esperio.AbstractCoordinatedAdapter.sendSoonestEvents(AbstractCoordinatedAdapter.java:269)
at com.espertech.esperio.AbstractCoordinatedAdapter.continueSendingEvents(AbstractCoordinatedAdapter.java:189)
at com.espertech.esperio.AbstractCoordinatedAdapter.start(AbstractCoordinatedAdapter.java:92)

Suggest that this situation should be caught in the WrapperEventBean constructor, e.g.:
public WrapperEventBean(EventBean event, Map<String, Object> properties, EventType eventType)
{
if( event == null )

{ throw new EPException("Event cannot be null."); }

this.event = event;
this.map = properties;
this.eventType = eventType;
}



 Comments   
Comment by Thomas Bernhardt [ 17/May/08 ]

Such additional checks for null values reduce performance.

It is part of the explicit contract of plug-in views to not produce null values in an array, we'll add to the documentation.





[ESPER-237] Duplicate debug log statement Created: 02/May/08  Updated: 11/May/08  Resolved: 05/May/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Minor
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When enabling debug logging, I get:

09:59:23.421 [main] DEBUG c.e.esper.client.Configuration - configuring from resource: /esper.cfg.xml
09:59:23.421 [main] DEBUG c.e.esper.client.Configuration - Configuration resource: /esper.cfg.xml



 Comments   
Comment by Thomas Bernhardt [ 02/May/08 ]

for 2.1

Comment by Alexandre Vasseur [ 05/May/08 ]

fixed

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-236] Patterns should support getUnderlying() Created: 02/May/08  Updated: 02/May/08  Resolved: 02/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Not A Bug Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When using 'select * from ...' one can use newEvents[0].getUnderlying() to obtain the event instance. Not so for patterns. My code:

epService.getEPAdministrator().createPattern("every UfPlantSample").addListener(new OpenEntityManagerUpdateListener() {
@Transactional
public void updateInternal(EventBean[] newEvents, EventBean[] oldEvents, EPStatement statement, EPServiceProvider epService)

{ ufPlantDao.merge(plant).addSample((UfPlantSample) newEvents[0].getUnderlying()); }

});

Here, the getUnderlying() returns an empty map, while I was expecting the event instance.



 Comments   
Comment by Thomas Bernhardt [ 02/May/08 ]

If you assign a tag to the event then that is used to populate the map, i.e. "every u=UfPlantSample" and the underlying is a map with a "u" key and underlying value.





[ESPER-235] ConfigurationOperations to provide a method to check if an alias exists Created: 28/Apr/08  Updated: 11/May/08  Resolved: 05/May/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: New Feature Priority: Critical
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The Configuration class uses HashMap and ArrayList implementations, that are not thread-safe. In my case, we're dynamically registering map events upon receiving specific data.

So ((EPServiceProviderSPI) epService).getConfigurationInformation().getEventTypesMapEvents().containsKey(...) breaks while another thread is adding adding event aliases.



 Comments   
Comment by Mathias Bogaert [ 29/Apr/08 ]

It seems my understanding of the Configuration was wrong.

"Note that Configuration is meant only as an initialization-time object. The Esper engine represented by an EPServiceProvider does not retain any association back to the Configuration."

Seems like I need to use the ConfigurationOperations to add and check for types.
So a better name for this issue would be 'Allow ConfigurationOperations to access event alias and type maps'. This way, I can execute

epService.getEPAdministrator().getConfiguration().getEventTypesNestableMapEvents().containsKey(...)

Comment by Thomas Bernhardt [ 29/Apr/08 ]

Yes ConfigurationOperations is designed for runtime use and is the one we would want to extend with a new capability. I'll change the JIRA from bug to improvement and assign to 2.1.
The EPServiceProviderSPI is an internal API in the core package that your application probably does not want to downcast to, but rather stay with the public EPServiceProvider.

Do you need a method added that can check if an alias already exists, such as (on ConfigurationOperations)
public booleas isAliasExists(String alias)

or is there type information you are also looking to retrieve from ConfigurationOperations?

Comment by Mathias Bogaert [ 29/Apr/08 ]

Such a method would be handy, and perhaps would even check against any possible type - class, map, nested map or node?

In my case I only need to check if the alias is added for that EPServiceProvider, and if not, add it. Is this thread-safe?
Also; perhaps name it eventAliasExists(...) ? This 'is' prefix mainly applies to JavaBean getter/setter style...

Comment by Mathias Bogaert [ 29/Apr/08 ]

Or to align with the other methods: boolean eventTypeAliasExists(String eventTypeAlias)

Comment by Mathias Bogaert [ 30/Apr/08 ]

Or: boolean isEventTypeAliased(String eventTypeAlias)

Comment by Thomas Bernhardt [ 30/Apr/08 ]

Yes the method returns true for any alias, regardless of underlying event type.
public boolean isEventTypeAliasExists(String eventTypeAlias)

Comment by Alexandre Vasseur [ 05/May/08 ]

implemented

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-233] engine destroy should trigger destroy of plugins Created: 24/Apr/08  Updated: 24/Apr/08  Resolved: 24/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

engine destroy should trigger destroy of plugins






[ESPER-232] EPStatement should expose isPattern Created: 24/Apr/08  Updated: 24/Apr/08  Resolved: 24/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EPStatement should expose isPattern






[ESPER-231] EPRuntime stats reset and switch to long Created: 24/Apr/08  Updated: 24/Apr/08  Resolved: 24/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EPRuntime stats should support reset and use long rather than int






[ESPER-230] case insensitivity option when matching property values Created: 17/Apr/08  Updated: 22/Apr/08  Resolved: 22/Apr/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1

Type: Improvement Priority: Minor
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We want to be able to match events without regard to case, so that a statement like "select * from event where prop1 = 'something'" would match when prop1's value was 'SOMETHING', for example.

I tried to do this using the regexp keyword, something like this: "select * from event where prop1 regexp '(?i)something'". This works, but unless I'm missing something the regexp keyword can't be used against a list of values (using 'IN'). This is probably fine; regexp against an IN list may be overkill anyway.

Is there any other option for specifying case-insensitivity?



 Comments   
Comment by Thomas Bernhardt [ 18/Apr/08 ]

The option provided for POJO events is described in this doc section:
http://esper.codehaus.org/esper-2.0.0/doc/reference/en/html_single/index.html#config-java-property-case-sensitivity

Is there anything that the POJO support for case sensitivity doesn't provide?

Comment by Scott Frenkiel [ 20/Apr/08 ]

I should have been more clear--our system builds up EQL statements based on information collected from our end users. I was looking for a way to provide them the option for case sensitivity on a statement-by-statement basis.

Comment by Alexandre Vasseur [ 20/Apr/08 ]

Can you use a user defined function for insensitive equal matching?
http://esper.codehaus.org/esper-2.0.0/doc/reference/en/html_single/index.html#epl-function-user-defined

or maybe use the statement object model to post process your statements constants in such cases?
http://esper.codehaus.org/esper-2.0.0/doc/reference/en/html_single/index.html#api-soda

Comment by Scott Frenkiel [ 20/Apr/08 ]

Thanks, a user-defined function might work. I assume this would have to be a two argument boolean function, something like "func(x,y)" to replace "x = y".

I'm not familiar with the statement object model, but it seems like that might be overkill just for case insensitivity.

Comment by Thomas Bernhardt [ 22/Apr/08 ]

A further option is to have your event object return String.toUpperCase()





[ESPER-229] MismatchedTokenException when creating statement "select count(*) as count from foo" Created: 14/Apr/08  Updated: 11/May/08  Resolved: 23/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Trivial
Reporter: sbailliez@gmail.com Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Creating a statement with 'count' as a variable seems to lose completely the parser.
Not sure whether you intend to have reserved keywords or if its a deficiency in the parser (honestly did not look), but the error message is also pretty surprising.

Obvious workaround is to use something else than count for the variable.

MismatchedTokenException(25!=183)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.mismatch(EsperEPL2GrammarParser.java:415)
	at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:99)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.selectionListElement(EsperEPL2GrammarParser.java:4686)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.selectionList(EsperEPL2GrammarParser.java:4451)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.selectClause(EsperEPL2GrammarParser.java:4362)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.selectExpr(EsperEPL2GrammarParser.java:1509)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.eplExpression(EsperEPL2GrammarParser.java:1360)
	at com.espertech.esper.epl.generated.EsperEPL2GrammarParser.startEPLExpressionRule(EsperEPL2GrammarParser.java:508)
	at com.espertech.esper.core.EPAdministratorImpl$3.invokeParseRule(EPAdministratorImpl.java:58)
	at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:105)
	at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:256)
	at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:121)
	at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:103)


 Comments   
Comment by Thomas Bernhardt [ 15/Apr/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 15/Apr/08 ]

The "count" keyword is a reserved keyword. Also see JIRA ESPER-218 Escape for EPL identifiers that are literals

Comment by sbailliez@gmail.com [ 15/Apr/08 ]

ok. before opening the bug I scanned quickly the user guide looking for 'reserved' to see if I could find something related to it but did not find anything.
maybe add it to the doc as well in the EPL section ?

Comment by Thomas Bernhardt [ 23/Apr/08 ]

in enhancement210 branch

Comment by Thomas Bernhardt [ 23/Apr/08 ]

The reserved keywords are now also in an appendix in the doc; certain keywords (built-in functions and such) can now be used as event property names

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-228] PDF document page number not showing Created: 11/Apr/08  Updated: 11/May/08  Resolved: 16/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-227] No documentation on time-batch view parameter for reference point Created: 10/Apr/08  Updated: 11/May/08  Resolved: 17/Apr/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

the "win:time_batch" view takes a second parameter which is a long-value and that is the reference point for when the batch should end/start. The documentation does not document this features, I have created a JIRA.

For reference, see test com.espertech.esper.regression.view.TestViewTimeInterval method testTimeBatchRefPoint



 Comments   
Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-226] Allow esperio to use external timer Created: 10/Apr/08  Updated: 11/May/08  Resolved: 13/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP SP2, Sun JDK 6


Attachments: Text File externalTimer.patch    
Testcase included: yes
Patch Submitted:
Yes
Number of attachments : 1

 Description   

If you specify a timestampColumn to esperio then currently esperio sends all events in "real time" i.e. if an input file contains the following data:

timestamp name
2 Jerry
3 Billy
3 David
1004 Julie

then esperio will sleep for 1001 milliseconds between sending the David and Julie events to the engine.

This patch allows esperio to run through the file at full speed without pausing. The algorithm I have used sends a time event for the last time when the current time changes. In this example it will send a time event for 2 after Jerry, for 3 after David and 1004 after Julie. Have added a new method setUsingExternalTimer(boolean) to all the places where setUsingEngineThread currently is and have modified AbstractCoordinatedAdapter.sendSoonestEvents to actually do the heavy lifting. For many of my use cases this makes a huge performance improvement.

This patch might need a little more work - for example, I guess that usingExternalTimer=true is incompatible with usingEngineThread=true and that I should throw an exception if both are set? Any comments?



 Comments   
Comment by Thomas Bernhardt [ 13/Apr/08 ]

Applied to branch enhancements210_con

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-225] Esper rated #2 by Enerjy code inspection tool among OSS projects - see if it can get #1 Created: 08/Apr/08  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.2
Fix Version/s: 3.2

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Which open source Java projects are least likely to break down? Below are the top ten, ranked by their Enerjy Score.
http://www.enerjy.com/
http://www.enerjy.com/explorer/projects/esper.html



 Comments   
Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-224] Support for Streaming XML using Apache Axiom Created: 08/Apr/08  Updated: 11/May/08  Resolved: 22/Apr/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Paul Fremantle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File esper-trunk.patch    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

This patch (on the trunk from a couple of weeks ago) provides the ability for Esper to use the Apache Axiom XML library. Axiom provides a DOM-like tree view, including XPath, but still supports Streaming behaviour via the StAX API. The benefit of this is that it will only parse enough of the message/event to evaluate the required XPaths. Some tests that one of my colleagues (Sanka) did have shown a big speedup compared to DOM.

Let me know if this needs updating to the latest trunk.



 Comments   
Comment by Thomas Bernhardt [ 22/Apr/08 ]

In branch enhancements210 as plug-in event representation, with in esper and esperio jars

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-223] Escape syntax for event property names that contain dots Created: 05/Apr/08  Updated: 11/May/08  Resolved: 16/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

But someone recently asked regarding dots in property names also. (I also think this was Sharad's original question.) I know allowing dots in property names would conflict with the syntax that allows chaining bean gets, XML elements, maps, etc.

For example:

select s1.id1, s1.trinity.event\.event_type ...

if the ESPTestEvent had a chain of maps so that it would eventually call
s1.get("trinity").get("event.event_type")?



 Comments   
Comment by Thomas Bernhardt [ 16/Apr/08 ]

Change made in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-222] Outer joins do not preserve order Created: 02/Apr/08  Updated: 24/May/08  Resolved: 24/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XPSP2, Sun Java 1.6.0


Attachments: Text File preserveJoinOrder.patch    
Testcase included: yes
Patch Submitted:
Yes
Number of attachments : 1

 Description   

If I am outer joining 2 event streams as below:
A B
a1 b1

  • b2
    then, depending on the hash code implementation of A and B, I may get back:
    (a1,b1), (a1,b2)
    or:
    (a1,b2), (a1,b1)

I reckon that joins should preserve the order of the underlying streams. Fortunately this looks like it is easily doable simply by changing HashSet (which makes no guarantees about order) to LinkedHashSet (which does) in UnindexedEventTable and PropertyIndexedEventTable.

I've modified TestTableOuterLookupExecNode to check that order is enforced.

Against 210_con branch, all tests pass after this patch that passed before.



 Comments   
Comment by Jerry Shea [ 02/Apr/08 ]

Woops JIRA has reformatted some of my test. If I am outer joining 2 event streams as below:

A: a1
B: b1 b2

Hope this makes sense

Comment by Thomas Bernhardt [ 02/Apr/08 ]

Joins do not preserve the order of events in each stream, not a guarantee the engine makes.

Comment by Jerry Shea [ 03/Apr/08 ]

But don't you think this is a useful feature? I'm happy for this issue to be changed from a bug to an enhancement but feel very strongly that this is an extremely useful feature. It is one that I use. We could always parameterise it I guess?

Comment by Thomas Bernhardt [ 03/Apr/08 ]

Why not use order-by?

I don't think we should make hard guarantees in a join/outer join about the order. In an N-stream join all streams are equal: The order in which streams are listed does and should not matter. Join execution order is up to the query plan optimizer. Any order obtained in incidental and the order-by clause must be used to guarantee an order.

I think the documentation is missing a statement on this topic.

Comment by Thomas Bernhardt [ 03/Apr/08 ]

Updated to "new feature"

Comment by Jerry Shea [ 03/Apr/08 ]

I agree that the order that streams are listed should not matter, and I don't want to change this.

My point is simply that, the current join processing takes events in in a their arrival order and, by putting them into a HashSet, loses that order. Later on when the join results are generated in TableOuterLookupExecNode, the HashSet is iterated through and results given back. By using LinkedHashSet instead of HashSet we don't lose the event ordering in the first place.

I could use order-by but my events were initially in order

Comment by Thomas Bernhardt [ 05/Apr/08 ]

Hmm, we can attempt to guarantee order of arrival but I think its not a hard guarantee we could make. This is because events can arrive into either streams at the same time (self-joins and pattern-joins).

I'd prefer to add a setting, since a LinkedHashMap has a higher overhead. This could be a statement-level setting, I wonder if we should look for a way to allow statement-level settings like this one. Else an engine-wide setting.

Comment by Jerry Shea [ 09/Apr/08 ]

Yes, LInkedHashMap does have a higher overhead but I reckon it's a price worth paying - personally I would vote to make the change anyway and worry about parameterisation later.

I'l start a discussion on dev list re: parameterisation.

Comment by Alexandre Vasseur [ 10/Apr/08 ]

I don't favor parameterisation at engine level as this would open for different observed behavior in simple scenarios. We' d either have to handle this as a statement property (but then as Tom describes it seems an order by provides better explicit consistency ), or document this better and leave it as it is.

Comment by Thomas Bernhardt [ 24/May/08 ]

The fact that joins don't guarantee order is documented in the order-by section.

Since there is a performance penalty of a LinkedHashMap versus HashMap, and since setting a proposed engine-global flag would still not guarantee order for all joins, we remain to recommend order-by or a listener/subscriber code that does not rely on order.

Closed and won't fix.





[ESPER-221] Named window with batch expiry policy causes late consumers to post incorrect data or throw IllegalArgumentException Created: 31/Mar/08  Updated: 11/May/08  Resolved: 31/Mar/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.0.0-JIRA221.jar    
Number of attachments : 1

 Description   

The problem manifests itself when a batching expiry policy is used for named windows, and a consuming statement is created upon the named window and the named window is already filled with data.

For example:
(1) create statement "create window MyWindow.win:time_batch(10 sec) as MyMap"
(2) send some events into the named window
(2a) create a second statement "select sum(value) as value from MyWindow"
(2b) create a second statement "select * from MyWindow as s0, MyStream as s1 where s0.val = s1.val"

In the case of (2a), the sum will incorrectly reflect the batched events in the named window twice.

In the case of (2b), the following exception can be observed:

java.lang.IllegalArgumentException: Event already in index, event=MapEventBean eventType=MapEventType typeName=view_MapStream1 propertyNames=[Price, Line, State, City, Quantity]
at com.espertech.esper.epl.join.table.PropertyIndexedEventTable.add(PropertyIndexedEventTable.java:138)
at com.espertech.esper.epl.join.table.PropertyIndexedEventTable.add(PropertyIndexedEventTable.java:89)
at com.espertech.esper.epl.join.JoinSetComposerImpl.join(JoinSetComposerImpl.java:93)
at com.espertech.esper.epl.join.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:41)
at com.espertech.esper.epl.join.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:62)
at com.espertech.esper.core.EPStatementHandle.internalDispatch(EPStatementHandle.java:115)
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:263)
at com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:464)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:283)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:203)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:111)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:94)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:60)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/08 ]

Resolved, attached jar patch is cumulative and includes the following bug fixed:

  • Fixed issue ESPER-209 Stop of consumer statements of named windows may not entirely deregister consumer
  • Fixed issue ESPER-213 ConcurrentModificationException creating consuming statements to a single named window under threading
  • Fixed issue ESPER-214 ClassCastException in named window dispatch for timer thread when multiple insert-into
  • Fixed issue ESPER-221 Named window with batch expiry policy causes late consumers to post incorrect data or throw IllegalArgumentException
Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-220] TimeBatchView.computeWaitMSec can give incorrect results for low "interval" Created: 30/Mar/08  Updated: 11/May/08  Resolved: 13/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP2, Sun JDK1.6.0.2


Attachments: Text File computeWaitMSec.patch    
Number of attachments : 1

 Description   

TimeBatchView.computeWaitMSec is giving me incorrect results with some combinations of input data:

Given the input data: current=82201355, reference=0, interval=1, the following expression:
long n = (long) ( (current - reference) / (interval * 1f)); // line 290 of TimeBatchView.java
gives a value of n=82201352 (==current-3) which is wrong and causes problems.

I believe that forcing a float ("1f") into the calculation is causing a loss of precision, and affecting accuracy. Replacing "1f" above with "1d", or alternatively, replacing the expression with:
long n = (current - reference) / interval;
fixes the problem for me although I have not had the chance to run the complete suite of unit tests.



 Comments   
Comment by Jerry Shea [ 02/Apr/08 ]

Patch attached. Using the 210_con branch I get the same tests failing after as before:

test5DefaultNoHavingNoJoin(com.espertech.esper.regression.view.TestOutputLimit
EventPerGroup)
testPattern(com.espertech.esper.multithread.TestMTStmtPattern)
testAggregationOverGroupedProps(com.espertech.esper.regression.view.TestGroupB
yEventPerGroup)

Comment by Thomas Bernhardt [ 09/Apr/08 ]

Assigned to 2.1; Will be added to branch soon for merge into 2.1 release from trunk

Comment by Thomas Bernhardt [ 13/Apr/08 ]

Merged into enhancements210_con branch; Could not reproduce any trouble reported with regression test

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-219] Documentation for plug-in views not specifying implicit contract towards object references Created: 30/Mar/08  Updated: 11/May/08  Resolved: 30/Mar/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The documentation for plug-in views omits the following information:

Custom views that post events to the insert stream must post unique EventBean object references as insert stream events, and cannot post the same EventBean object reference multiple times. The underlying event posted by such view can be the same, however the EventBean wrapper generated by the custom view must be unique for each insert stream event.

Further to clarify, event posted as remove stream must be the same object reference as the events posted as insert stream by the view. The documentation mistakingly states that remove stream events must only be semantically equal and that is wrong. The requirement is that remove stream events by the view (the EventBean instances, does not affect the underlying representation) must be reference-equal to insert stream events posted by the view.

The reason for this behavior is that an observation is unique and should not be made multiple times. The values of the observation can be the same, thus the underlying representation of an event can be reused, however the EventBean reference represents an observation that should be unique and posted only once in the insert stream and once in the remove stream.

The "trend" sample view also does not correctly post remove stream events.



 Comments   
Comment by Thomas Bernhardt [ 30/Mar/08 ]

Documentation update posted to site

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-218] Escape for EPL identifiers that are literals Created: 28/Mar/08  Updated: 11/May/08  Resolved: 23/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

While attempting to do the following query I discovered that there is no escape logic.

select last.price from summary

Well, last is a literal so while it matches the IDENT token in the grammar it subsequently matches a literal. Should we consider adding
the ability to escape to the grammar, similar to how databases do this. For instance, against SQLServer you could write this as:

select [last].price from summary



 Comments   
Comment by Thomas Bernhardt [ 23/Apr/08 ]

This is related to ESPER-229. For that JIRA we will allow a certain subset of reserved keywords to be used for event property names and in the rename syntax. The "last" keyword as discussed by this JIRA is included in this list.

Research shows that support for escape logic very much differs between SQL-based languages, sometimes there is no support, sometimes quoted and sometimes

{keyword}

.

The sprit of this issue is resolved by the changes for Esper-229, which we take as support for certain keywords.

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-217] Allow expressions as view parameters Created: 28/Mar/08  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is it possible to easily drive an ext_timed window where the timestamp
property is the result of an XPath property? XPath properties can return
STRING, NUMBER, or BOOLEAN - NUMBER translates to Double but the window
requires a long-typed milliseconds value.

What I found is that even after I converted to milliseconds, the window
specification accepts only a property name, not an expression, so I can't
give it cast(timestamp, long). It won't truncate the Double. So I had to
do

insert into TempEvent select property1, property2, cast(timestamp, long)
as timestamp from EventType

select property1, property2, timestamp from
TempEvent.win:ext_timed(timestamp, 10 sec)

which works but requires me to generate an intermediate map event for each
event that comes through the system. This is doable, and perhaps
encouraged if I have many rules driven by XPath properties, but it feels
like it should be avoidable, either by allowing an expression as the first
argument to ext_timed, by some truncation logic, or by allowing XPath
expressions to be cast to longs on their way out, etc.



 Comments   
Comment by Thomas Bernhardt [ 02/Jan/09 ]

In release 3.0

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-216] Provide additional XPath return value types to cast to Created: 28/Mar/08  Updated: 11/May/08  Resolved: 25/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is it possible to easily drive an ext_timed window where the timestamp
property is the result of an XPath property? XPath properties can return
STRING, NUMBER, or BOOLEAN - NUMBER translates to Double but the window
requires a long-typed milliseconds value.

What I found is that even after I converted to milliseconds, the window
specification accepts only a property name, not an expression, so I can't
give it cast(timestamp, long). It won't truncate the Double. So I had to
do

insert into TempEvent select property1, property2, cast(timestamp, long)
as timestamp from EventType

select property1, property2, timestamp from
TempEvent.win:ext_timed(timestamp, 10 sec)

which works but requires me to generate an intermediate map event for each
event that comes through the system. This is doable, and perhaps
encouraged if I have many rules driven by XPath properties, but it feels
like it should be avoidable, either by allowing an expression as the first
argument to ext_timed, by some truncation logic, or by allowing XPath
expressions to be cast to longs on their way out, etc.



 Comments   
Comment by Thomas Bernhardt [ 22/Apr/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 25/Apr/08 ]

in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-215] Allow access to statement's XPathFactory instance to supply XPathFunctionResolver, etc. Created: 27/Mar/08  Updated: 11/May/08  Resolved: 25/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: New Feature Priority: Minor
Reporter: John Stoneham Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Running on WinXP, Java 1.6.


Number of attachments : 0

 Description   

In order to use custom (i.e. implemented in Java) XPath functions, it is necessary in Java to access the XPathFactory object being used, to call its setXPathFunctionResolver() method. You pass this method a function resolver, which will be called only for non-built-in XPath functions, and which will mediate calls to custom functions to get them to the right Java implementations.

Each statement in Esper creates its own XPathFactory by calling XPathFactory.newInstance(), and these do not appear to be available to the client programmer. Therefore in order to define XPath properties that include custom functions, we were obliged to implement a custom XPathFactory that maintains the default XPathFactory as a singleton inside it and defers all calls to that singleton. That way we could call XPathFactory.newInstance().setXPathFunctionResolver() and have it affect the actual instance that would be used by Esper (since when it created a new instance of the custom factory, all calls would be deferred to the same singleton).

The particular use case motivating the use of custom XPath functions was the need to convert an XML dateTime into milliseconds-since-epoch in order to drive an ext_timed window based on the result. The XPath version of this would be very difficult; a code version can be done in two or three lines.



 Comments   
Comment by Thomas Bernhardt [ 28/Mar/08 ]

I understand you are planning to provide a custom XPathFunctionResolver and XPathVariableResolver resolver to the XPathFactory returned by XPathFactory.netInstance() ?

The proposed change to be implemented would add to two fields to ConfigurationEventTypeXMLDOM that would contain the class name of the function and the variable resolver classes.

Thus the code would be changed from
(before)
xPathFactory = XPathFactory.newInstance()

(after, in essence)
xPathFactory = XPathFactory.newInstance();
if (configXML.getXPathFunctionResolverClass() != null)

{ XPathFunctionResolver resolver = Class.forName(configXML.getXPathFunctionResolverClass()).newInstance() xPathFactory.setXPathFunctionResolver(resolver) }

// same for variable resolver

Comment by John Stoneham [ 28/Mar/08 ]

This would do the trick. An alternative would be to allow the user to provide an instance himself instead of configuring with a classname, in order to do some configuration at runtime perhaps. I don't know if this is feasible within the Esper architecture, not having looked deeply enough.

Comment by Thomas Bernhardt [ 28/Mar/08 ]

The XPathFactory abstract class has a protected constructor, thus it doesn't seem feasible for an application to provide it's own implementation of the XPathFactory abstract class.

You are referring to the ConfigurationEventTypeXMLDOM to carry an actual instance of XPathFunctionResolver. The configuration contract is that the configuration is Serializable: the preference is to not carry actual service instances in configuration to make it clear that a configuration cannot be modified at runtime other then via the ConfigurationOperations. We could add a function to ConfigurationOperations to inject an actual service instance overall or per event type, would that be preferred?

Comment by John Stoneham [ 28/Mar/08 ]

The constructor's protected, not package-private - the XPathFactory class itself carries only the logic for implementing the newInstance() methods. The user is expected to provide a subclass if the default is not used. We implemented our own XPathFactory subclass, for instance, to hold the singleton logic mentioned above.

It might be worthwhile to add something to use a different XPathFactory, I have not considered that. It ought not to be necessary, though, as it is already possible to customize the XPathFactory that is created via other means. The ability to use custom XPathFunctionResolver and XPathVariableResolver implementations should be enough to start.

If the ConfigurationEventTypeXMLDOM needs to be serializable, then it does make sense to specify a class name instead. However I still think in this case it might be useful to someone to be able to get hold of that Function/VariableResolver in order to downcast it and call setter methods. (I don't have a particular use case in mind, it's simply a flexibility option.) Perhaps the area where the resolver class is actually created is inaccessible, though, based on the architecture. One could always have the created class make callbacks for any data it needs through static methods or something similar, I imagine.

Comment by Thomas Bernhardt [ 22/Apr/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 25/Apr/08 ]

in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-214] ClassCastException in named window dispatch for timer thread when multiple insert-into Created: 19/Mar/08  Updated: 11/May/08  Resolved: 19/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.0.0-SP214.jar    
Number of attachments : 1

 Description   

This exception can occur when multiple named windows get data from a single timer event advancing time, as a multithread-safety issue. The timer thread continues processing however an event dispatched to consumers of a named window does not get posted.

Exception in thread "Timer-0" java.lang.ClassCastException: com.espertech.esper.epl.named.NamedWindowConsumerDispatchUnit
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:229)
at com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:464)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:238)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:146)
at com.sap.rtbi.test.EsperTest.doWork0(EsperTest.java:184)
at com.sap.rtbi.test.EsperTest$1.run(EsperTest.java:151)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)



 Comments   
Comment by Thomas Bernhardt [ 19/Mar/08 ]

Corrected this issue in the attached SP, which is includes the patch to Esper-213 and Esper-209

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-213] ConcurrentModificationException creating consuming statements to a single named window under threading Created: 14/Mar/08  Updated: 11/May/08  Resolved: 17/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.0.0-SP213a.jar    
Number of attachments : 1

 Description   

This problem manifests itself when an application creates statements that consumes from a named window and the named window is also receiving events. It occurs about every 300 new statements for 2 threads if one thread creates statements and a second thread sends events applicable to the named window.

The exception is thrown by NamedWindowServiceImpl.



 Comments   
Comment by Thomas Bernhardt [ 14/Mar/08 ]

Bug fix for release 2.0.0, includes fix for ESPER-209

Comment by Thomas Bernhardt [ 18/Mar/08 ]

A user reported the following exception using the bug fix, after running for minutes:

java.lang.NullPointerException
at com.espertech.esper.epl.named.NamedWindowServiceImpl.dispatch(NamedWindowServiceImpl.java:140)
at com.espertech.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:464)
at com.espertech.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:283)
at com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:203)
at com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:111)
at com.espertech.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:94)
at com.espertech.esper.timer.EPLTimerTask.run(EPLTimerTask.java:60)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

Comment by Thomas Bernhardt [ 18/Mar/08 ]

Bug fix for release 2.0.0 is attached to this JIRA issue, named "esper-2.0.0-SP213a.jar", includes fix for ESPER-209

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-212] Custom ClassLoader Created: 13/Mar/08  Updated: 11/May/08  Resolved: 17/Mar/08

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Blocker
Reporter: Roger Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add documentation describing how to use custom class loaders.

We are creating classes at runtime using ASM and then writing Esper queries that reference these classes. We get the exception when running this code:
...
60 // Dynamically construct MBean class using ASM
61: Object mBean = createMBean( .... )
...
74: Thread.currentThread().setContextClassLoader( mBean.getClass().getClassLoader() );
75: String s = "SELECT * FROM " + mBean.getClass().getName() + " WHERE Available = false";
76: EPStatement stmt = ePAdministrator.createEPL( s );
...

1) testClassLoader(om.mycompany.tests.ClassLoaderTest)com.espertech.esper.client.EPStatementException: Failed to resolve event type: Failed to load class sempra.sif.agents.Speaker [SELECT * FROM sempra.sif.agents.Speaker WHERE Available = false]
at com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:715)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:163)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:118)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:96)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:122)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:93)
at com.mycompany.tests.ClassLoaderTest.testClassLoader(ClassLoaderTest.java:76)

I found a few references to "custom classloader" in the mailing lists but clicking on the results of a search would not bring up the posting.

It is not clear how to check out the source to your 2.0 production release. I see esper/branches/major200/ and prerelease200/.

In major200 i see packages named: net.esper....
In prerelease200 I see packages names: com.espertech.esper

The prerelease200 package names match the Esper 2.0.0 download but the 'pre' in prerelease200 suggests it is not the production release.

Thanks



 Comments   
Comment by Thomas Bernhardt [ 13/Mar/08 ]

Release 2.0.0 and all prior releases load classes using "Class.forName(...)"

We have made the change to the "branches\enhancements210" branch switching all such code to use:
ClassLoader cl = Thread.currentThread().getContextClassLoader();
clazz = Class.forName(fullyQualClassName, true, cl);

The release 2.1.0 will have this change.

Comment by Thomas Bernhardt [ 13/Mar/08 ]

Since it's marked as a blocker, please let us know and we may be able to provide a service pack.

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-211] statement iterator is never empty Created: 07/Mar/08  Updated: 11/Mar/08  Resolved: 07/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Thomas Bernhardt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   
  • create a statement
  • don' t send any event
  • iterate the statement
    => it gives back one EventBean !

sample code:

EPServiceProvider ep = EPServiceProviderManager.getDefaultProvider();
EPStatement st = ep.getEPAdministrator().createEPL("select count from java.lang.Object.win:length(2)");
Iterator sti = st.iterator();
while (sti.hasNext())
System.out.println("BUG! " + sti.next());



 Comments   
Comment by Thomas Bernhardt [ 07/Mar/08 ]

The count should return zero when the data window is not filled, counting events always returns a value, yep

Comment by Alexandre Vasseur [ 11/Mar/08 ]

got it
must clarify doc on initial state of iterator





[ESPER-210] First-event or first N events data window Created: 07/Mar/08  Updated: 15/Aug/08  Resolved: 07/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The suggestion is to add a std:firstevent data window that captures simply the first N arriving events.



 Comments   
Comment by Thomas Bernhardt [ 07/Mar/08 ]

Assigned to 2.1 release

Comment by Thomas Bernhardt [ 22/Apr/08 ]

Contribution to be received, may make it in 2.1 release but assigned to 2.2

Comment by Thomas Bernhardt [ 30/May/08 ]

Thus the data windows that have been suggested are:
std:firstevent() // first event
std:uniquefirst(property [, ... property]) // first event per property
std:time_first(10 sec) // first 10 seconds
std:length_first(20) // first 20 events

Comment by Thomas Bernhardt [ 07/Aug/08 ]

in release 2.2

Here is the summary of the new data windows:

First Event
std:firstevent()
Retains the very first arriving event, disregarding all subsequent events.

First Unique
std:firstunique(property name(s))
Retains only the very first among events having the same value for the specified property or properties, disregarding all subsequent events for same property value(s).

First Length
win:firstlength(size)
Retains the first size events, disregarding all subsequent events.

First Time
win:firsttime(time period)
Retains the events arriving until the time interval has passed, disregarding all subsequent events.

Comment by Thomas Bernhardt [ 15/Aug/08 ]

in release 2.2





[ESPER-209] Stop of consumer statements of named windows may not entirely deregister consumer Created: 05/Mar/08  Updated: 11/May/08  Resolved: 14/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-2.0.0-JIRA209.jar    
Number of attachments : 1

 Description   

This problem manifests itself when an application registers multiple statements that consume from the same named window, and subsequently stops or destroys the consuming statements. The deregistration of the consuming statement does not always deregister the consuming view causing slowness when multiple adds and removes are performed.



 Comments   
Comment by Thomas Bernhardt [ 05/Mar/08 ]

Attached "esper-2.0.0-SP1.jar" to be placed in front of the classpath, to correct this issue.

Comment by Alexandre Vasseur [ 05/Mar/08 ]

renamed the patch to a conventional name

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-208] Esperio runs out of stack space when processing largeCSV file and not using engine thread Created: 03/Mar/08  Updated: 11/May/08  Resolved: 18/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File stackOverflow.patch    
Patch Submitted:
Yes
Number of attachments : 1

 Description   

When you import a large CSV file using esperio and with setUseEngineThread(false) a StackOverflow occurs. This is because AbstractCoordinatedAdapter.continueSendingEvents calls AbstractCoordinatedAdapter.waitToSendEvents which calls continueSendingEvents again, and so on.

Patch for fix attached.



 Comments   
Comment by Thomas Bernhardt [ 18/Mar/08 ]

Applied to branch "enhancements210_con"

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-207] Delta Event Support Created: 28/Feb/08  Updated: 11/May/08  Resolved: 10/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

removed "and delete" from title, on-delete already is a deletion event



 Comments   
Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-206] Joining more than one stream with an SQL Query Created: 28/Feb/08  Updated: 20/Aug/08  Resolved: 20/Aug/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 2.2

Type: Improvement Priority: Minor
Reporter: Neil Manson Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I notice the documentation states "Only one event stream and one SQL query can be joined; Joins of two or more event streams with an SQL query are not yet supported." I don't see this feature as being listed in the roadmap, are there any plans to include this in a future release?



 Comments   
Comment by Thomas Bernhardt [ 14/Mar/08 ]

Yep we didn't have that in the roadmap. Does your application require (a) multiple SQL queries in one statement or (b) multiple event streams and one SQL query or (c) both.

The questions around order of execution become interesting as the statements could provide parameters for each other's execution.

Can you provide an example of an actual use case.

Comment by Thomas Bernhardt [ 14/Mar/08 ]

Assigned to 2.5, since two statements connected via insert-into can accomplish the same task.

Comment by Thomas Bernhardt [ 20/Aug/08 ]

This was part of the release 2.2 feature set





[ESPER-205] Additional sendEvent method that accepts alias name and event object, plus EventSender instance to skip type lookup Created: 26/Feb/08  Updated: 11/May/08  Resolved: 22/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Let's say I have two objects:

class Quote

{ ... }

class Summary {
Quote bid;
Quote ask;

Assuming there is no discriminator in the Quote class, the question
becomes how can I have a stream for bids that is separate from a
stream for asks. Currently, EPRuntime supports the following syntax:

void sendEvent(Object _object)

But in this case, selecting the stream by class isn't granular enough.
However, the caller probably new that they were dealing with a bid or
an ask. We support the concept of eventTypeAlias for map types, could
we also support this for strongly typed objects too?

void sendEvent(Object _object, String eventTypeAlias);



 Comments   
Comment by Thomas Bernhardt [ 26/Feb/08 ]

I think that the idea is solid. The eventTypeAlias would need to be configured by the application before use, through the existing method addEventTypeAlias. The new sendEvent method would generate an EPException if the type does not match the configured type or is not a subtype. We may open up to support "java.lang.Object" as an event through this mechanism, which could be handy for queries strictly using instanceof, cast, exists and dynamic properties on untyped Object events.

Comment by Thomas Bernhardt [ 26/Feb/08 ]

I'm not sure how this suggestion would play out in Java, but I could
see a variant of this method being employed in .NET based upon the way
generics work.

First, define a delegate that could be used to send an event into the
engine. The delegate would be strongly typed so that you could only
send in an event of the given type.

public delegate void EventSender<T>( T eventObject ) ;

Add a method to the runtime that acquires a strongly typed sender for
the eventTypeOrAlias.

public EventSender<T> GetSender<T>( String eventTypeOrAlias );

The person sending the events then gets a method that only requires
the strong typed object T. If done with care, it could bypass lookups
for the EventType because these can be done in advance. Additionally,
it can bypass the resolution of the alias because this cost would be
incurred once.

Comment by Thomas Bernhardt [ 29/Feb/08 ]

I agree that an EventSender could eliminate a type lookup for Maps and other event types, in light of http://jira.codehaus.org/browse/ESPER-205
Lets use the same JIRA to track more comments.

It may also help make the engine easier to use since the EventSender can provide information what alias and type it expects. In Java, I think we won't be able to do the nice syntax that .NET offers, I think it will need to stay:
public EventSender getEventSender(String alias);

Comment by Thomas Bernhardt [ 06/Mar/08 ]

For the event sender interface I can only see two methods, did I miss anything:

public interface EventSender

{ public String getAlias(); public void sendEvent(Object event) throws EPException; }
Comment by Thomas Bernhardt [ 07/Mar/08 ]

I would recommend keeping the EventSender scoped narrowly so that it
defines what it does without exposing how it does it. IMO, the sender
has one purpose, to send an event down the narrow path that is defined
by the sender. The process of obtaining the sender determines the
path though.

If this is the case, then there is no need for the getAlias() method
being exposed at the interface level. Exposing it implies that all
senders have an alias (or at least the means to provide one). I can
see scenarios where you can use the EventSender model to prepare (i.e.
preprocess) an execution pipeline. As such, I think it makes more
sense to keep the model tight and simple.

As I understand it, parameterized types in Java are bound at runtime
whereas CLR parameterized types are bound at compile time. This
difference would be one area where I would see the CLR-based engine
using a strongly typed delegate to expose the EventSender rather than
an interface. I find that when interfaces have a single method and a
smaller focus the conversion is easy, when they have multiple methods,
I often wont convert at all. This is one of those cases where I see
greater utility as a small simple inline delegate.

Comment by Thomas Bernhardt [ 13/Mar/08 ]

Your method had void returns. Even so, could we do the following? It
would add one method to get a 'generic' sender. It would add two type
checked senders.

public interface EventSender<T>

{ void sendEvent(T event) throws EPException; }

public interface EPRuntime

{ ... EventSender<Object> getSender(String alias); EventSender<T> getSender<T>(String alias); EventSender<T> getSender<T>(); }
Comment by Thomas Bernhardt [ 22/Apr/08 ]

in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-204] DOM-type property of XML events transpose into new stream for use with XPath and nested syntax Created: 25/Feb/08  Updated: 11/May/08  Resolved: 27/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am filtering some xml events and inserting them in a new stream.

insert into machineOff select count as Tcount, new.Production as Production, new.State as State, new.ID as ID, new.Operator as Operator, new.startTime as offTime from pattern [every old=PollEvents(State in ('Warm_Start','Cold_Start')) -> new=PollEvents(State in ('Idle','Stop','Fault'),ID=old.ID) and not PollEvents(State in ('Idle','Stop','Fault'),ID=old.ID)]

I can also do this, which is easier to read.

insert into machineOff select count as Tcount, new, from pattern [every old=PollEvents(State in ('Warm_Start','Cold_Start')) -> new=PollEvents(State in ('Idle','Stop','Fault'),ID=old.ID) and not PollEvents(State in ('Idle','Stop','Fault'),ID=old.ID)]

This is a valide eql statement but I don't now how to reference properties with 'new' in subsequent statements. I've tried new.Production and even the Xpath expression (Usage.production) but neither work. Is there a way? It would be much more concise to select the document rather than each property.



 Comments   
Comment by Thomas Bernhardt [ 25/Feb/08 ]

the engine does allow this for Java POJO and Map-based events, however for XML events the engine does not currently allow to transpose DOM-typed properties into the insert-into stream such that the XPath or nested-property syntax can be used on the inserted-into stream. So selecting individual properties (XML elements and attributes) rather then the whole graph to populate the insert-into stream is currently the only option.

Comment by Thomas Bernhardt [ 28/Feb/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 27/Apr/08 ]

In enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-203] Normalization of subevents into resultant stream Created: 23/Feb/08  Updated: 11/May/08  Resolved: 27/Apr/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 2.1

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sometimes we get a class that is used for more than one purpose; in my
case, the class is Quote which represents a quotation on one side of
the market. One of my feeds provides me these Quote objects inside of
a larger object that does something like the following:

class Summary:
Quote bid
Quote ask

I fire the event into the engine and perform my queries based on the
bid and ask as properties off the summary. For example: select
bid.price from Summary – easy enough.

What if I wanted to create a stream which was just the bids.
Shouldn't be too hard right?
insert into mybid select bid from Summary

This creates a new stream mybid with one property which is 'bid' ...
this wasn't really my intent. My intent was to have bid become its
own stream with all the properties of Summary.bid. In other words, it
would be a stream of Quotes. Any thoughts on how I might go about
making this happen (I can think of some many tricks I could employ to
make this happen, but I'm hoping I simply overlooked something in the
EQL/EPL).



 Comments   
Comment by Thomas Bernhardt [ 23/Feb/08 ]

its an excellent topic to bring up. Over time we have provided new ways to select into streams and there is still value that we haven't yet touched.

To repeat the question, the query was:
insert into MyBidStream select bid from Summary

This query currently populates a stream that has a single property "mybid" that can then be used to select Quote properties. So this is already allowed (any release):
select bid.price from MyBidStream

The queries we discuss here select a single property that is itself a class. In the example, it seems nice to use the Quote instances, that the single property selects, as the underlying event of the inserted-into stream itself. This can simplify the consuming query.

On the other hand, just because an application selects only one property and not two or more properties, we can't populate the inserted-into stream differently. The insert-into result event type should be consistent regardless of the number of properties selected, else the behavior is confusing.

I'd propose we allow the inserted-into stream name as an alias name for a property, to specify that the property value itself should become the event for the stream. For example:

insert into MyBidStream select bid as MyBidStream from Summary
select price from MyBidStream

I think this syntax can make it pretty clear what the type of events into the insert-into stream is (bid.* was also possible but seems less clear).

Comment by Thomas Bernhardt [ 24/Feb/08 ]

The proposed syntax actually seems somewhat confusing to me.

insert into MyBidStream select bid as MyBidStream from Summary
select price from MyBidStream

Where what I think I am trying to convery is:

insert in MyBidStream select bid.* from Summary

To me, that seems to capture the essence of what I'm looking for., but
I currently have no means to indicate that I want everything under bid
represented in Summary. The trivial optimization in this case is that
if bid is an object that I simply transpose the object into the new
stream. If it were a map, then the map details would be transposed.

Comment by Thomas Bernhardt [ 25/Feb/08 ]

I agree that the "<property>.*" is better since, if one renames the insert-into stream, one would also have to rename the property alias. If one would forget the rename, the output of the query changes dramatically. The wildcard removes that chance of error and is also more readable.

Therefore, lets go with
insert in MyBidStream select bid.* from Summary

Comment by Thomas Bernhardt [ 27/Apr/08 ]

In enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-202] Allow "in" operator on array property, collection (set, list) property or map property for contains-value semantics Created: 21/Feb/08  Updated: 11/May/08  Resolved: 24/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It's been suggested to have a "contains" function, and to use the "in" keyword, and simply allow:
select * from MyEvent where value in array // with array being an array or collection event property



 Comments   
Comment by Thomas Bernhardt [ 29/Feb/08 ]

Can this be done with an array where you have the type information?

class Deal

{ Quote quotes[]; }

class Quote

{ BigDecimal price; }

class NamedQuote extends Quote

{ String name; }

select * from Deal where deal.quotes.price = '123'

Would duck typing like the following query work?
select * from Deal where deal.quotes.name = 'jdoe'

=========== reply

as you are probably aware such functions can be placed into static functions called from EPL. Thus I think we are discussing potentially extending the EPL to allow for additional intelligent array operations.

The first query...
select * from Deal where deal.quotes.price = '123'
...would involve a search of the array of quotes to see if any one price matches?

The second query...
select * from Deal where deal.quotes.name = 'jdoe'
...adds the aspect that the subclasses may expose a property.

In the second query, the strong type checking the EPL offers would not let the query compile as "name" is not a property on Quote. Therefore this would need to use the dynamic property syntax:
select * from Deal where deal.quotes.name? = 'jdoe'
...and then the query is similar to the first query which auto-iterates an array.

We have a JIRA to use the "in" keyword for arrays: http://jira.codehaus.org/browse/ESPER-202, however the JIRA is for querying an array of primitives.

Concluding, I think I'd prefer the application writes a static function to keep the EPL small and not add exceptions?

Comment by Thomas Bernhardt [ 24/Apr/08 ]

in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-201] support "days" and "hours" keywords in output rate limiting Created: 19/Feb/08  Updated: 11/May/08  Resolved: 23/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

From list.
Supporting "hours" and "days" sounds natural.

You can see in doc and grammar doc that "hours" is not allowed in that syntax
> http://esper.codehaus.org/esper-1.12.0/doc/reference/en/html/eql_clauses.html#eql-output-rate
> http://esper.codehaus.org/esper-1.12.0/doc/grammar/EQLStatementParser.html#outputLimit

Ah, damn. It seemed so obvious to have 'hours' and 'days' besides
minutes and seconds that it never occured to me to check those
documents. Thanks for pointing that out.



 Comments   
Comment by Thomas Bernhardt [ 19/Feb/08 ]

minor title change

Comment by Thomas Bernhardt [ 23/Apr/08 ]

in enhancements210 branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-200] Warning output "Duplicate time event received for currentTime" Created: 19/Feb/08  Updated: 10/May/08  Resolved: 10/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.1

Type: Bug Priority: Trivial
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File esper-JIRA200.jar     Text File extraTimeCheck.patch    
Number of attachments : 2

 Description   

in Esper 2.0 we have added a warning
14:49:25,811 WARN [EPRuntimeImpl] Duplicate time event received for currentTime 1203342565811

...to indicate that a CurrentTimeEvent timer event (internal and external timer) indicates the same time that the engine already has internally. There is no consequence to the message, and it does not impact processing. It is less efficient, however, to send duplicate time events, and we have therefore added that warning to help the application determine that duplicate timers are processed by the engine. Also see http://esper.codehaus.org/esper-2.0.0/doc/reference/en/html_single/index.html#api-controlling-time

A user has reported that this warning is output for regular processing and we are looking into.



 Comments   
Comment by Thomas Bernhardt [ 19/Feb/08 ]

There is no impact to processing, the warning has been added to make it easier on applications that send their own timer events to determine that a timer should not be sent or has already been processed.

Comment by Alexandre Vasseur [ 19/Feb/08 ]

under which scenario would we have this message if no external timer is used?

I think it can happen as we use scheduleAtFixedRate, and the timer event is created only upon future execution
if a drift happens (f.e. stop the world GC, memory swapping at OS level etc), then future execution are stacked and executes all in a row - possibly within 1 ms thus creating time events of the same ms

few questions

  • should we try to recompute the drift (future.getDelay to send the correct timestamp
    means we can have a time different from System.currentTimemillis that a user would call
  • should we schedule at fixed delay instead

Note that drift is candidate to upcoming monitoring features
We may also issue a warn only if we have external timer and an info or debug otherwise?

Comment by Thomas Bernhardt [ 19/Feb/08 ]

Do some VMs perhaps not move system clock when a full GC occurs?

Comment by Jerry Shea [ 21/Feb/08 ]

I've never heard of a VM freezing the system clock while GC takes place. As system clock (well at least System.currentTimeMillis) is supposed to be wall clock time, I would have though that the VM could not freeze the clock.

Maybe fixed delay would do the job or alternatively the EPLTImerThread could not resend the time event if it is the same as last time?

Comment by Alexandre Vasseur [ 25/Feb/08 ]

Tom can you assess if fixed delay would be better in there yet without impact on the semantics?
Alex

Comment by Alexandre Vasseur [ 03/Mar/08 ]

patch against 2.0.0 to use fixed delay
put this jar before the esper.jar
can check proper loading with -verbose:class

Comment by Alexandre Vasseur [ 07/Mar/08 ]

one extra behavior: if you do a debug session the WARN message shows up a lot, given that stepping into breakpoint can suspend things in the background.

I suggest
1/ we keep fixed rate
2/ but we add a check to only display this as a warning for when ext. time event is used - which is what this WARN is for initially

would everyone be ok with that?

Comment by Jerry Shea [ 12/Mar/08 ]

When using internal timing on a windows box, if you set the internal timing msec resolution to less than the platform's resolution (16) then these warnings show up. In this case I think the warnings are useful as they show you that you are not getting the resolution that you expect from the timer. IMHO there are two solutions to this: either measure the platform's resolution (there is code to do this in ESPER-191) and warn or throw an exception if the user attempts to set internal timer resolution lower than this, or else use nanoTime (+1 from me).

Thinking about this warning some more, if the engine received non-time events between duplicate time events then wouldn't that be a cause for even more concern - maybe a log.error - as this would mean that the user would be getting erroneous results from their time windows.

Comment by Jerry Shea [ 09/Apr/08 ]

I reckon that scheduleWithFixedDelay more accurately reflects the semantics of the internal timer thread.

Here's a patch to detect if an event has been sent in between two duplicate time events. If the user is using time windows then this may cause a problem so I have made it log.error. This error appears 7 times when I run the tests as there are some unit tests that deliberately send an event between duplicate time events.

Comment by Mathias Bogaert [ 29/Apr/08 ]

It would also be good to clarify the message a bit (and include the URI for the runtime):

WARN [EPRuntimeImpl] EPRuntime <URI> received a time event (currentTime: 1203342565811) while having the same internal time. You can safely ignore this message.

Comment by Alexandre Vasseur [ 05/May/08 ]

Tom can you summarize what was impl. in 2.1 before we close this once 2.1 gets GA:

  • fixed delay or fixed rate
  • behavior when sub platform resolution is configured for internal timing
  • duplicate event log message appears when configured with ext timer (I believe that is the status quo so far) and when ...
  • what (log.?) if an event has been sent in between two duplicate time events when using ext timer (ref Jerry note of Apr 9 2008)
Comment by Thomas Bernhardt [ 05/May/08 ]

The change to only log for external time events is already in branch "enhancements210".

Lets add an additional boolean configuration that controls the warning for external timer events, "on" by default. Log is warning level.

Lets also make the fixed delay/fixed rate configurable. By default I'd vote for fixed rate (thats what we have now).





[ESPER-199] switch xsd to 2.0 and make it namespace aware and available online Created: 14/Feb/08  Updated: 14/Feb/08  Resolved: 14/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

switch xsd to 2.0 and make it namespace aware and available online
this way IDE can fetch it etc - just as f.e. for Spring namespace used in EsperIO/JMS etc



 Comments   
Comment by Alexandre Vasseur [ 14/Feb/08 ]

done





[ESPER-198] esperIO CSV adapter to support sending of bean events as well as map events Created: 13/Feb/08  Updated: 11/May/08  Resolved: 13/Apr/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12, 2.0
Fix Version/s: 2.1

Type: Improvement Priority: Minor
Reporter: Jerry Shea Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File beanSupport2.patch     Text File beanSupport.patch    
Number of attachments : 2

 Description   

I really need esperIO CSV adapter to be able to send bean events instead of Map events. I've hacked up a solution...



 Comments   
Comment by Jerry Shea [ 13/Feb/08 ]

See mailing list thread http://www.nabble.com/esperIO-CSV-adapter-to-send-bean-events-as-well-as-map-events-to15453972.html

Comment by Thomas Bernhardt [ 13/Feb/08 ]

Moved to 2.1 to 2.5 release, for the 2.0 release it's going to be a little tight

Comment by Jerry Shea [ 14/Feb/08 ]

Here's some initial code, with only 1 additional test.

Working against trunk I've:
1. introduced a new class SendableBeanEvent which uses Spring's BeanUtils.copyProperties to copy properties from a Map into a bean. BeanUtils.copyProperties does not throw many errors and so this solution will have to change...
2. refactored common code out of SendableBeanEvent and SendableMapEvent into a new class AbstractSendableEvent
3. modified CSVInputAdapter to detect if it has been given a bean EventType, and to use SendableBeanEvent appropriately. I had to modify constructPropertyTypes to not throw, and also introduce an extra try/catch
4. modified TestCSVAdapterUseCases, adding a version of testExistingTypeNoOptions for sending beans.

I'm not sure how to efficiently test this new functionality. It would be nice to be able to run all the tests in TestCSVAdapterUseCases twice, once for Maps and once for Beans but I don't know how to do this in JUnit, and also have not fully analysed all the tests to see if they should be run for both Maps and Beans.

Comment by Jerry Shea [ 02/Mar/08 ]

Here's a new patch which I think resolves the problems with the last (unfinished) one.
1. I've modified TestCSVAdapterUseCases to use either Maps or beans and have inherited from it (TestCSVAdapterUseCasesBean) so that all tests are re-run but for beans instead of Maps. I've also added a new test to check that the adapter functions correctly for read-only bean properties (it ignores them)
2. I used commons-beanutils to convert a Map to a bean including type conversion

Comment by Thomas Bernhardt [ 30/Mar/08 ]

Incorporated to the enhancements210_con branch

Comment by Thomas Bernhardt [ 09/Apr/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 13/Apr/08 ]

Set to resolved, in enhancements210_con branch

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-197] EsperIO/CSV reported to be slow Created: 13/Feb/08  Updated: 11/May/08  Resolved: 16/Mar/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 2.1

Type: Bug Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File log.debug.patch    
Number of attachments : 1

 Description   

EsperIO/CSV is reported to be slower than hand written file parsing code by a factor of 10 which seems too much
This said, EsperIO/CSV is not designed for raw speed but for efficient simulation (replay, coordinated streams replays etc)

a baseline (on Sun T2000) was posted by Ukyo on lists in February 2008
we can establish a baseline on our own on a smaller scale machine as well

we also should be more explicit on perf in doc, and point out to NIO as users commented to Ukyo on the list.



 Comments   
Comment by Ukyo Virgden [ 13/Feb/08 ]

Please let me know if you need any more information.

Comment by Jerry Shea [ 27/Feb/08 ]

I had an example of esperio running very slowly and using up lots of amounts of CPU. With some very basic profiling (hitting pause in Eclipse a few times, rather than doing it properly) I saw that one of the log.debugs was causing the problem. I added if log.isDebugEnabled to the log.debugs in AdapterCoordinatorImpl, CSVReader, AbstractCoordinatedAdapter. Once this was done, the CPU plummeted and everything ran much quicker.

I'm afraid I haven't had time to work this up properly i.e. gather proper profiling evidence, and nail down the exact log.debug statement, but thought I'd mention it in case it helps anyone.

Comment by Thomas Bernhardt [ 28/Feb/08 ]

assigned to 2.1 release

log.debug(...) should be surrounded by:

if ((ExecutionPathDebugLog.isDebugEnabled) && (log.isDebugEnabled()))

{ log.debug(...); }
Comment by Jerry Shea [ 02/Mar/08 ]

Have the committers given any thought to SLF4J (http://slf4j.org/). It doesn't require implicit toStrings to be called may well not have exhibited this problem (http://slf4j.org/faq.html#logging_performance). I appreciate it is a bit of a change.... What do you think?

Comment by Alexandre Vasseur [ 07/Mar/08 ]

I understand this is a wrapper, and thus would replace commons-logging, but would still f.e. allow use of log4j configs as default scheme throughout samples etc

Can someone assess if our other depdendancies would still require commons-logging (cglib, antlr). Otherwise we'll add yet another deps instead of replacing one, and I would not favor this.

Also, the current ExecutionPathDebugLog.isDebugEnabled ends up in a static boolean check, where using slf4j with log4j beehind would end up a in few extra indirection, stack variable push (string, extra objects) and an integer comparison (in log4j Hierarchy).
If we chase microsecond, I think ExecutionPathDebugLog.isDebugEnabled is better despite cumbersone for core code authors.

Tom - thoughts?

Comment by Thomas Bernhardt [ 16/Mar/08 ]

I think the ExecutionPathDebugLog.isDebugEnabled gives the best performance and make the choice of logging framework less relevant. We'd need to make a 3.0 release to change dependencies.

Need to change esperio to add the check

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-196] Configuring a DB for an OutputAdapter Created: 13/Feb/08  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Luca Alberto Milani Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Using Eclipse 3.2 on Windows xp


Number of attachments : 0

 Description   

Hi, I'm luca

I'm trying to connect a DB to ESPER.

I had no problems in using ConfigurationDBRef and I'm able to join event data with stored data.

My need is to store data in my SQL server data base ... really I don't know how to do that.

I think I have to create a class to extend BaseSubscription and another one extending OutputAdapter.

Please tell me something helpful and forgive my ugly english

Thanks

Luca



 Comments   
Comment by Thomas Bernhardt [ 13/Feb/08 ]

Hi Luca,

Yep the output adapters could be used to write to a DB, if you want to create a solution that is more generic in nature or plug-in capable and perhaps contribute that to the project. The output adapter can hook up to streams populated by insert-into. The classes you mention are the right start.

Applications often simply chose to write to a DB from the listener code, as a specific solution .
-Tom

Comment by Luca Alberto Milani [ 13/Feb/08 ]

Hi Tom, thanks!

I don't know if I'm doing it right, this is what I've understood:

I have to create an event and to register it in the Subscription file,
so that ESPER will be able to recognize it as something destined to my DB.
This event also has to be registered in esper configuration.

I have to override method Start(), creating connection in that context.
In other words I have to write my JDBC procedure (Class.forName ...)
in that method's body.

I have to create a method called send() in my output adapter to implement the "insert into" JDBC procedure.

Am I doing it in the right way?

What do I have to expect from ESPER after those implementations?

Which is the correct syntax for the ESPER "insert into" procedure (in the case of insert into DB) ?

Thank you for the time spent upon my problems ...

Luca

Comment by Alexandre Vasseur [ 17/Feb/08 ]

yes output adatper, very likely similar to the existing JMS one with some Spring conf and custom marshalling (for event to table persistence) is the right way to go if you want to add that feaature to Esper

for a one shot solution it might be easier for you to implement this directly in an UpdateListener

Comment by Luca Alberto Milani [ 20/Feb/08 ]

Hi Tom.
I've implemented Subscription and OutputAdapter for DB ... in Subscription I used a "matchFound" implementation very similar to JMSSubscription, passing an event to the outputAdapter ...

In the output adapter I used an AdapterStateManager to implement methods to manage the adapter state (start, stop ...). My start() method is a copy-pasted solution from the same method in JMSOutputAdapter.

I've implemented the method send(EventBean eb), which include all my JDBC policyand manage output on DB.

Using the runtime configuration setting, when I start up my application, I use these invocations:

DBSubscription dbs = new DBSubscription(); // my Subscription implementation
DBOutputAdapterImp dboai = new DBOutputAdapterImp( ... settings for JDBC ... ); // my OutputAdapter implementation

dboai.setEPServiceProvider(esperEngine); // esperEngine is an EPServiceProvider object
dbs.setEventTypeAlias("ETAname"); ETAname is the name of a map event declared in the engine as for other normal events
dbs.registerAdapter(dboai);

doing this simple implementations, when I use "insert into ETAname(properties) etc ...", everything goes in the right way ... my DB is updated etc...

Now ... how can I told to my engine to use more than one alias (and Subscription)? This because when I tried to register another event I have encountered this problem:

net.esper.client.EPStatementException: Error starting view: Event type named 'newETAname' has already been declared with differing column name or type information [insert into newETAname'(intValue,doubleValue,stringValue) select ... from ...

Probably you'll find hard to understand my problems, but I hope you''ll manage to do it ... please help me ...

thanks

Luca

Comment by Alexandre Vasseur [ 21/Feb/08 ]

You need to alias it under a different name maybe
dbs.setEventTypeAlias("ETAnameANOTHER");

Do you want to contribute this code to the project if you think it is generic enough f.e. built atop Spring like the JMS code we had to allow declarative configuration?

Comment by Luca Alberto Milani [ 21/Feb/08 ]

Thanks, I've solved my problem

Now I'm developing an application that uses esper and I'm creating a set of portable output adapters for different kind of outputs. The actual problem is to decide, whithin a DB context, how can I tell to my adapter to do an Update instead of an insert.

Actually I have to finish it, I hope I'll be able to make it generic enough, when everything will be finished I'll send you the code.

Thank you very much.

Luca

Comment by Thomas Bernhardt [ 22/Apr/08 ]

Assigned to 2.5, unless contribution makes it possible to release earlier

Comment by Thomas Bernhardt [ 10/Jun/10 ]

Duplicate to esperio db output adapter





[ESPER-195] Not considering having-clause in un-aggregated and un-grouped query (no-join only) Created: 09/Feb/08  Updated: 18/Feb/08  Resolved: 11/Feb/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 2.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem affects queries without aggregation and group-by, that have a having-clause.
The effect is that the having-clause is simply ignored. Sample statement:
select symbol, volume, price from MarketData.win:time(5.5 sec) having price > 10






[ESPER-194] Nullpointer when using Jcl104-over-slf4j Created: 07/Feb/08  Updated: 18/Feb/08  Resolved: 10/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.11
Fix Version/s: 2.0

Type: Bug Priority: Major
Reporter: Mathias Bogaert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tomcat 6.0.14, Esper 1.11, slf4j-api 1.4.3, jcl104-over-slf4j 1.4.3, JDK 1.6.0 update 4


Number of attachments : 0

 Description   

16:41:55.626 [Timer-1] ERROR Timer-1 - Thread terminated with exception: Timer-1
java.lang.NullPointerException
at net.esper.core.UpdateDispatchViewBlocking.update(UpdateDispatchViewBlocking.java:37)
at net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:52)
at net.esper.core.EPStatementStartMethod$1.matchFound(EPStatementStartMethod.java:118)
at net.esper.pattern.EvalRootStateNode.evaluateTrue(EvalRootStateNode.java:100)
at net.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryStateNode.java:188)
at net.esper.pattern.EvalObserverStateNode.observerEvaluateTrue(EvalObserverStateNode.java:48)
at net.esper.pattern.observer.TimerIntervalObserver.scheduledTrigger(TimerIntervalObserver.java:49)
at net.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:351)
at net.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:318)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:285)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:217)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:104)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Perhaps due to http://bugzilla.slf4j.org/show_bug.cgi?id=15 ? The commons-logging log instances are declared static but not final?

Maybe you guys need to switch to SLF4J? Much better performance using Logback (see http://www.javadonkey.com/blog/log4j-isdebugenabled-logback/)



 Comments   
Comment by Thomas Bernhardt [ 10/Feb/08 ]

For the execution path debug logging we had introduced a static boolean flag on class ExecutionPathDebugLog, so all the debug-logs in the execution path should read:
if ((ExecutionPathDebugLog.isDebugEnabled) && (log.isDebugEnabled()))

The ExecutionPathDebugLog.isDebugEnabled can only be set to true via explicit configuration. The UpdateDispatchViewBlocking, my mistake, does not have the above check but should. In release 2.0 we'll make sure once more that all such checks are there.

Comment by Thomas Bernhardt [ 10/Feb/08 ]

We could provide a patch to the release 1.12 engine if you require so.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-193] EsperIO package refactoring to esperio Created: 05/Feb/08  Updated: 18/Feb/08  Resolved: 13/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

EsperIO package is c.e.esper.plugin
I think it 'd be better to c.e.esperio (ie top level package name esperio). The "plugin" only derives from the Esper core plugin loader mechanism and we don't need to use that in package or class name (we use adapter here anyway)

will add to the list of API breaks in 2.0



 Comments   
Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-192] support non String type in EsperIO Created: 05/Feb/08  Updated: 10/Feb/08  Resolved: 10/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

esperIO assume types are String, especially when using an header row
this is a bit limited
We can add support for typed columns:
long price,symbol
12,GOOG
13,STUF



 Comments   
Comment by Thomas Bernhardt [ 05/Feb/08 ]

It already supports typed columns, by defining a Map event type and using the alias for that type

Comment by Alexandre Vasseur [ 05/Feb/08 ]

reopen
I mean auto-discovery. When there is a header row only String type is assumed unless users code types explicitly.
I think it is nice to have an auto discovery thru a typed header row

Comment by Alexandre Vasseur [ 10/Feb/08 ]

impl & doc





[ESPER-191] Support nano/microsecond resolution Created: 03/Feb/08  Updated: 11/May/08  Resolved: 27/Apr/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File nano1.esper2.patch     Text File nano1.patch     Text File nano1warn.esper2.patch     Text File nano2.patch     Java Source File TestSystemTimers.java    
Number of attachments : 5

 Description   

Uses cases have come up where the millisecond resultion is to coarse-grained.

A user has done bit more investigation on this and confirmed that, when he passes external timer ticks into the Esper engine, everything works well for his test (1ms time_batch window). But to do this he had to remove the checks in the engine that prohibit <100ms time_batch windows.

Here is a link to an article about the resolution of System.currentTimeMillis: http://www.javaworld.com/javaworld/javaqa/2003-01/01-qa-0110-timing.html

Other work:

  • Change esper to support System.nanoTime instead
  • Remove java.util.Timer and replace with Thread


 Comments   
Comment by Jerry Shea [ 05/Feb/08 ]

To compare System.currentTimeMillis and System.nanoTime I have done some measurements on two platforms:

  • ms = millisecs, us=microsecs

a) Windows XP, Sun Java 6, 32bit

  • time to call System.currentTimeMillis=0.04 us
  • time to call System.nanoTime=1.41 us (35 times slower!)
  • System.currentTimeMillis resolution=16 ms (unusable for fine-grained timers)
  • System.nanoTime resolution=approx 50 us
  • drift between System.currentTimeMillis and System.nanoTime over 20 minutes=17 ms (extrapolated to 24hours=1.2secs)

b) RedHat Enterprise Linux, Sun Java 6, 64bit

  • time to call System.currentTimeMillis=1.10 us
  • time to call System.nanoTime=1.19 us
  • System.currentTimeMillis resolution=1 ms
  • System.nanoTime resolution=approx 60 us
  • drift between System.currentTimeMillis and System.nanoTime over 20 minutes=1 ms (extrapolated to 24hours=72ms)

I'll attach the code I used to generate these measurements tomorrow. In summary, on Windows System.nanoTime is much slower than System.currentTimeMillis and System.currentTimeMillis's resolution is not good enough for fine grained timers. On RHEL, resolution is fine, and performance comparable.

Comment by Thomas Bernhardt [ 05/Feb/08 ]

Given how much slower System.nanoTime is over System.currentTimeMillis (on Windows) should we allow the user to choose which one they use with a configuration parameter?

A new config could be: <timer nano-enabled="false"/> stanza inside <threading> in the configuration and, depending on its value, we could read <internal-timer msec-resolution="xx"/> or <internal-timer nsec-resolution="xx"/>.

Giving the user no choice and choosing System.nanoTime as the internal impl would certainly make the code cleaner and lead to less multiplying and dividing by 1,000,000.

Comment by Jerry Shea [ 06/Feb/08 ]

basic program to test timer resolution and performance on your platform

Comment by Thomas Bernhardt [ 06/Feb/08 ]

Moved to release 2.1 to 2.5 (2.5 for now) as more research is required

Comment by Jerry Shea [ 10/Feb/08 ]

Here is a patch made against esper/tags/release_1.12_0/trunk/esper. Tom&Alex, please let me know what you think and I can make another patch against trunk for esper2.

It includes the following changes:
1. instead of checking for minimum time window of 100ms in various Time-related views, check for minimum of 1 ms. I did not change OutputConditionTime which has a similar check
2. change EQLTImerTask and TimerServiceImpl to use ScheduledThreadPoolExecutor instead of Timer. Timer can only support resolution as good as System.currentTimeMillis whereas ScheduledThreadPoolExecutor supports much improved resolution
3. convert EPRuntimeImpl and SchedulingServiceImpl to use System.nanoTime internally
4. modify TestVariablesTimer to use System.nanoTime to sync it with internal clock to make it pass
5. there are a few other places in the engine (InsertIntoLatchSpin, UpdateDispatchFutureSpin, UuidGenerator) that call System.currentTimeMillis but I did not change these as it doesn't seem necessary. I could always change these for consistency's sake...?

All tests pass that passed before [testOperator(net.esper.regression.pattern.TestCronParameter) fails before and after - will look into this].

This patch only ensures that the esper internals do not have to rely on System.currentTimeMillis resolution (16ms on my Windows boxes) and are able to support finer-grained resolution. In retropect, it would be easy to parameterise the engine through configuration to use either of System.currentTimeMillis as opposed to System.nanoTime as this is only called in two places.

I have done some tests using internal timing with very fine-grained time windows (e.g. 1msec) and would not recommend you use internal timing for this use case on a vanilla (i.e. not real-time) VM due to GC etc. When I use external timing and 1msec windows everything works like a charm.

I have started making the changes to convert the internals of esper to use nanoseconds instead of milliseconds but it is a bigger job than I initially thought and I've put this on the back burner for now.

Comment by Thomas Bernhardt [ 10/Feb/08 ]

Great-thanks for the extensive comments and patch. We'll need to digest your work.

The TestCronParameter probably fails as there was a leap year problem with the code that we found during unit tests in 2008, and fixed recently.

When you use external timing, do you use a thread pool for sending timer events? I think the project would benefit from sample code, or perhaps a couple of classes in the client API, to simplify.

Comment by Jerry Shea [ 11/Feb/08 ]

Another patch that adds a log.warn if you send a duplicate time event into the engine. Having this would certainly have saved me some time during my testing of esper timing internals

Will look at tidying up my test/example code for esper examples.

Comment by Alexandre Vasseur [ 11/Feb/08 ]

great work.
I agree on putting this out of 2.0 but more for 2.1 - unless we shift 2.0 to a later week?

Comment by Jerry Shea [ 11/Feb/08 ]

I'll upload patches against trunk in approx 8 hours if that helps. It would be great to get this out as part of 2.0 if it's ok with you guys. Please ignore the second patch for now - I will re-upload it later.

Comment by Jerry Shea [ 12/Feb/08 ]

Here's the nanoTime patch but made against svn trunk. Very similar to the last one but I had to make some changes around EPLTimerTask to capture clock drift.
I also changed TestTimestampExpr to use the configuration with internal timer disabled.

Comment by Jerry Shea [ 12/Feb/08 ]

(nano1warn.esper2.patch) And here's the same patch but with extra code to log.warn when a duplicate time event is received by the engine. I initialise currentTime to current time - 1ms in SchedulingServiceImpl constructor to prevent this warning being logged everywhere.
Again, this was made against trunk.

Comment by Thomas Bernhardt [ 13/Feb/08 ]

I will rewrite the code changes into trunk for the 2.0 release

Comment by Thomas Bernhardt [ 14/Feb/08 ]

Added to trunk, documentation changes under review

Comment by Alexandre Vasseur [ 14/Feb/08 ]

some issue with engine time under discussion

Comment by Thomas Bernhardt [ 15/Feb/08 ]

For release 2.0, the timer uses System.currentTimeMillis() (and not nano since nano is not related to wall clock).
All other changes stay.

Comment by Jerry Shea [ 21/Feb/08 ]

Here's another patch that fixes the System.nanoTime wallclock issue.
I originally wrote some code which allowed the configuration to select whether to use TimeSourceMillis or TimeSourceNanos but decided to upload the simpler version with a static TimeSource.getDefaultTimeSource() method as we had discussed only allowing nanoTime... This code can be cut down further - any suggestions more than welcome.

Comment by Jerry Shea [ 24/Feb/08 ]

What do you guys think about this latest patch? As I see it we could:
1. do the simplest change that could possibly work: convert esper to use System.nanoTime plus include wall-clock offset against trunk, or
2 apply the latest patch (21 Feb) although it contains some redundant code (TimeSourceMillis) which we could remove, or
3. I can tidy my code that allows either millis or nanos to be selected using configuration, and upload that
I'd really like to get System.nanoTime into 2.1 by one of these mechanisms

Comment by Alexandre Vasseur [ 25/Feb/08 ]

In the patch 2 (from Feb 21), I can read in the TimeSourceNanos:

+ public TimeSourceNanos()

{ + super(); + // calculate approximate offset by referring to TimeSourceMillis which + // is already normalised to wall clock time + this.wallClockOffset = new TimeSourceMillis().getTimeMicros() - this.getTimeMicros(); + }

+
+ public long getTimeMicros()

{ + return (System.nanoTime() / NANOS_TO_MICROS) + wallClockOffset; + }

I think wallClockoffset is a bad name, as there is no meaning in substracting / adding wall clock time and System.nanoTime() since the later is not a time information but simply some counter (the javadoc f.e. also say it could be negative sometime)
This said, as in the getter you do another operation I guess the end result is valid.
Better design would likely be to keep nanoTime as is in a final field and manipulate things from that value only, thus changing the getTimeMicros

The one issue I see is that I assume it will be impossible to synchronise 2 instances even running on the same hardware and OS (in 2 jvms, as the offset will be different). I thus would like to have TimeSourceMillis the default.

Let's see Tom comments now.

Comment by Thomas Bernhardt [ 25/Feb/08 ]

http://blogs.sun.com/dholmes/entry/inside_the_hotspot_vm_clocks

Comment by Jerry Shea [ 26/Feb/08 ]

Interesting article. I tried running my stats measurement program again on my laptop with -XX:+ForceTimeHighResolution set but it have the same results i.e. a System.currentTimeMillis resolution of 15-16 ms.

Two instances in two JVMs would have a different offset but the end wall clock time would be within 15-16 ms given the above code. It could be made more accurate by waiting for System.currentTimeMillis to "flip over" its resolution boundary i.e. wait until System.currentTimeMillis changes its time before calculating the offset. I believe this would allow 2 VMs to be synchronised to 1 millisecond.

I'll upload some sample code later, but I think this would allow two VMs to report an accurate, synchronised wall clock time, cross platform (i.e. on Windows).

Comment by Jerry Shea [ 02/Mar/08 ]

Looking at the code again, the code (in waiting for construction of TimeSourceMillis) does wait for System.currentTimeMillis to flip over. As this is the case, I believe that 2 VMs would be synchronised as accurately as they are now, using System.currentTimeMillis.

Comment by Thomas Bernhardt [ 18/Mar/08 ]

Changes applied to branch "enhancements210_con".
The TimeSource implementation cannot be static though, since multiple Esper engines per VM can co-exist. Thus we need an engine configuration.
The branch contains that adds an engine defaults configuration that, by default, uses the TimeSourceMillis, and can be set to use TimeSourceNanos.

Comment by Thomas Bernhardt [ 09/Apr/08 ]

Reopen for further changes as part of the the esper-210-con banch and 2.1 release

Comment by Thomas Bernhardt [ 27/Apr/08 ]

Already merged to enhancements210_con branch

Comment by Thomas Bernhardt [ 10/May/08 ]

The TimeSourceService was too inefficient as it first multiplied System.currentTimeMillis by 1000 and then divided it by 1000 for each call.

The new TimeSourceService that was rewritten in trunk keeps a public static boolean that indicates whether to use System.currentTime of System.nano (wallclock-adjusted), making the configuration a JVM-global setting.

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-190] Add event type alias to EventType interface Created: 01/Feb/08  Updated: 08/Nov/08  Resolved: 05/Nov/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 2.3

Type: Improvement Priority: Minor
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be nice if you could determine from an EventBean what the event type alias for the event is. EventType seems like the right place to do this, but EventType currently only reports the class type for the EventBean, not the alias. For map events this comes out as Map.class. It would be helpful if my update listeners & views could differentiate mapped events.



 Comments   
Comment by Thomas Bernhardt [ 02/Feb/08 ]

The relationship between EventType and alias is actually not necessarily a one-to-one relationship. For example:
config.addEventTypeAlias("AEvent", MyClass);
config.addEventTypeAlias("BEvent", MyClass);

The EventType for MyClass still exists only once, however now statements that say
(1) select * from AEvent
(2) select * from BEvent
...both statements receive MyClass events

Therefore its is only be possible to supply the primary alias, i.e. in this example "AEvent" as that is the first name the class has been registered with.

However when the listener to statement (2) receives events the EventType will say "AEvent", not "BEvent".

Would adding a application-defined property to the event be terrible?

Comment by Scott Frenkiel [ 02/Feb/08 ]

Thanks for responding. I see what you are saying, actually it makes me curious why you would want to register the same class with 2 different aliases? Although for map events i suppose that couldn't easily be prevented.

As you suggest, we are already using a special property to get around this for now. But I was hoping for a more general solution. It looks like the implementation of EventType that we are using, MapEventType, carries the event's alias as a private variable. Even if you don't want to modify the interface, just exposing that field in the subclass would be helpful.

Comment by Thomas Bernhardt [ 03/Feb/08 ]

You are suggesting we make the "typeName" member that carries the alias name a protected field so its available in a subclass? Do you have a good reason to subclass?

The other option could be to add an interface AliasedEventType with a "getAlias" method, and have the MapEventType and DomEventType implement that interface.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

Assigned to 2.1 to 2.5 release

Comment by Thomas Bernhardt [ 05/Nov/08 ]

in 2.3

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-189] Improve performance of anonymous map events by using indexed access in EventPropertyGetter Created: 26/Jan/08  Updated: 04/Aug/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 04/Aug/10 ]

Not considered an option, subscriber is an alternative delivery method with still better performance.





[ESPER-188] Output snapshot buffers events until output condition is reached Created: 26/Jan/08  Updated: 18/Feb/08  Resolved: 28/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The situation is that S1 is a high-volume stream, assume 100000/sec events. Esper can keep up with the stream filtering and computing aggregates. However a further consumer needs to output results only once per day (for example). The once-per-day consumer (Q1) should not buffer events.

// this statement should not buffer events arriving for Q1 for 1 day
select * from Q1.groupby('col1','col2','col3').std:lastevent() output snapshot every 86400 seconds



 Comments   
Comment by Thomas Bernhardt [ 28/Jan/08 ]

A bug fix release has been made available that fixes the issue: esper-1.12.0e.jar in the download area under previous release.

See esper-1.12.0-bugfix-changelog.txt for bug fix change log.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0 and

Comment by Thomas Bernhardt [ 18/Feb/08 ]

...and a bug fix for 1.12 is also available





[ESPER-187] Join of two or more named windows on late start may not return correct aggregation state on iterate Created: 18/Jan/08  Updated: 18/Feb/08  Resolved: 18/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This affects statements that joins two or more named windows, that aggregate and that start the join statement on already-filled named windows.
Depending on the join clause, the symetricity of outer-join is violated and the resulting aggregation state may post incorrect result.

Sample queries:
create window WindowLeave.win:keepall() as select tl, id, loc from AEvent
insert into WindowLeave select tl, id, loc from AEvent
create window WindowEnter.win:keepall() as select loc, sku, te, id from BEvent
insert into WindowEnter select loc sku, te, id from BEvent
// populate named windows with data
// then create consuming join
select s1.loc, sku, avg(tl -te), count(te), count(tl), (count(te) - count(tl))
from WindowLeave as s0 right outer join WindowEnter as s1
on s0.id = s1.id and s0.loc = s1.loc
group by s1.loc, sku
output every 1.0 seconds
order by s1.location, sku



 Comments   
Comment by Thomas Bernhardt [ 18/Jan/08 ]

Bug fix release available under "esper-1.12.0d.jar" in distribution dir.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-186] Iterator not honoring order by clause for grouped join query with output-rate clause Created: 18/Jan/08  Updated: 18/Feb/08  Resolved: 18/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem affects the iterator result of queries that are all of the following

  • join
  • fully aggregated and grouped
  • output rate clause
  • order by clause

Workaround: leave output rate clause off

Sample query:
select s1.loc, sku, avg(abc), count(def), count(abc), (count(abc)- count(def))
from WindowLeave as s0 right outer join WindowEnter as s1
on s0.id = s1.id and s0.loc = s1.loc
group by s1.loc, sku
output every 1.0 seconds
order by s1.location, sku

The iteration result may not be returned sorted as a result.



 Comments   
Comment by Thomas Bernhardt [ 18/Jan/08 ]

Bug fix release available under "esper-1.12.0d.jar" in distribution dir.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-185] Remove limitation whereas grouped-by properties cannot also occur within aggregation functions Created: 14/Jan/08  Updated: 15/Jan/08  Due: 15/Jan/08  Resolved: 15/Jan/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The error reported is:

> net.esper.client.EPStatementException: Error starting view: Group-by property 'xxx' cannot also occur in an aggregate function in the select clause [select cat, xxx, yyy, count(xxx) as mycount from ANamedWindow group by cat, xxx, loc output every 1.0 seconds]
>
> If I remove the "xxx" from the Group By, it works fine but user will get too much line to be useful... Have you specific info on this limitation?

=======

The limitation had originally been observed in database systems, with Sybase(TM), Oracle(TM) and MySQL(TM) being the references that were used in the original designs.



 Comments   
Comment by Thomas Bernhardt [ 15/Jan/08 ]

Changed to bug fix, release patch for 1.12 will be made

Comment by Thomas Bernhardt [ 15/Jan/08 ]

Patch release made available in distribution dir by name esper-1.12.0c.jar





[ESPER-184] NPE when using regexp or like on null pojo properties Created: 11/Jan/08  Updated: 18/Feb/08  Resolved: 30/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.11
Fix Version/s: 2.0

Type: Improvement Priority: Minor
Reporter: Edmund Wagner Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

when using like or regexp on a string property that can be null a npe is thrown.

workaround: check if its null before doing the regexp or like check ( a.b!=null and a.b like 'asdf%' )

would be nice if they would just return false.



 Comments   
Comment by Edmund Wagner [ 11/Jan/08 ]

I'm sorry the workaround does not work.

Comment by Thomas Bernhardt [ 27/Jan/08 ]

In checking and testing the like and the regexp both return null if the event property is null...can you please let us know a stack trace or more details?

Comment by Edmund Wagner [ 28/Jan/08 ]

im using a statement like:
select * from A ( x=1 and y like '123%' )

"at net.esper.filter.FilterParamIndexBooleanExpr.matchEvent(FilterParamIndexBooleanExpr.java:80)"
Maybe that null return value is the problem when processed by the boolean expression.

09:07:32,464 ERROR [STDERR] net.esper.client.EPException: java.lang.NullPointerException
09:07:32,464 ERROR [STDERR] at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:240)
09:07:32,464 ERROR [STDERR] at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)
09:07:32,464 ERROR [STDERR] at de.innosystec.esp.processor.ESProcessor.sendEvent(ESProcessor.java:123)
09:07:32,464 ERROR [STDERR] at de.innosystec.esp.processor.JmsAdapter.run(JmsAdapter.java:122)
09:07:32,464 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
09:07:32,464 ERROR [STDERR] Caused by: java.lang.NullPointerException
09:07:32,464 ERROR [STDERR] at net.esper.filter.ExprNodeAdapter.evaluate(ExprNodeAdapter.java:60)
09:07:32,464 ERROR [STDERR] at net.esper.filter.FilterParamIndexBooleanExpr.matchEvent(FilterParamIndexBooleanExpr.java:80)
09:07:32,464 ERROR [STDERR] at net.esper.filter.FilterParamIndexEquals.matchEvent(FilterParamIndexEquals.java:100)
09:07:32,464 ERROR [STDERR] at net.esper.filter.FilterHandleSetNode.matchEvent(FilterHandleSetNode.java:97)
09:07:32,464 ERROR [STDERR] at net.esper.filter.EventTypeIndex.matchType(EventTypeIndex.java:140)
09:07:32,464 ERROR [STDERR] at net.esper.filter.EventTypeIndex.matchEvent(EventTypeIndex.java:91)
09:07:32,464 ERROR [STDERR] at net.esper.filter.FilterServiceImpl.evaluate(FilterServiceImpl.java:48)
09:07:32,464 ERROR [STDERR] at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:497)
09:07:32,464 ERROR [STDERR] at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:236)
09:07:32,464 ERROR [STDERR] ... 4 more

let me know if you need any additional info.

Comment by Edmund Wagner [ 28/Jan/08 ]

esper version is 1.11.0

Comment by Thomas Bernhardt [ 29/Jan/08 ]

Thanks for the additional info. We'll have this in the 2.0 release

Comment by Thomas Bernhardt [ 30/Jan/08 ]

In 2.0 release

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-183] Replace LinkedLists with ArrayDeque where possible Created: 09/Jan/08  Updated: 18/Feb/08  Resolved: 30/Jan/08

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: 1.12
Fix Version/s: 2.0

Type: Improvement Priority: Minor
Reporter: Richard Huddleston Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP, Java 1.6


Attachments: PNG File ProfilerScreenshot.png    
Number of attachments : 1

 Description   

Please replace LinkedLists with ArrayDeques (since JDK 1.6) and (backported from JDK 1.6 if must) where possible (i.e., you don't need to remove / iterator remove from the non head / tails of the list). Attached is a profiling session showing that 20% of our object allocations are in LinkedList.add (with most of that related to Esper views). I took a look at the source code, and in both TimeBatchView and TimeWindow, ArrayDeques could be used (assumming the EventCollection .iterator.remove calls are not being used).

If the iterator.remove() calls are being used, perhaps there could be an optional way to specify that a view will not create an iterator mutable event collection. Then based on that, decide whether to use ArrayDeques or LinkedLists.

Since ArrayDeques were added in 1.6, perhaps the source code could be ported into Esper.



 Comments   
Comment by Thomas Bernhardt [ 10/Jan/08 ]

Great suggestion, thank you. I have tried to backport the ArrayDeque class from JDK6 to JDK5 and found no problem. Scheduled for 2.0 release due next, which will still be build with JDK5.

Comment by Thomas Bernhardt [ 30/Jan/08 ]

The ArrayDeque does turn out faster then LinkedList when used for adding, removing and iteration. For construction and no removal with few elements, it seems about equivalent. For toArray() operation it's clearly slower.

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-182] Allow array as variable type Created: 27/Dec/07  Updated: 21/May/12  Resolved: 21/May/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A suggestion is to allow arrays and not just scalar values as variable types, such that the in-clause can use a single variable and variable values can be assigned using the "

{...}

" syntax.



 Comments   
Comment by Thomas Bernhardt [ 21/May/12 ]

removed from roadmap





[ESPER-181] Add API to set variable values Created: 27/Dec/07  Updated: 18/Feb/08  Resolved: 10/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In Esper 1.12, variables can be set via the On-Set statement only, and there is no API to set one or more variables. This suggestion was raised to add an API.



 Comments   
Comment by Thomas Bernhardt [ 10/Jan/08 ]

For release 2.0

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-180] Null aggregation results outer joining a named window on filled named window Created: 26/Dec/07  Updated: 15/Jan/08  Resolved: 26/Dec/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem has been reported for release 1.12.

Aggregation results for a statement that joins a named window are incorrect if the statement is created on an already-populated named window. This occurs with the iterator API and also for the subscription API.

To reproduce:

1) create named window
create window MyWindow.std:groupby(

{'string', 'intPrimitive'}

).win:length(3) as select string, intPrimitive, boolPrimitive from SupportBean

2) insert into for named window
insert into MyWindow select string, intPrimitive, boolPrimitive from SupportBean

3) populate events into named window...
epService.getEPRuntime().sendEvent(bean);

4) create statement joining the named window and aggregating on join results:
select string, intPrimitive, count(boolPrimitive) as cntBool, symbol
from MyWindow full outer join SupportMarketDataBean.win:keepall()
on string = symbol
group by string, intPrimitive, symbol
order by string, intPrimitive, symbol

5) use iterator API to obtain results, aggregation values are initial values and don't reflect named window contents

Workaround: create statement before sending events to the named window, or use on-select instead

See comments for bug fix jar file release.



 Comments   
Comment by Thomas Bernhardt [ 26/Dec/07 ]

The updated jar file that fixes issue ESPER-180 is available.

The updated jar file is "esper-1.12.0b.jar" and can be downloaded from our download page under previous releases, at http://dist.codehaus.org/esper/





[ESPER-179] Iterator on select statement selecting from a named window may return incomplete results Created: 20/Dec/07  Updated: 15/Jan/08  Resolved: 21/Dec/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This problem manifests itself when a statement selects from a named window and the iterator is used to pull statement results. The result returned by the iterator may only return the last event rather then a complete set of events.

For example:
create window MyWindow.std:groupby(

{'string', 'intPrimitive'}

).win:length(9) as select string, intPrimitive from SupportBean
insert into MyWindow select string, intPrimitive from SupportBean
.. insert events...
select string, intPrimitive, count from MyWindow group by string, intPrimitive

The iterator on the last statement may not return the full result set when the result set consists of multiple rows.



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/07 ]

The updated jar file that fixes issue ESPER-179 is available.

The updated jar file is "esper-1.12.0a.jar" and can be downloaded from our download page under previous releases, at http://dist.codehaus.org/esper/





[ESPER-178] Problem selecting "sum" as a property of event posted by stat:uni view Created: 06/Dec/07  Updated: 18/Feb/08  Resolved: 11/Feb/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 2.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am trying to run the query shown below but get an error because sum the parser thinks i am trying to specify sum('whatever') and expects the parenthesis. Anyone know how get around this (without using the sum(''whatever') notation) ?

select symbol, sum event.PriceChangeEvent.win
:time_batch(10 seconds).std:groupby('symbol').stat:uni('price')

================

The workaround is to select * from the view. The "sum" property gets hidden by the parser and will need to be renamed, or a second property provided, in a next version.



 Comments   
Comment by Thomas Bernhardt [ 13/Dec/07 ]

Assigned to 2.0, requires a change that is not backwards compatible; version 2 may rename to "total" and "datapoints"

Comment by Thomas Bernhardt [ 11/Feb/08 ]

In release 2.0, the two properties "sum" and "count" are renamed to "total" and "datapoints"
This affects the stat:cube view as well.

See also Wiki at http://docs.codehaus.org/display/ESPER/Migrating+Esper+1.x+to+Esper+2.x

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-177] Deadlock in EPRuntimeImpl.sendEvent Created: 30/Nov/07  Updated: 21/Dec/07  Resolved: 07/Dec/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Bug Priority: Blocker
Reporter: Richard Huddleston Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows xp, jdk 1.6


Attachments: Zip Archive EsperBug177.zip    
Number of attachments : 1

 Description   

Found one Java-level deadlock:
=============================
"Timer-6":
waiting for ownable synchronizer 0x0c752538, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "Timer-5"
"Timer-5":
waiting for ownable synchronizer 0x0c753088, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "Timer-6"

Java stack information for the threads listed above:
===================================================
"Timer-6":
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x0c752538> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:7
    47)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)
    at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
    at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
    at net.esper.util.ManagedLockImpl.acquireLock(ManagedLockImpl.java:42)
    at net.esper.core.EPRuntimeImpl.route(EPRuntimeImpl.java:187)
    at net.esper.eql.view.InternalRouteView.route(InternalRouteView.java:60)
    at net.esper.eql.view.InternalRouteView.update(InternalRouteView.java:47)
    at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:97)
    at net.esper.eql.view.OutputProcessViewDirect.update(OutputProcessViewDirect.java:58)
    at net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:52)
    at net.esper.core.EPStatementStartMethod$1.matchFound(EPStatementStartMethod.java:118)
    at net.esper.pattern.EvalRootStateNode.evaluateTrue(EvalRootStateNode.java:100)
    at net.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryStateNode.java:188)
    at net.esper.pattern.EvalOrStateNode.evaluateTrue(EvalOrStateNode.java:88)
    at net.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterStateNode.java:84)
    at net.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterStateNode.java:124)
    at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:534)
    at net.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:459)
    at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:252)
    at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)
    at OUR SOURCE CODE REMOVED STACK TRACE ELEMENTS REMOVED
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-5":
    at sun.misc.Unsafe.park(Native Method)
  • parking to wait for <0x0c753088> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:7
    47)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)
    at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
    at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
    at net.esper.util.ManagedLockImpl.acquireLock(ManagedLockImpl.java:42)
    at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:531)
    at net.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:459)
    at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:291)
    at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:217)
    at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)
    at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:104)
    at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

Found 1 deadlock.



 Comments   
Comment by Thomas Bernhardt [ 30/Nov/07 ]

Can you please attach the statements that produce the deadlock? Or better yet a test case?

Try this configuration option:
config.getEngineDefaults().getThreading().setInsertIntoDispatchPreserveOrder(false);

Comment by Richard Huddleston [ 03/Dec/07 ]

Unfortunately, I can't attach our statements, but I hope what I've provided will help.
Attached is a test case which can reproduce a deadlock ... may not be our deadlock.
The suggested fix you gave of:
config.getEngineDefaults().getThreading().setInsertIntoDispatchPreserveOrder(false);
does resolve this test case.
Hopefully, the fix will remedy the code we have in production too. If it does, then perhaps the test case is an accurate representation of the issue we are seeing.

Comment by Thomas Bernhardt [ 05/Dec/07 ]

Deepest thanks for the outstanding testcase!

Comment by Thomas Bernhardt [ 07/Dec/07 ]

In release 1.12

Comment by Thomas Bernhardt [ 07/Dec/07 ]

In 1.12 we have re-written the insert-into locking to use latches instead.

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-176] NullPointerException for grouped-by length view and previous operator Created: 28/Nov/07  Updated: 21/Dec/07  Resolved: 28/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java.lang.NullPointerException
at net.esper.eql.expression.ExprPreviousNode.evaluate(ExprPreviousNode.java:110)
at net.esper.eql.expression.ExprArrayNode.evaluate(ExprArrayNode.java:147)
at net.esper.eql.expression.ExprStaticMethodNode.evaluate(ExprStaticMethodNode.java:184)
at net.esper.eql.expression.ExprAndNode.evaluate(ExprAndNode.java:47)
at net.esper.eql.view.FilterExprView.filterEvents(FilterExprView.java:74)
at net.esper.eql.view.FilterExprView.update(FilterExprView.java:44)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:103)
at net.esper.view.std.MergeView.update(MergeView.java:80)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:97)
at net.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java:95)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:97)
at net.esper.view.window.LengthWindowView.update(LengthWindowView.java:114)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:119)
at net.esper.view.std.GroupByView.update(GroupByView.java:122)
at net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:52)
at net.esper.view.stream.StreamFactorySvcImpl$1.matchFound(StreamFactorySvcImpl.java:124)
at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:553)
at net.esper.core.EPRuntimeImpl.processThreadWorkQueue(EPRuntimeImpl.java:461)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:254)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:123)
at espertest.Temperature2Test.sendCepInputs(Temperature2Test.java:103)
at espertest.Temperature2Test.testAll(Temperature2Test.java:582)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90



 Comments   
Comment by Thomas Bernhardt [ 28/Nov/07 ]

This can be worked-around by disabling view-sharing via the configuration option:
configuration.getEngineDefaults().getViewResources().setShareViews(false);

Comment by Thomas Bernhardt [ 28/Nov/07 ]

fixed by view factories checking view reusability taking random access into account

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-175] ArrayIndexOutOfBoundsException with when no event posted with new multipolicy time-length batch window Created: 28/Nov/07  Updated: 21/Dec/07  Resolved: 28/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

But I see it happening today against 1.11.0. Here's the exact stack trace I get, which is very similar to the one below.

Exception in thread "Timer-7" java.lang.ArrayIndexOutOfBoundsException: 0

at net.esper.core.UpdateDispatchViewBlocking.update(UpdateDispatchViewBlocking.java:43)

at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:97)

at net.esper.eql.view.OutputProcessViewPolicy.output(OutputProcessViewPolicy.java:176)

at net.esper.eql.view.OutputProcessViewPolicy.continueOutputProcessingView(OutputProcessViewPolicy.java:167)

at net.esper.eql.view.OutputProcessViewPolicy$1.continueOutputProcessing(OutputProcessViewPolicy.java:230)

at net.esper.eql.view.OutputConditionTime$1.scheduledTrigger(OutputConditionTime.java:122)

at net.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:351)

at net.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:318)

at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:285)

at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:217)

at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)

at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:104)

at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)



 Comments   
Comment by Thomas Bernhardt [ 28/Nov/07 ]

Provided a bug fix for version 1.11 in distribution as jar file "esper-1.11.0a.jar"

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-174] Insert-into from pattern with wildcard and no tags creates incompatible streams Created: 26/Nov/07  Updated: 21/Dec/07  Resolved: 26/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I am trying to destroy the statement loaded into the Esper and trying to load the new statement,

My Eql's are Like ...

insert into p1 select * from pattern [ every LogIn()]

insert into p2 select * from pattern [ every LogOut()]

Here what exaclty i am doing is ..

// Creating EQL's

String stmtText1 = insert into p1 select * from pattern [ every LogIn()]

String stmtText2 = insert into p2 select * from pattern [ every LogOut()]

// Loading to Engine

EPStatement stmt1 = epService. getEPAdministrator().createEQL(stmtText1,
"EQL1");

EPStatement stmt2 = epService. getEPAdministrator().createEQL(stmtText2,
"EQL2");

/// Here when i check for all the Loaded statements in the Esper the output is Both EQL1 and EQL2

for
(String temp : epService.getEPAdministrator ().getStatementNames())

System.

out.println(temp); // Prints Both EQL1 and EQL2

// I am destryong EQL2

epService.getEPAdministrator(). getStatement("EQL2").destroy();

// After destroying EQL2 if i check for the all the loaded statements it prints EQL1 so it means that only EQL one is running

for(String temp : epService.getEPAdministrator(). getStatementNames())

System.out.println(temp); // Prints Both EQL1 only

// Loading statement into esper engine..

EPStatement stmt3 = epService. getEPAdministrator().createEQL(stmtText2,"EQL2");

But this is giving me error...

net.esper.client.EPStatementExc eption

: Error starting view: Event type named 'p2' has already been declared with differing column name or type information [insert into p2 select * from pattern [ every LogOut()] ]

at net.esper.core.StatementLifecyc leSvcImpl.startInternal(
StatementLifecycleSvcImpl.java:341)

at net.esper.core.StatementLifecyc leSvcImpl.start(
StatementLifecycleSvcImpl.java:300)

at net.esper.core.StatementLifecyc leSvcImpl.createAndStart(
StatementLifecycleSvcImpl.java:70)

at net.esper.core.EPAdministratorI mpl.createEQLStmt(
EPAdministratorImpl.java:178)

at net.esper.core.EPAdministratorI mpl.createEQL(
EPAdministratorImpl.java:101)

at com.Test.testEQL(
Test.java:41)

at com.Test.main(
Test.java:52)



 Comments   
Comment by Thomas Bernhardt [ 26/Nov/07 ]

In release 1.12

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-173] Iterator and safe iterator to support joins and outer joins Created: 30/Oct/07  Updated: 21/Dec/07  Resolved: 30/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The is for the iterator and safe iterator (ESPER-174) to fully support joins. Planned for release 1.12.



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-172] New safe iterator to provide a concurrent-safe pull API Created: 30/Oct/07  Updated: 21/Dec/07  Resolved: 30/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This new feature adds a new iterator to the EPStatement interface (the EPIterable interface):
The new safe iterator allows safe traversal over a statement's results (aka. pull API) in the face of concurrent event processing. This is accomplished by locking the statement being iterated over at the time the safe iterator is acquired. The safe iterator must be closed explicitly by the application to remove the lock held.

If an application does not close the safe iterator, the statement remains locked until the safe iterator is closed.

Planned for release 1.12



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-171] AutoID example in Sun JDK6 fails with Invalid schema error Created: 26/Oct/07  Updated: 21/Dec/07  Resolved: 15/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.12

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

-------------------------------------------------------------------------------
Test set: net.esper.example.autoid.TestAutoIdSimMain
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.828 sec <<< FAILURE!
testRun(net.esper.example.autoid.TestAutoIdSimMain) Time elapsed: 0.781 sec <<< ERROR!
net.esper.client.EPStatementException: Error starting view: Invalid schema - the root element must have at least either attribute declarations or childs elements [select ID as sensorId, coalesce(sum(countTags), 0) as numTagsPerSensor from AutoIdRFIDExample.win:time(60 sec) where Observation[0].Command = 'READ_PALLET_TAGS_ONLY' group by ID]
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:374)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:333)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:105)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:83)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:119)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:90)
at net.esper.example.autoid.RFIDTagsPerSensorStmt.<init>(RFIDTagsPerSensorStmt.java:18)
at net.esper.example.autoid.AutoIdSimMain.run(AutoIdSimMain.java:75)
at net.esper.example.autoid.TestAutoIdSimMain.testRun(TestAutoIdSimMain.java:10)
at net.esper.example.autoid.TestAutoIdSimMain.testRun(TestAutoIdSimMain.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)



 Comments   
Comment by Thomas Bernhardt [ 15/Nov/07 ]

Fix requires an Esper build with JDK6 in order to run in a JDK 6 engine, as the schema interrogation uses Xerxes classes shipped with the respective JVM

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-170] Ability to delay event listners for delayed or out of sync events Created: 23/Oct/07  Updated: 26/Oct/07  Resolved: 26/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Noah Campbell Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We're currently generating events from our source systems and using various transports to move the data into Esper. There are times when some data is delayed or sent out of order. We would like for Esper to be able to:

1. Use the timestamp from the event to determine eligibility into a window/aggregate.
2. Delay the event listener from being called for a set period of time so any tardy events will be considered.



 Comments   
Comment by Thomas Bernhardt [ 23/Oct/07 ]

Through the mailing list a new view was proposed for this, as below (from http://archive.esper.codehaus.org/user/490199.51192.qm%40web37111.mail.mud.yahoo.com)

(3) View for buffering and sorting out-of-order events (in JIRA ESPER-147)

This new view is for pre-processing of a stream of events that arrive out-of-order in reference to an event timestamp column. The view buffers events for a given interval and releases events by timestamp order.

The time-order view examines the timestamp of each arriving event and compares that timestamp with the engine time:
(a) If the timestamp indicates that the event is older then system time minus 1 second, it releases the event.
(b) else the event is added to the buffer sorted by timestamp.
The engine continuosly monitors the buffer and releases any events with a timestamp older then system time minus 1 second

Example:
insert into OrderedStream select * from MyEvent.ext:time_order('timestamp', 1 sec)

Here events are expected to have a 'timestamp' column. The view buffers each arriving event for a maximum of 1 second before releasing the event, to allow for older events arriving during the time an event waits in the buffer.

The view is not a data window view as it does not present a remove stream and insert stream, but only an insert stream.

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Duplicate to ESPER-147





[ESPER-169] remove/replace ExecutionPathDebugLog.isEnabled() with direct access to the isDebugEnabled variable Created: 21/Oct/07  Updated: 21/Dec/07  Resolved: 13/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: Improvement Priority: Major
Reporter: Ming Fang Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

ExecutionPathDebugLog.isEnabled() is called many many times and therefore should be as fast as possible.
Accessing the variable directly is much faster and making a method call.



 Comments   
Comment by Thomas Bernhardt [ 26/Oct/07 ]

assigned to 1.12

Comment by Noah Campbell [ 26/Oct/07 ]

Today's JVM's would inline this method call so this change would not necessarily provide any gain in performance. Ming: Did you attach a profiler and see it consume a lot of CPU cycles around this method?

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-168] missing 3rd party licenses Created: 09/Oct/07  Updated: 12/Oct/07  Resolved: 12/Oct/07

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 1.11
Fix Version/s: None

Type: Wish Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

trunk/esper/lib is missing 3rd parties license for
log4j
cglib

Those license should stand in there (just as the antlr, commons and junit licenses)



 Comments   
Comment by Alexandre Vasseur [ 12/Oct/07 ]

i have added a 3rd party license file that aggregates all runtime required licenses, which makes it easier when someone is using esper runtime





[ESPER-167] Make WeakHashMap a HashMap for expiry-time based cache for SQL results Created: 06/Oct/07  Updated: 21/Dec/07  Resolved: 13/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.12

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is there a reason why DataCacheExpiringImpl uses WeakHashMap to hold the
data? We observed that under some load, our cache starts evicting data
long before the specified expiry interval. In our case this is
undesirable and we would prefer to have an implementation that stuck to
the specified expiry-time, and didn't discard the data based on GC.



 Comments   
Comment by Thomas Bernhardt [ 06/Oct/07 ]


Do you think the HashMap rather then a WeakHashMap should be the default? I think we want add a configuration parameter that leaves the weak reference the default, unless the parameter is explicitly set.

Comment by Alexandre Vasseur [ 07/Oct/07 ]

I would expect that if a WeakHashMap is used that is to avoid situations where a regular HashMap could cause memory leaks
I am not sure this should be configurable given the level of tech details there.

Comment by Alexandre Vasseur [ 08/Oct/07 ]

(from user list)

so this seems we should be more verbose in the doc on the memory
constraints of each cache choice and also provide in future version:

expiry-time-cache-weak
expiry-time-cache-soft
expiry-time-cache-hard

and have one be simply name as the current expiry-time-cache (the weak
or soft likely)

  • need to impl a soft ref based map
  • need to do provice config based choice (thru attribute rather than long name perhaps: ref-type="weak/soft/hard" (defaults to X)
Comment by Thomas Bernhardt [ 13/Nov/07 ]

Soft-reference hashmap based on ReferenceMap by apache commons

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-166] Accumulating time-based data window Created: 30/Sep/07  Updated: 21/Dec/07  Resolved: 29/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Previous request:
The new data window would accumulate events and release events when no more events arrive for a given time interval.

For example, consider a case where a sensor will send updates for some objects, and will also track new objects, indentified by an id. The result must aggregate across all sensor events for a given id, and aggregate the last 30 seconds after the arrival of the last sensor event. So most objects are considered for 30 seconds, but if an update happens, they are considered for a longer time.



 Comments   
Comment by Thomas Bernhardt [ 29/Oct/07 ]

In 1.12 release

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-165] win:length_batch and win:time_batch data window combined Created: 27/Sep/07  Updated: 21/Dec/07  Resolved: 29/Oct/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.11
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Antonel Pazargic Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

1. The event stream provides events very variable in time. Some times there are thousands per second sometime there are tens per minute;
2. Must create a statement that use a combination of win:length_batch and win:time_batch as filters so as it fire when either X events arrived or Y seconds passed, whichever comes first.
3. When tens of events comes per minute they are batched after time batch window (1 sec);
4. When thousands of them comes they are batched after length batch window (200);

I think this new sort of filter is very suitable against flooding and starvation of client.



 Comments   
Comment by Thomas Bernhardt [ 27/Sep/07 ]

Assigned to 1.12

Comment by Thomas Bernhardt [ 29/Oct/07 ]

in 1.12 release

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-164] Quick Start tutorial doesn't work Created: 26/Sep/07  Updated: 26/Sep/07  Resolved: 26/Sep/07

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 1.11
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Leonardo M R Lima Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Using Eclipse Europa, Libs from Esper 1.11 distribution


Number of attachments : 0

 Description   

There are two mistakes in Quick Start tutorial (http://esper.codehaus.org/tutorials/tutorial/quickstart.html):
1) In the second code block, variable 'statement' is used twice; the String one should be 'stmtText' for consistency with next line
2) The package 'org.myorganization.events' causes a parse error. It seems that 'events' is a reserved word. The package name then should be changed to something else.

2007-09-26 10:37:45,062 DEBUG [main] net.esper.timer.TimerServiceImpl .startInternalClock Starting internal clock daemon thread, resolution=100
2007-09-26 10:37:45,156 DEBUG [main] net.esper.core.EPAdministratorImpl .createEQLStmt statementName=null eqlStatement=select avg(price) from org.myorganization.events.OrderEvent.win:time(30 sec)
2007-09-26 10:37:45,171 DEBUG [main] net.esper.eql.parse.ParseHelper .parse Parsing expr=select avg(price) from org.myorganization.events.OrderEvent.win:time(30 sec)
Exception in thread "main" net.esper.eql.parse.EPStatementSyntaxException: expecting a colon ':', found '.' near line 1, column 42 [select avg(price) from org.myorganization.events.OrderEvent.win:time(30 sec)]
at net.esper.eql.parse.EPStatementSyntaxException.convert(EPStatementSyntaxException.java:47)
at net.esper.eql.parse.ParseHelper.parse(ParseHelper.java:89)
at net.esper.core.EPAdministratorImpl.compileEQL(EPAdministratorImpl.java:245)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:118)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:90)
at test.Engine.<init>(Engine.java:27)
at test.Main.main(Main.java:15)



 Comments   
Comment by Thomas Bernhardt [ 26/Sep/07 ]

Thanks for the corrections!

Comment by Thomas Bernhardt [ 26/Sep/07 ]

updated site





[ESPER-163] Add a pause() method to EPStatement Created: 19/Sep/07  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 3.2

Type: Improvement Priority: Minor
Reporter: Philip Luppens Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently, when a statement is stopped, all views are cleared. A pause state for EPStatements would not evaluate incoming events (thus cause its listeners not to get any new events), but keeps the current view rather than clearing it. When the start() method is called on the statement in paused state, it would start evaluating events again.

Thread at http://archive.esper.codehaus.org/user/74ac90460709190228m4763e7f3p730d225a8a807fd0%40mail.gmail.com



 Comments   
Comment by Thomas Bernhardt [ 03/Sep/09 ]

in 3.2 as isolated service provider

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version

Comment by Thomas Bernhardt [ 17/Sep/09 ]

release as 3.2 version

Comment by Philip Luppens [ 17/Sep/09 ]

Thanks a lot!





[ESPER-162] Error compile pattern with timer:interval Created: 15/Sep/07  Updated: 16/Sep/07  Resolved: 16/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Ming Fang Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This simple test

public class Test {
public static void main(String[] args)

{ Configuration configuration = new Configuration(); EPServiceProvider epService = EPServiceProviderManager.getProvider("Test", configuration); epService.getEPAdministrator().createPattern("every timer:interval(20 sec)"); }

}

Causes this error

Exception in thread "main" net.esper.client.EPStatementException: Invalid parameter for pattern observer: Timer-interval observer requires a single numeric or time period parameter [every timer:interval(20 sec)]
at net.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:686)
at net.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:144)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:104)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:83)
at net.esper.core.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:106)
at net.esper.core.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:85)
at Test.main(Test.java:15)



 Comments   
Comment by Thomas Bernhardt [ 15/Sep/07 ]

I could not reproduce this problem.

Comment by Ming Fang [ 16/Sep/07 ]

Sorry I made a mistake.
This is only a problem at the trunk.

Comment by Thomas Bernhardt [ 16/Sep/07 ]

Can you please elaborate when you are saying a problem at the trunk? --thanks
Ming - can I ask you to send email to user@esper.codehaus.org so we may know your contact info, and perhaps explain the domain a little bit that you are addressing with Esper --greatly appreciated





[ESPER-161] add ability to specify and then subsequently retrieve the "source" of an event Created: 15/Sep/07  Updated: 04/May/08  Resolved: 04/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Minor
Reporter: Ming Fang Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

add new sendEvent(event, "source name")
and in EventBean add String getSource()



 Comments   
Comment by Thomas Bernhardt [ 15/Sep/07 ]

Please describe the use case?

Comment by Ming Fang [ 15/Sep/07 ]

I see Esper as being perfect for implementing decoupled systems.
Let's say I'm building a trading system using Esper to hook up the order submission side to the order execution side, and that I may submit orders using a GUI or from an automated algo system. Finally let's say the events sent from either method are just indistinguishable Order objects; the Order objects don't have a source field nor should it.
In this case it would help a lot when supporting such a system to have a way of knowing where the event came from.

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Changed priority to minor and assigned to 2.0

Reason is that an application can take care of that itself by adding a decorating property to events, perhaps using an Interface or abstract class.

Comment by Thomas Bernhardt [ 04/May/08 ]

The architectural decision is not to add a source field as the is very application specific.





[ESPER-160] Notify listeners when no matches Created: 15/Sep/07  Updated: 21/Dec/07  Resolved: 12/Nov/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Ming Fang Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In some situations it would be very useful to register to be notified when events are not matched.
This feature can be used to detect exceptional situations when you know events should match.



 Comments   
Comment by Thomas Bernhardt [ 15/Sep/07 ]

This can be done already with the patterns and insert-into though, I think. A pattern to detect the absence of an event is part of the solution patterns, and via insert-into I can route events into such a pattern. Such a pattern uses timer:interval and timer:within to check that no event was generated.

Do you have any additional syntax or other facility in mind, or a use case that you could share?

Comment by Ming Fang [ 15/Sep/07 ]

I was thinking the ability to register for "un-matches" via a add/remoteUnMatchedListener(UnMatchedListener)
Then in EPRuntimeImpl line 506 would schedule callbacks before returning.

Comment by Thomas Bernhardt [ 15/Sep/07 ]

Are you suggesting the UnMatchedListener would get events that didn't get processed as any stream.

Lets say we have 2 statements
(a) select * from MyEvent(val>0).win:length(100)
(b) select * from MyEvent.win:length(100) where val>5

would the UnMatchedListener get an event
(1) "val=-1"
(2) "val=1"
(3) "val=5"

I think the UnMatchedListener would get neither of these, since statement (b) matches any of these even though it filters out.

Would that make the UnMatchedListener useful?

Please describe the use case this is for --thanks

Comment by Ming Fang [ 15/Sep/07 ]

I'm actually just looking to use this to detect user error at this point.
I can see, especially in a team environment, where an event is being sent but nothing seems to be happening.
Using your example, let's say programmer1 sends event MyEvent and programmer2 miscoded and ended up not creating the 2 statements listed above, eg bad if statement.
I want a listener to be notified when no other listeners were notified for whatever reason, filtered or not.

Comment by Thomas Bernhardt [ 26/Oct/07 ]

assigned to 1.12

Comment by Thomas Bernhardt [ 12/Nov/07 ]

New method added to EPRuntime for 1.12:

/**

  • Sets a listener to receive events that are unmatched by any statement.
  • <p>
  • Events that can be unmatched are all events that are send into a runtime via one
  • of the sendEvent methods, or that have been generated via insert-into clause.
  • <p>
  • For an event to be unmatched by any statement, the event must not match any
  • statement's event stream filter criteria (a where-clause is NOT a filter criteria for a stream, as below).
  • <p>
  • Note: In the following statement a MyEvent event does always match
  • this statement's event stream filter criteria, regardless of the value of the 'quantity' property.
  • <pre>select * from MyEvent where quantity > 5</pre>
  • <br>
  • In the following statement only a MyEvent event with a 'quantity' property value of 5 or less does not match
  • this statement's event stream filter criteria:
  • <pre>select * from MyEvent(quantity > 5)</pre>
  • <p>
  • For patterns, if no pattern sub-expression is active for such event, the event is also unmatched.
  • @param listener is the listener to receive notification of unmatched events, or null to unregister a
  • previously registered listener
    */
    public void setUnmatchedListener(UnmatchedListener listener);
Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-159] Two patterns with similar filters cause duplicates reported by one pattern Created: 08/Sep/07  Updated: 15/Sep/07  Resolved: 09/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

1. Create statement "every event1=SupportEvent(userID in ('100','101'),
amount>=1000)", as statement S1
2. Add StatementAwareUpdateListener L1 to S1
3. Run some events through (actually the app listens to a fairly active
JMS channel so we get typically 3-4 events per hour into L1 from S1, with
no duplicates).
4. Create statement as discussed below, as statement S2. This statement
has the same userID filter but without the amount filter.
5. Add listener L1 to S2.
6. Continue listening to events on JMS Topic. We now get duplicate events
into L1 from S1.
7. So far S2 has not fired an event, I have confirmed this is correct by
back-checking the data source, there has not been a direction change
within the time limits.

(
every event1=SupportEvent(userID in ('100','101')) ->
(
SupportEvent(userID in ('100','101'), direction =
event1.direction ) ->
SupportEvent(userID in ('100','101'), direction =
event1.direction )
) where timer:within(8 hours)
and not eventNC=SupportEvent(userID in ('100','101'), direction
!= event1.direction )
)
// The second part of the pattern follows only when the first part
matched, satisfying #3, looking for a final event for 1 hour
-> eventFinal=SupportEvent(userID in ('100','101'), direction !=
event1.direction ) where timer:within(1 hour)



 Comments   
Comment by Thomas Bernhardt [ 08/Sep/07 ]

See test in net.esper.multithread.TestMTStmtTwoPatterns

Comment by Thomas Bernhardt [ 09/Sep/07 ]

Jar file correcting this issue is http://dist.codehaus.org/esper/esper-1.10.0c.jar

Comment by Thomas Bernhardt [ 09/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-158] Implement a StatementFlushCallback interface Created: 07/Sep/07  Updated: 15/Sep/07  Resolved: 10/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11

Type: New Feature Priority: Minor
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Batch-style views, like length_batch, only emit events when they become full. For event streams that are closing, this means the last set of events are likely to be lost inside the view. Consider implementing a StatementFlushCallback, similar to StatementStopCallback, which could be sent a notification before the statement is torn down and which would allow such views the opportunity to flush out any cached events.

Note that StatementStopCallback doesn't work for this purpose, as by the time the view receives the notification (at least in my case) any/all child views have already been destroyed.

See ESPER-154.



 Comments   
Comment by Thomas Bernhardt [ 10/Sep/07 ]

In 1.11 release.

It turns out the StatementStopCallback is well-suited for this. A small change to the shutdown order ensures that the callback fires first before important statement resources are freed, and a dispatch happens

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-157] the word "order" conflicts with the syntax "order by" Created: 06/Sep/07  Updated: 27/Jan/08  Resolved: 27/Jan/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Type: Improvement Priority: Minor
Reporter: Ming Fang Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

If I have a class my.Order, I would not be able to create a pattern like this "every o=my.Order".
I get this error...

Exception in thread "main" net.esper.eql.parse.EPStatementSyntaxException: unexpected token: . near line 1, column 11 [every o=my.Order]
at net.esper.eql.parse.EPStatementSyntaxException.convert(EPStatementSyntaxException.java:38)
at net.esper.eql.parse.ParseHelper.parse(ParseHelper.java:123)
at net.esper.core.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:103)
at net.esper.core.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:82)

I understand that "order by" is part of the syntax and that may be causing the conflict,
but the word Order is very popular in financial systems and will almost always cause conflicts.
Is there a way to improve this situation?
I wouldn't mind changing syntax to orderby (one word).



 Comments   
Comment by Thomas Bernhardt [ 13/Sep/07 ]

Planned for 1.12 release likely with upgrade to ANTLR 3.0

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Moved to 2.0 release as this would either way impact EQL and must thus be in a major release, probably addressed with ANTLR 3.0 upgrade in 2.0 release

Comment by Thomas Bernhardt [ 27/Jan/08 ]

This will not be fixed. The "order" is a keyword in "order by ".





[ESPER-156] Fully auditing facility Created: 06/Sep/07  Updated: 30/Jul/10  Resolved: 30/Jul/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 5.0

Type: Wish Priority: Major
Reporter: Ming Fang Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be very useful for Esper to provide full auditing capability.
Something like a AuditListener interface that would get callbacks from Esper on every
1-sendEvent
2-every stream created or destroyed
3-every firing of matches
4-every window created or destroyed
5-every statement created or destroyed
6-etc

I can see many uses for this
1-tools to visualize what's happening
2-potentially a journalling mechanism to replay on another instance for recovery, like a db journal log
3-as hook for performances instrumentation



 Comments   
Comment by Ming Fang [ 06/Sep/07 ]

typo, Full auditing facility

Comment by Thomas Bernhardt [ 06/Sep/07 ]

assigned to 2.0

Comment by Thomas Bernhardt [ 30/Jul/10 ]

Logging can be enabled which logs the information sought by this JIRA. The explain-plan is duplicate to JIRA 123.





[ESPER-155] BeanEventType fails on write only property Created: 06/Sep/07  Updated: 15/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11

Type: Bug Priority: Major
Reporter: Ming Fang Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

for example, with this bean

public class Order{
public void setSide(String buySell){
}
}

will throw the following exception.

java.lang.NullPointerException
at net.esper.event.BeanEventType.initialize(BeanEventType.java:297)
at net.esper.event.BeanEventType.<init>(BeanEventType.java:61)
at net.esper.event.BeanEventAdapter.createBeanType(BeanEventAdapter.java:92)
at net.esper.event.EventAdapterServiceImpl.addBeanType(EventAdapterServiceImpl.java:169)
at net.esper.eql.spec.FilterStreamSpecRaw.resolveType(FilterStreamSpecRaw.java:97)
at net.esper.eql.spec.PatternStreamSpecRaw.compile(PatternStreamSpecRaw.java:99)
at net.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:651)
at net.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:119)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:79)
at net.esper.core.EPAdministratorImpl.createPatternStmt(EPAdministratorImpl.java:138)
at net.esper.core.EPAdministratorImpl.createPattern(EPAdministratorImpl.java:82)



 Comments   
Comment by Thomas Bernhardt [ 06/Sep/07 ]

assigned to 1.11

Comment by Thomas Bernhardt [ 06/Sep/07 ]

in 1.11 release

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-154] Length batch - final few events clarification Created: 04/Sep/07  Updated: 10/Sep/07  Resolved: 04/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: None

Type: Test Priority: Minor
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

First noticed this while developing my own view, but also observed in the built-in view 'length_batch'. If I set up a length_batch of length, say, 10, and submit to it 15 events, my UpdateListener never gets notification on the last 5 events. So my first question is whether or not this is by design; if not I suppose that should be recorded as a new bug.

For my custom view, I don't want this behavior; I need notification on all events, even the partial batch at the end. My first thought was I could handle this by setting up a StatementStop listener in the view, but unfortunately it seems the StatementStopCallback is called too late for new notifications to be sent.

Again, not sure if this is by design or not. If so, I wonder if anyone knows of a strategy I could use to notify my UpdateListener of the last (partial) batch?

thanks,
Scott Frenkiel



 Comments   
Comment by Thomas Bernhardt [ 04/Sep/07 ]

The length_batch view batches events until a certain number of events is reached and only when the batch is filled does the batch get posted.
Can you outline when you expect the last 5 events to be posted, (a) when a time interval passed or (b) when a statement is stopped (c) any other external event, ie. what is the 'end' ?
The time_batch window posts every X second interval, would that suit?

Comment by Scott Frenkiel [ 05/Sep/07 ]

Thanks for responding. I would have expected to be able to send the last 5 events as the statement was stopped, but by the time my view is notified any child views have already been destroyed (hasViews() is false) so it is too late.

just for background, the view i am writing is kind of a hybrid between ext_timed and time_batch; I want to group events into batches using the events' timestamp property.

I was thinking about some alternative approaches, similar to the ones you mention:

  • perhaps my view could by notified that the statement has stopped while its child views are still intact ('b' from your comment above)
  • perhaps there is some way for the view to register for 'flush' events, which might be similar to external timing events. this capability probably only makes sense for batching views and so may not be general purpose enough.
  • if neither of the above is acceptible, and no one comes up with a better approach i was thinking i could workaround the issue myself by issuing a 'sentinal' event after I am finished; one that occurs at MAX_LONG time in the future.

thanks-
Scott Frenkiel

Comment by Thomas Bernhardt [ 06/Sep/07 ]

You are right that the StatementStopCallback was designed to allow views to clean up their resources used, and wasn't designed to flush views for events.

We could introduce a StatementFlushCallback to be invoked before the statement is actually stopped. Do you want to add a separate JIRA request?

Would you consider contributing the new view to the project, that would be great as it would benefit everybody and would be the first test for the StatementFlushCallback?

The workarounds would certainly work but would be specific to your application.

Comment by Scott Frenkiel [ 07/Sep/07 ]

Added ESPER-158.

I will happily submit my view. We're in a bit of a crunch right now; give me a few days to clean it up.

Scott

Comment by Thomas Bernhardt [ 10/Sep/07 ]

We will be using the StatementStopCallback for this in the upcoming release 1.11, not introduce a StatementFlushCallback, see Esper-158

Comment by Thomas Bernhardt [ 10/Sep/07 ]

in 1.11 release





[ESPER-153] Dynamic native type generation Created: 03/Sep/07  Updated: 27/Jan/08  Resolved: 27/Jan/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently, when esper derives a stream it potentially binds the result
to a Map. The structure is easy to implement and flexible, but lacks
the raw performance that is gained from use of a native class. What
do you about an option that allows dynamic structures like this to be
generated on the fly to achieve higher performance numbers. Since the
resultant class would effectively result in a BeanEventType being
generated with backing FastMethods, it would mean that most of the
lookup costs would be reduced to initialization.



 Comments   
Comment by Thomas Bernhardt [ 26/Oct/07 ]

Planned for the next major release, as it would impact the way events are delivered to listeners, as the underlying type is no longer Map (although it could still implement Map) the generated class would change the contract slightly.

Comment by Thomas Bernhardt [ 27/Jan/08 ]

Duplicate to ESPER-189





[ESPER-152] Support for setting an instance of ExtensionServicesContext Created: 03/Sep/07  Updated: 22/Sep/09  Resolved: 22/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: Improvement Priority: Trivial
Reporter: Karim Osman Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The user should be able to provide an instance of a class implemeting the ExtensionServicesContext interface. For example, an instance of the ExtensionServicesContext interface could be stored to the configuration properties passed to EPServiceProviderManager#getProvider():

Configuration configuration = new Configuration();
configuration.setExtensionServicesContext(...);
EPServiceProvider provider = EPServiceProviderManager.getProvider("foobar", configuration);



 Comments   
Comment by Thomas Bernhardt [ 15/Nov/07 ]

It has not been captured what the purpose is and a use case. Moved to 2.0 release.
Is the purpose just passing some data to a plug-in view? Can a static method or Singleton be used the instead.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-151] Load balance listener instances Created: 31/Aug/07  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core, Performance
Affects Version/s: 3.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: luk Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently Esper calls all listener instances of an EPStatement, instead of load balancing the calls to the listener instances.
If the calls are load balanced then:
1. User would provide the list of listener objects for an EPStatement which Esper would maintain in a pool, for each of such statements.
2. Whenever match(es) occur for that statement, Esper would call one or multiple listener instance(s) from the pool and hence reuse the listener instances concurrently.

Mailing list discussion: http://archive.esper.codehaus.org/user/507053.14107.qm%40web37107.mail.mud.yahoo.com



 Comments   
Comment by Thomas Bernhardt [ 27/Jan/08 ]

This would mean a little more thread context switching which incurs a performance penalty

Comment by Thomas Bernhardt [ 03/Sep/09 ]

this could be done by an application itself and will not be considered as a change to the core engine.

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-150] Allow user-defined function's alias in group by clause Created: 31/Aug/07  Updated: 06/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.10
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Scott Frenkiel Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A statement like the following doesn't work:

select UtilFuncs.func(metric) as grp, * from Stream group by grp

the following will work, but is more complicated than necessary:

select UtilFuncs.func(metric) as grp, * from Stream group by UtilFuncs.func(metric)



 Comments   
Comment by Thomas Bernhardt [ 01/Sep/07 ]

Changed to new feature as not all database systems offer this, and order-by, having and other clauses could also benefit from allowing an alias to appear

Comment by Thomas Bernhardt [ 06/Sep/07 ]

Is actually a duplicate to Esper-120, comment has been copied to 120 and issue closed





[ESPER-149] Automatic bean aliases by specifying imports Created: 29/Aug/07  Updated: 15/Sep/07  Resolved: 10/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.11

Type: Improvement Priority: Minor
Reporter: Philip Luppens Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I was wondering about the following; right now we can add aliases for beans, and imports for helper functions, but I cannot seem to automatically import event beans.

The case: a lot of event beans, a lot of entries in esper.cfg.xml, and of course, often changing event names, and new events being introduced all the time. I tried using some classpath discovery to configure the Configuration programmatically, but it does not feel elegant, and has the obvious classloading issues when testing under app containers.

The request: automatically alias com.foo.bar.SuperEvent to SuperEvent when a 'com.foo.bar.* ' import is used. If multiple imports are used, loop over them to find the correct Event (or fail if multiple classes are resolved).

I've taken a quick look, but I'm not really sure where the aliasing is happening - is in in the ConfigurationSnapShot() ? It would seem like an easy enough fix, but my experience with ast is too limited to be of any use here.



 Comments   
Comment by Thomas Bernhardt [ 30/Aug/07 ]

I think we would handle this through a new method on ConfigurationOperations and through XML schema enhancements.
public void addPackageEventTypeAliases(String javaPackageName)

Comment by Thomas Bernhardt [ 10/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-148] Step by Step Installation and Quick Start Guide Created: 29/Aug/07  Updated: 15/Sep/07  Resolved: 11/Sep/07

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: Wish Priority: Major
Reporter: Sanjeev Katoch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

First Release


Number of attachments : 0

 Description   

With first Release of esper the expectations are high from the user side. we nee to have installation Step by Step guid and Quick Start Guide.



 Comments   
Comment by Philip Luppens [ 29/Aug/07 ]

What parts of the documentation would you like to see improved ? I agree that the 'Tutorial' should also contain an installation & configuration part rather than just some EQL statements (kinda like the OnJava article). A step-by-step guide seems overkill (after all, Esper is easy to set up) & nearly everything else is covered by the reference documentation, imho.

Comment by Thomas Bernhardt [ 30/Aug/07 ]

We could add a steps guide how to create EDA appls:

  • define what mission: business domain, situations to be detected, functional and quality requirements specifically throughput and latency
  • identify where events are coming from
  • identify lower level event formats, contents of the domain
  • design event representations
  • design event relationships leading to complex events
  • instrument event sources
  • adapter interfaces for sources
  • define EQL for patterns and stream processing
  • use CSV adapter as an event simulation tool, test situations to be detected
  • test quality requirements: throughput, latency in target environment
Comment by Thomas Bernhardt [ 10/Sep/07 ]

Change "Tutorial" to "Tutorial & Quick Start"

  • provide better introduction
  • provide unpack and run instructtions
  • provide instructions for typical config (add packages) and types
Comment by Thomas Bernhardt [ 11/Sep/07 ]

in 1.11

Comment by Alexandre Vasseur [ 11/Sep/07 ]

this highly relates to ship a -bin distrib that contains only doc + compiled jars (and may be another one with samples added such as bin-samples ) instead of the current src+doc+samples+compiled
(of course all dist should include required runtime dependencies in lib/ and this may mean the -bin may have less dependancies ?)

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-147] Sorted time window for more flexibility in handling out-of-order events Created: 23/Aug/07  Updated: 21/Dec/07  Resolved: 29/Oct/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

> > > Can esper cope with timing of events?
> > >
> > > Let me explain what I mean with "timing of events". If I had created a
> > > pattern that matches when event A is followed - in time - by event B,
> > > what happens if B arrives at the engine before A? Normally, I
> think that
> > > the pattern would not match in this case, but could information
> > > contained in the events, like a timestamp, be somehow used by esper so
> > > that it still recognises that these events form a match?

==========

> > Well, that's not too hard. You can simple compare the timestamp
> > property from the first event to the second event - something like
> > this "a=A -> b=B(a.timestamp < timestamp)". If you want to check both
> > conditions (eg. A followed by B, or B followed by A where the
> > timestamp from A is less than B's timestamp), just combine them with
> > an 'OR' statement. Of course, make sure you have a timestamp property
> > on your event object.

========

> > The pattern with an OR is one good way to deal with the out-of-order
> > problem.
> >
> > Esper could also provide an ordering time window. Events would enter
> > that new time window, get resorted based on timestamp, and leave the
> > time window sorted, for use with insert-into. Such as (IAB being a
> > interface that A and B implement)...
> >
> > insert into SortedStream select * from
> > IAB.win:time_order('timestamp', 1 sec)
> >
> > The ordering time window allows B to arrive 1 second or less before A
> > to be resorted into the order (A, B).

=========
>
> > insert into SortedStream select * from IAB.win:time_order('timestamp',
> > 1 sec)
> Would this mean that whenever a new timer event goes into the engine to
> make one step forward in the time window, all elements contained in that
> window are ordered according to their 'timestamp' element and the
> natural ordering of that element? See the - modified - image I attached
> for what I mean. Would that work like this? (would be nice)

==========

Some questions: Which format would the timestamp need to be in, a
java.util.Date or can it also be an ISO String? Would sorting the time
window like this be a huge loss of performance?



 Comments   
Comment by Thomas Bernhardt [ 29/Oct/07 ]

in 1.12 release

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-146] Upload Esper to the central Maven2 repository Created: 23/Aug/07  Updated: 01/Oct/07  Resolved: 01/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: Task Priority: Minor
Reporter: Olle Hallin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Since Esper is built with Maven2, it would be very convenient for us Maven2 users if the released artifacts were uploaded to the central Maven2 repository.

See http://jira.codehaus.org/browse/MAVENUPLOAD .



 Comments   
Comment by Thomas Bernhardt [ 06/Sep/07 ]

assigned to 1.11





[ESPER-145] Ignore start or stop commands on already started or stopped EPStatements. Created: 20/Aug/07  Updated: 18/Feb/08  Resolved: 13/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 2.0

Type: Improvement Priority: Minor
Reporter: Philip Luppens Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently, EPStatements throw exceptions when attempting to start or stop them, when they are already started or stopped. It would make more sense to simply ignore a start or stop request when the EPStatement is already in the requested state.

Another small improvement might be to create is-methods to check the state in a more concise way (isStarted(), isStopped() and isDestroyed()).

See the mailing list [1].

[1] http://archive.esper.codehaus.org/user/74ac90460708160635h5ae189afob568b457216c5482%40mail.gmail.com



 Comments   
Comment by Thomas Bernhardt [ 10/Sep/07 ]

The suggested change is a change to the behavior or public interface methods that we can only make in a major version.
Assigned to 2.0

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-144] Add timestamp() function to select the current engine time Created: 17/Aug/07  Updated: 15/Sep/07  Resolved: 10/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In our application, we use external-timing and our application itself also
emits his own events. Now those new events also need to have a timestamp set
but I don't have access to the current esper-time. I currently have a
working workaround, so I made my external time-source available for other
objects as well (e.g. using a static java method, which always returns my
current external time) so other components could query the current
esper-time.

BTW, how would you set the timestamp-prperty of implicitly generated events
(e.g. those from "insert into NewEvent select * from OtherEvent")? Currently
I have no control at which time those "NewEvents" are created.

============

Perhaps it would be better as a builtin function? I.e. "select timestamp(),
...". I feel slightly concerned with adding new reserved keywords because
that introduces additional restrictions on what names can be used as field
names.
But perhaps it would be an idea to have a method in esper, so you could query the current "esper-time"?



 Comments   
Comment by Thomas Bernhardt [ 10/Sep/07 ]

This will be implemented as "select current_timestamp()" following SQL-92 standards

Comment by Thomas Bernhardt [ 10/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-143] Add a timestamp with last state change in EPStatement Created: 14/Aug/07  Updated: 15/Sep/07  Resolved: 10/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.11

Type: New Feature Priority: Minor
Reporter: Philip Luppens Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be useful to know when an EPStatement changed state (started, stopped, or destroyed).



 Comments   
Comment by Thomas Bernhardt [ 10/Sep/07 ]

In 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-142] Relational Database Access does not work with Oracle JDBC Created: 09/Aug/07  Updated: 15/Sep/07  Resolved: 10/Aug/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: agostino perrotta Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP, Oracle 10g or Oracle 9.2, JDK 1.5.0_04


Number of attachments : 0

 Description   

I'm trying to access a Oracle Relational Database in order to retrieve historical data but without success.
I've used both THIN and OCI JDBC driver but I received always the same error message:

"....net.esper.client.EPStatementException: error starting view: Error obtaining parameter metadata from prepared statement....."

I've checked the behaviour (with a test program) of Oracle JDBC drivers when you have to deal with metadata and I've found that the only metadata that it's not possible to retrieve with ResultSetMetaData is "tableName".

Our standard DB is Oracle !!

Kind regards,
NIKO.



 Comments   
Comment by Thomas Bernhardt [ 09/Aug/07 ]

In reproducing this problem, the stack trace is as follows.

Occurs with Oracle JDBC Driver version 9.0.2 "ojdbc14.jar"

java.sql.SQLException: Unsupported feature
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
at oracle.jdbc.driver.OraclePreparedStatement.getParameterMetaData(OraclePreparedStatement.java:4195)
at net.esper.eql.db.PollingViewableFactory.createDBStatementView(PollingViewableFactory.java:120)
at net.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:137)
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:340)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:307)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:80)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:174)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:87)
at net.esper.regression.db.TestDatabaseJoin.testTimeBatch(TestDatabaseJoin.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:69)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Comment by Thomas Bernhardt [ 09/Aug/07 ]

Same issue using the newest driver
Specification-Version: Oracle JDBC Driver version - "10.2.0.3.0"

This appears an old issue with Metadata and Oracle drivers: http://www.webservertalk.com/archive149-2005-2-927274.html

09:46:28,171 ERROR [PollingViewableFactory] Error in statement 'select myint from "testtable" where ? = myint', failed to obtain result metadata
java.sql.SQLException: statement handle not executed: getMetaData
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.OracleResultSetImpl.getMetaData(OracleResultSetImpl.java:135)
at oracle.jdbc.driver.OraclePreparedStatement.getMetaData(OraclePreparedStatement.java:4049)
at net.esper.eql.db.PollingViewableFactory.createDBStatementView(PollingViewableFactory.java:160)
at net.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:137)
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:340)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:307)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:80)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:174)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:87)
at net.esper.regression.db.TestDatabaseJoin.testTimeBatch(TestDatabaseJoin.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:69)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Comment by Thomas Bernhardt [ 09/Aug/07 ]

The issue is that the Esper engine requires the query result metadata to build an event type, and to use the types returned by the SQL statement to verify the expressions in the select-clause and other clauses of the EQL statement. Even the newest Oracle driver (see JIRA comments) does not return the metadata. We are planning to add a configuration item. If configured, the engine would not use to getMetadata for parameter and result metadata on a prepared statement. If configured, the engine would fire the SQL query with a where clause of "where 1=0" and then obtain the result column types form the actual empty result set.

Comment by Thomas Bernhardt [ 10/Aug/07 ]

This problem is address by the updated esper-1.10.0b.jar file downloadable at http://dist.codehaus.org/esper/esper-1.10.0b.jar

The problem is rooted in the Oracle drivers not supporting retrieving SQL statement metadata on a SQL prepared statement after SQL prepared statement compilation. However, the engine must obtain metadata for the output columns of the SQL statement to determine output event types. At EQL statement compilation times the engine therefore prepares the SQL statement and attempts to inspect metadata.

This problem has been addressed the following way: The engine detects an Oracle-connection and by default generates a "sample" statement that it executes at EQL statement complile time against the database and obtains the executed statement metadata.

The engine uses "sample" statement to retrieve metadata for the column names and types returned by the actual statement. It uses the "sample" statement from any of these sources:
(1) A sample statement has been supplied via the new "metadatasql" syntax:
select mycol from sql:myDB ["'select mycol from mytesttable where ....' metadatasql 'select mycol from mytesttable'], .....
(2) If no "metadatasql' keyword was supplied, the engine inspects the SQL statement supplied and through lexical analysis inserts a where-clause that returns no rows ("where 1=0")
(3) if the tag "${$ESPER-SAMPLE-WHERE}" exists in the SQL statement, then the engine will not perform lexical analysis. This is for SQL statements that cannot be correctly lexically analyzed. The tag defines where to insert the "where 1=0" clause. The SQL text after the placeholder is ignored to construct the sample SQL. For example:
select mycol from sql:myDB ["'select mycol from mytesttable ${$ESPER-SAMPLE-WHERE} where ....'], .....

The following additional Configuration options have been added to ConfigurationDBRef:
(1) a MetadataOrigin allows to override the strategy to obtain metadata
(2) a mapping of SQL types (java.sql.Types) to Java built-in types such that awkward database types can easily be changed
(3) a ColumnChangeCase that instructs the engine to automatically convert to lower or uppercase any output column names

Comment by Vinod Akunuri [ 30/Aug/07 ]

Just wanted to check if relational database access has been tested with kdb database ever. I gave it a shot, with esper-1.10.0b.jar to access kdb, using a driver from http://kx.com/a/kdb/connect/jdbc/
I get the following when I try to test statement, select * from sql:TestKDB ['select * from testtable']
Regards


Vinod

2007-08-30 16:14:16,566 [main] INFO PollingViewableFactory - .getPreparedStmtMetadata Preparing statement 'select * from testtable'
2007-08-30 16:14:16,574 [main] ERROR PollingViewableFactory - Error obtaining parameter metadata from prepared statement, consider turning off metadata interrogation via configuration, for statement 'select * from testtable'
java.sql.SQLException: nonce
at k.jdbc.q(jdbc.java:14)
at k.jdbc.q(jdbc.java:15)
at k.jdbc$ps.getParameterMetaData(jdbc.java:149)
at net.esper.eql.db.PollingViewableFactory.getPreparedStmtMetadata(PollingViewableFactory.java:460)
at net.esper.eql.db.PollingViewableFactory.createDBStatementView(PollingViewableFactory.java:120)
at net.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.java:137)
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:340)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:307)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:80)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:174)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:97)
at com.ml.ets.apptk.services.esper.EsperEngine.createEQL(EsperEngine.java:89)
......(local code)

Exception in thread "main" net.esper.client.EPStatementException: Error starting view: Error obtaining parameter metadata from prepared statement, consider turning off metadata interrogation via configuration, for statement 'select * from testtable', please check the statement, reason: nonce [select * from sql:TestKDB ['select * from testtable']]
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:348)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcImpl.java:307)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:80)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.java:174)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:97)
at com.ml.ets.apptk.services.esper.EsperEngine.createEQL(EsperEngine.java:89)

Comment by Thomas Bernhardt [ 30/Aug/07 ]

With the 1.10.0b jar file there is a couple of workarounds when the driver doesn't supply metadata, as described in the prior comment.

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-141] Memory leak using CreateMapFromValues function and and EventAdaptorServiceBase Created: 07/Aug/07  Updated: 11/Aug/07  Resolved: 11/Aug/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lixinhui Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP computer (Intel Pentium 4, 2.4 GHz, 1024 MB RAM


Number of attachments : 0

 Description   

we run the case of "ESPER-107" on version 1.10.0, error of "out of memory" come out at the 57th round. we made a deeper analysis on it and did not resolve it. Any suggestions are welcome.

In current Esper, Every event is encapsulated into a instance of MapEventBean, which is put into HashMap for succeed handling. These instaces will not out of date bwfore a long time and no support of disk, 5days or 10days. So these Large amount of objects have to stay into memory for a long time and new obcjects swarm into continously. we d proposed to fix it by a time Expriement and backup based on Thread writting out mechanism, but it can not really be donet without the suggestions from the designers of Esper since the information is copied and cached in differnet place in current framework.



 Comments   
Comment by Thomas Bernhardt [ 11/Aug/07 ]

It is definitly possible to hit Java VM memory boundaries when too many events must be processed and held in memory for one or another reason, such as for long time windows. The need for memory can be reduced by designing tiny events that have a small memory footprint.

Please contact the user mailing list by sending an email to "user@esper.codehaus.org" so we may continue this discussion over the mailing list. Through the mailing list we may find a better solution to this.

Thank you for any prior suggestions.





[ESPER-140] Memory leak using add function and Time Window Created: 07/Aug/07  Updated: 11/Aug/07  Resolved: 11/Aug/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lixinhui Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP computer (Intel Pentium 4, 2.4 GHz, 1024 MB RAM


Number of attachments : 0

 Description   

we run the case of "ESPER-107" on version 1.10.0, error of "out of memory" come out at the 57th round. we made a deeper analysis on it and resolved it. Any suggestions are welcome.

The entry point of out nanlysis is the function "add" of TimeWindow. During this function, LinkedList<EventBean> reserved by Pair is copied into EventBean[] to later deal with once expired. But the LinkedList<EventBean> reserved by Pair is not released. This problem is fixed by adding two sentences into the Pair, "Pair.getSecond().clear();expired=null;" , which are used to release the expired LinkedList by setting it to null.



 Comments   
Comment by Thomas Bernhardt [ 11/Aug/07 ]

Thanks for the suggestion. When the TimeWindow gets rid to the timestamp-keyed pair including the LinkedList during expireEvents then the memory gets freed.





[ESPER-139] Memory leak using handleEvent function and and GroupByView Created: 07/Aug/07  Updated: 11/Aug/07  Resolved: 11/Aug/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lixinhui Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP computer (Intel Pentium 4, 2.4 GHz, 1024 MB RAM)


Number of attachments : 0

 Description   

Running the case provided by "ESPER-107" on version 1.10.0, out of memory happens after 57 rounds, about 7 years using the description of this case. we made deeper analysis and resolved this problem. Any suggestions are welcome.

By deeper analysis, find the leaking involoves MultiKey,HashMap$Entry,Object[], LinkedList, LinkedList$Entry, LengthWindowView, IStreamRandomAccess, TimeWindowView, and TimeWindow. It is found that the event handling mechanism should be blame. Whenever a new event is received in version 1.10.0, a new LinkedList will be created containing a list of views related with this event, such as those used to present the content of this event. Then one mapping item between the LinkedList and Event is put into a HashMap with an exclusive key. Actually, any event can be clarified belonging to one pattern and every pattern is related with a only steady linklist of views. It is not necessary to allocate new LinkedList every time for every event. Even worse, these large amounts of LinkedLists have to be reserved in memory until the event is out of date. To fix this leak, a new member variable was added into GroupByView (private List<View> subViewsList = new LinkedList<View>(). This variable is assigned for every pattern during the initial time and is referred when an event is received based on its pattern. In this way, the repetitious allocations of large amount of objects are avoided.



 Comments   
Comment by Thomas Bernhardt [ 11/Aug/07 ]

Thanks again for the suggestions.

The allocation of the linked lists in GroupByView on line 152 is per multikey, and are reused for subsequent multikeys. So no memory leak unless one keeps generating new groups.





[ESPER-138] Allow Map event type to contain nested Map values Created: 06/Aug/07  Updated: 18/Feb/08  Resolved: 13/Feb/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I do not see how to query nested maps with EQL.

Consider the following example: Order and Product are classes that extend HashMap. An order map contains a product. A product map contains a ticker

Order events containing products are sent to Esper. How does one query against the nested map, i.e. "select product.ticker TestOrder where product.underlying = 'thename'"?

The method epService.getEPRuntime().sendEvent(ORDER_FOR_VANILLA_CALL, "TestOrder"); relates an event to its map name, but there is no way to do this with nested maps.

What are common alternatives or workarounds? Can the nested element be submitted as a separate event?

===============

One correction, the example query should be "select product from TestOrder where product.ticker = 'IBM'?

So essentially, I am asking how to handle a map of maps.



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/07 ]

We hadn't thought of the idea of using Maps within Maps to represent complex domain object graphs.
We currently support JavaBean classes and of course Java built-in data types within Maps.
The nested element could only be submitted as a separate event if the statements account for that.

If this is an emergency, please let us know, the capability seems easy to add.

Comment by Thomas Bernhardt [ 13/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11

Comment by Scott Frenkiel [ 08/Jan/08 ]

It seems this issue has been fixed for 1.11, but I'm having trouble understanding how to use it. How do you define the event type with its nested elements via configuration? The docs don't seem to address this. Should the class type for the nested property be Map.class? And does the nested map itself need to be defined as a separate event type?

Thanks.

PS I took a stab at it as follows, to give you an idea of my confusion:

Configuration configuration;

{ Map<String, Class> nestedMap = new HashMap<String, Class>(); nestedMap.put("int", int.class); Map<String, Class> eventMap = new HashMap<String, Class>(); eventMap.put("nested", Map.class); configuration = new Configuration(); configuration.addEventTypeAlias("nested", nestedMap); configuration.addEventTypeAlias("event", eventMap); }

EPServiceProviderSPI epService = (EPServiceProviderSPI) EPServiceProviderManager.getProvider("engine", configuration);
epService.initialize();

EPStatement statement = epService.getEPAdministrator().createEQL("select * from event where nested.int = 2");

At this point the statement fails to compile.

Comment by Thomas Bernhardt [ 08/Jan/08 ]

The documentation is incomplete on the nested/indexed/mapped property support for Maps, right.
The support is implemented as dynamic properties, and example is the class net.esper.regression.event.TestEventPropertyDynamicMap
So the restriction is that dynamic properties must be used.

We'll reopen this issue to investigate if type-safe nested Map could be supported and to add to the documentation.

Comment by Thomas Bernhardt [ 08/Jan/08 ]

May further improve nested-Maps by allowing properties themselves to be declared as a well-defined Map event type

Comment by Thomas Bernhardt [ 13/Feb/08 ]

In release 2.0

There is a limitation that is inherent to all non-POJO events (DOM and Map) (closer integration with Java brings benefits and costs):
type information for nested objects is not available as a java.lang.Class, therefore doesn't populate downstream from the consuming query
For example:
Map root
Map nestedOne
String prop1
Map nestedTwo
String prop2

insert into MyStream select root.nestedOne as value from NestedMapEvent
select value.prop1 from MyStream <-- this does not work as the type of "value" is Map.class

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-137] GROUP BY: strange behaviour in UpdateListener Created: 06/Aug/07  Updated: 11/Aug/07  Resolved: 11/Aug/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: agostino perrotta Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Sun SDK 1.5.0_04, Windows XP SP2


Number of attachments : 0

 Description   

Hi.
I have a strange behaviour when I use the "group by" clause.
I have a chain of 2 statement:
".....
//===================================================
// Reload of Reservations Events from RDBMS
sb = new StringBuilder();
sb.append("insert into ReservationEvents(type, corrid, timestamp, series, elapsed, cid) ");
sb.append("select istream C.event_type as type, C.event_correlation_id as corrid, C.event_timestamp as timestamp, ");
sb.append("C.event_correlation_id2 as series, CEUtils.checkElapsed(C.event_timestamp) as elapsed, C.entity_id as cid ");
sb.append("from pattern [every timer:interval(20 sec)], ");
sb.append("sql:POST [' select event_type, event_correlation_id, event_correlation_id2, ");
sb.append("event_timestamp, event_status, entity_id from KRONOS_EVENT where event_type=100 and event_status=0 '] as C ");
String stmt10 = sb.toString();

// Reservation Events status change, aggregation, sla definition and DB cache update
sb = new StringBuilder();
sb.append("insert into SumOfReservations(cid, type, series, total, insla, bordersla, outsla) ");
sb.append("select istream cid, type, series, ");
sb.append("count as total, ");
sb.append("sum(case when elapsed < 600000 then 1 else 0 end) as insla, ");
sb.append("sum(case when elapsed between 600000 and 900000 then 1 else 0 end) as bordersla, ");
sb.append("sum(case when elapsed > 900000 then 1 else 0 end) as outsla ");
sb.append("from ReservationEvents.win:time_batch(10 sec) ");
sb.append("group by cid, type, series order by series asc");
String stmt11 = sb.toString();
//===================================================
....."

The second statement (stmt11) gave me a strange result since I receive in my listener the correct result/update but immediatly after 2/3 seconds I receive an update with null (or zero) values.

Regards,
NIKO.



 Comments   
Comment by Thomas Bernhardt [ 06/Aug/07 ]

I have tried to reproduce this problem using the 1.10 version but haven't been able to get the same result.

The relevant test class is net.esper.regression.db.TestDatabaseJoinInsertInto (SVN trunk), as below.

Since the pattern checks every 20 seconds and the time-batch outputs every 10 seconds, the result is that only every second time that the time batch statement produces outputs, does the query produce real results, since the time batch empties in between thus producing zero counts every second time?
Try adjusting both to 10 seconds?

package net.esper.regression.db;

import junit.framework.TestCase;
import net.esper.client.*;
import net.esper.client.time.TimerControlEvent;
import net.esper.client.time.CurrentTimeEvent;
import net.esper.support.util.SupportUpdateListener;
import net.esper.support.eql.SupportDatabaseService;
import net.esper.support.client.SupportConfigFactory;
import net.esper.support.bean.SupportBean;
import net.esper.support.bean.SupportBeanComplexProps;
import net.esper.support.bean.SupportBean_S0;
import net.esper.event.EventBean;
import net.esper.event.EventType;

import java.util.Properties;
import java.math.BigDecimal;
import java.sql.*;

public class TestDatabaseJoinInsertInto extends TestCase
{
private EPServiceProvider epService;
private SupportUpdateListener listener;

public void setUp()

{ ConfigurationDBRef configDB = new ConfigurationDBRef(); configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties()); configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN); configDB.setConnectionCatalog("test"); configDB.setConnectionReadOnly(true); configDB.setConnectionTransactionIsolation(1); configDB.setConnectionAutoCommit(true); Configuration configuration = SupportConfigFactory.getConfiguration(); configuration.addDatabaseReference("MyDB", configDB); epService = EPServiceProviderManager.getDefaultProvider(configuration); epService.initialize(); epService.getEPRuntime().sendEvent(new TimerControlEvent(TimerControlEvent.ClockType.CLOCK_EXTERNAL)); }

public void testInsertIntoTimeBatch()

{ epService.getEPRuntime().sendEvent(new CurrentTimeEvent(0)); StringBuilder sb = new StringBuilder(); sb.append("insert into ReservationEvents(type, cid, elapsed, series) "); sb.append("select istream 'type_1' as type, C.myvarchar as cid, C.myint as elapsed, C.mychar as series "); sb.append("from pattern [every timer:interval(20 sec)], "); sb.append("sql:MyDB [' select myvarchar, myint, mychar from mytesttable '] as C "); epService.getEPAdministrator().createEQL(sb.toString()); // Reservation Events status change, aggregation, sla definition and DB cache update sb = new StringBuilder(); sb.append("insert into SumOfReservations(cid, type, series, total, insla, bordersla, outsla) "); sb.append("select istream cid, type, series, "); sb.append("count(*) as total, "); sb.append("sum(case when elapsed < 600000 then 1 else 0 end) as insla, "); sb.append("sum(case when elapsed between 600000 and 900000 then 1 else 0 end) as bordersla, "); sb.append("sum(case when elapsed > 900000 then 1 else 0 end) as outsla "); sb.append("from ReservationEvents.win:time_batch(10 sec) "); sb.append("group by cid, type, series order by series asc"); EPStatement stmt = epService.getEPAdministrator().createEQL(sb.toString()); listener = new SupportUpdateListener(); stmt.addListener(listener); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(20000)); assertFalse(listener.isInvoked()); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(30000)); EventBean[] received = listener.getLastNewData(); assertEquals(10, received.length); listener.reset(); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(31000)); assertFalse(listener.isInvoked()); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(39000)); assertFalse(listener.isInvoked()); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(40000)); received = listener.getLastNewData(); assertEquals(10, received.length); listener.reset(); epService.getEPRuntime().sendEvent(new CurrentTimeEvent(41000)); assertFalse(listener.isInvoked()); }

}

Comment by Thomas Bernhardt [ 11/Aug/07 ]

Couldn't reproduce and provided test case.





[ESPER-136] Improve error messages when encountering reserved keywords Created: 01/Aug/07  Updated: 18/Feb/08  Resolved: 27/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 2.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I find that some error messages for invalid statements are sometimes
cryptic (too generic) and very hard to understand. In several cases it
took me some time and a trial and error to figure out what was wrong. Is
there any chance of improving this? Here's a particular example that was
driving me nuts for a while:

-------------------
"select foo,millisecond from Bar"

net.esper.eql.parse.EPStatementSyntaxException: unexpected token: foo
near line 1, column 8 [select foo, millisecond from Bar]
at
net.esper.eql.parse.EPStatementSyntaxException.convert(EPStatementSyntax
Exception.java:38)
-----------------------

It took me a while to realize that this is due to "millisecond" being
the reserved keyword. I had to rename the field to something else. I had
a similar one with another keyword. I think there was also another
flavor of the error message that was hard to debug, but I didn't save
it. If I hit it again I'll let you know.



 Comments   
Comment by Thomas Bernhardt [ 01/Aug/07 ]

I see two possible solutions:

  • Use the ANTLR-generated token enumeration and compare each reserved keyword with the statement, and append an error text if a syntax error is encountered, such as ..
    unexpected token: foo (found reserved keyword millisecond)
  • Upgrade to ANTLR 3.0
Comment by Thomas Bernhardt [ 06/Sep/07 ]

We will include a tip in the error messages for 1.11, however since the grammar is not accessible this will need to be addresses with the move to ANTLR 3, assigned to release 2.0

Comment by Thomas Bernhardt [ 27/Jan/08 ]

In release 2.0 with ANTLR upgrade

Comment by Thomas Bernhardt [ 18/Feb/08 ]

in release 2.0





[ESPER-135] Support unchecked/dynamic properties; Support Java instanceof and casts Created: 31/Jul/07  Updated: 15/Sep/07  Resolved: 09/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm wondering what the best way is to formulate queries where I'm interested if a property value is of a certain type, and if so, whether it contains a particular value. For example, assuming I'm using the following classes:

public class Event

{ public A getA(); }

public class A {

}

public class B extends A

{ public String getData(); }

...the query I'm interested in is along the lines of:

select * from Event where a instanceof B and ((B)a).data = "someValue"

==============

The Esper EQL syntax doesn't currently allow the Java 'instanceof' and doesn't support casts. Sounds like this could be useful to add to the syntax?

A possible workaround is to write a static method that performs the same functions.



 Comments   
Comment by Thomas Bernhardt [ 26/Aug/07 ]

This mail is seeking feedback to extend EQL adding unchecked property access to the language.

The idea is that for a given underlying event representation we don't always know all properties in advance. An underlying event (Bean, Map, XML) may have additional properties that are not known at statement compilation time, that we want to query on. Some of these properties can itself be nested classes. This can be useful for events that are a nice, object-oriented domain models.

Let's look at an Order event that could contain a reference to either Service or Product, depending on whether a product or service was ordered.

One solution seems to add an "instanceof" and a cast capability, however statements may get hard to read:
select * from Order where ( (Order.item instanceof Product) && ((Product)Order.item).name = "some") OR
(Order.item instanceof Service) && ((Service)Order.item).name = "some")

It seems possible to slap an Interface on the object returned by "item", that has a "getName" method, and then use:
select * from Order where Order.item.name = "some"

However that is bending the domain model. And what if an Order contains something else then Product or Service in the future?

A possible new syntax places the unchecked property in parenthesis:
select * from Order where Order.item.(name)? = "some"

Using this new syntax would instruct the engine that there is an optional name property that may or may not exist at runtime.

Comment by Thomas Bernhardt [ 28/Aug/07 ]

Sounds like a good idea. How would you declare multiple deep nested
optional properties ? Would every property become surrounded by
brackets with its own question mark ? Can they be grouped together ?
eg. foo.(bar.name)? vs foo.(bar)?.(name)?

Maybe another is this:
every OrderEvent(item.name?) where the question mark also can replace
the dot notation for optional (non-existing) properties. Thus a
notation of OrderEvent(item?parent.name?='foo') would be translated as
optional 'item' property, if the 'item' property exists, then it
must have a 'parent' property, and that 'parent' property has an
optional property 'name'.

=========================

I agree, the parenthesis seem to lead to confusion, since they appear to provide a grouping. I like your second suggestion in using the questionmark alone.
Examples....

// Optional 'name' property on item
every OrderEvent(item.name?)

// Optional 'item' property
// If the 'item' property exists, then it must have a 'parent' property, and that 'parent' property has an optional property 'name'.
every OrderEvent(item?.parent.name?='foo')

// Example in a select clause
select a?, b? as optionalB from E

Comment by Thomas Bernhardt [ 09/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-134] EPException using std:groupby without child view Created: 30/Jul/07  Updated: 15/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.11

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This bug occurs when declaring a group-by view without any child views:

select avg(price), symbol from StockTick.win:length( 100 ).std:groupby('symbol')

Exception in thread "main" net.esper.client.EPException:
net.esper.client.EPException: Unexpected merge view as child of
group-by view
............ etc ...................

06:20:44,062 FATAL [GroupByView] .copySubViews Unexpected merge view as child of group-by view

net.esper.client.EPException: net.esper.client.EPException: Unexpected merge view as child of group-by view
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:240)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:121)
at net.esper.regression.view.TestViewGroupBy.sendEvent(TestViewGroupBy.java:156)
at net.esper.regression.view.TestViewGroupBy.testGroupByPastWindow(TestViewGroupBy.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: net.esper.client.EPException: Unexpected merge view as child of group-by view
at net.esper.view.std.GroupByView.makeSubViews(GroupByView.java:208)
at net.esper.view.std.GroupByView.handleEvent(GroupByView.java:144)
at net.esper.view.std.GroupByView.update(GroupByView.java:105)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:97)
at net.esper.view.window.LengthWindowView.update(LengthWindowView.java:113)
at net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:52)
at net.esper.view.stream.StreamFactorySvcImpl$1.matchFound(StreamFactorySvcImpl.java:118)
at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:534)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:236)
... 24 more



 Comments   
Comment by Thomas Bernhardt [ 06/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-133] stats broken, download likely broaken Created: 29/Jul/07  Updated: 06/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

As codehaus as changed policy the index.php magic folder list is broken
http://jira.codehaus.org/browse/HAUS-1551



 Comments   
Comment by Alexandre Vasseur [ 29/Jul/07 ]

need to rework it with 2 static pages (current and prior-release), and to use google analytic onclick
in the same way as the download apt for 1.10





[ESPER-132] Support comments inside the statement text Created: 25/Jul/07  Updated: 28/Aug/07  Resolved: 28/Aug/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a minor request for support of comments inside the statement
text. I.e. allowing the following statement text to parse, for example:

select xx, /* blah */
yy /* foo */
from y /* blah */
...

Of course the choice of comment character doesn't have to be '/* .. */'
but that seems like semi universal multi-line choice.

Now, this may not look useful when you are creating statements in the
source code, as you can achieve this by breaking it up into multiple
strings that are concatenated and add java comments. However in my case
I'm parsing the statements from the config file and it would be useful
to allow comments inside the statement. This would make it easier to
document and explain statements.

I realize that one could write a simple utility function that strips out
the comments prior to giving the string to the engine, and that's
probably what I'll do if I decide to support comments, but I thought
this might be generally useful feature.



 Comments   
Comment by Thomas Bernhardt [ 28/Aug/07 ]

Already supported

Comment by Thomas Bernhardt [ 28/Aug/07 ]

Comments are already supported.

// same-line comments

or

/* in-line comments */

Documentation set to be updated





[ESPER-131] Namespace problem using XML events and XPath properties Created: 25/Jul/07  Updated: 15/Sep/07  Resolved: 25/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11

Type: Bug Priority: Major
Reporter: Paul Fremantle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Here is my XML event:
<m0:getQuote xmlns:m0="http://services.samples/xsd"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote>

Here is my Esper config:
<?xml version="1.0" encoding="UTF-8"?>
<esper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../etc/esper-configuration-1-0.xsd">
<event-type alias="StockQuoteEvent">
<xml-dom root-element-name="getQuote" default-namespace="http://services.samples/xsd" root-element-namespace="http://services.samples/xsd">
<namespace-prefix prefix="m" namespace="http://services.samples/xsd"/>
<xpath-property property-name="symbol" xpath="//symbol" type="string"/>
<!-xpath-property property-name="symbol" xpath="//*[local-name(.) = 'getQuote' and namespace-uri(.) = 'http://services.samples/xsd']" type="string"/->
</xml-dom>
</event-type>
</esper-configuration>

If I do my own XPath it works. If I use the commented out xpath-prop then it also works. However, given the config as above and this statement:
select symbol from StockQuote
I get an empty string. I can't see where the namespaces are actually being set onto the XPathExpression, so maybe thats the problem?



 Comments   
Comment by Thomas Bernhardt [ 25/Jul/07 ]

Added test in trunk in net.esper.regression.event.TestNoSchemaXMLEvent

Comment by Thomas Bernhardt [ 25/Jul/07 ]

The test XML:
<m0:getQuote xmlns:m0="http://services.samples/xsd">
<m0:request>
<m0:symbol>IBM</m0:symbol>
</m0:request>
</m0:getQuote>

The "symbol" is under "request" thus the query "select request.symbol from StockQuote" can works with no namespaces, however "select symbol from StockQuote" should not work.

The XPath must include the namespace, note the "m0" before the "symbol":
<xpath-property property-name="m0:symbol" xpath="//symbol" type="string"/>

The namespace prefix mapping did not work correctly for XML types that didn't have a schema associated, the code changes for this has been made.

With namespaces, the query "select request.symbol from StockQuote" cannot work as the namespace cannot be supplied unless one uses XPath.

Comment by Thomas Bernhardt [ 25/Jul/07 ]

The change was made to class "SimpleXMLEventType" that now populates the XPathNamespaceContext before compiling explicit XPath properties.

Let us know if you require a jar file with this correction.

Comment by Thomas Bernhardt [ 26/Jul/07 ]

An additional change was made such that the following query works with the default namespace prefix:
select request.symbol from StockQuote

The engine now takes the default namespace's prefix and constructs XPath expressions for properties using that prefix. Thus the property name
"request.symbol" results in an XPath expression "/m0:getQuote/m0:request/m0:symbol"

Comment by Paul Fremantle [ 26/Jul/07 ]

Great!

Thanks for the responsive fixes.

Paul

Comment by Thomas Bernhardt [ 26/Jul/07 ]

In addition, we want to support "deep" resolution of properties. We are planning to provide this additional setting:

/**

  • When set to true (the default), indicates that when properties are compiled to XPath expressions that the
  • compilation should generate an absolute XPath expression such as "/getQuote/request" for the
  • simple request property, or "/getQuote/request/symbol" for a "request.symbol" nested property,
  • wherein the root element node is "getQuote".
  • <p>
  • When set to false, indicates that when properties are compiled to XPath expressions that the
  • compilation should generate a deep XPath expression such as "//symbol" for the
  • simple symbol property, or "//request/symbol" for a "request.symbol" nested property.
  • @param resolvePropertiesAbsolute true for absolute XPath for properties (default), false for deep XPath
    */
    public void setResolvePropertiesAbsolute(boolean resolvePropertiesAbsolute) { this.resolvePropertiesAbsolute = resolvePropertiesAbsolute; }

By setting this value to true, the following statement resolves the symbol property using XPath "//symbol":
select symbol from StockQuote

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-130] Problem using Namespaces with XML Created: 25/Jul/07  Updated: 25/Jul/07  Resolved: 25/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Paul Fremantle Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Paul Fremantle [ 25/Jul/07 ]

This is a duplicate of 131 created by mistake. Please delete

Comment by Thomas Bernhardt [ 25/Jul/07 ]

Close, was duplicate of 131





[ESPER-129] DOM expects a Document, no error checking if not Created: 25/Jul/07  Updated: 15/Sep/07  Resolved: 25/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.11

Type: Bug Priority: Major
Reporter: Paul Fremantle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

When I use the DOM XML approach to pass events to Esper, I pass in a Node object but it then does this with it:
public EventBean adapterForDOM(Node node)
{
String rootElementName;
Node namedNode = null;
if (node instanceof Document)

{ namedNode = ((Document) node).getDocumentElement(); }
rootElementName = namedNode.getLocalName();
if (rootElementName == null)
{ rootElementName = namedNode.getNodeName(); }

It seems to me it should do:
if (node instanceof Document)
{ namedNode = ((Document) node).getDocumentElement(); }

else if (node instanceof Element)
namedNode = (Element)node;
} else // handle error here



 Comments   
Comment by Thomas Bernhardt [ 25/Jul/07 ]

In release 1.11, code change in SVN trunk

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-128] test folders Created: 19/Jul/07  Updated: 11/Aug/07  Resolved: 11/Aug/07

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 1.10
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

net.esper.regression.adapter.TestCSVAdapter is in esper/test but depends on esperIO net.esper.adapter.csv.*
this test should be in esperIO






[ESPER-127] Joining Relational Data via SQl Created: 16/Jul/07  Updated: 06/Aug/07  Resolved: 06/Aug/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.9
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: agostino perrotta Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi.
I'm testing ESPER in order to understand how to use it in a BAM implementation but in this moment I've a problem with SQL Join.

I've defined an XML event (see configuration below):

<event-type alias="smevent">
<xml-dom root-element-name="event-envelope">
<xpath-property property-name="cname" xpath="/event-envelope/event-header/customer" type="string"/>
<xpath-property property-name="cid" xpath="/event-envelope/event-header/id" type="number"/>
<xpath-property property-name="etype" xpath="/event-envelope/event-header/@event-type" type="string"/>
<xpath-property property-name="igroup" xpath="/event-envelope/event-body/instrument-group" type="string"/>
<xpath-property property-name="sla" xpath="/event-envelope/event-body/sla" type="string"/>
</xml-dom>
</event-type>

I tried to correlate events of type "smevent" and everything was fantastic...I got what I expected.
During the succesful tests I've used the following EQL query:

String stmt = "select istream cname, igroup, sla, count as total "+
"from smevent(etype='reservation').win:time_batch(3 sec) "+
"group by cname,igroup,sla order by cname,igroup,sla desc";

Afterwords I decided to join these events with SQL data (stored in a table of a HSQLDB instance) therefore
I've added the following section to the configuration file (see below):

<database-reference name="MYDB">
<drivermanager-connection class-name="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:7777" user="sa" password="">
</drivermanager-connection>
<connection-lifecycle value="retain"/>
</database-reference>

In the database I've defined a table with 2 fields:

  • NAME that is VARCHAR(64)
  • ID that is an INTEGER.

I used the following EQL statement (according to the reference manual that come along with the software):

String stmt = "select istream cid, cust_name, igroup, sla, count as total "+
"from smevent(etype='reservation').win:time_batch(3 sec), "+
"sql:MYDB [' select id, name as cust_name from Customers where id=$

{cid}

'] "+
"group by cust_name,igroup,sla";

.....but in the EventBean I received in the UpdateListener the field "cust_name" is
always empty (but the table "Customers" is not empty !

I tried to use an outer join too but without success !
I do not know what else to do, I'm blocked.

Thanks in advance for your help.

Regards,
NIKO.



 Comments   
Comment by Thomas Bernhardt [ 19/Jul/07 ]

Hi Niko,

I have tried reproducing your problem in my environment but wasn't able to get the same problem. My test code is as below. Can you please try the test code in your environment to see if you encounter a problem? It may also be possible that the "cid" type conversion in your SQL between your database and the XPath property value may create mismatching types, perhaps try changing the SQL query to explicitly convert types?

Regards
Tom

public void testEsper127()
{
epService = EPServiceProviderManager.getDefaultProvider(configuration);
epService.initialize();
epService.getEPRuntime().sendEvent(new TimerControlEvent(TimerControlEvent.ClockType.CLOCK_EXTERNAL));

Map<String, Class> props = new HashMap<String, Class>();
props.put("cid", Integer.class);
props.put("igroup", Integer.class);
props.put("sla", Integer.class);

epService.getEPAdministrator().getConfiguration().addEventTypeAlias("smevent", props);

sendTimer(0);
String stmtText = "select istream cid, cust_name, igroup, sla, count as total "+
"from smevent.win:time_batch(3 sec), "+
"sql:MyDB [' select id, name as cust_name from Customers where id=$

{cid}

'] "+
"group by cust_name,igroup,sla";

EPStatement stmt = epService.getEPAdministrator().createEQL(stmtText);
listener = new SupportUpdateListener();
stmt.addListener(listener);

Map<String, Object> event = new HashMap<String, Object>();
event.put("cid", 1);
epService.getEPRuntime().sendEvent(event, "smevent");

sendTimer(3000);
EventBean result = listener.assertOneGetNewAndReset();
assertEquals("abc", result.get("cust_name"));
}

Comment by Thomas Bernhardt [ 06/Aug/07 ]

Closed, no issue





[ESPER-126] Allow null statement name for createPattern Created: 16/Jul/07  Updated: 19/Jul/07  Resolved: 16/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently throws an IllegalArgumentException, however the statement name is optional since createPattern(text) exists



 Comments   
Comment by Thomas Bernhardt [ 16/Jul/07 ]

In 1.10

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-125] IllegalStateException in a self-joining statement without join condition using sorted window Created: 07/Jul/07  Updated: 21/Dec/07  Resolved: 15/Nov/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.12

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I came up with the following query which works well, but only if I ignore the IllegalStateException from the remove method of net.esper.collection.SortedRefCountedSet. Do you think it's ok to ignore this exception or do you think there's another underlying problem? This query has the advantage that the number of unique values for Sensor.device may vary and the query still outputs the correct values.

Note that this use case calculates the min and max of Sensor.measurement across unique devices. I found that I had to surround each property I output with an aggregate function to ensure that I only got a single row as output. I was happy to see that this worked, even for String types, but maybe there's a better way? Since there should be only a single value in the window of the view, would it make sense to have a current() aggregate function?

SELECT max(high.type) as type,
max(high.measurement) as highMeasurement, max(high.confidence) as highConfidence,
min(low.measurement) as lowMeasurement, min(low.confidence) as lowConfidence
FROM Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',true,1) as high,
Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',false,1) as low

net.esper.client.EPException: java.lang.IllegalStateException: Attempting to remove key from map that wasn't added
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:239)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:120)
at test.pattern.TestSensorQuery.testSensorQuery(TestSensorQuery.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.IllegalStateException: Attempting to remove key from map that wasn't added
at net.esper.collection.SortedRefCountedSet.remove(SortedRefCountedSet.java:59)
at net.esper.eql.agg.MinMaxAggregator.leave(MinMaxAggregator.java:46)
at net.esper.eql.agg.AggregationServiceGroupAllImpl.applyLeave(AggregationServiceGroupAllImpl.java:37)
at net.esper.eql.core.ResultSetProcessorRowForAll.processJoinResult(ResultSetProcessorRowForAll.java:74)
at net.esper.eql.view.OutputProcessViewDirect.process(OutputProcessViewDirect.java:77)
at net.esper.eql.join.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:47)
at net.esper.eql.join.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:63)
at net.esper.core.EPStatementHandle.internalDispatch(EPStatementHandle.java:94)
at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:567)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:235)
... 20 more

I'm using release 1.9. I've included the test case below along with the exception and trace log. The use case is to output the min and max measurements across unique devices (partitioned by the type of device). The additional somewhat tricky part (at least for me) was to output the corresponding confidence and device property values that were part of the event containing the min and max values.

Here's the test case:

package test.pattern;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.esper.client.Configuration;
import net.esper.client.EPRuntime;
import net.esper.client.EPServiceProvider;
import net.esper.client.EPServiceProviderManager;
import net.esper.client.EPStatement;
import net.esper.client.UpdateListener;
import net.esper.event.EventBean;
import net.esper.event.EventType;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import junit.framework.TestCase;

public class TestSensorQuery extends TestCase {

private Configuration setup()

{ Configuration config = new Configuration(); config.addEventTypeAlias("Sensor", Sensor.class); return config; }

private void logEvent (Object event)

{ log.info("Sending " + event); }

public void testSensorQuery() throws Exception {
log.info ("testSensorQuery...........");
Configuration configuration = setup();

EPServiceProvider epService = EPServiceProviderManager.getProvider("testSensorQuery", configuration);
MatchListener listener = new MatchListener();
String stmtString =
"SELECT max(high.type) as type, \n" +
" max(high.measurement) as highMeasurement, max(high.confidence) as confidenceOfHigh, max(high.device) as deviceOfHigh\n" +
",min(low.measurement) as lowMeasurement, min(low.confidence) as confidenceOfLow, min(low.device) as deviceOfLow\n" +
"FROM\n" +
" Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',true,1) as high " +
",Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',false,1) as low ";

EPStatement stmt = epService.getEPAdministrator().createEQL(stmtString);
log.info(stmtString);
stmt.addListener(listener);

EPRuntime runtime = epService.getEPRuntime();
List<Sensor> events = new ArrayList<Sensor>();
events.add(new Sensor("Temperature", "Device1", 68.0, 96.5));
events.add(new Sensor("Temperature", "Device2", 65.0, 98.5));
events.add(new Sensor("Temperature", "Device1", 62.0, 95.3));
events.add(new Sensor("Temperature", "Device2", 71.3, 99.3));
for (Sensor event : events)

{ logEvent (event); runtime.sendEvent(event); }

Map lastEvent = (Map) listener.getLastEvent();
assertTrue (lastEvent != null);
assertEquals (62.0,lastEvent.get("lowMeasurement"));
assertEquals ("Device1",lastEvent.get("deviceOfLow"));
assertEquals (95.3,lastEvent.get("confidenceOfLow"));
assertEquals (71.3,lastEvent.get("highMeasurement"));
assertEquals ("Device2",lastEvent.get("deviceOfHigh"));
assertEquals (99.3,lastEvent.get("confidenceOfHigh"));
}

static public class Sensor {

public Sensor() {
}

public Sensor(String type, String device, Double measurement, Double confidence)

{ this.type = type; this.device = device; this.measurement = measurement; this.confidence = confidence; }

public void setType(String type)

{ this.type = type; }

public String getType()

{ return type; }

public void setDevice(String device)

{ this.device = device; }

public String getDevice()

{ return device; }

public void setMeasurement(Double measurement)

{ this.measurement = measurement; }

public Double getMeasurement()

{ return measurement; }

public void setConfidence(Double confidence)

{ this.confidence = confidence; }

public Double getConfidence()

{ return confidence; }

private String type;
private String device;
private Double measurement;
private Double confidence;
}

class MatchListener implements UpdateListener {
private int count = 0;
private Object lastEvent = null;

public void update(EventBean[] newEvents, EventBean[] oldEvents) {
log.info("New events.................");
if (newEvents != null) {
for (int i = 0; i < newEvents.length; i++) {
EventBean e = newEvents[i];
EventType t = e.getEventType();
String[] propNames = t.getPropertyNames();
log.info("event[" + i + "] of type " + t);
for (int j=0; j < propNames.length; j++)

{ log.info(" " + propNames[j] + ": " + e.get(propNames[j])); }

count++;
lastEvent = e.getUnderlying();
}
}
log.info("Removing events.................");
if (oldEvents != null) {
for (int i = 0; i < oldEvents.length; i++) {
EventBean e = oldEvents[i];
EventType t = e.getEventType();
String[] propNames = t.getPropertyNames();
log.info("event[" + i + "] of type " + t);
for (int j=0; j < propNames.length; j++)

{ log.info(" " + propNames[j] + ": " + e.get(propNames[j])); }

count--;
}
}
log.info("......................................");
}

public int getCount()

{ return count; }

public Object getLastEvent()

{ return lastEvent; }

}

private static final Log log = LogFactory.getLog(TestSensorQuery.class);
}

Here's the exception that occurs:

net.esper.client.EPException: java.lang.IllegalStateException: Attempting to remove key from map that wasn't added
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:239)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:120)
at test.pattern.TestSensorQuery.testSensorQuery(TestSensorQuery.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.IllegalStateException: Attempting to remove key from map that wasn't added
at net.esper.collection.SortedRefCountedSet.remove(SortedRefCountedSet.java:59)
at net.esper.eql.agg.MinMaxAggregator.leave(MinMaxAggregator.java:46)
at net.esper.eql.agg.AggregationServiceGroupAllImpl.applyLeave(AggregationServiceGroupAllImpl.java:37)
at net.esper.eql.core.ResultSetProcessorRowForAll.processJoinResult(ResultSetProcessorRowForAll.java:74)
at net.esper.eql.view.OutputProcessViewDirect.process(OutputProcessViewDirect.java:77)
at net.esper.eql.join.JoinExecutionStrategyImpl.join(JoinExecutionStrategyImpl.java:47)
at net.esper.eql.join.JoinExecStrategyDispatchable.execute(JoinExecStrategyDispatchable.java:63)
at net.esper.core.EPStatementHandle.internalDispatch(EPStatementHandle.java:94)
at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:567)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:235)
... 20 more

Here's the output log:

17:52:35,968 INFO [TestSensorQuery] testSensorQuery...........
17:52:36,515 INFO [TestSensorQuery] SELECT max(high.type) as type,
max(high.measurement) as highMeasurement, max(high.confidence) as confidenceOfHigh, max(high.device) as deviceOfHigh
,min(low.measurement) as lowMeasurement, min(low.confidence) as confidenceOfLow, min(low.device) as deviceOfLow
FROM
Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',true,1) as high ,Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',false,1) as low
17:52:36,515 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@22ab57
17:52:36,515 INFO [TestSensorQuery] New events.................
17:52:36,515 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:52:36,515 INFO [TestSensorQuery] highMeasurement: 68.0
17:52:36,515 INFO [TestSensorQuery] type: Temperature
17:52:36,515 INFO [TestSensorQuery] confidenceOfLow: 96.5
17:52:36,515 INFO [TestSensorQuery] confidenceOfHigh: 96.5
17:52:36,515 INFO [TestSensorQuery] deviceOfLow: Device1
17:52:36,515 INFO [TestSensorQuery] lowMeasurement: 68.0
17:52:36,515 INFO [TestSensorQuery] deviceOfHigh: Device1
17:52:36,515 INFO [TestSensorQuery] Removing events.................
17:52:36,515 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:52:36,515 INFO [TestSensorQuery] highMeasurement: null
17:52:36,515 INFO [TestSensorQuery] type: null
17:52:36,515 INFO [TestSensorQuery] confidenceOfLow: null
17:52:36,515 INFO [TestSensorQuery] confidenceOfHigh: null
17:52:36,515 INFO [TestSensorQuery] deviceOfLow: null
17:52:36,515 INFO [TestSensorQuery] lowMeasurement: null
17:52:36,515 INFO [TestSensorQuery] deviceOfHigh: null
17:52:36,515 INFO [TestSensorQuery] ......................................
17:52:36,515 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@1cf4a2c

Here's the output log I get (which is correct) if I ignore the exception:

17:50:20,812 INFO [TestSensorQuery] testSensorQuery...........
17:50:21,359 INFO [TestSensorQuery] SELECT max(high.type) as type,
max(high.measurement) as highMeasurement, max(high.confidence) as confidenceOfHigh, max(high.device) as deviceOfHigh
,min(low.measurement) as lowMeasurement, min(low.confidence) as confidenceOfLow, min(low.device) as deviceOfLow
FROM
Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',true,1) as high ,Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',false,1) as low
17:50:21,359 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@22ab57
17:50:21,359 INFO [TestSensorQuery] New events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 96.5
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 96.5
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device1
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,359 INFO [TestSensorQuery] Removing events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: null
17:50:21,359 INFO [TestSensorQuery] type: null
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: null
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: null
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: null
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: null
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: null
17:50:21,359 INFO [TestSensorQuery] ......................................
17:50:21,359 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@1cf4a2c
17:50:21,359 INFO [TestSensorQuery] New events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 98.5
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 96.5
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device2
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 65.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,359 INFO [TestSensorQuery] Removing events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 96.5
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 96.5
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device1
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,359 INFO [TestSensorQuery] ......................................
17:50:21,359 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@15575e0
17:50:21,359 INFO [TestSensorQuery] New events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 62.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 95.3
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 95.3
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device1
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 62.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,359 INFO [TestSensorQuery] Removing events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 68.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 98.5
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 96.5
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device2
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 65.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,359 INFO [TestSensorQuery] ......................................
17:50:21,359 INFO [TestSensorQuery] Sending test.pattern.TestSensorQuery$Sensor@11bed71
17:50:21,359 INFO [TestSensorQuery] New events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 71.3
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 95.3
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 99.3
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device1
17:50:21,359 INFO [TestSensorQuery] lowMeasurement: 62.0
17:50:21,359 INFO [TestSensorQuery] deviceOfHigh: Device2
17:50:21,359 INFO [TestSensorQuery] Removing events.................
17:50:21,359 INFO [TestSensorQuery] event[0] of type MapEventType typeName= propertyNames=[highMeasurement, type, confidenceOfLow, confidenceOfHigh, deviceOfLow, lowMeasurement, deviceOfHigh]
17:50:21,359 INFO [TestSensorQuery] highMeasurement: 62.0
17:50:21,359 INFO [TestSensorQuery] type: Temperature
17:50:21,359 INFO [TestSensorQuery] confidenceOfLow: 95.3
17:50:21,359 INFO [TestSensorQuery] confidenceOfHigh: 95.3
17:50:21,359 INFO [TestSensorQuery] deviceOfLow: Device1
17:50:21,375 INFO [TestSensorQuery] lowMeasurement: 62.0
17:50:21,375 INFO [TestSensorQuery] deviceOfHigh: Device1
17:50:21,375 INFO [TestSensorQuery] ......................................



 Comments   
Comment by Thomas Bernhardt [ 07/Jul/07 ]

this is definitely one of the most complex statements I have seen solving a use case in a single statement. It may be possible to use insert-into to just make this query more modular and understandable.

I have created a JIRA issue for tracking this issue at http://jira.codehaus.org/browse/ESPER-125

There are 2 workarounds that I can see. One, it seems the statement can be split up via insert-into as follows. The test works fine.
insert into MyStream SELECT * FROM
Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',true,1) as high,
Sensor.std:groupby('type').win:time(1 hour).std:unique('device').ext:sort('measurement',false,1) as low

SELECT max(high.type) as type,
max(high.measurement) as highMeasurement, max(high.confidence) as confidenceOfHigh, max(high.device) as deviceOfHigh,
min(low.measurement) as lowMeasurement, min(low.confidence) as confidenceOfLow, min(low.device) as deviceOfLow
FROM MyStream

Second and perhaps the less desirable option is to ignore the exception as I don't see it impact the building of results.

Comment by Thomas Bernhardt [ 15/Nov/07 ]

Removed assertion; Version 2 will provide a checker for data window combinations

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-124] IllegalStateException in a grouped time window using the prior function Created: 04/Jul/07  Updated: 19/Jul/07  Resolved: 14/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Exception in thread "Timer-0" java.lang.IllegalStateException: Event not currently in collection, event=BeanEventBean eventType=BeanEventType clazz=info.noahcampbell.linearroad.streamdata.PositionReport bean=info.noahcampbell.linearroad.streamdata.PositionReport@ae4d8
at net.esper.view.internal.PriorEventBufferSingle.getRelativeToEvent(PriorEventBufferSingle.java:86)
at net.esper.view.internal.PriorEventViewFactory$RelativeAccessImpl.getRelativeToEvent(PriorEventViewFactory.java:168)
at net.esper.eql.expression.ExprPriorNode.evaluate(ExprPriorNode.java:93)
at net.esper.eql.expression.ExprEqualsNode.evaluate(ExprEqualsNode.java:105)
at net.esper.eql.view.FilterExprView.filterEvents(FilterExprView.java:74)
at net.esper.eql.view.FilterExprView.update(FilterExprView.java:45)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:96)
at net.esper.view.internal.PriorEventView.update(PriorEventView.java:29)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:96)
at net.esper.view.std.MergeView.update(MergeView.java:81)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:96)
at net.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java:88)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:96)
at net.esper.view.window.TimeWindowView.expire(TimeWindowView.java:162)
at net.esper.view.window.TimeWindowView$1.scheduledTrigger(TimeWindowView.java:196)
at net.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:418)
at net.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:319)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:284)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:216)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:120)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:103)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)



 Comments   
Comment by Thomas Bernhardt [ 07/Jul/07 ]

Has not been reproduced outside of user environment, working on it

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-123] Provide an "Explain Plan" method to EPStatement Created: 04/Jul/07  Updated: 19/Jan/11  Resolved: 07/Dec/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: New Feature Priority: Trivial
Reporter: Noah Campbell Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A programmatic way to access if a particular statement is will perform well.



 Comments   
Comment by Thomas Bernhardt [ 11/Aug/07 ]

Tentativly assigned to release 2.0

Some of the infomation can already be derived by turning on info-level logging for the join plan package.

Comment by Thomas Bernhardt [ 03/Sep/09 ]

Since the debug output contain this information, changed to Trivial

Comment by Thomas Bernhardt [ 07/Dec/10 ]

In 4.1 we added the show plan logging configuration.





[ESPER-122] IllegalArgumentException in a join statement between same-typed map-underlying events Created: 04/Jul/07  Updated: 19/Jul/07  Resolved: 04/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have an event stream called PositionReport that contains various
properties. There are 3 views that are derived from PositionReport.
These are cars, avgs and avgsv. cars is the set of all
PositionReports for a particular vehicle id group by 3 position
properties (XWay, seg, dir) for 1 minute. Avgs is the average speed
of all the cars in a segment (XWay, seg, dir) and Avgsv is the same
as Avgs except it averages any two position reports during the one
minute for a particular car.

Essentially these 3 "views" are recombined back into two more views,
lav and toll. I've implemented each view as its own stream (using
insert into ...). Everything seems to run fine until I hit an
exception:

Exception in thread "Timer-0" java.lang.IllegalArgumentException:
Event already in index, event=MapEventBean eventType=MapEventType
typeName=lav propertyNames=[seg, lav, dir, XWay]
at net.esper.eql.join.table.PropertyIndexedEventTable.add
(PropertyIndexedEventTable.java:134)
at net.esper.eql.join.table.PropertyIndexedEventTable.add
(PropertyIndexedEventTable.java:88)
at net.esper.eql.join.JoinSetComposerImpl.join
(JoinSetComposerImpl.java:83)
at net.esper.eql.join.JoinExecutionStrategyImpl.join
(JoinExecutionStrategyImpl.java:41)
at net.esper.eql.join.JoinExecStrategyDispatchable.execute
(JoinExecStrategyDispatchable.java:63)
at net.esper.core.EPStatementHandle.internalDispatch
(EPStatementHandle.java:94)
at net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:537)
at net.esper.core.EPRuntimeImpl.processThreadWorkQueue
(EPRuntimeImpl.java:459)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:
290)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:216)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:120)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:103)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Since all these new streams originate from the original
PositionReport, I'm not sure how to work around this exception. Any
suggestions are welcome.



 Comments   
Comment by Thomas Bernhardt [ 04/Jul/07 ]

> I'm using different stream names. Here are my EQL statements:
>
> insert into cars select *, count as total from PositionReport.win:time_batch(1 minute) group by XWay, seg, dir
>
> insert into avgs select avg(spd) as avgSpd, XWay, seg, dir, min(timestamp) as ts
> from PositionReport.win:time_batch(1 minute) group by XWay, seg, dir
>
> insert into avgsv select avg(spd) as avgSpd, XWay, seg, dir, VID
> from PositionReport.win:time_batch(1 minute) group by XWay, seg, dir, VID
>
> insert into lav select avg(avgSpd) as lav, XWay, seg, dir from avgsv.win:length(5) group by XWay, seg, dir
>
> select case when cars.total > 50 and lav.lav < 40 then 2 * Math.pow(cars.total, 2) else 0 end as toll, XWay, seg, dir
> from PositionReport.win:time_batch(1 minute) as avgs, PositionReport.win:time_batch(1 minute).std:groupby('VID') as cars
> group by XWay, seg, dir
>
>
select case when cars.total > 50 and lav.lav < 40 then 2 * Math.pow(cars.total, 2) else 0 end as toll, lav.XWay, lav.seg, lav.dir
from lav as lav, cars as cars where lav.XWay = cars.XWay and lav.seg = cars.seg and lav.dir = cars.dir group by lav.XWay, lav.seg, lav.dir

========

The "lav" and "cars" in the join are unlimited streams and thus may lead to out-of-memory since the join is required to keep-all.

Consider using a the last event view for both streams, i.e. "lav.std:lastevent()" and "cars.std:lastevent()" or another data window view to limit the streams. I think the last element view also fixes the exception.

Comment by Thomas Bernhardt [ 04/Jul/07 ]

see test TestJoinMapType

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-121] Filter expression not evaluating correctly after optimization and using multiple pattern subexpression results Created: 02/Jul/07  Updated: 19/Jul/07  Resolved: 04/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I would like to use the following pattern to match 3 events which occur
within a time window where 3 *different* users submit trades with
similar properties:

tradeevent1=FxTradeEvent(userId in ('U1000','U1001','U1002') ) -> (
tradeevent2=FxTradeEvent(userId in ('U1000','U1001','U1002') and userId
!= tradeevent1.userId and ccypair=tradeevent1.ccypair and
direction=tradeevent1.direction ) -> tradeevent3=FxTradeEvent(userId in

('U1000','U1001','U1002') and userId != tradeevent1.userId and userId !=
tradeevent2.userId and ccypair=tradeevent1.ccypair and
direction=tradeevent1.direction ) ) where timer:within(600 sec)

The events that come through include those where the same user has traded
twice, which is not want I want. Of course I can filter these out in the
EventListener.
But I would like to know what is wrong with this pattern.

============

I am using Esper 1.9.0.

Sorry - I missed off the "every" keyword in my pattern. Taking your test
example I have expanded the example (see below) to reproduce the problem
of self-matches. These occur after the data set has a number of entries
in it. The test can be run as a junit test.

import java.util.Random;
import net.esper.client.Configuration;
import net.esper.client.EPServiceProvider;
import net.esper.client.EPServiceProviderManager;
import net.esper.client.EPStatement;
import net.esper.client.UpdateListener;
import net.esper.event.EventBean;
import junit.framework.TestCase;

public class TestEventPattern extends TestCase {

private EPServiceProvider epService;
private SupportUpdateListener listener;

protected void setUp() throws Exception

{ Configuration config = new Configuration(); config.addEventTypeAlias("FxTradeEvent", SupportTradeEvent.class .getName()); epService = EPServiceProviderManager.getProvider( "testRFIDZoneEnter", config); epService.initialize(); String expression = "every tradeevent1=FxTradeEvent(userId in ('U1000','U1001','U1002') ) -> " + "(tradeevent2=FxTradeEvent(userId in ('U1000','U1001','U1002') and " + " userId != tradeevent1.userId and " + " ccypair = tradeevent1.ccypair and " + " direction = tradeevent1.direction) -> " + " tradeevent3=FxTradeEvent(userId in ('U1000','U1001','U1002') and " + " userId != tradeevent1.userId and " + " userId != tradeevent2.userId and " + " ccypair = tradeevent1.ccypair and " + " direction = tradeevent1.direction)" + ") where timer:within(600 sec)"; EPStatement statement = epService .getEPAdministrator().createPattern(expression); listener = new SupportUpdateListener(); statement.addListener(listener); }

public void testDifferentUserTrades() {

Random random = new Random();
String users[] =

{"U1000","U1001","U1002"}

;
String ccy[] =

{"USD", "JPY", "EUR"}

;
String direction[] =

{"B", "S"}

;

for (int i=0; i <1000; i++)

{ epService.getEPRuntime().sendEvent(new SupportTradeEvent(users[random.nextInt(users.length)], ccy[random.nextInt(ccy.length)], direction[random.nextInt(direction.length )])); }

System.out.println("Bad Matches="+listener.badMatchCount +
" good matches=" + listener.goodMatchCount);
assertEquals(0, listener.badMatchCount);
}

protected void tearDown() throws Exception

{ super.tearDown(); }

private class SupportUpdateListener implements UpdateListener {

private int badMatchCount;
private int goodMatchCount;

public void update(EventBean[] newEvents, EventBean[]
oldEvents) {
if (newEvents!=null)

{ for (EventBean eventBean : newEvents) handleEvent(eventBean); }

}

private void handleEvent(EventBean eventBean) {
SupportTradeEvent tradeevent1 = (SupportTradeEvent)
eventBean.get("tradeevent1");
SupportTradeEvent tradeevent2 = (SupportTradeEvent)
eventBean.get("tradeevent2");
SupportTradeEvent tradeevent3 = (SupportTradeEvent)
eventBean.get("tradeevent3");

if ((
tradeevent1.getUserId().equals(tradeevent2.getUserId()) ||
tradeevent1.getUserId().equals(tradeevent3.getUserId()) ||
tradeevent2.getUserId().equals(tradeevent3.getUserId()) ))

{ System.out.println("Bad Match : "); System.out.println(tradeevent1); System.out.println(tradeevent2); System.out.println(tradeevent3 + "\n"); badMatchCount++; }

else

{ goodMatchCount++; }

}

}

}



 Comments   
Comment by Thomas Bernhardt [ 02/Jul/07 ]

Thanks for the additional test code. I have created a JIRA issue for tracking at http://jira.codehaus.org/browse/ESPER-121

The issue lies in the fact that the filter expression optimization decides on a certain strategy that doesn't execute correctly for a pattern that produces multiple events for consideration in the filter, if there are multiple such sub-expressions – not an easy to explain problem I guess

There is a simple workaround to the issue: by using the "not in" instead of not equals "!=" in the 3rd filter parameter list. The following statement behaves correctly in the tests:

String expression = "every tradeevent1=FxTradeEvent(userId in ('U1000','U1001','U1002') ) -> " +
"(tradeevent2=FxTradeEvent(userId in ('U1000','U1001','U1002') and " +
" userId != tradeevent1.userId and " +
" ccypair = tradeevent1.ccypair and " +
" direction = tradeevent1.direction) -> " +
" tradeevent3=FxTradeEvent(userId in ('U1000','U1001','U1002') and " +
" userId not in (tradeevent1.userId, tradeevent2.userId) and " +
" ccypair = tradeevent1.ccypair and " +
" direction = tradeevent1.direction)" +
") where timer:within(600 sec)";

Comment by Thomas Bernhardt [ 04/Jul/07 ]

See test TestUseResultPattern.testFollowedByFilter

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-120] Allow use of the field aliases for removing repeat computations in the select Created: 29/Jun/07  Updated: 31/Mar/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 4.2

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We could create an enhancement request, enhancing the engine so it could remember an alias such as the "cnt" alias as you suggested? That would allow the statement to look as you suggested:
select count as cnt, cnt - some_field as diff from FOO

========
Hi,

Is there any way to use values of computed select field in another
field, without creating a temporary stream and without retyping the
computation?

For example the following fails to find "cnt" field:

select
count as cnt,
cnt - some_field as diff
from FOO

The 2 workarounds I found are :

A)
select
count as cnt,
count - some_field as diff
from FOO

B)

insert into BAR
select
field1, some_field, ...,
count as cnt,
from FOO

select cnt,
cnt - some_field as diff
from BAR

========

I think that the engine enhancement to allow use of the field aliases in the select itself would be nice. And would allow not just simpler expression in this use case, but also better performance than any of the workarounds.



 Comments   
Comment by Thomas Bernhardt [ 06/Jul/07 ]

Lowered priority and moved to 1.11 as the performance difference may not be huge since same-aggregation functions are already represented internally only once, and only if complex calculations repeat within the same statement would this feature make a bigger difference. However repeat calculations can be factored into a Java class or could be done via insert-into.

Comment by Thomas Bernhardt [ 06/Sep/07 ]

A statement like the following doesn't work:
select UtilFuncs.func(metric) as grp, * from Stream group by grp

the following will work, but is more complicated than necessary:

select UtilFuncs.func(metric) as grp, * from Stream group by UtilFuncs.func(metric)

Comment by Thomas Bernhardt [ 26/Oct/07 ]

This needs to be carefully considered for two reasons:
1. it could break existing EQL statements or change behavior, therefore must be in a 2.0 version
2. it's non-standard in SQL, and none of the database systems seems to have it

I think the engine could implement an optimization to detect duplicate expressions and condense these such that the computation occurs once and the results are shared. In such optimization the alias would still not be reusable.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Another example query:
select table1.column1 as alias1 from Pattern[..] where alias1 = 2;

Comment by Thomas Bernhardt [ 01/Oct/10 ]

As an expression may also itself return multiple columns, the syntax would need to also support "alias.property".
A second complication is aggregation functions, which can be used in the select-clause but not the where-clause.
When adding this feature it would also need to consider whether an alias result could or should be cached or whether the feature is expression substitution causing the substituted expression to reevaluate.

Comment by Thomas Bernhardt [ 31/Mar/11 ]

part of expression def in 4.2





[ESPER-119] .NET Cannot use "params" keyword in custom method Created: 29/Jun/07  Updated: 05/Aug/10  Resolved: 05/Aug/10

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: 5.0
Fix Version/s: 3.4

Type: Improvement Priority: Major
Reporter: hank kniight Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The "params" keyword isn't handled in custom methods so you can't create custom methods whose last parameter is marked as "params".






[ESPER-118] NullPointerException when select * and additional fields Created: 28/Jun/07  Updated: 19/Jul/07  Resolved: 04/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm seeing a NullPointerException when doing "select *" and some
additional fields.
The following query generates exception that is shown below.


select *, count as cnt from FOO


Caused by: java.lang.NullPointerException
at
net.esper.eql.core.SelectExprEvalProcessor.getEvent(SelectExprEvalProces
sor.java:244)
at
net.esper.eql.core.SelectExprEvalProcessor.process(SelectExprEvalProcess
or.java:200)
at
net.esper.eql.core.ResultSetProcessorRowForAll.getSelectListEvents(Resul
tSetProcessorRowForAll.java:128)
at
net.esper.eql.core.ResultSetProcessorRowForAll.processViewResult(ResultS
etProcessorRowForAll.java:92)
at
net.esper.eql.view.OutputProcessViewDirect.update(OutputProcessViewDirec
t.java:50)
at
net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:48)
at
net.esper.view.stream.StreamFactorySvcImpl$1.matchFound(StreamFactorySvc
Impl.java:116)
at
net.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:534)
at
net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:235)
... 2 more



 Comments   
Comment by Thomas Bernhardt [ 28/Jun/07 ]

The workaround to this issue is to select at least one property of event FOO in addition:
select *, count, myfooproperty as dummy from FOO

The problem is caused as the system choosing the wrong processor for the result sets.

Comment by Thomas Bernhardt [ 04/Jul/07 ]

see test TestCountAll.testCountPlusStar

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-117] Detect looping statements and control looping behavior Created: 24/Jun/07  Updated: 31/Mar/11  Resolved: 31/Mar/11

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Also a question which might be linked, is something done to avoid infinite looping?
I mean if I create a quite stupid rule which create a new message each time a new message arrives, I only have to send one message to make it loop infinitely.
Here it's quite easy to see the problem, but if we have lots of rules, it may not be that easy...
I know that in Drools they have a "noloop" property they can use for their rules (don't exactly know how it works)...

============
No we don't currently have a facility to detect or avoid infinite looping. I agree that for applications that specify a lot of interdependent EQL statements that use insert-into to fire events to further statements that this could come in handy. An application can attach update listeners to each statement in a chain or loop of statements and so could probably detect this however it may be nice for the engine to detect.

============

As for how the engine should be configured and react...I'm not too sure, it's probably a little bit too theoretical.
But I guess a user might want to specify that a rule
1. should not loop
2. is allowed to loop as much as it wants
3. should not loop more than X times (X could be defined at the rule level or maybe just at the engine level, I doubt people will want to define it everywhere)
In case 2, the engine has nothing to do. In case 1, the engine should only prevent the rule from firing again. On the other hand the case 3 is more like a safe guard, meaning that if the engine doesn't prevent the rule from firing again, the engine will just die if the rule fires too often, and anyway the state will always diverge...so a warning should be a good thing to inform the user that he should consider modifying that rule.



 Comments   
Comment by Thomas Bernhardt [ 31/Mar/11 ]

not applicable, in practical applications has simply not been an issue





[ESPER-116] Include in Maven build the checkstyle, PMD, findbugs code quality tools Created: 20/Jun/07  Updated: 19/Jul/07  Resolved: 05/Jul/07

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 1.10
Fix Version/s: 1.10

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add to the automated build: analyzing with maven 2 plugins: findbugs, PMD and checkstyle.



 Comments   
Comment by Thomas Bernhardt [ 05/Jul/07 ]

We are using "findbugs" and IntelliJ IDEA's integrated code analysis as documented in the release instructions.

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-115] NullPointerException using iterator on pattern without window Created: 19/Jun/07  Updated: 19/Jul/07  Resolved: 04/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For this, I thought of using "iterator" method (pull API) to find out if there was a match (even though esper places certain restrictions on the pull API). I tried this in esper 1.9.0. I created an EQL that would result in a pattern match when two events are sent. Then, I sent two events to esper. Then, when I called "iterator" method on the EPStatement object to check if there was a match I got "NullPointerException". Even if "sendEvent" does not result in a match I get the "NullPointerException". Please find attached the java files that contains the test code and the error log files. Could you please tell if this is a bug or is there something wrong in the way I am using the API's.

package net.test;

import junit.framework.TestCase;

import java.util.Iterator;
import net.esper.client.EPRuntime;
import net.esper.client.EPServiceProvider;
import net.esper.client.EPServiceProviderManager;
import net.esper.client.EPStatement;
import net.esper.client.UpdateListener;
import net.esper.event.EventBean;

public class EsperTest extends TestCase {

public void testIterator() throws Exception

{ System.out.println ("testIterator..."); EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(); epService.initialize(); EPRuntime runtime = epService.getEPRuntime(); String cepStatementString = "select * from pattern " + "[every ( addressInfo = net.test.MyEventBean(name='address') " + "-> txnWD = net.test.MyEventBean(name='txn') ) ] " + "where addressInfo.intField = txnWD.intField"; EPStatement epStatement = epService.getEPAdministrator().createEQL(cepStatementString); // MyListener listener = new MyListener(); // epStatement.addListener(listener); MyEventBean myEventBean1 = new MyEventBean(); myEventBean1.setName("address"); myEventBean1.setIntField(9001); myEventBean1.setStringField("abc"); runtime.sendEvent(myEventBean1); MyEventBean myEventBean2 = new MyEventBean(); myEventBean2.setName("txn"); myEventBean2.setIntField(9001); myEventBean2.setDoubleField(50000.00); runtime.sendEvent(myEventBean2); System.out.println("Matched : " + getIsMatch(epStatement)); System.out.println("Test complete"); }

public boolean getIsMatch(EPStatement epStmt) {
Iterator<EventBean> itr = epStmt.iterator();
if(itr != null)

{ System.out.println(itr.next()); return true; }

else

{ System.out.println("No match found."); return false; }

}

public class MyListener implements UpdateListener {
public void update(EventBean[] newEvents, EventBean[] oldEvents){
System.out.println("Pattern Matched!");
String[] eventAliases = newEvents[0].getEventType().getPropertyNames();

System.out.println("The events that caused this signature are :");

for(String eventAlias : eventAliases)

{ System.out.println(eventAlias); }

}
}
}



 Comments   
Comment by Thomas Bernhardt [ 04/Jul/07 ]

see test TestIterator.testPatternNoWindow

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-114] Allow equals operator on object types in expressions Created: 19/Jun/07  Updated: 19/Jul/07  Resolved: 04/Jul/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.10
Fix Version/s: 1.10

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have a simple query with a condition like where myEvent1.MyField = myEvent2.MyField, where MyField is an object (either defined in the framework like an IPAddress, or user defined).
I get an exception in GetCompareToCoercionType(Type typeOne, Type typeTwo) . This method only handles objects of type string, boolean or numeric. So it seems that right now it isn't handled.
I haven't found anything on JIRA about coercion...
I can easily create a function to handle this case, something like where MyFunction.Equals(myEvent1.MyField, myEvent2.MyField) but it's a little bit heavier to write...



 Comments   
Comment by Thomas Bernhardt [ 19/Jun/07 ]

that sounds like a nice improvement to enhance the equals operator to be able to use the Object equals method to compare objects of the exact same type. I think the statement compilation should remain strongly typed however and not allow to compare objects of any type.

Comment by Thomas Bernhardt [ 04/Jul/07 ]

see test TestFilterExpressions

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-113] New listener interface providing statement and engine instance Created: 15/Jun/07  Updated: 19/Jul/07  Resolved: 15/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.10
Fix Version/s: 1.10

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

in the UpdateListener.Updated method, is there a way to know which rule was used? It could be an interesting thing to know to be able to see what happened, which rules were used, ...

===========

If I understand you right, you are considering the fact that when a single UpdateListener implementation is attached to multiple statements, then how does the UpdateListener know which statement produced the result.

Of course statements could select some constant value that the UpdateListener can pull out of event properties, e.g.
select 'stmt1' as statement, ...

Other then selecting a constant, there isn't currently a way unless an application uses multiple UpdateListener instances.

We had discussed in this forum adding a new interface similar to UpdateListener that passes the engine instance and statement along:
public interface StatementAwareUpdateListener

{ public void update(EPStatement statement, EPServiceProvider engine, EventBean[] newEvents, EventBean[] oldEvents); }

==================

Exactly, a single UpdateListener attached to multiple statements.

Indeed as I thought I could add some sort of ID in my queries so that the listener can retrieve it.
Having a StatementAwareUpdateListener interface would simplify things, also I guess it wouldn't be difficult to implement as the method calling the UpdateListener probably has this information...



 Comments   
Comment by Thomas Bernhardt [ 15/Jul/07 ]

In 1.10

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-112] Pattern problem in 'every' operator not restarting a permanently false sub-expression Created: 08/Jun/07  Updated: 19/Jul/07  Resolved: 13/Jun/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.10

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I just tried the following statement with Esper 1.9 and I get no output:

select 'No StockTick within 6 seconds' as alert
from pattern [ every (timer:interval(6) and not StockTick) ]

package test.pattern;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import net.esper.client.Configuration;
import net.esper.client.EPRuntime;
import net.esper.client.EPServiceProvider;
import net.esper.client.EPServiceProviderManager;
import net.esper.client.EPStatement;
import net.esper.client.UpdateListener;
import net.esper.event.EventBean;
import net.esper.event.EventType;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import junit.framework.TestCase;

public class TestPatternMatching extends TestCase {
private final String STOCK_TICK_EVENT_TYPE_ALIAS = "StockTick";

private long startTimeMillis;

private Configuration setup()

{ Configuration configuration = new Configuration(); Properties properties1 = new Properties(); properties1.put("stockSymbol", "string"); properties1.put("price", "double"); configuration.addEventTypeAlias(STOCK_TICK_EVENT_TYPE_ALIAS, properties1); return configuration; }

private Map createStockTickEventAsMap(String symbol, double price)

{ Map<String, Object> evt = new HashMap<String, Object>(); evt.put("type", STOCK_TICK_EVENT_TYPE_ALIAS); evt.put("stockSymbol", symbol); evt.put("price", price); return evt; }

private void logEvent (Map event) {
StringBuffer buf = new StringBuffer();
buf.append ("Sending " + event.get("type") + " {");
Set keys = event.keySet();
Iterator iterator = keys.iterator();
while (iterator.hasNext()) {
Object key = iterator.next();
if (!"type".equals(key))

{ buf.append(key + "=" + event.get(key) + ""); break; }

}
while ( iterator.hasNext() )

{ Object key = iterator.next(); if (!"type".equals(key)) buf.append(", " + key + "=" + event.get(key) + ""); }

buf.append("} @ ");
buf.append(System.currentTimeMillis() - startTimeMillis);
log.info(buf);
}

public void testEventAbsence() throws Exception {
log.info ("testEventAbsence...........");
Configuration configuration = setup();

EPServiceProvider epService = EPServiceProviderManager.getProvider("testEventAbsence", configuration);
String stmtString =
"select 'No StockTick within 6 seconds' as alert " +
"from pattern [ every (timer:interval(6) and not StockTick) ]";
EPStatement stmt = epService.getEPAdministrator().createEQL(stmtString);
MatchListener listener = new MatchListener();
stmt.addListener(listener);

EPRuntime runtime = epService.getEPRuntime();
List<Map> events = new ArrayList<Map>();
events.add(createStockTickEventAsMap("ACME", 1.0));
events.add(createStockTickEventAsMap("ACME", 2.0));
events.add(createStockTickEventAsMap("ACME", 3.0));
int sleepAmount = 20000;
startTimeMillis = System.currentTimeMillis();
for (Map event : events)

{ logEvent (event); runtime.sendEvent(event, "StockTick"); log.info("Sleeping for " + sleepAmount/1000 + " seconds..."); Thread.currentThread().sleep(sleepAmount); }

log.info("Test complete");
}

class MatchListener implements UpdateListener {
private int count = 0;

public void update(EventBean[] newEvents, EventBean[] oldEvents) {
StringBuffer buf = new StringBuffer("New events @ ");
buf.append(System.currentTimeMillis() - startTimeMillis);
buf.append(".................");
log.info(buf);
if (newEvents != null) {
for (int i = 0; i < newEvents.length; i++) {
EventBean e = newEvents[i];
EventType t = e.getEventType();
String[] propNames = t.getPropertyNames();
log.info("event[" + i + "] of type " + t);
for (int j=0; j < propNames.length; j++)

{ log.info(" " + propNames[j] + ": " + e.get(propNames[j])); }

count++;
}
}
log.info("......................................");
}

public int getCount()

{ return count; }

}

private static final Log log = LogFactory.getLog(TestPatternMatching.class);
}



 Comments   
Comment by Thomas Bernhardt [ 08/Jun/07 ]

thanks for the test code, I was able to reproduce your finding for this statement:
select 'No StockTick within 6 seconds' as alert
from pattern [ every (timer:interval(6) and not StockTick) ]

We have test code that covers the timer:interval and 'not', in class net.esper.regression.pattern.TestFollowedByOperator in several of the test methods.

The inner expression to the every operator turns permanently false as it receives the 'StockTick' event. Permanently false sub-expressions are not restarted by the 'every' operator (currently), and terminate. This behavior does not match the documentation and is incorrect. The doc link is: http://esper.codehaus.org/esper-1.9.0/doc/reference/en/html_single/index.html#pattern-logical-every

The every operator should restart the subexpression whenever it comes up with a new result (true or false) and thus continue to listen for StockTick events for the next interval. I have created a JIRA defect to track this at http://jira.codehaus.org/browse/ESPER-112

If you need this function we can have a new jar file build, or alternatively can provide the corrected Java class, or include this in the next release?

The workaround is to wait an interval:
select 'No StockTick within 6 seconds' as alert
from pattern [ every timer:interval(6) -> (timer:interval(6) and not StockTick) ]

Or use the time window we discussed earlier:
select count from StockTick.win:time(6 sec) having count == 0

Comment by Thomas Bernhardt [ 13/Jun/07 ]

The jar that fixes this problem named esper-1.9.0a has been made available at http://dist.codehaus.org/esper/

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-111] Replay an event stream into a new statement Created: 08/Jun/07  Updated: 27/Jan/08  Resolved: 27/Jan/08

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In my event I just have an ID and timestamp and there is an undefined
number of IDs.The following events occurs and every block is a second, [ ____ ]
means that no event occurred during that second.

[ ID="A" ] --> Throw in new events "A"
[ ID="A" ] [ ID="A" ] --> Throw in new events "A"
[ ID="A" ] [ ID="A" ] [ ID="B" ] --> Throw in new events "B" , "A"
[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ____ ] --> Throw in new events "B" , "A"
[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ____ ] [ ____ ] --> Throw in new
events "B" , "A"
[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ____ ] [ ____ ] [ ____ ] --> Throw
in new events "B" , "A"
[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ____ ] [ ____ ] [ ____ ] [ ____ ]
--> Throw in new events "B"
[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ____ ] [ ____ ] [ ____ ] [ ____ ]
[ ____ ] --> No event

As you can see I want to group by ID, order by time of the event
descending, and keep the event for 5 seconds. Another restriction is
that I just want to throw the last 3 IDs. For instance:

[ ID="A" ] [ ID="A" ] [ ID="B" ] [ ID="C" ] [ ID="D" ] --> Throw in
new events "B" , "C", "D", in old events "A".

My first try to a similar behavior was:
select ID from Event.win:time_batch(1 sec) group by ID

But when I do this, it will only analyze the second from time_batch,
I want to check the criteria always when a new event is received. So...

select a.ID from pattern [ every a=Event -> timer:interval(5 sec) ]
group by a.ID

Now, that is more like it. But the first 5 seconds is total
blankness. But now, how can I include this 5 seconds in this query?



 Comments   
Comment by Thomas Bernhardt [ 06/Jul/07 ]

Moved to 1.11

Proposal is to introduce new syntax for statements providing data to other statements:
provide as AEventLast30Sec select * from A.win:time(30)
provide as BEventLast30Sec select * from B.win:time(30)

...and for statements consuming data from other statements:
consume from AEventLast30Sec, BEventLast30Sec
select * from A(val=5).win:time(5 sec), B.std:groupbby('symbol').win:time(5 sec) where a.id = b.id

The goal is to:

  • honor the providing statement's selections
  • honor consuming statement selections
  • honor consuming statement requirements for timestamp-based logic on original events, enabling seamless continuation of query
  • allow creating a statement in stopped mode, thus an application can attach listeners and start the statement that is
    consuming from another statement,
Comment by Thomas Bernhardt [ 27/Jan/08 ]

Named windows in release 1.12 and their consuming statements allow this





[ESPER-110] Iterator not honoring filter, aggregation, group-by and having clause Created: 02/Jun/07  Updated: 07/Jun/07  Resolved: 03/Jun/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In 1.8 and earlier, the iterator on statements using a where-clause, group-by, aggregation, and having -clauses would not honor these and return correct results only from a viewpoint of data window and select clause.



 Comments   
Comment by Thomas Bernhardt [ 03/Jun/07 ]

In release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-109] NPE while fetching events from statements Created: 01/Jun/07  Updated: 07/Jun/07  Resolved: 03/Jun/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Mike Patsenker Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

jar used: 1.8a


Number of attachments : 0

 Description   

Hi,

I am trying to iterate over the events froim the statement and getting NPE:

java.lang.NullPointerException
at net.esper.eql.view.OutputProcessViewPolicy$OutputProcessTransform.transform(OutputProcessViewPolicy.java:255)
at net.esper.collection.TransformEventIterator.next(TransformEventIterator.java:47)
at net.esper.collection.TransformEventIterator.next(TransformEventIterator.java:19)
....

The issue is that the result from calling net.esper.eql.core.ResultSetProcessorRowPerGroup#generateOutputEventsView is null since the count =0 :
...
// Resize if some rows were filtered out
if (count != events.length)
{
if (count == 0)

{ return null; }

...

Then the code at net.esper.eql.view.OutputProcessViewPolicy$OutputProcessTransform.transform(OutputProcessViewPolicy.java:255) does not check it :
...
Pair<EventBean[], EventBean[]> pair = resultSetProcessor.processViewResult(newData, null); // the pair is null due to the above
return pair.getFirst()[0]; // <==== NPE here
...

The staement is:

insert into Cutoff select provider, (String.valueOf(count) || 'x1000.0') as msg from Cost.std:groupby('provider').win:length(1) where report.cost - report.expectedCost >= 1000.0 group by provider having count = 1,

where Cost is another stream.

Thanks,
Mike.



 Comments   
Comment by Thomas Bernhardt [ 02/Jun/07 ]

The workaround can be to use a second statement such as "select * from Cutoff" and use that statement's iterator.

The fix for this issue may make it into the 1.9 release.

Comment by Thomas Bernhardt [ 03/Jun/07 ]

In release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-108] Statement management via SODA Created: 31/May/07  Updated: 15/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.11

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This entry proposes enhancements to the administrative API, specifically statement creation, and the statement information that is returned by an engine for existing statements:

  • Provide an API to create statements via a SODA object model representing a statement. This allows statements to be generated through code rather then through string manipulation.
  • Provide SODA object graph back for statements created via EQL. This allows existing statements to be reflected on in code.

References:

  • SODA=Simple Object Database Access
  • as in db4o


 Comments   
Comment by Thomas Bernhardt [ 14/Jul/07 ]

moved to 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-107] Memory leak using previous function and length window under a group Created: 30/May/07  Updated: 07/Jun/07  Resolved: 30/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Many thanks for your response - I have uploaded an example project
(eclipse 3.2) on:

http://homepage.mac.com/kussmaul/FileSharing7.html

If I execute this app, the memory will slowly but steadily grow (I
even set -Xmx512M arguments on JVM)

============
Sample query that exhibits this problem in 1.8:

"SELECT Small.symbol as symbol, Large.timestamp as timestamp, Small.averagePrice as price "+
"FROM MovingAverageSmall.std:groupby('symbol').win:length(2) as Small, " +
" MovingAverageLarge.std:groupby('symbol').win:length(2) as Large " +
"WHERE Small.symbol = Large.symbol " +
"AND ( ( prev(1,Small.averagePrice) < prev(1,Large.averagePrice) ) AND ( prev(0,Small.averagePrice) > prev(0,Large.averagePrice) ) ) ");

============

In technical detail, the problem is rooted in the length window view (LengthWindowView) that was not posting the remove stream to the random accessor for the 'previous' function, but was rather using the parent view's remove stream and that means it was collecting events.

A workaround is to replace the length window "win:length(2)" by a length batch window "win:length_batch(2)". If that change does not give you the desired result, we can certainly provide a corrected jar file.



 Comments   
Comment by Thomas Bernhardt [ 30/May/07 ]

workaround as described

Comment by Alexandre Vasseur [ 30/May/07 ]

There are some side notes left aside the primary issue described by Tom

  • if you just use the first statement (removing its insert into), you can run out of memory if you don't turn on the external clocking mechanism with
    epService.getEPRuntime().sendEvent(new TimerControlEvent(TimerControlEvent.ClockType.CLOCK_EXTERNAL));
    epService.getEPRuntime().sendEvent(new CurrentTimeEvent(0));
  • I have also seen issue if you turn on debug log, as the ViewSupport.printObjectArray iterates over all elements (in some runs I have 20k elements beeing expired - see below next note). I'd suggest to only print the first 5 or 10 ones and then the total count but not all as it explodes the log output buffer (and is likely meaningless to write that much)
  • When I don't start the external clocking, I also see an odd behavior in TimeWindow.expireEvents(). There is some regular expires of about 5 events after startup, then there is no expires for a while, and then there is burst of more than 20k events (contained in TimeWindow.window whose size is about 1500).
    To reproduce this you can send 18 events per day (if (i%18==0)...)
Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-106] Provide "start eager" option for output rate limiting Created: 28/May/07  Updated: 26/Oct/07  Resolved: 26/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.10
Fix Version/s: 1.12

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example, the query
select * from LocationReport output every 1 seconds

...delivers output 1 second after the first event arrives and every second thereafter. A "start eager" option would deliver the first result 1 second after statement creation regardless of whether one or more events arrived.



 Comments   
Comment by Thomas Bernhardt [ 06/Jul/07 ]

Moved to 1.11 and lowered priority as a subquery can do this:
select (select * from LocationReport.std:last()) from pattern[every timer:interval(1 sec)]

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Closed as a duplicate to the time_length_batch, while will also have a "start_eager" option. And also can be done via other means.





[ESPER-105] Allow subquery to return the event object Created: 28/May/07  Updated: 07/Jun/07  Resolved: 03/Jun/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.9

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For example, the query
select (select * from MarketData.std:last()) as md from pattern [every timer:interval(10)]

would return the full MarketData event object in a property "md".



 Comments   
Comment by Thomas Bernhardt [ 03/Jun/07 ]

In release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-104] Statement configuration from XML file Created: 26/May/07  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 5.0

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Allow statement or statement templates/factories to live in one or more XML statement configuration files or modules.



 Comments   
Comment by Thomas Bernhardt [ 06/Jul/07 ]

Moved to 1.11. In relationship with OSGi service designs.

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Moved to 2.0, can easily be addressed by any application by it's own

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Criticality lowered to minor

Comment by Thomas Bernhardt [ 10/Jun/10 ]

3.5 module file format is preferable





[ESPER-103] Option for case-insensitive event property names Created: 26/May/07  Updated: 19/Jul/07  Resolved: 15/Jul/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.10
Fix Version/s: 1.10

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Reasons for adding the option (default would stay case-insensitive):

  • .NET and Java have different naming standard, an option could serve both and allow the EPL to be the same for all platforms
  • most SQL is case-insensitive
  • could make statements easier to compose

============
partial email chain:

I would vote for the default behavior be case-sensitive, and you could allow for case-insensitive through config options.

Keep in mind that property lookups only occur once during the compilation of a statement after that, the method is bound and there are no further lookups. As such, the cost is only incurred once per statement compilation.

I vote to keep case sensitive if it yields better performance, saving a string.toUpperCase().

> The Esper team is considering to have event property names become case-insensitive (currently they are case-sensitive). That is, when Esper compiles a statement it can attempt to match property names to Java bean methods ignoring case, and would consider case only if a property name is not unique by name when ignoring case.
>
> Please let us know your feedback. Should the default behavior be case-insensitive property names? Or should there be a configuration to enable/disable case-insensitive property names and the default be case-sensitive?
>



 Comments   
Comment by Thomas Bernhardt [ 15/Jul/07 ]

In 1.10

Comment by Thomas Bernhardt [ 19/Jul/07 ]

in 1.10





[ESPER-102] Time batch and row batch in full aggregation case with a having-clause not producing correct results Created: 25/May/07  Updated: 27/May/07  Resolved: 27/May/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The problem manifests itself in a statement that has all of: 1) has a having clause 2) full aggregation without group by 3) row batch or time batch window

Example:

select sum(longBoxed) as mySum
from MyEvent.win:time_batch(1 sec) having sum(longBoxed) > 100

In such a statement if during a batch the following events arrive:

{110}, {-100}
then the having-clause does not fire as soon as the {110}

event is encountered. Rather, in version 1.8 the having-clause is only checked at the beginning and end of a batch and thus does not produce an event.



 Comments   
Comment by Thomas Bernhardt [ 27/May/07 ]

This is the correct behavior as we are looking at the sum of a batch of events not individual events





[ESPER-101] ArrayIndexOutOfBounds with 'output last' and group by Created: 22/May/07  Updated: 07/Jun/07  Resolved: 27/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I've been trying to use "output last" together with "group by" which
according to do should output only events where something has changed,
which is what I want. However I've seem to get sometimes the following
exception:

java.lang.ArrayIndexOutOfBoundsException: 0
at net.esper.core.UpdateDispatchView.update(UpdateDispatchView.java:74)
at net.esper.view.ViewSupport.updateChildren(ViewSupport.java:96)
at
net.esper.eql.view.OutputProcessViewPolicy.output(OutputProcessViewPolic
y.java:164)
at
net.esper.eql.view.OutputProcessViewPolicy.continueOutputProcessingView(
OutputProcessViewPolicy.java:155)
at
net.esper.eql.view.OutputProcessViewPolicy$1.continueOutputProcessing(Ou
tputProcessViewPolicy.java:218)
at
net.esper.eql.view.OutputConditionTime$1.scheduledTrigger(OutputConditio
nTime.java:121)
at
net.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:3
27)
at net.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:294)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:259)
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:192)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:110)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:93)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

The statement that generated this was:

-------
select name, sum as s, avg as average
from TestEsperOutputLast.win:time_batch(.1 seconds)
group by name
output last every .1 seconds
----------

I think that happens when the result window has nothing to output? I
tried to workaround this by not using 'last' and using 'having' instead,
but hit the same exception.



 Comments   
Comment by Thomas Bernhardt [ 22/May/07 ]

I have been able to reproduce this problem and concur that it occurs when there are no events in a data window, in a group-by statement where the results are fully grouped. We are tracking the problem through JIRA issue http://jira.codehaus.org/browse/ESPER-101

As a workaround, consider leaving the "output every" clause off entirely. This would works as the time batch window only indicates new data after every interval:
select name, sum as s, avg as average
from TestEsperOutputLast.win:time_batch(.1 seconds)
group by name

Comment by Thomas Bernhardt [ 27/May/07 ]

in release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-100] log.debug is not optimized Created: 18/May/07  Updated: 07/Jun/07  Resolved: 27/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.9

Type: Improvement Priority: Major
Reporter: Alexandre Vasseur Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

log.debug is not optimized, causing uneeded object expansion and nursery memory waste

f.e.
// Build index specifications
QueryPlanIndex[] indexSpecs = QueryPlanIndexBuilder.buildIndexSpec(queryGraph);
log.debug(".build Index build completed, indexes=" + QueryPlanIndex.print(indexSpecs));
//... indexSpecs will be used later on

should be written

// Build index specifications
QueryPlanIndex[] indexSpecs = QueryPlanIndexBuilder.buildIndexSpec(queryGraph);
if (log.isDebugEnabled()) log.debug(".build Index build completed, indexes=" + QueryPlanIndex.print(indexSpecs));
//... indexSpecs will be used later on

this will delegate to log4j Logger (f.e.) and ends up in Category up to
if(repository.isDisabled(constant))
return false;
up to Hierarchy
public boolean isDisabled(int level)

{ return thresholdInt > level; }

There could be options to also avoid doing inextensive yet numerous debug checks by using some tricks relying on a constant so that the JIT can immediately throw it out of the code path but lets leave that aside for now

Also another option for build time optimization
http://just4log.sourceforge.net/



 Comments   
Comment by Thomas Bernhardt [ 27/May/07 ]

changed in 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-99] IllegalStateException combining a time window with min/max and group-by and output every Created: 17/May/07  Updated: 07/Jun/07  Resolved: 27/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I seem to have hit a possible bug in 1.8.0 with max/min functions over
time windows when combined with group by & output statement. For example
the following query:

select name, i, max as maxI
from TestEsperMinMax.win:time(1 seconds)
group by name
output every 1 seconds

Generates the following exception:

Exception in thread "Timer-0" java.lang.IllegalStateException:
Attempting to remove key from map that wasn't added
at
net.esper.collection.SortedRefCountedSet.remove(SortedRefCountedSet.java
:59)
at
net.esper.eql.agg.MinMaxAggregator.leave(MinMaxAggregator.java:46)
at
net.esper.eql.agg.AggregationServiceGroupByImpl.applyLeave(AggregationSe
rviceGroupByImpl.java:74)
at
net.esper.eql.core.ResultSetProcessorAggregateGrouped.processViewResult(
ResultSetProcessorAggregateGrouped.java:154)
at
net.esper.eql.view.OutputProcessViewPolicy.continueOutputProcessingView(
OutputProcessViewPolicy.java:142)
at
net.esper.eql.view.OutputProcessViewPolicy$1.continueOutputProcessing(Ou
tputProcessViewPolicy.java:218)
at
net.esper.eql.view.OutputConditionTime$1.scheduledTrigger(OutputConditio
nTime.java:121)
at
net.esper.core.EPRuntimeImpl.processScheduleHandles(EPRuntimeImpl.java:3
93)
at
net.esper.core.EPRuntimeImpl.processSchedule(EPRuntimeImpl.java:294)
at
net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:259)
at
net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:192)
at
net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:110)
at
net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:93)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:29)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Same problem with "time_batch" window.

To add to this, I think other aggregate functions may also have a
related problem. For example I don't think sum computes the right value
in this case. My observation shows that this is possibly only problem
for the very first time window.



 Comments   
Comment by Thomas Bernhardt [ 19/May/07 ]

We are planning to have this correction in the next release due on June 2. This is a problem using max/min together with output rate limiting that can be worked around by using an "insert-into" statement to move the output rate limit into a further statement, as below.

insert into StreamMax
select name, i, max as maxI
from TestEsperMinMax.win:time(1 seconds)
group by name

select * from StreamMax output every 1 seconds

Comment by Thomas Bernhardt [ 19/May/07 ]

You had also found that the sum aggregation value appears to be incorrect when using a time window and using output rate limiting, for the very first time window. The sample statement is the following:

select name, i, sum as sumI
from TestEsperMinMax.win:time(1 seconds)
group by name
output every 1 seconds

Comment by Thomas Bernhardt [ 27/May/07 ]

in release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-98] NullPointerException for Joins involving Map event types Created: 07/May/07  Updated: 07/Jun/07  Due: 08/May/07  Resolved: 08/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.8
Fix Version/s: 1.8

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Sorry, if this might be a newbie question, but I'm having problems
with joins, even for simple ones I get NullPointerExceptions:

Exception in thread "main" java.lang.NullPointerException
at net.esper.core.StatementLifecycleSvcImpl.isPotentialSelfJoin
(StatementLifecycleSvcImpl.java:194)
at net.esper.core.StatementLifecycleSvcImpl.createStopped
(StatementLifecycleSvcImpl.java:107)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart
(StatementLifecycleSvcImpl.java:63)
at net.esper.core.EPAdministratorImpl.createEQLStmt
(EPAdministratorImpl.java:178)
at net.esper.core.EPAdministratorImpl.createEQL
(EPAdministratorImpl.java:87)
at base.ComponentBase.addEQL(ComponentBase.java:60)
at esper.demo.MovingAverageComponent.onLoad
(MovingAverageComponent.java:37)
at base.ComponentManager.addAndStartComponent(ComponentManager.java:71)
at base.ComponentManager.loadAndStartComponents
(ComponentManager.java:61)
at base.ComponentManager.run(ComponentManager.java:43)
at main.Main.main(Main.java:76)

E.g. if I use the following EQL:
"select * from MovingAverageSmall.win:time(1 min) as A,
MovingAverageLarge.win:time(10 min) as B where A.symbol = B.symbol"

In general I always get this Exception if I try to use two different
EventTypes in the "from" part. I took a loot at the esper-source, and
it seems it is happening, when you check if the specified event is a
sub-type of another one - as I'm using Map-based event I guess there
is never a subtype (or how could you define sub-types for Map-based
events?)



 Comments   
Comment by Thomas Bernhardt [ 08/May/07 ]

Provided esper-1.8.0a.jar release, at http://dist.codehaus.org/esper/esper-1.8.0a.jar

The problem was indeed related to Map event types that don't have supertypes and the self-join check didn't take the null collection into account.

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-97] Building Esper Created: 02/May/07  Updated: 02/May/07  Resolved: 02/May/07

Status: Closed
Project: Esper
Component/s: Build
Affects Version/s: 1.8
Fix Version/s: 1.8

Type: Task Priority: Major
Reporter: Silviano Diaz Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Dell Optiplex 745 Microsoft Windows XP Professional Version 2002 Service Pack 2


Number of attachments : 0

 Description   

I tried to build esper 1.8.0 following the instructions of the Building Section but there are test failures and they don't allow me to build esper.

My computer is a Dell Optiplex 745 with Microsoft Windows XP Professional Version 2002 Service Pack 2, I use jdk1.6.0_01, jre1.6.0_01 an Maven 2.0.4.

I also tried to build NEsper and some components don't be installed.

Can anybody help me with this problem??

These are the results of the command C:\esper\esper mvn install -e

Last packet sent to the server was 0 ms ago. SQLState: 08S01 VendorError: 0
at net.esper.eql.db.DatabaseDMConnFactory.getConnection(DatabaseDMConnFa
ctory.java:87)
at net.esper.eql.db.PollingViewableFactory.createDBStatementView(Polling
ViewableFactory.java:83)
at net.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.ja
va:126)
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifec
ycleSvcImpl.java:292)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcI
mpl.java:259)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLife
cycleSvcImpl.java:64)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.
java:178)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java
:87)
at net.esper.multithread.TestMTStmtDatabaseJoin.testJoin(TestMTStmtDatab
aseJoin.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure d
ue to underlying exception:

    • BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2569)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at net.esper.eql.db.DatabaseDMConnFactory.getConnection(DatabaseDMConnFa
ctory.java:70)
at net.esper.eql.db.PollingViewableFactory.createDBStatementView(Polling
ViewableFactory.java:83)
at net.esper.core.EPStatementStartMethod.start(EPStatementStartMethod.ja
va:126)
at net.esper.core.StatementLifecycleSvcImpl.startInternal(StatementLifec
ycleSvcImpl.java:292)
at net.esper.core.StatementLifecycleSvcImpl.start(StatementLifecycleSvcI
mpl.java:259)
at net.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLife
cycleSvcImpl.java:64)
at net.esper.core.EPAdministratorImpl.createEQLStmt(EPAdministratorImpl.
java:178)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java
:87)
at net.esper.multithread.TestMTStmtDatabaseJoin.testJoin(TestMTStmtDatab
aseJoin.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)

    • END NESTED EXCEPTION **

Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2643)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at net.esper.eql.db.DatabaseDMConnFactory.getConnection(DatabaseDMConnFa
ctory.java:70)
... 33 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.484 sec <<< FA
ILURE!

Results :

Failed tests:
testGetEventType(net.esper.regression.view.TestViewSelectExprClause)
testInvalidSQL(net.esper.regression.db.TestDatabaseJoin)
testInvalidBothHistorical(net.esper.regression.db.TestDatabaseJoin)
testInvalid3Streams(net.esper.regression.db.TestDatabaseJoin)
testInvalidPropertyEvent(net.esper.regression.db.TestDatabaseJoin)
testInvalidPropertyHistorical(net.esper.regression.db.TestDatabaseJoin)
testInvalid1Stream(net.esper.regression.db.TestDatabaseJoin)
testGetResultEventType(net.esper.eql.core.TestSelectExprEvalProcessor)

Tests in error:
testGetConnection(net.esper.eql.db.TestDatabaseDMConnFactory)
testPoll(net.esper.eql.db.TestPollExecStrategyDBQuery)
testTimeBatch(net.esper.regression.db.TestDatabaseJoin)
testStreamNamesAndRename(net.esper.regression.db.TestDatabaseJoin)
testWithPattern(net.esper.regression.db.TestDatabaseJoin)
testPropertyResolution(net.esper.regression.db.TestDatabaseJoin)
testSimpleJoinLeft(net.esper.regression.db.TestDatabaseJoin)
testRestartStatement(net.esper.regression.db.TestDatabaseJoin)
testSimpleJoinRight(net.esper.regression.db.TestDatabaseJoin)
testMySQLDatabaseConnection(net.esper.regression.db.TestDatabaseJoin)
testGetConnection(net.esper.eql.db.TestDatabaseDSConnFactory)
testOuterJoinLeftS0(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinRightS1(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinFullS0(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinFullS1(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinRightS0(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinLeftS1(net.esper.regression.db.TestDatabaseOuterJoin)
testOuterJoinOnFilter(net.esper.regression.db.TestDatabaseOuterJoin)
test100EventsRetained(net.esper.regression.db.TestDatabaseJoinPerformance)
test100EventsPooled(net.esper.regression.db.TestDatabaseJoinPerformance)
testSelectRStream(net.esper.regression.db.TestDatabaseJoinPerformance)
testSelectIStream(net.esper.regression.db.TestDatabaseJoinPerformance)
testExpireCacheNoPurge(net.esper.regression.db.TestDatabaseQueryResultCache)
testLRUCache(net.esper.regression.db.TestDatabaseQueryResultCache)
testLRUCache25k(net.esper.regression.db.TestDatabaseQueryResultCache)
testExpireCache25k(net.esper.regression.db.TestDatabaseQueryResultCache)
testExpireRandomKeys(net.esper.regression.db.TestDatabaseQueryResultCache)
testDBStatementViewFactory(net.esper.eql.db.TestPollingViewableFactory)
testJoin(net.esper.multithread.TestMTStmtDatabaseJoin)

Tests run: 1416, Failures: 8, Errors: 29, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures
.
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugi
n.java:425)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 minutes 21 seconds
[INFO] Finished at: Wed May 02 09:35:59 CDT 2007
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

Thanks for your help

I'll look forward for your reply

Silviano Diaz



 Comments   
Comment by Alexandre Vasseur [ 02/May/07 ]

I believe Esper test suite has fired, and thus stream to database joins tests are started. This requires a running MySQL DB that is may be not described in our build instructions.

You can start using Esper with the binary jar, there is no need to build your own kit at all unless you 're goal is to contribute - which would be very welcome of course.

Comment by Thomas Bernhardt [ 02/May/07 ]

Added a Note on the "Building" Esper page to outline the required MySql installation and system requirements to run tests

Comment by Thomas Bernhardt [ 02/May/07 ]

Also, NEsper Building page already has a list of required installed software





[ESPER-96] Cache result of user-defined functions when parameter set is constants Created: 12/Apr/07  Updated: 07/May/07  Resolved: 18/Apr/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.8

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

In an example, a statement "select MyLib.myfunc("abc")" could cache the result of the evaluation of the "myfunc" function such that subsequent expression evaluations use the same result



 Comments   
Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-95] CLONE -Create Quick Reference document page Created: 08/Apr/07  Updated: 06/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: hiroaki yamane Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 09/Apr/07 ]

Please clarify why this JIRA issue was cloned, is it because you are supporting the issue and wish for the quick reference doc as well?





[ESPER-94] Performance degradation for statement between 1.4 and 1.5 of 25% Created: 22/Mar/07  Updated: 07/May/07  Resolved: 18/Apr/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.8

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The statement affected is...

select name
from EVENT(id='$

{id}

').win:time($

{secondsWindowSpan}

)
having val >= min(val) * $

{percent}

 Comments   
Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-93] Improve error handling parsing too large Integer numbers and remove L suffix requirement for Long Created: 21/Mar/07  Updated: 07/May/07  Resolved: 18/Apr/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.8

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

select totalTime from T where crc = 2512570244L and totalTime > 3

The statement above requires the L to denote the long just as Java would require. The exception text without L is not friendly, but should the engine simply append L when a large number is encountered and parse as long?



 Comments   
Comment by Thomas Bernhardt [ 18/Apr/07 ]

Engine now parses as Long type

Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-92] String with parantheses not parsing in static method arg Created: 13/Mar/07  Updated: 20/Mar/07  Resolved: 13/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: 1.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

select * from Temperature as temp where MyLib.myFunc("A ((100,100))")
Above not parsing correctly, getting syntax errors.



 Comments   
Comment by Thomas Bernhardt [ 13/Mar/07 ]

We have found a problem in the static method resolution that determines if the syntax "a.b('arg')" is a mapped property or a static method.
Thus the problem only occurs for static methods that take a single string parameter with paranthesis, and that string is a constant rather then an expression.

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-91] Comparison of event properties in filter criteria causes syntax exception Created: 12/Mar/07  Updated: 20/Mar/07  Resolved: 12/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: 1.7

Type: Bug Priority: Major
Reporter: James Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I receive an exception when I compare two event properties on the rhs and lhs of a filter criteria. For example, assume I have a StockTick event with symbol, bid, and ask properties and run the following query:

select symbol, ask, bid from StockTick(ask > bid).win:length(2)

In this case, I receive the exception below:

net.esper.eql.parse.EPStatementSyntaxException: expecting DOT, found ')' near line 1, column 39 [select symbol from StockTick(ask > bid).win:length(2)]
at net.esper.eql.parse.EPStatementSyntaxException.convert(EPStatementSyntaxException.java:34)
at net.esper.eql.parse.ParseHelper.parse(ParseHelper.java:81)
at net.esper.core.EPAdministratorImpl.createEQL(EPAdministratorImpl.java:138)
at com.bea.wlrt.cep.test.TestMatchingClause.testOutputClause1(TestMatchingClause.java:106)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



 Comments   
Comment by Thomas Bernhardt [ 12/Mar/07 ]

This is a restriction in esper 1.6, the filter criteria didn't support self-compares.

Release 1.7 scheduled for release in about 1 week addresses this issue through allowing filter criteria to contain any expression, also see http://jira.codehaus.org/browse/ESPER-77

Comment by James [ 12/Mar/07 ]

That's good news! So any expression will be possible in a filter criteria and this replaces the comma separated list? For example, I'd be able to do the following types of query:

select symbol, ask, bid from StockTick(ask > bid or (symbol='GOOG' and ask > 500.0)).win:length(2)

Comment by Thomas Bernhardt [ 12/Mar/07 ]

Yes, truely any expression one can do in a select, where or having (etc) -clause, except the aggregation functions and previous and prior functions.

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-90] Statement management API Created: 11/Mar/07  Updated: 20/Mar/07  Resolved: 11/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.7
Fix Version/s: 1.7

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

These all sound like very good additions. I have not yet needed to get the engine instance from an update listener, but can imagine needing this down the road.

----- Original Message ----
From: Thomas Bernhardt <bernhardttom@yahoo.com>
To: user@esper.codehaus.org; dev@esper.codehaus.org
Sent: Thursday, February 15, 2007 4:03:22 PM
Subject: [esper-user] feedback sought on API enhancements

This is to the wider user and dev team community to discuss enhancements to the public API. Please feedback -thanks

We want to add the capability in the API for

  • applications to destroy statements releasing all statement resources (the engine currently hold very minimal statement resources for stopped statements)
  • applications to ask a statement for current statement state
  • applications to assign a name to a statement when the statement is created
  • applications to look up an existing statement by name
  • applications to get a list of names of started and stopped statements (destroyed statements would not appear in this list)
  • applications to stop all statements, or destroy all statements
  • applications to return the engine URI
  • applications to get the engine instance along with the update call to UpdateListener (do you need this?)

The couple of new client API methods we are thinking of are:

interface EPStatement
destroy()
EPStatementStateEnum getState()

enum EPStatementStateEnum
STARTED // transition to STOPPED and DESTROYED
STOPPED // transition to STARTED and DESTROYED
DESTROYED // no transitons allowed

interface EPAdministrator
createEQLStatement(String eql, String statementName)
createPatternStatement(String eql, String statementName)
EPStatement getStatementByName(String statementName)
String[] getStatementNames()
stopAllStatements()
destroyAllStatements()

interface EPServiceProvider
String getURI()

(new) interface ProviderUpdateListener
update(EPServiceProvider provider, EventBean[] newEvents, EventBean[] oldEvents)

  • If apps use createEQLStatement(String eql) not supplying a name, the engine assigns a unique name
  • If apps use a name that already exists, the engine appends a counter to it until the name is unique


 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-89] Allow literal keywords to be case insensitive Created: 06/Mar/07  Updated: 20/Mar/07  Resolved: 11/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: 1.7

Type: Improvement Priority: Minor
Reporter: James Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It would be nice if literal keywords such as select, where, from, etc. could be matched in a case insensitive way since this is more similar to the way SQL is parsed. I believe that this would just require that the caseSensitiveLiterals option be set to false in the Lexer.



 Comments   
Comment by Thomas Bernhardt [ 11/Mar/07 ]

That makes sense.
The question holds whether view names, event properties and event aliases should also be case-insensitive. Raised to the user mailing list.

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-88] Constrain pattern by fact that joined to streams Created: 02/Mar/07  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.3
Fix Version/s: 5.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

One more item that's language related rather than API related. The view specification already defines a very nice way of declaring a time or row based limit to the window size. It would be great if the pattern could use this information to constrain how many events are kept to match a pattern. Here's an example of how this might be done by allowing the pattern to reference an alias of a stream source whose size has already been constrained:

select * from EventA.win:length(5) A, EventB.win:length(5) B, pattern[every A -> every B]



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/07 ]

I think the syntax you suggested for constraining a pattern/window results could be improved...the original syntax was:
select * from EventA.win:length(5) A, EventB.win:length(5) B, pattern[every A -> every B]

The suggested syntax is a regular join syntax that, by following a naming convention, changes meaning to become a constraint. I think that can be confusing. Regular joins produce products of the joined streams, relating the streams by means of a where-clause. However in this syntax the pattern builds the relation between streams, yet the pattern appears in the from-clause. The from-clause can list multiple patterns, therefore by adding anther pattern such as "every B -> A" would that further constrain the join results or would there be an or-condition between constrains?

I'd like suggest a "matching" clause that acts comparable to a where-clause in that it defines the result-constraining pattern:

select * from EventA.win:length(5) A, EventB.win:length(5) B
matching pattern [every A -> every B]

This also makes it pretty clear that any event type aliases used in the pattern (A and B) must relate to stream names in the from clause.

Comment by James [ 06/Mar/07 ]

Your idea is excellent. Having a matching clause is much more clear.

Along the same lines, would this potentially eliminate the need for variable assignments inside of a matching clause, since the alias name could be used to reference previous bindings? For example:

select * from EventA.win:length(5) A, EventB.win:length(5) B
matching pattern [every A -> every B (itemId = A.itemId)]

instead of

select * from EventA.win:length(5) A, EventB.win:length(5) B
matching pattern [every a=A -> every B (itemId = a.itemId)]

Also, could the use of timer:within be replaced by referencing a window that uses win:time? For example

select * from EventA.win:time(1 min) A, EventB.win:length(5) B
matching pattern [every A -> B]

instead of

select * from EventA.win:length(5) A, EventB.win:length(5) B
matching pattern [every A -> B where timer:within(1 min)]

One final idea that I haven't thought through completely, but would like to get some feedback on. Would it be possible to make the pattern syntax more similar with the syntax of expressions in other clauses? For example:

select * from StockTickEvent
matching symbol = 'IBM' and price > 100

instead of

select * from StockTickEvent
matching pattern [every StockTickEvent(symbol = 'IBM', price > 100)

or instead of

select * from StockTickEvent (symbol = 'IBM', price > 100)

Comment by Thomas Bernhardt [ 07/Mar/07 ]

In discussing the use of the event alias as a prefix to property names in patterns, the event alias can occur multiple times in the same pattern, i.e. "(A or A) -> B" (simplified). The property "A.val" is then ambiguous. The same in a select clause which cannot read "select A.val from A" but reads "select a.val from A as a", since the from-clause can also list the same event alias multiple times. The engine could default in all these cases, yet that may be confusing, I think.

In discussing the "timer:within" in the pattern the statements were:
select * from EventA.win:time(1 min) A, EventB.win:length(5) B
matching pattern [every A -> B]
instead of
select * from EventA.win:length(5) A, EventB.win:length(5) B
matching pattern [every A -> B where timer:within(1 min)]
The second statement's pattern states that B must arrive within 1 minute of A considering only the last 5 events of A and B. The first statement's time window implies to only match events A that arrived within the last minute. I think the results are different without walking in detail through a scenario, as one statement considers the last 1 minute of A, while the other considers only the last 5 A.

In discussing the final idea to remove the pattern keywords and imply an event type, I think for most of the patterns that wouldn't work since a pattern is usually used to match 2 or more events having some sort of relationship with each other. Also note the "pattern" keyword leaves room for future enhancements such as replacement with the "sql" keyword if one wants to constrain a result set of a join in other ways then a pattern.

Comment by Alexandre Vasseur [ 07/Mar/07 ]

(discussing the original idea here only and not all James suggestion as Tom addressed those)

we could also inline the views in the pattern :

select * from pattern [ every EventA.win:length(5) -> every EventB.win:length(5) ]

that said this opens for too long syntax, and will also lead to combination of pattern filter and view spec

I think Tom use of matching keyword is good.

Comment by James [ 15/May/07 ]

How would you approach the implementation of this?

Comment by Thomas Bernhardt [ 06/Jul/07 ]

Moved to 1.11

Comment by Thomas Bernhardt [ 26/Oct/07 ]

Has simply not found a use case for this yet, that patterns could not solved. Moved to 2.0 for re-priorization

Comment by Thomas Bernhardt [ 10/Jun/10 ]

Match-recognize is already constrained by the declare data window(s)





[ESPER-87] Add new class alias, Map or DOM event type to an engine dynamically Created: 02/Mar/07  Updated: 20/Mar/07  Resolved: 15/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.7
Fix Version/s: 1.7

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Allow applications to add types to an existing engine instance (EPServiceProvider is currently immutable). The ability to add new rules dynamically is a nice feature, but is considerably constrained by the fact that new types cannot be added and referenced. The ability to update and delete types as well would be a "nice-to-have", but not essential.



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/07 ]

One needs to point out that types can already be added to an existing engine instance: statements can simply refer to the Java class name and the engine picks up the new type automatically.

In order to add Map types, DOM and legacy types to an existing engine instance, we may provide an additional method on EPAdministrator that returns an implementation of a new ConfigurationOperations interface, such as:

interface EPAdminstrator:
public ConfigurationOperations getConfiguration();

interface ConfigurationOperations:
public void addEventTypeAlias(String eventTypeAlias, Properties typeMap);
...other methods from Configuration that configure an engine instance

The existing Configuration class then changes and implements the new ConfigurationOperations interface.

Comment by James [ 06/Mar/07 ]

Good point about Java class references being picked up automatically. I believe it would still be necessary to be able to add type aliases for Java classes dynamically. Something like the following added to the ConfigurationOperations interface:

public void addEventTypeAlias (String eventTypeAlias, String javaClassName);

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-86] selecting first element via prev and count(*) Created: 22/Feb/07  Updated: 20/Mar/07  Resolved: 24/Feb/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: 1.7

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Thought I'd run a scenario by you. When using a time based view such as a sliding window (win:time) I'd like to reference the first element (or event) within that view from my select clause. There doesn't appear to be a way to do this within EQL that I can tell. Obviously, since it's a temporal window I don't know the total number of events currently in it so I'd reference it by using count.

For example, something like this would be ideal:

select count as total, timestamp as lastTimestamp,
prior(count - 1, timestamp) as firstTimestamp from
DATA(userId=$

{userId}

).win:time(60 sec)

However, since prior doesn't take any expressions this doesn't work. If one tries to use the alternative 'prev' function you get the following exception:

java.lang.ClassCastException: java.lang.Long
net.esper.client.EPException: java.lang.ClassCastException: java.lang.Long
at net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:179)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:67)
I believe that's a bug. In any case, sticking strictly to using EQL is there a way to achieve this that I might be missing? Thanks for any insight you might be able to lend.



 Comments   
Comment by Thomas Bernhardt [ 22/Feb/07 ]

There is a workaround to convert the Long value returned by the count into integer.

(1) Define a function as follows:

public class MyClass
{
public static Integer intToLong(Long longValue)
{
if (longValue == null)

{ return null; }

else

{ return longValue.intValue(); }

}
}

(2) Use the function to convert the count as follows:
select prev(mypackage.MyClass.intToLong(count) - 1, price) as firstPrice from ....

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-85] This is a test issue -- please deprecate it immediately Created: 15/Feb/07  Updated: 02/Mar/07  Resolved: 02/Mar/07

Status: Closed
Project: Esper
Component/s: NEsper
Affects Version/s: None
Fix Version/s: None

Type: Test Priority: Trivial
Reporter: Aaron Jackson Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

.NET v2.0 - Microsoft Implementation Framework


Number of attachments : 0

 Description   

Sample test to validate that I can enter a test






[ESPER-84] Timer:at to have last day of month function Created: 14/Feb/07  Updated: 07/Jun/07  Resolved: 27/May/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.9
Fix Version/s: 1.9

Type: Improvement Priority: Minor
Reporter: alex mcbeth Assignee: Yves Greatti
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Would it be possible to implement the following features in the timer:at statement :-

Last day of month
First weekday of month
Last weekday of month

The quartz scheduler has L, 1W and LW to represent the above functions. It would be nice it this were available within esper.

Thanks.



 Comments   
Comment by Yves Greatti [ 14/Mar/07 ]

I am proposing to add special characters L, W as suggested by user.

Comment by Thomas Bernhardt [ 27/May/07 ]

in release 1.9

Comment by Thomas Bernhardt [ 07/Jun/07 ]

in release 1.9





[ESPER-83] Modify queries on the fly Created: 10/Feb/07  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 3.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

being able to replace queries and simply keep the existing query state when replaced with a new query freely would be rather nice.



 Comments   
Comment by Thomas Bernhardt [ 27/Jan/08 ]

Note that named windows provide a subset of this feature, as a new statement can be initialized from a named window simply by referring to the named window

Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-82] More helpful error messages when invalid syntax Created: 10/Feb/07  Updated: 20/Mar/07  Resolved: 04/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.7
Fix Version/s: 1.7

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

more helpful error messages when it comes to registering a query with invalid syntax (user feedback)



 Comments   
Comment by Thomas Bernhardt [ 04/Mar/07 ]

Use via ANTLR paraphrases and handling of EOF errors. With ANTLR 3 the no-viable-alternative error handling can further be improved.

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-81] Create Quick Reference document page Created: 06/Feb/07  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 2.3
Fix Version/s: 5.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Removed from roadmap





[ESPER-80] Prev function to consider grouped windows Created: 02/Feb/07  Updated: 22/Feb/07  Resolved: 05/Feb/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: 1.6

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I don't see a simple EQL-only solution to this problem. I think the "prev" function could be useful. A little piece of listener code that resets the current count seems the easiest solution.

insert into AddStream
select case price > prior(1, price)
when true then 1
when false then 0
end as incUpTick
from StockTick(symbol='GOOG') as tick

The listener to a statement such as above could simply keep a counter and add 1 or reset the counter to 0.

I have noticed that the "prev" function has a limitation that in a grouped-window view it doesn't allow to look for the current group window:
select prev(1, price) from StockTick.std:groupby('symbol').win:length(2)
The prev function could be enhanced to look at the current event's symbol and consider the corresponding window. I have created a JIRA enhancement request

----- Original Message ----
From: Esper User <esper_user@yahoo.com>
To: Esper User <user@esper.codehaus.org>
Sent: Thursday, February 1, 2007 2:35:05 PM
Subject: [esper-user] detecting length of trend

Hello,

I have a StockTick event stream with attributes price and symbol. I'd like to be able to detect how many continuous up-ticks occur (i.e. the count of events that occur for the same symbol where the price increases relative to the previous event). For example, if I process the following events:

symbol price
---------------
GOOG 475.0
GOOG 480.0
GOOG 478.0
MSFT 30.0
GOOG 490.0
GOOG 495.0
GOOG 501.0
GOOG 499.0

I'd get back 4 for GOOG, since there is a series of prices 478.0, 490.0, 495.0, and 501.0 that are all increasing in value. Is it possible to write such a query in Esper?

Thanks!

James



 Comments   
Comment by Thomas Bernhardt [ 05/Feb/07 ]

For 1.6 release

Comment by Thomas Bernhardt [ 22/Feb/07 ]

in release 1.6





[ESPER-79] Natural SQL with embedded EQL Created: 28/Jan/07  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 5.0

Type: Wish Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

3) For the embedding of SQL database statements, I have a design-related question. Did you consider being able to combine SQL statements with EQL statements in the same statement rather than embedding them more as subqueries? For example, did you consider allowing the following:

select custId, cust_name
from CustomerCallEvent callEvent, MyCustomerDB custDB
where callEvent.custId = callDB.cust_id

instead of this:

select custId, cust_name from CustomerCallEvent,
sql:MyCustomerDB [' select cust_name from Customer where cust_id = $

{custId}

']

Or are there too many semantic differences between SQL and EQL? Or is it more a matter of the additional effort that would be necessary to implement all of the required SQL functionality in EQL?



 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Removed from roadmap





[ESPER-78] Insert-into streams not using correct event type when same-typed streams Created: 21/Jan/07  Updated: 22/Feb/07  Resolved: 21/Jan/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I wrote three statments:
>
> 1.
> insert into InZone
> select 111 as statementId, locationReportId ,
> assetId
> from LocationReport
> where tagId in (1,2,3)
> and MyFunctions.checkIntersection(A.zoneIds ,'10')
>
> 2.
> insert into OutOfZone
> select 111 as statementId, locationReportId ,
> assetId
> from LocationReport
> where tagId in (1,2,3)
> and not MyFunctions.checkIntersection(A.zoneIds
> ,'10')
>
> 3.
> select 111 as eventSpecId, A.locationReportId as
> locationReportId
> from pattern [
> every A=InZone(eventSpecId=@eventSpecId@) ->
> (timer:interval(1 sec) and not
> OutOfZone(eventSpecId=@eventSpecId@,
> assetId=A.assetId
> ]
>
> If I send report from zone 10 by asset 2 (for
> example)
> and waits 2 seconds, I got the triggered
> notification
> as required.
>
> If I send a repeatedly reports from zone 10 by asset
> 2
> (for example) every 400ms, I got no notification.
>

The InZone and OutZone streams specify the exact same field names and types in the insert-into statements. That causes the generated event types for these streams to be equal and filter conditions for such event type match both streams.
Thus a second InZone event also is an OutZone event to the filters and the not-clause holds.



 Comments   
Comment by Thomas Bernhardt [ 21/Jan/07 ]

Fixed issue in esper-1.5.0a

Event type for insert-into now carries the name and equality includes name. Test in regression.eql.TestInsertInto

Comment by Thomas Bernhardt [ 22/Feb/07 ]

in release 1.6





[ESPER-77] User-defined filter functions Created: 19/Jan/07  Updated: 20/Mar/07  Resolved: 10/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.7
Fix Version/s: 1.7

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

You have raised the idea of a user-defined filter function, such as below:
select * from pattern [every A=LocationReport(tagId in (1,2,3), MyFunctions.checkIntersection(A.zoneIds ,'10'))]



 Comments   
Comment by Thomas Bernhardt [ 30/Jan/07 ]

Set to lower priority as the user-defined function can be called in an EQL expression in an insert-into, for example:
insert into LocationReportFiltered select * from LocationReport(tagId in (1,2,3)) where MyFunctions.checkIntersection(A.zoneIds ,'10')
... and next...
select * from LocationReportFiltered

Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-76] Java array initialization syntax for constants Created: 17/Jan/07  Updated: 22/Feb/07  Due: 20/Feb/07  Resolved: 31/Jan/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.6
Fix Version/s: 1.6

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have an Object which include a Set<Long> of Ids. I would like to be able to check if the intersection between the Ids and a certain lint of longs isn't empty.

For example, I would like to be able writing:

select ....
From A
where MyFunctions.checkIntersect(Ids , (111,222,333))

The MyFunctions.checkInterse is a user defined
function which returns true is the intersection is not
empty.

Is it possible?
How do I refer the (111,222,333) set?

=======================

It would be nice to support the {} syntax for array initialization in Java, such as
MyFunctions.checkIntersect(Ids ,

{111,222,333}

))



 Comments   
Comment by Thomas Bernhardt [ 17/Jan/07 ]

We don't currently have support for array or Set-typed constants using the array-initialization syntax in Java outside of view parameters (we have it for views).

A workaround would be to create a method that returns the Set you are looking for, such as:
select ....
From A
where MyFunctions.checkIntersect(Ids , MyFunctions.getMySet())

Alternatively, we could add array initialization support, using the curly brackets {} syntax. The syntax could be as below, with "checkIntersect" being passed an array of int or a Set depending on what the method takes:
select ....
From A
where MyFunctions.checkIntersect(Ids ,

{111,222,333}

)





[ESPER-75] PropertyAccessException selecting individual fields from a group-by with sub-ordinate length window Created: 10/Jan/07  Updated: 11/Jan/07  Resolved: 10/Jan/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.4
Fix Version/s: 1.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Hi

While doing some experimentation with Esper I have run into this
strange behavior. Here 'ticks' is an alias for events using a
javabean 'TickBean' which contains, among others, the methods
getSym() and getPrice(). Using this eventstream this statement
executes just fine:

select * from ticks.std:groupby('sym').win:length(2)

While this statement:

select sym,price from ticks.std:groupby('sym').win:length(2)

casts an exception as soon as it is run. This appears to be
related to the groupby view, since all other queries I have
attempted seem to work fine ("select * from ticks.win:time(30
minutes).std:unique('sym')" for example).

The exception is as follows:

/********************************************************
Exception in thread "Thread-2" net.esper.client.EPException:
net.esper.event.PropertyAccessException: Mismatched property getter to
event bean type, the underlying data object is not of type java.lang.Map
at
net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:181)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:67)
<My classes removed.....>
Caused by: net.esper.event.PropertyAccessException: Mismatched property
getter to event bean type, the underlying data object is not of type
java.lang.Map
at net.esper.event.MapEventType$1.get(MapEventType.java:53)
at
net.esper.eql.expression.ExprIdentNode.evaluate(ExprIdentNode.java:226)
at
net.esper.eql.core.SelectExprEvalProcessor.process(SelectExprEvalProcess
or.java:171)
at
net.esper.eql.core.ResultSetProcessorSimple.getSelectEventsNoHaving(Resu
ltSetProcessorSimple.java:125)
at
net.esper.eql.core.ResultSetProcessorSimple.processViewResult(ResultSetP
rocessorSimple.java:78)
at
net.esper.eql.view.OutputProcessView.continueOutputProcessingView(Output
ProcessView.java:147)
at
net.esper.eql.view.OutputProcessView$1.continueOutputProcessing(OutputPr
ocessView.java:247)
at
net.esper.eql.view.OutputConditionNull.updateOutputCondition(OutputCondi
tionNull.java:27)
at
net.esper.eql.view.OutputProcessView.update(OutputProcessView.java:98)
at
net.esper.view.ViewSupport.updateChildren(ViewSupport.java:91)
at net.esper.view.std.MergeView.update(MergeView.java:108)
at
net.esper.view.ViewSupport.updateChildren(ViewSupport.java:91)
at
net.esper.view.std.AddPropertyValueView.update(AddPropertyValueView.java
:133)
at
net.esper.view.ViewSupport.updateChildren(ViewSupport.java:91)
at
net.esper.view.window.LengthWindowView.update(LengthWindowView.java:113)
at
net.esper.view.ViewSupport.updateChildren(ViewSupport.java:113)
at net.esper.view.std.GroupByView.update(GroupByView.java:139)
at
net.esper.view.ZeroDepthStream.insert(ZeroDepthStream.java:42)
at
net.esper.view.stream.StreamReuseServiceImpl$1.matchFound(StreamReuseSer
viceImpl.java:47)
at
net.esper.filter.FilterServiceImpl.evaluate(FilterServiceImpl.java:52)
at
net.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:169)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:67)
... 3 more
********************************************************/

It seems to me that the internals is attempting to fetch the
Output values as if the underlying event was represented by a Map,
but it still appears to be my javabean.

Is this some configuration error on my part or is it an actual
Esper problem?



 Comments   
Comment by Thomas Bernhardt [ 10/Jan/07 ]

the issue was that there is a complexity in the way the Group-by view works together with the views it needs to merge the group-key back into results. For example, the statement "std:groupby('sym').win:length(2)" has 2 view specification objects coming from the parser representing the 2 views. Then when the ViewFactoryFactory comes along, it translates the groupby into a GroupByViewFactory object and the window into a LengthWindowViewFactory and for each group-by also adds a MergeViewFactory. The view factories are then asked to realize/instantiate the actual views. The group-by view when it receives a new group key, i.e. a sym value it hasn't seen before, will dynamically clone a new chain of child views until it encounters a matching MergeView.

That merge view factory has the responsibility to create a MergeView instance that works together with the GroupByView and also the dynamically created AddPropertyValueView to merge back the group-by key into the final result.
For example, in the case of "std:groupby('sym').stat:uni('price')" the sym field value needs to be added to the result events generated view the statistics view. Thats what the AddPropertyValueView does, and hands the result to MergeView. The problem was that sometimes we need to create a new event type since we actually add a field to an existing map type like in the statistics examples, while the prior example didn't need to create a new event type as the sym value is already part of the fields coming from the bean. The problem was introduced when all the ViewFactory subclasses were added, which hadn't been there before, and the event type wasn't passed on to the MergeView for use by the AddPropertyValueView.

Comment by Thomas Bernhardt [ 11/Jan/07 ]

Bug fix in 1.5 release





[ESPER-74] Port Esper to C# Created: 06/Jan/07  Updated: 11/Mar/07  Resolved: 02/Mar/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 1.7

Type: Wish Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive NEsper.zip    
Number of attachments : 1

 Description   

a place to contribute the initial port of Esper to C# based on Esper release 1.x



 Comments   
Comment by Aaron Jackson [ 08/Feb/07 ]

Official submission of the initial 1.3 esper port to .NET
This code does not pass all of its unit tests.

Comment by Thomas Bernhardt [ 02/Mar/07 ]

Internal beta

Comment by chris donnan [ 06/Mar/07 ]

is this supposed to actually build - or not quite?

Comment by Thomas Bernhardt [ 06/Mar/07 ]

The attached zip represents an initial contribution and is not supposed to build and run, as it is a representation of the NEsper contribution at the time of Feb. 8

We are working on an internal beta and are planning to make a release candidate version available soon. The current codebase is in Subversion under "trunknet". We also have a mailing list for NEsper, see http://xircles.codehaus.org/projects/esper/lists





[ESPER-73] some interesting use case when mixing static method invocation with output stmt - work as design or not Created: 21/Dec/06  Updated: 11/Jan/07  Resolved: 11/Jan/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.4

Type: Bug Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

select avg(Math.random()) as random from NullEvent output last every 500 events

one may argue this should converge toward 0.5
interestingly in AggregationServiceGroupAllImpl.applyLeave() (at least) the Cglib fast method for Math.random() is called again (as it is not part of the event) which returns a different random number. In such a case we don't remove the same event we had added
After some round it can even happen that 'random' gets negative.

If it is work as design, we'd better warn users properly in the doc about this behavior
Else I believe we need to remember the method invocation result from the applyEnter invocation which will incur some more memory consumption and lookup cost



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/06 ]

Events are expected to provide immutable event properties, that is in the doc....thus the event itself provide the memory of the value to be removed. It would still be good to point that out in the doc.





[ESPER-72] use of Vector Created: 21/Dec/06  Updated: 26/Dec/06  Resolved: 21/Dec/06

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: None
Fix Version/s: 1.4

Type: Improvement Priority: Trivial
Reporter: Alexandre Vasseur Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A bunch of core classes are using Vector. What is the rationale ? Vector is syncrhonized.
Should we change to ArrayList and possibly sometime LinkedList ?

Targets
String 'Vector'
Found usages (34 usages)
esper (34 usages)
net.esper.collection (9 usages)
EventBuffer.java (3 usages)
(6, 18) import java.util.Vector;
(13, 13) private Vector<EventBean[]> remainEvents = new Vector<EventBean[]>();
(13, 52) private Vector<EventBean[]> remainEvents = new Vector<EventBean[]>();
SortedDoubleVector.java (6 usages)
(3, 18) import java.util.Vector;
(10, 26) public class SortedDoubleVector
(12, 13) private Vector<Double> values;
(17, 24) public SortedDoubleVector()
(19, 22) values = new Vector<Double>();
(79, 15) protected Vector<Double> getValues()
net.esper.core (5 usages)
UpdateDispatchView.java (5 usages)
(5, 18) import java.util.Vector;
(29, 13) private Vector<EventBean[]> lastNewEvents = new Vector<EventBean[]>();
(29, 53) private Vector<EventBean[]> lastNewEvents = new Vector<EventBean[]>();
(30, 13) private Vector<EventBean[]> lastOldEvents = new Vector<EventBean[]>();
(30, 53) private Vector<EventBean[]> lastOldEvents = new Vector<EventBean[]>();
net.esper.eql.expression (3 usages)
ExprMedianNode.java (3 usages)
(3, 41) import net.esper.collection.SortedDoubleVector;
(64, 29) private SortedDoubleVector vector;
(71, 43) this.vector = new SortedDoubleVector();
net.esper.event (11 usages)
EventBeanUtility.java (11 usages)
(18, 20) * @param eventVector vector
(21, 39) public static EventBean[] flatten(Vector<EventBean[]> eventVector)
(21, 64) public static EventBean[] flatten(Vector<EventBean[]> eventVector)
(23, 18) if (eventVector.size() == 0)
(28, 18) if (eventVector.size() == 1)
(30, 25) return eventVector.get(0);
(34, 34) for (int i = 0; i < eventVector.size(); i++)
(36, 35) totalElements += eventVector.get.length;
(41, 34) for (int i = 0; i < eventVector.size(); i++)
(43, 36) EventBean[] src = eventVector.get;
(45, 29) destPos += eventVector.get.length;
net.esper.pattern (3 usages)
EvalAndStateNode.java (3 usages)
(139, 9) Vector<List<MatchedEventMap>> listArray = new Vector<List<MatchedEventMap>>();
(139, 55) Vector<List<MatchedEventMap>> listArray = new Vector<List<MatchedEventMap>>();
(164, 53) protected final static void generateMatchEvents(Vector<List<MatchedEventMap>> eventList,
net.esper.view.std (3 usages)
LastElementView.java (3 usages)
(4, 18) import java.util.Vector;
(60, 9) Vector<EventBean> oldDataToPost = new Vector<EventBean>();
(60, 47) Vector<EventBean> oldDataToPost = new Vector<EventBean>();



 Comments   
Comment by Thomas Bernhardt [ 21/Dec/06 ]

excellent suggestion, changes made to trunk for 1.4 release

Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-71] EQL Statement containing a having clause equal to a value fires twice. Created: 13/Dec/06  Updated: 11/Jan/07  Resolved: 10/Jan/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.3
Fix Version/s: 1.5

Type: Bug Priority: Minor
Reporter: alex mcbeth Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I have the following EQL statement which should trigger only once when the

EPStatement singleTrigger = admin.createEQL(
"select sum(myEvent.value) from pattern [every myEvent=MyEvent] having sum(myEvent.value) = 2");
UpdateListener singleListenerImpl = new SingleListenerImpl();
singleTrigger.addListener(singleListenerImpl);

I then send the event 3 times.

// send event 1
MyEvent myEvent = new MyEvent();
myEvent.setValue(1);
sendEvent(myEvent);

// send event 2
MyEvent myEvent = new MyEvent();
myEvent.setValue(1);
sendEvent(myEvent);

// send event 3
MyEvent myEvent = new MyEvent();
myEvent.setValue(1);
sendEvent(myEvent);

// send event 4
MyEvent myEvent = new MyEvent();
myEvent.setValue(1);
sendEvent(myEvent);

Now I would've expected the singleTrigger to have fired after event 2 only. What happens is that the listener is called twice - once after event 2 and once after event 3. Is this expected behaviour?

Also - is this the best way to set up a "fire once" event?



 Comments   
Comment by Thomas Bernhardt [ 16/Dec/06 ]

Thanks for submitting this, sorry for any delay, we are looking at this now

Comment by Thomas Bernhardt [ 16/Dec/06 ]

Hi Alex,
listeners are invoked when either new data or old data matches your selection criteria. I think the doc could have a better example for this, the statement above is a great example.
If you don't care that the engine informs you when the 2 changes to a 3 by sending event 3 (this is the second time the listener is called), then please use the "istream" keyword which selects the
new data only:

select istream sum(myEvent.value) from pattern [every myEvent=MyEvent] having sum(myEvent.value) = 2

Comment by Thomas Bernhardt [ 10/Jan/07 ]

in documentation for 1.5 release

Comment by Thomas Bernhardt [ 11/Jan/07 ]

In release 1.5 - now doc chapter on output model - aggregation posts remove stream





[ESPER-70] test of notifications Created: 01/Dec/06  Updated: 04/Dec/06  Resolved: 04/Dec/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Ben Walding Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[ESPER-69] Pull throws UnsupportedOperationException for statement not selecting wildcard Created: 30/Nov/06  Updated: 26/Dec/06  Resolved: 17/Dec/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.3
Fix Version/s: 1.5

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Trying to use the pull model to get the EQL result set of a single event stream.
"select * from EventStream.win:length(10)" – OK
For this statement,
"select price from EventStream.win:length(10)"
Iterator iterator = statement.iterator() --> Exception.
Exception in thread "Thread-3" java.lang.UnsupportedOperationException
at net.esper.eql.view.OutputProcessView.iterator(OutputProcessView.java:230)
at net.esper.core.EPEQLStatementImpl.iterator(EPEQLStatementImpl.java:110)
at ml.esper.PriceMonitor.PullResult(PriceMonitor.java:87)
at ml.esper.MonitorTest.run(MonitorTest.java:66)
I wonder what have I done wrong.
It works when the statement is "select * ", guess the resultProcessor is null in net.esper.eql.view.OutputProcessView
public Iterator<EventBean> iterator()
{
if(resultSetProcessor != null)

{ throw new UnsupportedOperationException(); }

else

{ return parent.iterator(); }

}



 Comments   
Comment by Thomas Bernhardt [ 17/Dec/06 ]

fixed for 1.4

Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-68] Followed-by operator not releasing memory for dead sub-expressions Created: 27/Nov/06  Updated: 27/Nov/06  Resolved: 27/Nov/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The problematic statement uses a pattern.
> The statement is:
> "select 'Tag May Be Broken' as alert, tag.mac,
> tag.zoneID
> from pattern
> [every tag=LR(zoneID!=111) -> (timer:interval(10
> sec)
> and not LR(mac=tag.mac]"
>

----------------------------
I have changed the size memory which is allocated to
the VM.
While changing the maximum size to 512MB, 10000 loops
executed successfully, 20000 loops executed
successfully, but around 24000 loops it start working
slow.
After 26964 loops I got a "Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space"
exception.
----------------------------
I have been able to reproduce the problem. The issue was in the followed-by expression state that didn't clean up after itself completely when becoming permanently false. I have corrected this problem and retested using your generators. I was able to get through the 10k loop without any problems.

The jar file with the correction is esper-1.3.0a.jar, for download in http://dist.codehaus.org/esper/



 Comments   
Comment by Thomas Bernhardt [ 27/Nov/06 ]

Fixed in 1.3.0a





[ESPER-67] Modifying events in a stream Created: 13/Nov/06  Updated: 26/Dec/06  Resolved: 23/Dec/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: srdan bejakovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Would it be possible to modify one or more event properties, while keeping all the other poperties in the resulting stream?
I mean, it is quite easy to change one property, for example replacing "text" by "texttext" with the following statement:

insert into ModifiedEvents select text||text as newtext from MyStream.win:time(10 sec)

but then, we will only find the single "newtext" property in resulting events. My current need would be more something like:

insert into ModifiedEvents select *, text||text as newtext from MyStream.win:time(10 sec)

using the * wildcard in the select (in addition to another modifying expression) which is apparently not allowed. Of course, we can manually enumerate the complete properties "select prop1, prop2, MyChange(prop3) as prop3, etc... from MyStream", but this would be rather painful compared to the wildcard usage.



 Comments   
Comment by Thomas Bernhardt [ 28/Nov/06 ]

Requested....

It would be nice to allow '*' wildcard in the insert into syntax, like
this:
insert into newStream
select * from ....

Right now it is not allowed and have to specify the event properties
inside select or use insert into Event (prop, ....)
The reason is that it is more convenient to combine the query string
without the need of the embedded query's schema.

Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-66] Support for 'in' in filter expressions Created: 09/Nov/06  Updated: 26/Dec/06  Resolved: 19/Dec/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Is it possible to write "in" inside patters?
For example:
"select a.id, from pattern [
every a=A(id in ('111','222','333') -> not A(id
in ('111','222','333') and id!=a.id)]"

=============

Since attributes on filters may only be referenced only once, it doesn't look like I could say "grade 1 or grade 2 or grade 7...", only grades 1 through 2. (Short of writing something like this for each number in the set: mypackage.RfidEvent(category="Perishable", price<1.00, grade=1) or mypackage.RfidEvent(category="Perishable", price<1.00, grade=2)).

============

Since "in" is used in EQL and it follows the same behavior as SQL, I'd guess most people would end up making the same incorrect assumption as I did. So renaming it to "between" would probably reduce support questions in the future ...although it'd break backwards compatibility for anyone out there using it today.

This would be a really nice addition because it'd greatly reduce the number of nearly duplicated EQL expressions people would have to end up writing to work around it. I love the embedded filter support directly in the EQL since it simplifies most of my statements. Awesome feature!



 Comments   
Comment by Thomas Bernhardt [ 19/Dec/06 ]

going to be in 1.4

Comment by Thomas Bernhardt [ 19/Dec/06 ]

test comment

Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-65] Regular expression support and SQL-Like operator Created: 28/Oct/06  Updated: 14/Nov/06  Resolved: 30/Oct/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

regular expressions in EQL clauses

Could work like REGEXP and NOT REGEXP functions in MySQLDB (or RLIKE and NOT RLIKE)

See
http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html



 Comments   
Comment by Thomas Bernhardt [ 30/Oct/06 ]

Added 'like', 'not like', 'regexp' and 'not regexp'

Comment by Thomas Bernhardt [ 14/Nov/06 ]

in release 1.3





[ESPER-64] Example for running in J2EE container Created: 21/Sep/06  Updated: 26/Oct/06  Resolved: 04/Oct/06

Status: Closed
Project: Esper
Component/s: Examples
Affects Version/s: 1.5
Fix Version/s: 1.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

>If you have specific requirements on this chapter or wish >some samples please let us know.
Yes, if you have some examples of Esper running in an EJB container I would be very interested. Our use case is the following: We have an J2EE-based self-service terminal managing system, which gets a lot of events from connected
terminals (500 per second; e.g. ´paper low´, ´terminal out of order´) and we are correlating these events in the server to build up higher-level events. So for us it would be nice to use Esper in conjunction with our framework which is based mostly on stateless session beans and JMS messaging.

>Esper is light-weight in terms of threads: each engine
>instances starts 1 timer thread. However the engine can
>also be externally timed and the timer thread disabled.
>Thus Esper
>engine threading should not interfere with J2EE
>container threading.
Sounds perfect. I think it is very important that Esper is fully J2EE compliant and not specific to any AppServer, so that it can be used in many scenarios and big applications.

>Esper engine instances are not clusterable. That is, engine
>state cannot be replicated within a J2EE application server
>cluster if your server supports this configuration.
No problem in a stateless application using JMS persistence.

>If you are running inside an EJB container, using stateless
>session EJBs, pooled EJB instances would need to share the
>same Esper engine instance. The mechanism for sharing an
>engine instance between EJBs, I think, would have to be via >static member variable, Singleton or possibly JNDI. For
>servlets, the servlet context would seem to suit.
An example of SLSBs using the Esper engine instance would be nice.



 Comments   
Comment by Thomas Bernhardt [ 04/Oct/06 ]

New terminal service case study added





[ESPER-63] Ability to use != (not equals) in filter expressions Created: 18/Sep/06  Updated: 26/Oct/06  Resolved: 20/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ user request ]]

Is there a way to create a pattern which contains a "Not Equals" operator
for a string property ?
for Example:
every a=CallEvent -> b=CallEvent(source=a.source, dest !=a.dest)

[[ Esper team reply ]]

>the filter operators are currently limited to the set of operators
>described in the doc, i.e. =, <, >, <=, >=, and ranges. This is because the
>filters are high-speed but don't offer the full expression syntax as
>available in EQL.
>
>The next release of Esper that we are about to make available on next
>Wednesday, version 1.1, will allow to specify patterns expressions in EQL
>statements. Thus the expression power of EQL with all constructs such as
>where-clause, aggregation, output rate limiting and insert-into become
>available for patterns.
>
>With the next release I think we can possibly rewrite your query as the
>below. Note that there may need to be an "every" keyword before
>"b=CallEvent" depending of whether you can stop listening if the first
>CallEvent with matching source is found, or not.
>
> select * from pattern [every a=CallEvent -> every
>b=CallEvent(source=a.source)] where b.dest != a.dest
>
>If you perceive the filter operators too limited, please let me know and we
>will create an enhancement request.

[[ user reply ]]
Regarding your suggestion, if I will use a query to find couples for events
that match the pattern by executing the query every few minutes, I will get
the same results over and over again (in addition to new results as well),
so I think it's not a complete solution to my problem.



 Comments   
Comment by Thomas Bernhardt [ 20/Sep/06 ]

Assigned to 1.0 release

Comment by Thomas Bernhardt [ 20/Sep/06 ]

Will be available in next release

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-62] How does one use the EmitService Created: 15/Sep/06  Updated: 26/Oct/06  Resolved: 09/Oct/06

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Improvement Priority: Major
Reporter: Noah Campbell Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm interested in how the EmitService works but can't find any comprehensive documentation. Will it provide the ability to create filtered streams of events?



 Comments   
Comment by Thomas Bernhardt [ 18/Sep/06 ]

Assigned to 1.0 reasoning that it's not in the docs but should be

Comment by Thomas Bernhardt [ 09/Oct/06 ]

Extended existing comment in API section to better elaborate on what this accompishes.

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-61] Having clause not applied in query without group-by and without aggregation functions Created: 14/Sep/06  Updated: 20/Sep/06  Resolved: 15/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ Request ]]
Basically, I want to calculate the difference in price between two products based upon the last or most current price event that I received for each and if the difference meets a certain threshold, have my listener notified. What I came up with immediately is below. You'll notice I'm simply using a window length of 1 for each product (same results when using std:lastevent()).

select a.price as aPrice, b.price as bPrice, Math.max(a.price, b.price) - Math.min(a.price, b.price) as spread
from PriceEvent(id=179344).win:length(1) as a,
PriceEvent(id=179354).win:length(1) as b
having Math.max(a.price, b.price) - Math.min(a.price, b.price) >= 1.4

The having cluasing is basically ignored.

[[ reply ]]
You have found a problem where the "having" clause is not applied if there is no aggregation in the query. According to the doc, the having-clause is used to pass and reject events defined by the group-by clause. If there is no group-by clause, and no aggregation function, the code optimizes incorrectly and ignores the having clause. (Math.min and Math.max isn't an aggregation function but just applying a single-row function).

Workaround: In the meantime, you can use the "where" clause instead of "having" in the exact same query as above. I have tested this and had good results.



 Comments   
Comment by Thomas Bernhardt [ 15/Sep/06 ]

Resolved by having the appropriate result set processor apply the having clause, if present





[ESPER-60] Not all memory cleared for 30 second window with aggregation query Created: 11/Sep/06  Updated: 20/Sep/06  Resolved: 13/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ start ]]

The query and permutations of it are quite simple and look like:

select price, min(price) as minPrice
from PriceEvent(epId=23453).win:time(30)
having price >= min(price) * (1.0 + .02)
Also, under the load and configuration I supplied in the defect, Esper exhausts the 1GB of memory given to it within 5 minutes. Unless there's something seriously wrong with this query, I wouldn't expect a 30 second window and one data stream to cause this to happen. So I ran a profiler on it to see what was going on. I've attached the results of the memory graph. It looks like the memory consumption is heavy with the LinkedList, TreeMap and HashMap entries. The LinkedList holding onto BeanEventBeans and the latter two holding on to key values of types Double and Integer, respectively.

I haven't had time to comb the inner workings of Esper, but I'd figured that it would drop stream data when it no longer had an interest in it. As in this query example, it has no need to preserve data beyond 30 seconds. But after seeing this behavior I'd assume Esper is holding in memory all Event data. Is that right?

[[ Reply ]]

Your statement declares a 30 second window thus Esper won't keep any references to events older then 30 seconds. Esper does keep all events arriving within 30 seconds since it needs these events for processing the "rstream" when these events leave the window. Once an event leaves the window after 30 seconds the Esper engine won't hold any references to it, and derived collections also remove references.

With a 30 second time window and a load of 5000 msg/sec the single statement below would require memory for 30 * 5000 = 150k messages. Are the messages fairly large? Would you be able to share the test code?

[[ Reply ]]
As for the possible memory issue, I thought I'd try a simple experiment. After placing load (5000 messages p/s) for 3 minutes I stopped the input feed. Now the expectation would be that once the 30 second window had pass the JVM would reclaim the memory consumed by the event data. Using JConsole I could verify that memory had not decreased after two minutes. Memory consumption remained at the same level after 3 more minutes. If you look at the vertical green bar above the horizontal one named "Heap" you notice that being the Tenured memory space where the memory is remaining. Ok, so since the standard GC algo doesn't clean this pool up so readily I did a manual GC at which point you can see the noticeable decline in memory (100MB). Yet more than 400MB is still consumed almost entirely in the tenured pool. As the object allocation report I provided last Friday showed, Esper still has entries cached in its internal data structures. Any ideas why these aren't getting purged?

And in answer to your question as to if the messages are large, they are nothing more than a JavaBean with a small String, int, double and float.

BTW - I must apologize for the huge dual screen screen shot. I thought I could crop it in Paint but I guess I was wrong. Still looking at JConsole on my desktop 15 minutes later and it's still showing 400MB of memory consumed with the application doing nothing. Anyway, I hope this information is helpful. Sorry I'm not rolling up my sleeves and getting into the code yet. Maybe in a bit I will.



 Comments   
Comment by Thomas Bernhardt [ 12/Sep/06 ]

I have looked into the apparent memory leak problem but have not been able to reproduce or see anything lingering in caches in my tests. I have put the result and test classes up at http://docs.codehaus.org/display/ESPER/Profiling+Test+Results

My tests ran fine for 30 minutes with the query. I was testing higher volumes (100k per window) via external timer events, and also the tested 5k msg/second with system time.

Comment by Thomas Bernhardt [ 13/Sep/06 ]

Related to Esper-59 http://jira.codehaus.org/browse/ESPER-59
The timer thread could likely not flush from the window because of exceptions causing memory not to free.
http://jira.codehaus.org/browse/ESPER-59

Also see memory consumption page on Confluence.

[[ comments from users ]]
Ok, looks like the threading fix you made resolved the memory leak. I was using your latest patch this morning and couldn't reproduce the memory leak myself.





[ESPER-59] Internal Threading Bugs Found Created: 07/Sep/06  Updated: 20/Sep/06  Resolved: 09/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nathan Phillips Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Doing some load testing I ran into what appears to be a threading bug. The version of Esper is 1.5, JVM 1.5x, Windows XP, JVM Heap 1MB. The test was set up as follows:

1 engine
100 queries with their own listeners registered against one event stream
5000 messages sent to engine per second with what should be appropriate locking code on the client side as per below:

private void fireEvent(Object o) {
engineLock.lock();
try

{ epRuntime.sendEvent(o); eventCount++; }

finally

{ engineLock.unlock(); }

}

The following two related errors occurred multiple times in testing:

                                                                          • Error 1 ***********************************

Exception in thread "Timer-1" net.esper.client.EPException: java.lang.ArrayIndex
OutOfBoundsException
at net.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:271)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:225)

at net.esper.core.EPRuntimeImpl.processBeanEvent(EPRuntimeImpl.java:172)

at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:55)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:151)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:19)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at net.esper.event.EventBeanUtility.flatten(EventBeanUtility.java:44)
at net.esper.core.UpdateDispatchView.execute(UpdateDispatchView.java:82)

at net.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServ
iceImpl.java:68)
at net.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.j
ava:32)
at net.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:267)
... 7 more

                                                                          • Error 2 ***********************************

Exception in thread "Timer-1" net.esper.client.EPException: java.lang.ArrayIndex
OutOfBoundsException: Array index out of range: 0
at net.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:271)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:225)

at net.esper.core.EPRuntimeImpl.processBeanEvent(EPRuntimeImpl.java:172)

at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:55)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:151)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:19)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0

at java.util.Vector.get(Vector.java:710)
at net.esper.event.EventBeanUtility.flatten(EventBeanUtility.java:30)
at net.esper.core.UpdateDispatchView.execute(UpdateDispatchView.java:83)

at net.esper.dispatch.DispatchServiceImpl.dispatchFromQueue(DispatchServ
iceImpl.java:68)
at net.esper.dispatch.DispatchServiceImpl.dispatch(DispatchServiceImpl.j
ava:32)
at net.esper.core.EPRuntimeImpl.dispatch(EPRuntimeImpl.java:267)
... 7 more

Please feel free to contact me for any more details.



 Comments   
Comment by Nathan Phillips [ 07/Sep/06 ]

Update: JVM was 1GB not 1MB.

Comment by Thomas Bernhardt [ 09/Sep/06 ]

Fixed, affected EPRuntimeImpl

Comment by Thomas Bernhardt [ 13/Sep/06 ]

Released a bug fix jar file esper-1.0.5a.jar available from http://dist.codehaus.org/esper/
Was retested by user and satisfies need.





[ESPER-58] IllegalMonitorStateException logged by engine Created: 06/Sep/06  Updated: 26/Oct/06  Resolved: 10/Oct/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

I get this intermittently when running my function tests that include some Esper processing. As none of my code appears in the stack trace I tought you might like to look at it

Exception in thread "Timer-6" java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(ReentrantReadWriteLock.java:259)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1102)
at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(ReentrantReadWriteLock.java:821)
at net.esper.core.EPRuntimeImpl.processTimeEvent(EPRuntimeImpl.java:222)
at net.esper.core.EPRuntimeImpl.processBeanEvent(EPRuntimeImpl.java:172)
at net.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:55)
at net.esper.core.EPRuntimeImpl.timerCallback(EPRuntimeImpl.java:151)
at net.esper.timer.EQLTimerTask.run(EQLTimerTask.java:19)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)



 Comments   
Comment by Thomas Bernhardt [ 09/Sep/06 ]

I have been able to reproduce this on a multi-core system only, not on a single-core PC. Added log statements to print the theread number acquiring and releasing lock but log shows all in order. Needs further work, is not a critical error since the timer thread has completed its work

Comment by Thomas Bernhardt [ 09/Sep/06 ]

Also appears to be related to very frequent "initialize" calls to an existing engine instance

Comment by Thomas Bernhardt [ 10/Oct/06 ]

Fixed error in EPRuntime lock use

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-57] Initialize not resetting types declare via "insert into" Created: 06/Sep/06  Updated: 20/Sep/06  Resolved: 09/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ finding reported ]]
EPServiceProvider.inistialize does not clear out declared types from an insert statement. For example, if I use EQL 'insert into Result select something as a...', do call initialize method and then use EQL 'insert into Result select something as a, otherthing as b...' I get EPStatementException saying that 'Result' has already been declared.

Is there any way to clear out a service provider instance completely or should I just grab another instance (which I realise would solve this problem - yes). In this case what is the initialize method for?

[[ finding reported ]]
Just been looking at this further, and the API provides no way to remove a statement or pattern that has been created. So if I want to change a statement fo a service provider instance then I have to create the provider from scratch. If I use the same name for the provider in the EPServiceProviderManager.getProvider method then of course I get the same instance and since initialize doesn't clear out everything then I cannot use it if I change the definition of a Type. So I have to use a new name - which makes it tricky for me if I want to associate the instance with some id in my system.

So, it seems to me that initialize should clear out type definitions.

[[ comment ]]
you are right, the initialize should entirely reset the engine state and that includes "insert into" type definitions, which should be flushed. I'll create a JIRA issue for this. Defects are given priority in the development work.

Note that a statement can be stopped and any event type created via "insert into" can be reused as long as the number of properties and types match the other statement(s).



 Comments   
Comment by Thomas Bernhardt [ 09/Sep/06 ]

Changed EPServiceProviderImpl to snapshot the config entries and keep these, then construct new services on initialize using the config snapshot and not reuseing the services (event adapter and auto import services are config-driven)





[ESPER-56] count(*) always returns 0 Created: 30/Aug/06  Updated: 30/Aug/06  Resolved: 30/Aug/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: srdan bejakovic Assignee: srdan bejakovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

"select count from MarketDataBean.win:time(1)" returns 0 regardless of the number of actual events.



 Comments   
Comment by srdan bejakovic [ 30/Aug/06 ]

The bug was in ResultSetProcessorFactory, which used the presence of aggregated properties instead of the presence of aggregated functions to decide which processor to create.





[ESPER-55] Mechanism to support EventType Adaptors for legacy Java classes Created: 29/Aug/06  Updated: 26/Oct/06  Resolved: 27/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Improvement Priority: Major
Reporter: Noah Campbell Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n/a


Number of attachments : 0

 Description   

Hi have a class A defined that each properties does not follow the JavaBean naming convention of get/set/is.

I need a way to specify the properties and the getter during configuration.



 Comments   
Comment by Thomas Bernhardt [ 08/Sep/06 ]

Good point - we could allow configuring the method names for classes that return the event property values rather then automatically deduce them from the Class.

As a workaround, one could of course wrap the legacy class, if feasible, with a minimal POJO that acts as an event container. The wrapper class would expose the JavaBean-style getter methods and internally call the legacy object it wraps to obtain event properties. Yet that requires writing a wrapper class.

Will schedule for 1.5 release.

Comment by Noah Campbell [ 08/Sep/06 ]

Great, glad to see it on the roadmap.

I did write a wrapper class for the top level object, but realized I had to repeat the process for a private collection. It returned an object that had the same, non-javabean, method signature.

I wanted to use the CollectionUtils (jakarta collections) to wrap the request so I didn't have to do a deep copy on each request to the collection field, but the cglib couldn't handle it. I had to make a copy of the collection on every request.

Comment by Thomas Bernhardt [ 27/Sep/06 ]

Will be in next release.

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-54] select-clause istream and rstream keywords Created: 25/Aug/06  Updated: 26/Oct/06  Resolved: 22/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ original request ]]
I want to be able to select 'istream' or 'rstream' events (borrowing the names from the 'insert' clause) directly in the select statement to avoid having to choose between them in the Java listener. To explain:
(1) 'UpdateListener.update(EventBean[] newEvents, EventBean[] oldEvents)' allows me to look at 'istream' and / or 'rstream' events.
(2) 'insert [istream | rstream] into' allows me to insert events entering or leaving windows into another stream. If I listen directly to this statement with the above api I effectively get 'istream' and 'rstream' via 'newEvents' and 'oldEvents' respectively - same as case 1 above - the insert clause does not affect this statement's listeners. If I use a separate pattern to select events from the stream generated by the insert clause then I can receive 'istream' events or 'rstream' events via 'newEvents' in the 'update' method depending on the 'insert' clause.
In case 1 I have to change my Java code to switch between 'istream and 'rstream' - its not possible to direct one or the other into the same piece of Java code just using the EQL.
In case 2 I can switch between 'istream and 'rstream' just by changing the 'insert' clause and so process 'newEvents' only in my Java code. But I have to have a second statement to select them (pattern currently but EQL when other enhancements from other posts are added).
This could be made simpler if we add 'istream' and 'rstream' as options to the select statement, or indeed move them from the 'insert' statement then I could write this:
select [istream | rstream] select_list from_clause...
and listen to that statement and receive all events via 'newEvents'. The author of the EQL can choose 'istream' or 'rstream' events - the Java code listening does not have to decide.
In this case would there still be a need for 'update(EventBean[] newEvents, EventBean[] oldEvents)' or could it be simplified to 'update(EventBean[] newEvents)'? So far I just keep having to point my code at one or the other array but I guess people must have use cases where they want both. If those use cases are rare then maybe you can register as a complex listener or a simple listener each with the appropriate method from above and most people use the simple listener. However, if it is common to need both then 'simple' code an obviously just ignore 'oldEvents'.

[[ reply from Tom ]]
you are right a select-clause syntax with optional [istream | rstream] keywords could make life a little easier. I'll enter an enhancement request into out tracking tool and attach this discussion.

I think I would prefer staying with one type of UpdateListener though to keep the API simpler. The "rstream" keyword would generate newEvents just as the "istream" keyword would.

[[ response ]]
OK - so just to clarify then if no istream or rstream is specified then it is as now, i.e. istream into newEvents and rstream into oldEvents, and if either are specified then the events go into newEvents and oldEvents is always null.



 Comments   
Comment by Thomas Bernhardt [ 22/Sep/06 ]

implemented in branch enhancements110, next release

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-53] Consuming pattern-generated events in EQL Created: 17/Aug/06  Updated: 20/Sep/06  Resolved: 19/Sep/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[[ original request ]]
Is it possible to use EQL to select from an event stream generated by a pattern statement? There doesn't seem to be a way to do this within esper. I think I will need to create an UpdateListener to consume the events from the pattern, then send them to the esper runtime for use in other statements.
It would be useful to have the ability to assign a name to a pattern statement, then be able to reference this name as an event stream in other pattern or EQL statements.

[[ reply with question ]]
excellent question, thanks for bringing this up. You are right, currently one will need to create an UpdateListener to consume events from a pattern and feed events back into the engine.

I agree, by assigning a name to a pattern statement that stream could be used in a further statement. The EQL equivalent syntax is the "insert into" syntax. Do you suggest assigning the name through the API? I presume a new method "createPattern(String onExpression, String eventStreamName)" would be added.

Or would you suggest allowing a pattern syntax like "insert into MyStream A() -> B()"?

[[ reply ]]
"insert into syntax is preferred"



 Comments   
Comment by Thomas Bernhardt [ 19/Sep/06 ]

available as of 1.1.0





[ESPER-52] EQL windows take seconds parameter while patterns take milliseconds parameter Created: 16/Aug/06  Updated: 26/Oct/06  Resolved: 08/Oct/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

That looks fine to me.

Thomas Bernhardt wrote:

>
>thanks for pointing this out. You are right, there is an inconsistency, we need to fix this. I'll be creating a defect into our JIRA defect tracking.
>
>I'd propose we make the timer:interval and timer:within accept seconds as well, and accept double-type values to represent fractions of a second.
>
>Please let me know if you see a better approach.
>
>Regards
>Tom
>
>
>



 Comments   
Comment by Thomas Bernhardt [ 17/Aug/06 ]

[[ from Alex]]
what about a typed syntax like
timer:within(3s)
timer:within(500ms)

harder to write 3s500ms though we could say in this case the syntax is timer:within(3.5s)

Comment by Thomas Bernhardt [ 09/Sep/06 ]

Assigned to 1.5 for future enhancement

Comment by Thomas Bernhardt [ 06/Oct/06 ]

[[ start of discussion ]]

I'd like to suggest a new grammer for time intervals. If you are interested, please feedback.

This is for use in time-based windows and pattern statements with timers. The purpose is to make statements with time windows and patterns a bit more readable. There is also an outstanding issue http://jira.codehaus.org/browse/ESPER-52 where pattern and time windows take millseconds versus seconds.

Some examples of the grammer could look like this:
1050 msec equilvalent to 1.05 sec equilvalent to 1 sec 50 msec
20.5 sec equilvalent to 20 sec 500 msec
90.1 min equilvalent to 1 hr 30 min 6 sec

The grammer would allow several options for specifying time:

time_interval := (number days)? (number hours)? (number minutes)? (number seconds)? (number millis)?

hours := hr | hour | hours
millis := msec | millisecond | milliseconds
seconds := sec | second | seconds
minutes := min | minute | minutes
days := day | days

[[ Feedback ]]

I agree with this.
I 'd like to add the following (1d 2h 3m 4s 5ms):

hours := h | hr | hour | hours
millis := ms | msec | millisecond | milliseconds
seconds := s | sec | second | seconds
minutes := m| min | minute | minutes
days := d | day | days

Comment by Thomas Bernhardt [ 06/Oct/06 ]

The syntax (1d 2h 3m 4s 5ms) creates a problem in that 1d is 1 double in Java. Also 1L is a long and 1E10 is a double 100.
Esper sticks to the Java lexer/tokens for gaining advantages and disadvantages like this one, I guess.
Therefore I think we need to require the "1 day" and not allow "1d"

Comment by Alexandre Vasseur [ 08/Oct/06 ]

Tom, do you mean this is due to a technical complexity ? The y/m/d/s/ms syntax seems way more intuitive and common to me.

Comment by Thomas Bernhardt [ 08/Oct/06 ]

I think potential user confusion and technical complexity are the two problems.

A statement such as "select 1d where A.win:time(1d)" -in that statement the 1d would both be a double-typed 1 as well as 1 day for the time window. The time window currently already takes a double number of seconds as a parameter, therefore, for example, "win:time(1.02d) is 1.02 seconds or 1.02 days?

Technical complexity because the Esper ANTLR lexer (breaks string into tokens for parser to process) is based on Java. Thus the lexer outputs "1d" as a NUM_DOUBLE token, I believe, which could not be told apart from "1.0" at a parser level. Thus I think the lexer changes that would be required and therefore also parser changes would be more work.

I agree that "win:time(1s)" reads slightly better then "win:time(1 sec)", perhaps.

Comment by Thomas Bernhardt [ 08/Oct/06 ]

The "timer:within", "timer:interval" and "win:ext_timed" now take a second parameter or a time period parameters (such as 5 min 3 sec) -no longer milliseconds

Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-51] Add "output first" to reduce duplicate output Created: 09/Aug/06  Updated: 17/Aug/06  Resolved: 17/Aug/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: srdan bejakovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[ original user request ]

I would like to be notified at the start of the interval not the end for the output clause of an EQL statement. So maybe with a 'first' keyword we would have something like...

select * from StockTickEvent.win:length(5) output first every 90 seconds

...would output the first one as soon as its found and then whatever is the first one 90 seconds later.

This allows me to watch for situations such as a rate falling below a threashold and only be informed every now and again (output interval) but be informed the moment it first happens. Currently I can only be informed at the end of the output interval.

[ comment by Tom ]
Please let me know if I got this one wrong:
The purpose is to output the first matching event as soon as it arrives, then ignore matching events for 90 seconds thereafter. After the 90 seconds elapsed the next first matching event is output again and the following 90 seconds we again ignore matching events.



 Comments   
Comment by Thomas Bernhardt [ 17/Aug/06 ]

code changes in trunk





[ESPER-50] Substitution parameters for statements & user property types Created: 09/Aug/06  Updated: 15/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 2.0

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

[ original request below]

      • Any plans to allow substitution parameters a bit like jdbc to make
        construction of queries and patterns a little easier? Not sure of the
        best API though - couple of suggestions below.

For example, rather than...

administrator.createPattern("every Thing(a=" + aValue + ",b=" + bValue+ ")")

... you would do...

administrator.createPattern("every Thing(a=?,b=?)", aValue, bValue)

... or ...

EPStatement pattern= administrator.preparePattern("every
Thing(a=?,b=?)"); // defers compilation
pattern.set(1, aValue); // use 1 based index like jdbc
pattern.set(2, bValue);
administrator.compile(pattern);

      • Also, any plan to allow other types of property. For example, I use
        a GUID object with 16 bytes and use the equals method of GUID object to
        compare. To use this in esper I have to compare the property as...

"someGuidProperty.hex=" + guidInstance.hex()

... (GUID has a hex method returning 32 hex characters). Cannot esper
use the equals method for unrecognised objects, or perhaps we can
register classes with esper along with some implementation of an
interface that esper consults for certain operations on properties of
that type?

If you combine this with jdbc-like parameters above then I would be able
to do this...

EPStatement pattern= administrator.preparePattern("every Thing(guid=?)");
pattern.set(1, aGuid);
administrator.compile(pattern);

...and it will be more efficient for esper to use my equals method
which compares the byte array rather than having my hex method to
convert to hex and then compare the 2 strings. This would apply to other
objects too of course - not just my weird GUID class.

[ comment by Tom ]
Substitution parameters would indeed help make statements more readable, that's a great idea. Via the JDK5 varargs feature we could accomodate both styles of interface that you have suggested. I'm creating an item in our roadmap and prioritize as an enhancement.

The support for other property types is another good one. This feature seems to require substitution parameters since the parser would not by able to recognize user types, I think. It would make filters and statements in general more convenient to use and efficient for user types. I'll also add this to the roadmap.



 Comments   
Comment by Thomas Bernhardt [ 06/Sep/07 ]

in 1.11

Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-49] Event stream view that posts no old events, is unlimited depth, and prohibits joins against other streams not windows Created: 07/Aug/06  Updated: 21/Sep/06  Resolved: 21/Sep/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 1.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This would be useful for just totalling up events when we not care about any particular window, but just want to sum it all up, for example



 Comments   
Comment by Thomas Bernhardt [ 21/Sep/06 ]

With 1.1.0 release it is possible to simply specify no child view. Closed since the result is the same.





[ESPER-48] Multithread-safety Created: 04/Aug/06  Updated: 11/Jan/07  Resolved: 11/Jan/07

Status: Closed
Project: Esper
Component/s: Performance
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Currently an engine instance is not multithread-safe.

Use internal locking to make an engine instance multithread-safe by synchronizing sendEvent with EPAdministrator and statement start/stop etc., potentially is an configuration option.

Advanced: intelligently or through configuration associate statements to threads supplying events (segregation)

more analysis to be performed



 Comments   
Comment by Alexandre Vasseur [ 24/Dec/06 ]

deleted long comment, will open sub issue

Comment by Thomas Bernhardt [ 11/Jan/07 ]

In 1.5 release





[ESPER-47] site.xml says Maven which mirrors in html header names on public site Created: 21/Jul/06  Updated: 21/Jul/06  Resolved: 21/Jul/06

Status: Closed
Project: Esper
Component/s: Documentation
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Alexandre Vasseur Assignee: Alexandre Vasseur
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

site.xml says Maven which mirrors in html header names on public site



 Comments   
Comment by Alexandre Vasseur [ 21/Jul/06 ]

fixed





[ESPER-46] Create market data feed example Created: 17/Jul/06  Updated: 04/Aug/06  Resolved: 04/Aug/06

Status: Closed
Project: Esper
Component/s: Examples
Affects Version/s: 1.0
Fix Version/s: 1.5

Type: Improvement Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 04/Aug/06 ]

completed, posted case study on site, simulator also available on command line





[ESPER-45] Output Adapter - CSV files Created: 14/Jul/06  Updated: 27/Apr/12  Resolved: 27/Apr/12

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 27/Apr/12 ]

in release 4.6.0





[ESPER-44] Analysis persistence or cache backing strategy for robustness Created: 13/Jul/06  Updated: 19/Nov/07  Resolved: 19/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 2.0

Type: Task Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 19/Nov/07 ]

Addresses in EsperHa product





[ESPER-43] Timer behavior is non-deterministic between and within statements Created: 06/Jul/06  Updated: 09/Jul/06  Resolved: 09/Jul/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Minor
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

The timers for example for a statement such as "select * from StockTick.win:time(30) output every 5 sec" the time window and the output limit timer may fire either the window first, or the output limit first.
Also dependent statements connected via "insert into" that both use timed windows may or may not fire timers in dependency order.



 Comments   
Comment by Thomas Bernhardt [ 09/Jul/06 ]

scheduling service now requires each callback to registers with a slot, which is allocated from buckets. Callbacks for the same time are order by buckets first and within bucket by slot. Statements associate with buckets and elements using scheduling associate with a slot.





[ESPER-42] EQL - support for IF/THEN/ELSE and CASE Created: 05/Jul/06  Updated: 20/Sep/06  Resolved: 19/Sep/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Yves Greatti
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Yves Greatti [ 07/Jul/06 ]

Assiged to me Yves Greatte.

Comment by Yves Greatti [ 12/Sep/06 - Visible by: esper-developers ]

Core of the feature completed. Regression testing in progress.

Comment by Yves Greatti [ 16/Sep/06 - Visible by: esper-developers ]

Regression testing complete. Most of the feature has been covered. Tom will review it, finalize (include error handling) and close it.

Comment by Thomas Bernhardt [ 19/Sep/06 ]

available as of 1.1.0





[ESPER-41] EQL - plug in a view or a new aggregation function Created: 05/Jul/06  Updated: 07/May/07  Resolved: 24/Mar/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 1.8

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Allow configuration of a user-defined....

  • data window view
  • other view
  • pattern guard
  • pattern observer
  • static function
  • aggregation function
  • event type


 Comments   
Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-40] Pattern - plug in a pattern guard and pattern observer function Created: 05/Jul/06  Updated: 07/May/07  Resolved: 18/Apr/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 1.8

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-39] Plug in an event type Created: 05/Jul/06  Updated: 11/May/08  Resolved: 10/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 04/May/08 ]

Assigned to 2.1

Comment by Thomas Bernhardt [ 11/May/08 ]

in release 2.1





[ESPER-38] EQL - support for pull API for join EQL statements Created: 05/Jul/06  Updated: 21/Dec/07  Resolved: 16/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 16/Nov/07 ]

In release 1.12

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-37] Managability - runtime engine management (monitoring, start/stop, config changes) Created: 05/Jul/06  Updated: 04/May/08  Resolved: 04/May/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 04/May/08 ]

Duplicate to other JIRA





[ESPER-36] Robustness - distributed caching Created: 05/Jul/06  Updated: 17/Sep/09  Resolved: 17/Sep/09

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 17/Sep/09 ]

change fix version





[ESPER-35] Robustness - event transaction log and engine state persistance, recovery Created: 05/Jul/06  Updated: 21/Dec/07  Resolved: 19/Nov/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 16/Aug/06 ]

[[ original request ]]]
I might have a mix of queries that refer to the last few seconds of events and some that monitor situations over much longer timescales, maybe weeks or months. Whilst you could argue that the longer running ones could be achieved in a different way, it would be nice to use something like Esper for both situations as the only difference is the duration. Although maybe not always true, I can imagine that a higher latency on the longer running ones will be acceptable (if we've waited 4 weeks for this thing to happen then a few seconds here or there is not likely to make any difference).
It's possible that ESPER-35 may address this but I am not sure. This seems to be more about a transaction log.
A transaction log would be needed in this situation as well to recover from system failures (people will be very upset if their 3 month query dies due to a power problem after 2 months) but a persistent store may also be needed to handle the possibility of high volumes of accumulated 'situations' which may be too large to hold in memory - they would need to be swapped out to the store. This is a different storage requirement from the transaction log but maybe could be combined with it - the log could be cleared down periodically and stuff moved to the persistent store at that point and dropped from memory then.
Presumably as much filtering as possible can be done before the permanent store is consulted for swapped out situations - so maybe some aspects with respect to certain filters would need to remain in memory but more specific stuff might be swapped out.
I guess also that it is reasonable to require the user to specify in the statement, or perhaps more likely the engine configuration, that persistence is required.

[[ respone to below email by Tom]]
the team would like to address the need for persisting events and/or engine state so this is a great subject to bring up. I'll add the discussion to the roadmap item on JIRA and rename the item rather then create a new one.

I think a transaction log would allow us to replay past events into an engine and thus restore engine state. The transaction log would need to be tailored to the specific statement(s) and window requirements. For example a length window of 100 events would result in a rolling transaction log of the last 100 events. We would probably write the log asynchronously. When an engine starts up it could recover it's state from the set of known transaction logs via replay.

Very long running statements could potentially accumulate very large quantities of data in a transaction log. Would a replay of the full set of events over 3 month be feasible - possibly not. I think a solution would be to persist engine state as it changes as well as persist events to a transaction log, which then serves more as a persistent backing of window contents rather then a replay store. When an engine recovers, it would then read the engine state from persistence, and attach to the logs to manage window contents i.e. events leaving the window etc.

I agree that the statement and engine configuration would be the place to specify persistence is required.

Relational databases are readily available in many environments, and distributed caching products are gaining traction. Would you recommend either of these technologies or do you see Esper providing it's own persistence files through java.nio or java.io?

Comment by Thomas Bernhardt [ 19/Nov/07 ]

Resolved by EsperHA

Comment by Thomas Bernhardt [ 21/Dec/07 ]

in EsperHA





[ESPER-34] Doc - Patterns of use Created: 05/Jul/06  Updated: 09/Aug/06  Resolved: 09/Aug/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 09/Aug/06 ]

Solution patterns has been started on web site





[ESPER-33] GUI for modeling, testing, drag&drop composition, configuration, record&playback, visualization of streams, debugging, step forward/backward Created: 05/Jul/06  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Addressed by Enterprise Edition





[ESPER-32] Performance - multi-thread safe single engine instance Created: 05/Jul/06  Updated: 21/Sep/06  Resolved: 21/Sep/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 21/Sep/06 ]

Closed - duplicated with ESPER-48 Multithread-safety





[ESPER-31] Performance - precompiled statements to reduce statement creation time Created: 05/Jul/06  Updated: 15/Sep/07  Resolved: 06/Sep/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 15/Sep/07 ]

in release 1.11





[ESPER-30] EQL - join against storage-based tables (JDBC and chaching) Created: 05/Jul/06  Updated: 14/Nov/06  Resolved: 09/Nov/06

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Alexandre Vasseur [ 03/Nov/06 ]

Tom
could we iterate some on the language

seems the proto is
//select id, name, address from Bean as s0, database MyDB schema test [[select name, address from customers where ?s0.id = customers.custid]]
where database, schema and [[ ]] are reserved words and points to configured database-reference (if I got it correctly)

how about with a "database:db/schema" prefix (assuming db / schema is referenced in config)
//select id, name, address from Bean as s0, database:MyDB/test[[select name, address from customers where ?s0.id = customers.custid]]
(or may be sql: prefix)

and why do we have to have a double [[ ?

let me know if I got anything wrong

Comment by Thomas Bernhardt [ 03/Nov/06 ]

ok lets make these changes

select id, name, address from Bean as s0,
sql:MyDB [select name, address from customers where $

{s0.id}

= customers.custid]

Note that I made the following changes:

  • use sql keyword is shorter, good suggestion, similar to patterns (e.g. select * from pattern [ a->b ])
  • use the sql:<DBName> syntax to supply the database name, in the above examples that would be "MyDB"
  • single bracket [ ... ]
  • the SQL syntax is itself not parsed by Esper, but handed through to the database, thus we can support any grammar that the database supports
  • the $ {event property}

    syntax has replaced the ? syntax since one can address streams and nested/complex event properties with this syntax
    for example: $

    {s0.id.inner.mapped('a').indexed[1]}

    only negative is that the ? is more JDBC-like

I haven't yet found a use for schema, that seems to be mostly either in the table name and sql, or in the connection URL?

Here is the XML configuration design:
<!-- Sampe configuration for database access using InitialContext and DataSource -->
<database-reference name="mydb1">
<datasource-connection context-lookup-name="java:comp/env/jdbc/mydb">
<env-property name="java.naming.factory.initial" value ="com.myclass.CtxFactory"/>
<env-property name="java.naming.provider.url" value ="iiop://localhost:1050"/>
</datasource-connection>
<connection-lifecycle value="pooled"/> <!-- Obtains a new connection and closes the connection on every use, such as useful for connection pooling -->
</database-reference>

<!-- Sampe configuration for database access using DriverManager; retains connections associated with a statement, closing the connection when a statement is stopped -->
<database-reference name="mydb2">
<drivermanager-connection class-name="my.sql.Driver" url="jdbc:mysql://localhost/test?user=root&password=welcome" user="myuser" password="mypassword">
<connection-arg name="user" value ="myuser"/>
<connection-arg name="password" value ="mypassword"/>
<connection-arg name="somearg" value ="someargvalue"/>
</drivermanager-connection>
<connection-lifecycle value="retain"/> <!-- Retains connection associated with a statement, closing a connection only when a statement is stopped -->
</database-reference>

Comment by Thomas Bernhardt [ 04/Nov/06 ]

Since the $

{property}

notation can have indexed properties (e.g $

{indexed[1]}

), the single bracket [ ] is trouble parsing out and would need to be escaped - ugly.

Back to the double brackets [[ and ]]

select id, name, address from Bean as s0,
sql:MyDB [[select name, address from customers where $

{s0.id}

= customers.custid]]

Comment by Alexandre Vasseur [ 04/Nov/06 ]

sounds good
indeed the "?param" sounds more like JDBC. We'll simply have to stay consistent with the prepared statement syntax. If the syntax is the same then it might be somewhat confusing as it would means parameter resolution is first made from streams and then from prepared statement - which may open for weird behavior in case of misuse.
Hence the $

{param}

might be good here to resolve from stream, and we'll use the "?param" in the prepared statement syntax so that the resolution mechanism is really clear.

Comment by Thomas Bernhardt [ 14/Nov/06 ]

in release 1.3





[ESPER-29] EQL - support for keep-all window Created: 05/Jul/06  Updated: 21/Sep/06  Resolved: 21/Sep/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 1.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 21/Sep/06 ]

This could simply be done via a very large length window - closed





[ESPER-28] EQL - externally controlled insert/delete window and API Created: 05/Jul/06  Updated: 07/Dec/07  Resolved: 07/Dec/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 1.12

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 07/Dec/07 ]

In 1.12 in the form of named windows





[ESPER-27] EQL - jumping/tumbling window Created: 05/Jul/06  Updated: 22/Feb/07  Resolved: 06/Feb/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.6
Fix Version/s: 1.6

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Length based or time based window that resets (clears) every N events or N seconds



 Comments   
Comment by Thomas Bernhardt [ 28/Jan/07 ]

User comment: I notice that you have a time-based batching mechanism (win:time_batch), but I don't see a similar row-based batching mechanism (i.e. to specify that n events should be batched prior to processing). Is this functionality available through some other means?

Comment by Thomas Bernhardt [ 22/Feb/07 ]

in release 1.6





[ESPER-26] EQL - sort window allowing multiple columns and expressions Created: 05/Jul/06  Updated: 09/Aug/06  Resolved: 09/Aug/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 09/Aug/06 ]

Closed since the existing sort window already allows multiple columns. Just order-by expressions are not supported but could be worked-around by providing the expression via a further select statement or within the event property getter method itself.





[ESPER-25] EQL - support for 'prior' operator Created: 05/Jul/06  Updated: 26/Dec/06  Resolved: 16/Dec/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

For access of prior events in arrival order, or window sort order

Do we want to allow access to prior events in an event stream in EQL? Points (A) (B) (C) outline a couple of proposals...
Thanks for any feedback

(A) Provide a stream index operator in [number], such as below example.

Example: select s0[1].price from StockTicks.win:length(100) as s0

s0[0] would select the current row or top of the data window, in window sort order if this is a sorted window.
s0[1] selects the previous row, s0[n] therefore the n-previous row in the window. This would return null if the window doesn't have such a row.

(B) Have a previous function with syntax "previous(expr, property)"

Example: select previous(1, price) from StockTicks.win:length(100)

The previous function is equivalent to the stream index operator only that an expression can be specified to determine the index. For example: select previous(s0.index, s0.price)

(C) Have a prior function with syntax "prior(number, expr)"

Example: select prior(1, price) from StockTicks.win:length(100)

The difference between "prior" and "previous" is that the "previous" is a previous row/event from a data window perspective, while the prior is the earlier evaluation value of the embedded expression. Therefore the sorting or other layout of any data window or view does not affect the prior operator in any way. The prior operator would just hold on to the result of a prior evaluation of the expression.

There would be restrictions around where these operators and functions could be used, i.e. not in group by or having, and not with output rate limiting.



 Comments   
Comment by Thomas Bernhardt [ 16/Dec/06 ]

For 1.4 release

Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-24] EQL - support for BETWEEN and IN Created: 05/Jul/06  Updated: 26/Oct/06  Resolved: 12/Oct/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 26/Oct/06 ]

in 1.2 release





[ESPER-23] EQL - Support for more operators (string ops ||, modulo %, NOT) Created: 05/Jul/06  Updated: 13/Jul/06  Resolved: 13/Jul/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[ESPER-22] EQL - support for subqueries Created: 05/Jul/06  Updated: 07/May/07  Resolved: 18/Apr/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 1.8

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

A subquery would look like this:

select rfidId
from RFIDEvent
where zone in (select zone from ForbiddenZones)

or

select rfidId
from RFIDEvent
where zone in (select zone from ForbiddenZones.win:time(30))



 Comments   
Comment by Thomas Bernhardt [ 07/May/07 ]

in release 1.8





[ESPER-21] EQL - support for 'Union' Created: 05/Jul/06  Updated: 11/Jan/12  Resolved: 11/Jan/12

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Set to minor as two statements could have the same listener and observer attached and thus achieve virtually the same






[ESPER-20] Patterns - causal relationship operators Created: 05/Jul/06  Updated: 26/Oct/07  Resolved: 26/Oct/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 26/Oct/07 ]

This can be solved already by dedicating properties in an event that identify the causality relationship, and then using these properties to match patterns. For example:
Withdrawal(txnId=1)
Login(userId=10)
Fraud(txnId=1, userId=10) // causality tracked by linking back to the withdrawal and login event that caused the fraud suspicion





[ESPER-19] Patterns - operator for no event of any type Created: 05/Jul/06  Updated: 06/Dec/08  Resolved: 06/Dec/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 06/Dec/08 ]

This can already be done via variant event type in pattern





[ESPER-18] Patterns - Immediate sequence operator Created: 05/Jul/06  Updated: 15/Oct/10  Resolved: 31/Dec/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 31/Dec/08 ]

This can be done without adding an extra operator via variant streams and NOT-pattern operator.

Comment by Daniel Huss [ 02/Oct/10 ]

So we have to write "AND NOT ..." 90 times if we want to match a sequence of 10 events? That's ... great! Too bad the documentation doesn't even mention how the behavior that most people would expect from a sequence operator can be emulated. It's hidden in the FAQ.

Comment by Thomas Bernhardt [ 03/Oct/10 ]

Do you want to provide an example why a sequence of 10 events would require 90 "and not"?

Note the match-recognize pattern matching can also be used for detecting immediate followed-by, as simple as "pattern (a,b)"

Comment by Daniel Huss [ 10/Oct/10 ]

Thomas,

thanks for replying so quickly, I had little hope for getting a response at all, hence the extra cocky choice of words. Sorry about that

Here's what made me think we needed so many "and not" statements. An example from the FAQ solution patterns page that turned up when searching for "sequence of events" read like this:

every a=F -> (
        (b=F(src=a.src) and not S(src=a.src)) ->
        (c=F(src=a.src) and not S(src=a.src)) ->
        (d=F(src=a.src) and not S(src=a.src)) ->
        (d=F(src=a.src) and not S(src=a.src)) ->
        (e=S(src=a.src) and not F(src=a.src))
     )
) where timer:within(5 min)

Given this example and your comment

This can be done without adding an extra operator via variant streams and NOT-pattern operator.

I assumed that we had to do the follwing if we wanted to match a sequence of 10 event types:

every a=A -> (
        (b=B and not A and not C and not D and not E and not F ...) ->
        (c=C and not A and not B and not D and not E and not F ...) ->
        (d=D and not A and not B and not C and not E and not F ...) ->
        ...
     )

I don't even know if this pattern would work at all, I haven't tested it.

However, using match-recognize as you suggested, we get a statement that is somewhat less verbose:

/* 
 * Assumption: all interesting events descend from TEvent.
 * Sequence pattern: events (A,B,C) arrive in immediate sequence => notify
 */
create variant schema SequencePatternStream as *;
insert into SequencePatternStream select * from TEvent; 
@Name('Sequence')
select a, b, c from SequencePatternStream match_recognize(
  measures A as a, B as b, C as c
  pattern (A B C)
  define A as instanceof(A, org.example.event.TEventA),
         B as instanceof(B, org.example.event.TEventB),
         C as instanceof(C, org.example.event.TEventC)
);

For comparison here's what I think the same statement might look like using a fictional immediate sequence pattern operator "->!"

select a, b, c from pattern [every a=A ->! b=B ->! c=C];

Sorry about the lengthy comment, I hope it's at least somewhat useful to users who searched for "esper sequence" (this page is the first result on google).

Comment by Thomas Bernhardt [ 15/Oct/10 ]

The problem with the immediate sequence operator is that its not clear what the semantics would be if the subexpression is not a simple filter expression.

For example:
A ->! (B where timer:within(1))

What is the semantics of the above? The immediate-sequence operator would only seem to make sense if followed by a Filter expression.

Other alternative approaches are using "and not" with "instanceof" or writing a simple single-row function that checks for the desired type.

Comment by Thomas Bernhardt [ 15/Oct/10 ]

We'll update solution patterns. Thanks for the input.

Comment by Thomas Bernhardt [ 15/Oct/10 ]

We'll update solution patterns. Thanks for the input.





[ESPER-17] Pattern Filter - null value support Created: 05/Jul/06  Updated: 20/Mar/07  Resolved: 11/Mar/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.7

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Filters don't currently allow null values, where-clauses do



 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-15] Java integration - support min/maxelement, size etc. for access into event properties that are arrays and collections Created: 05/Jul/06  Updated: 01/Oct/10  Resolved: 01/Oct/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 03/Sep/07 ]

Consider adding few more advance methods which will be
great, for intersection and existence of objects.

For example:
theCollection.contains(Object o)
theCollection.containsAll(Collection<?> c)

If it will support:
theCollection.containsAll(Object[] c) - event better,
because we will be able to insert the required values
in the EQL definitions.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

With the chained syntax together with plug-in single-row functions in release 4.0 this seems addressed.

Comment by Thomas Bernhardt [ 01/Oct/10 ]

Also the dot-operator syntax for access to array/collection size





[ESPER-14] Java integration - java library methods available in EQL Created: 05/Jul/06  Updated: 13/Jul/06  Resolved: 13/Jul/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: srdan bejakovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[ESPER-13] Native class JDK5 Enum support in filters, EQL, patterns Created: 05/Jul/06  Updated: 21/Dec/07  Resolved: 12/Dec/07

Status: Closed
Project: Esper
Component/s: Core
Affects Version/s: 2.0
Fix Version/s: 1.12

Type: New Feature Priority: Minor
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Workaround is to simply use the value of the enum, the enum class is otherwise handled correctly as enums are already a Java class



 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7

Comment by Thomas Bernhardt [ 11/Jul/07 ]

Trying the statement:
every event=Event(type=EventType.STARTED)

getting:
net.esper.client.EPStatementException: Failed to resolve property
'EventType.STARTED' to a stream or nested property in a stream [every
event=Event(type=EventType.STARTED)]

I have registered the Event and EventType as aliases in my
esper.cfg.xml file, and since it parses fine, I'm assuming my
configuration file is correct.

============

The enums are supported through the Enum class methods. So for example:
every event=Event(type=EventType.valueof('STARTED'))

It makes sense to support the alternative syntax through "type=EventType.STARTED" as well, but we don't currently have that. I have reopened the issue in JIRA http://jira.codehaus.org/browse/ESPER-13 and assigned a low priority. The documentation also will have an example in the next release.

Comment by Thomas Bernhardt [ 11/Jul/07 ]

reopened, could be further improved

Comment by Thomas Bernhardt [ 12/Dec/07 ]

In 1.12 release

Comment by Thomas Bernhardt [ 21/Dec/07 ]

Changes are in release 1.12





[ESPER-12] Output Adapter - JDBC Created: 05/Jul/06  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.4

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Duplicate to Esper IO DB adapter





[ESPER-11] Output Adapter for dashboard, charting, BAM Created: 05/Jul/06  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Addressed by Enterprise Edition





[ESPER-10] Engine Monitoring - JMX console Created: 05/Jul/06  Updated: 08/Nov/08  Resolved: 30/Oct/08

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 2.3

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

moved to later



 Comments   
Comment by Thomas Bernhardt [ 02/Aug/07 ]

On load-monitoring the parameters "time to insert one event" and "insert-rate" can give an overview of the
machine-capacity, how much room there is, till the upper limit.
For activity-monitoring (to except the esper-machine from bottlenecks or failures) the throughput
per statement / for the whole machine would be nice. This could be computed in samples or memory.

Also it could be interesting to know, how many events ar located in the machine
and how many events are connnected to one specific statement,
so the output of the statements can be controlled - are there many not-matching events or
is there nothing in the machine.

Comment by Thomas Bernhardt [ 08/Nov/08 ]

in 2.3





[ESPER-9] Output Adapter - Event actioning/alerting API Created: 03/Jul/06  Updated: 04/Aug/10  Resolved: 04/Aug/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 04/Aug/10 ]

Overlap with output adapters.





[ESPER-8] Output Adapter - JMS destinations Created: 03/Jul/06  Updated: 20/Mar/07  Resolved: 14/Mar/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 2.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Yves Greatti
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-7] Input Adapter - API and configuration architecture Created: 03/Jul/06  Updated: 20/Mar/07  Resolved: 14/Mar/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.7

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-6] Input Adapter for reading CSV files Created: 03/Jul/06  Updated: 26/Dec/06  Resolved: 04/Dec/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: srdan bejakovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 26/Dec/06 ]

Changes in 1.4.0 release





[ESPER-5] Input Adapter for JDBC Created: 03/Jul/06  Updated: 10/Jun/10  Resolved: 10/Jun/10

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 5.0

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Thomas Bernhardt [ 10/Jun/10 ]

Already exist in SQL integration capabilities and IO DB adapter





[ESPER-4] Input Adapter for JMS destinations Created: 03/Jul/06  Updated: 20/Mar/07  Resolved: 14/Mar/07

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.7

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Also process native JMS events



 Comments   
Comment by Thomas Bernhardt [ 20/Mar/07 ]

In release 1.7





[ESPER-3] Input Adapter for XML events Created: 03/Jul/06  Updated: 14/Aug/06  Resolved: 14/Aug/06

Status: Closed
Project: Esper
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.5

Type: New Feature Priority: Major
Reporter: Thomas Bernhardt Assignee: Thomas Bernhardt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Native DOM and String events

  • Xpath
  • schema support
  • field and type validations


 Comments   
Comment by Thomas Bernhardt [ 14/Aug/06 ]

merged to main, docs complete, much code a contribution of Pablo Pavlorian





Generated at Thu Mar 05 10:31:57 CST 2015 by Thomas Bernhardt using JIRA 6.1.6#6162-sha1:7af547ce7c84dbb7c1e345a65437ed7b85efffa2.