Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Task/upgrade esper 8.8.0 (TODO use esper 8.9.0) #188

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Feb 15, 2022

https://github.com/espertechinc/esper/blob/master/changelog.txt

  • Test: upgrade a environment with 8.4.0 with a several perseo rules

@AlvaroVega
Copy link
Member Author

Having the following rule in perseo-fe:

Action:
{"type":"post","parameters":{"url":"http://172.17.0.1:10026/v2/entities/${id}/attrs","method":"PATCH","version":2,"headers":{"Content-Type":"application/json","Fiware-Service":"db01","Fiware-ServicePath":"/"},"qs":{"temperature":{"value":"${value}","type":"${type}"}}}}

Text:
select "user_temperature_post" as ruleName, ev.id? as id, ev.temperature__type? as type, ev.temperature? as value, * from pattern [every ev=iotEvent]

After migrate from perseo-core with esper 8.4.0 to esper .8.8.0 the following error happens:

time=2022-03-01T11:58:19.754Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=resolveClass | comp=perseo-core | msg=Resolving class com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeVariables id 8276015152830052323 classloader class org.apache.catalina.loader.ParallelWebappClassLoader
time=2022-03-01T11:58:19.970Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import java.lang.*
time=2022-03-01T11:58:19.971Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import java.math.*
time=2022-03-01T11:58:19.978Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import java.text.*
time=2022-03-01T11:58:19.979Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import java.util.*
time=2022-03-01T11:58:19.980Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import com.espertech.esper.common.client.annotation.*
time=2022-03-01T11:58:19.982Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import com.espertech.esper.common.internal.epl.dataflow.ops.*
time=2022-03-01T11:58:19.982Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=validateImportAndAdd | comp=perseo-core | msg=Adding import com.telefonica.iot.perseo.utils.*
time=2022-03-01T11:58:20.092Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=parse | comp=perseo-core | msg=.parse Parsing expr=create context ctxt$smartcity$ partition by service from iotEvent(service="smartcity" and subservice="/")
time=2022-03-01T11:58:20.466Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=parse | comp=perseo-core | msg=.parse Dumping AST...
time=2022-03-01T11:58:20.641Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=walk | comp=perseo-core | msg=.walk Walking AST using walker com.espertech.esper.compiler.internal.parse.EPLTreeWalkerListener
time=2022-03-01T11:58:21.015Z | lvl=DEBUG | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=buildNoStmtCtx | comp=perseo-core | msg=.makeFilterSpec spec=com.espertech.esper.common.internal.compile.stage2.FilterSpecPlanForge@32dc932d
time=2022-03-01T11:58:22.107Z | lvl=ERROR | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=compileInternal | comp=perseo-core | msg=Failed to compile: Line 26, Column 108: '[' expected instead of '.'
code: 1 package generated;
2 import java.lang.annotation.Annotation;
3 import com.espertech.esper.common.client.util.StatementType;
4 import com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime;
5 import com.espertech.esper.common.internal.context.module.StatementProvider;
6 import com.espertech.esper.common.client.util.StatementProperty;
7 import com.espertech.esper.common.internal.context.module.EPStatementInitServices;
8 import java.util.Map;
9 import com.espertech.esper.common.internal.context.module.StatementAIFactoryProvider;
10 import java.util.HashMap;
11 public class StatementProvider_3cc83d4345b57145447645bfe64532d51aeae81a_ctxt$smartcity$ implements StatementProvider {
12 final StatementInformationalsRuntime statementInformationals;
13 StatementAIFactoryProvider factoryProvider;
14
15 public StatementProvider_3cc83d4345b57145447645bfe64532d51aeae81a_ctxt$smartcity$(){
16 statementInformationals=m0();
17 }
18
19 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.forge():62
20 public StatementInformationalsRuntime getInformationals(){
21 return statementInformationals;
22 }
23
24 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeInitialize():82
25 public void initialize(EPStatementInitServices stmtInitSvc){
26 factoryProvider=new StatementAIFactoryProvider_3cc83d4345b57145447645bfe64532d51aeae81a_ctxt.smartcity.(stmtInitSvc);
27 }
28
29 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeGetStatementAIFactoryProvider():88
30 public StatementAIFactoryProvider getStatementAIFactoryProvider(){
31 return factoryProvider;
32 }
33
34 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.make():130
35 StatementInformationalsRuntime m0(){
36 StatementInformationalsRuntime info=new StatementInformationalsRuntime();
37 info.setStatementNameCompileTime("ctxt$smartcity$");
38 info.setNumFilterCallbacks(1);
39 info.setStatementType(StatementType.CREATE_CONTEXT);
40 info.setHasVariables(true);
41 info.setAllowSubscriber(true);
42 info.setAnnotations(new Annotation[]{});
43 info.setProperties(m1());
44 return info;
45 }
46
47 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.makeProperties():369
48 Map m1(){
49 Map properties=new HashMap(3);
50 properties.put(StatementProperty.EPL,"create context ctxt$smartcity$ partition by service from iotEvent(service="smartcity" and subservice="/")");
51 properties.put(StatementProperty.CREATEOBJECTNAME,"ctxt$smartcity$");
52 return properties;
53 }
54 }

