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

Error validating "Followed-by" query #9

Open
ValeFormi opened this issue Oct 6, 2014 · 1 comment
Open

Error validating "Followed-by" query #9

ValeFormi opened this issue Oct 6, 2014 · 1 comment

Comments

@ValeFormi
Copy link

Dear Tomdz,
it would be great if you could assist me to fix the following error while using your code.
I've implemented a "followed-by" statement on a topology in the two variants below and received the errors shown at the end:

select a.interface as Interface from pattern [every a=ManagementSystems -> b=ManagementSystems (a.interface='192.168.1.1' and b.interface='192.168.1.2')]
2)
select ManagementSystemsEvent.interface as Interface from pattern [every a=ManagementSystems -> b=ManagementSystems (ManagementSystemsEvent.interface='192.168.1.1' and ManagementSystemsEvent.interface='192.168.1.2')]

This query should simply verify if the "interface" field follows that pattern on the ManagementSystems stream. No temporal window is specified here.
Here, ManagementSystems is the stream name defined through the "toEventType" call of the InputBuilder. ManagementSystemsEvent is the class type declared through the methods "withFields" and "ofType". Before showing the errors I tell that this configuration works if I use a query like this: select ManagementSystemsEvent.interface as Interface from ManagementSystems.win:time(1 min) where ManagementSystemsEvent.interface='192.168.1.1'.

Here the errors.
Error for type 1 query):
Failed to validate filter expression 'a.interface="192.168.1.1" and a.int...(55 chars)': Failed to resolve property 'a.interface' to a stream or nested property in a stream [ select a.interface as Interface from pattern [every a=ManagementSystems -> b=ManagementSystems (a.interface='192.168.1.1' and a.interface='192.168.1.2')] ]

Error for type 2 query):

[Thread-22-FinalQuery_GlobalQuery1] ERROR backtype.storm.util - Async loop died!
com.espertech.esper.client.EPStatementException: Error starting statement: Failed to validate select-clause expression 'ManagementSystemsEvent.interface': Failed to resolve property 'ManagementSystemsEvent.interface' to a stream or nested property in a stream [ select ManagementSystemsEvent.interface as Interface from pattern [every a=ManagementSystems -> b=ManagementSystems (ManagementSystemsEvent.interface='192.168.1.1' and ManagementSystemsEvent.interface='192.168.1.2')] ]
at com.espertech.esper.core.service.StatementLifecycleSvcImpl.startInternal(StatementLifecycleSvcImpl.java:650) ~[esper-5.0.0.jar:na]

Many thanks in advance.
Bye
Val.

@ValeFormi
Copy link
Author

Solved.
This is the correct statement in this case.
select a.ManagementSystemsEvent.interface as Newfield from pattern [every a=ManagementSystems -> b=ManagementSystems (a.ManagementSystemsEvent.interface='192.168.1.1' and b.ManagementSystemsEvent.interface='192.168.1.2')]

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

No branches or pull requests

1 participant