3

I have created simple execution plan with storm support using WSO2 CEP v4.1.0. But it will give some exceptions when i use window facilities in Siddhi. And Its not possible to join table with stream with use of storm also. How do I resolve this? Is there any alternative for it.

Execution Plan

@Plan:name('ExecutionPlan')

@Import('InputStream:1.0.0')
define stream InputStream (id string, param1 int, param2 double, param3 string, param4 string, param5 string, param6 string, param7 string);

@Export('outputStream:1.0.0')
define stream OutputStream (id string, param3 string);

@From(eventtable = 'rdbms' , datasource.name = 'MYSQL' , table.name = 'cep') 
define table cepTable (id string, param1 int, param2 double, param3 string, param4 string, param5 string, param6 string, param7 string);

@name('query1') 
@dist(parallel='8', execGroup='Filtering')
from InputStream#window.time(1 sec)
select id as id, param3 as param3  
insert into OutputStream;

Given error by CEP

Exception: Invalid distributed query specified, Error while converting to XML storm query plan. Execution plan: ExecutionPlan Tenant: -1234. Error in deploying query: @name('query1') @dist(parallel='8', execGroup='Filtering') from InputStream#window.time(1 sec) select id as id, param3 as param3 insert into OutputStream Parallelism has to be 1 for window, join and pattern queries.

Community
  • 1
  • 1
Saveendra Ekanayake
  • 3,153
  • 6
  • 34
  • 44

1 Answers1

2

You can't have the parallelism of > 1 for a query when the query contains a window, join or a pattern. This is due to the fact that when the state is distributed across multiple bolts such queries can't be processed correctly.

However, if you use partitions then you can have a parallelism of > 1 for window and pattern queries because once partitioned each partition becomes an isolated unit of processing which can be executed on different bolts independently. Refer to this sample for a better understanding of such partitioned query.

Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
Sajith Eshan
  • 696
  • 4
  • 17