time=2022-03-01T11:58:22.116Z | lvl=ERROR | from=172.17.0.13 | corr=n/a | trans=31c44830-7691-442f-b084-91e2c1dcad33 | srv=n/a | subsrv=n/a | op=updateAll | comp=perseo-core | msg=creating statement com.espertech.esper.common.client.EPException: org.codehaus.commons.compiler.CompileException: Line 26, Column 108: '[' expected instead of '.' [create context ctxt$smartcity$ partition by service from iotEvent(service="smartcity" and subservice="/")]

@AlvaroVega
Copy link
Member Author

Still....

time=2022-05-20T08:28:46.610Z | lvl=ERROR | from=172.17.0.12 | corr=n/a | trans=1a7db178-40a5-4b01-8a88-73934c17de5f | srv=n/a | subsrv=n/a | op=compileInternal | comp=perseo-core | msg=Failed to compile: Line 26, Column 21: Cannot determine simple type name "StatementAIFactoryProvider_c174d05445b646454d094580c545e12a1ba6f023_ctxt"
code: 1 package generated;
2 import java.lang.annotation.Annotation;
3 import com.espertech.esper.common.internal.context.module.StatementProvider;
4 import com.espertech.esper.common.internal.context.module.EPStatementInitServices;
5 import com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime;
6 import com.espertech.esper.common.client.util.StatementType;
7 import com.espertech.esper.common.client.util.StatementProperty;
8 import com.espertech.esper.common.internal.context.module.StatementAIFactoryProvider;
9 import java.util.Map;
10 import java.util.HashMap;
11 public class StatementProvider_c174d05445b646454d094580c545e12a1ba6f023_ctxt$smartcity$castillos implements StatementProvider {
12 final StatementInformationalsRuntime statementInformationals;
13 StatementAIFactoryProvider factoryProvider;
14
15 public StatementProvider_c174d05445b646454d094580c545e12a1ba6f023_ctxt$smartcity$castillos(){
16 statementInformationals=m0();
17 }
18
19 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.forge():62
20 public StatementInformationalsRuntime getInformationals(){
21 return statementInformationals;
22 }
23
24 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeInitialize():82
25 public void initialize(EPStatementInitServices stmtInitSvc){
26 factoryProvider=new StatementAIFactoryProvider_c174d05445b646454d094580c545e12a1ba6f023_ctxt.smartcity.castillos(stmtInitSvc);
27 }
28
29 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeGetStatementAIFactoryProvider():88
30 public StatementAIFactoryProvider getStatementAIFactoryProvider(){
31 return factoryProvider;
32 }
33
34 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.make():130
35 StatementInformationalsRuntime m0(){
36 StatementInformationalsRuntime info=new StatementInformationalsRuntime();
37 info.setStatementNameCompileTime("ctxt$smartcity$castillos");
38 info.setNumFilterCallbacks(1);
39 info.setStatementType(StatementType.CREATE_CONTEXT);
40 info.setHasVariables(true);
41 info.setAllowSubscriber(true);
42 info.setAnnotations(new Annotation[]{});
43 info.setProperties(m1());
44 return info;
45 }
46
47 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.makeProperties():369
48 Map m1(){
49 Map properties=new HashMap(3);
50 properties.put(StatementProperty.EPL,"create context ctxt$smartcity$castillos partition by service from iotEvent(service="smartcity" and subservice="/castillos")");
51 properties.put(StatementProperty.CREATEOBJECTNAME,"ctxt$smartcity$castillos");
52 return properties;
53 }
54 }

time=2022-05-20T08:28:46.612Z | lvl=ERROR | from=172.17.0.12 | corr=n/a | trans=1a7db178-40a5-4b01-8a88-73934c17de5f | srv=n/a | subsrv=n/a | op=updateAll | comp=perseo-core | msg=creating statement com.espertech.esper.common.client.EPException: org.codehaus.commons.compiler.CompileException: Line 26, Column 21: Cannot determine simple type name "StatementAIFactoryProvider_c174d05445b646454d094580c545e12a1ba6f023_ctxt" [create context ctxt$smartcity$castillos partition by service from iotEvent(service="smartcity" and subservice="/castillos")]

@AlvaroVega
Copy link
Member Author

We need to tests with new esper 8.9.0

@AlvaroVega AlvaroVega changed the title [WIP] Task/upgrade esper 8.8.0 [WIP] Task/upgrade esper 8.8.0 (TODO use esper 8.9.0) Jul 6, 2023
@AlvaroVega
Copy link
Member Author

Using esper 8.9.0 still there are some errors:

time=2023-09-21T11:00:55.515Z | lvl=DEBUG | from=172.17.0.14 | corr=n/a | trans=32c4eba9-c3da-4933-8d98-6f183a6869da | srv=n/a | subsrv=n/a | op=parse | comp=perseo-core | msg=.parse Dumping AST...
time=2023-09-21T11:00:55.545Z | lvl=DEBUG | from=172.17.0.14 | corr=n/a | trans=32c4eba9-c3da-4933-8d98-6f183a6869da | srv=n/a | subsrv=n/a | op=walk | comp=perseo-core | msg=.walk Walking AST using walker com.espertech.esper.compiler.internal.parse.EPLTreeWalkerListener
time=2023-09-21T11:00:55.597Z | lvl=DEBUG | from=172.17.0.14 | corr=n/a | trans=32c4eba9-c3da-4933-8d98-6f183a6869da | srv=n/a | subsrv=n/a | op=buildNoStmtCtx | comp=perseo-core | msg=.makeFilterSpec spec=com.espertech.esper.common.internal.compile.stage2.FilterSpecPlanForge@2773df39
time=2023-09-21T11:00:55.797Z | lvl=ERROR | from=172.17.0.14 | corr=n/a | trans=32c4eba9-c3da-4933-8d98-6f183a6869da | srv=n/a | subsrv=n/a | op=compileInternal | comp=perseo-core | msg=Failed to compile: Line 26, Column 21: Line 26, Column 21: Cannot determine simple type name "StatementAIFactoryProvider_ba96aeb9458878454c97459549455f1db1174e09_ctxt"
code: 1 package generated;
2 import com.espertech.esper.common.client.util.StatementType;
3 import com.espertech.esper.common.internal.context.module.StatementAIFactoryProvider;
4 import com.espertech.esper.common.internal.context.module.EPStatementInitServices;
5 import java.util.HashMap;
6 import com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime;
7 import java.lang.annotation.Annotation;
8 import com.espertech.esper.common.client.util.StatementProperty;
9 import com.espertech.esper.common.internal.context.module.StatementProvider;
10 import java.util.Map;
11 public class StatementProvider_ba96aeb9458878454c97459549455f1db1174e09_ctxt$smartcity$test implements StatementProvider {
12 final StatementInformationalsRuntime statementInformationals;
13 StatementAIFactoryProvider factoryProvider;
14
15 public StatementProvider_ba96aeb9458878454c97459549455f1db1174e09_ctxt$smartcity$test(){
16 statementInformationals=m0();
17 }
18
19 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.forge():62
20 public StatementInformationalsRuntime getInformationals(){
21 return statementInformationals;
22 }
23
24 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeInitialize():82
25 public void initialize(EPStatementInitServices stmtInitSvc){
26 factoryProvider=new StatementAIFactoryProvider_ba96aeb9458878454c97459549455f1db1174e09_ctxt.smartcity.test(stmtInitSvc);
27 }
28
29 // StmtClassForgeableStmtProvider --- StmtClassForgeableStmtProvider.makeGetStatementAIFactoryProvider():88
30 public StatementAIFactoryProvider getStatementAIFactoryProvider(){
31 return factoryProvider;
32 }
33
34 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.make():130
35 StatementInformationalsRuntime m0(){
36 StatementInformationalsRuntime info=new StatementInformationalsRuntime();
37 info.setStatementNameCompileTime("ctxt$smartcity$test");
38 info.setNumFilterCallbacks(1);
39 info.setStatementType(StatementType.CREATE_CONTEXT);
40 info.setHasVariables(true);
41 info.setAllowSubscriber(true);
42 info.setAnnotations(new Annotation[]{});
43 info.setProperties(m1());
44 return info;
45 }
46
47 // StatementInformationalsCompileTime --- StatementInformationalsCompileTime.makeProperties():369
48 Map m1(){
49 Map properties=new HashMap(3);
50 properties.put(StatementProperty.CREATEOBJECTNAME,"ctxt$smartcity$test");
51 properties.put(StatementProperty.EPL,"create context ctxt$smartcity$test partition by service from iotEvent(service="smartcity" and subservice="/test")");
52 return properties;
53 }
54 }

time=2023-09-21T11:00:55.798Z | lvl=ERROR | from=172.17.0.14 | corr=n/a | trans=32c4eba9-c3da-4933-8d98-6f183a6869da | srv=n/a | subsrv=n/a | op=updateAll | comp=perseo-core | msg=creating statement com.espertech.esper.common.client.EPException: org.codehaus.commons.compiler.CompileException: Line 26, Column 21: Line 26, Column 21: Cannot determine simple type name "StatementAIFactoryProvider_ba96aeb9458878454c97459549455f1db1174e09_ctxt" [create context ctxt$smartcity$test partition by service from iotEvent(service="smartcity" and subservice="/test")]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
time=2023-09-21T11:01:01.415Z | lvl=INFO | from= | corr= | trans= | srv= | subsrv= | op=doPut | comp=perseo-core | msg=changing log level to DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant