WSO2 CEP Siddhi window and table join are not working with Apache Storm

时间:2016-05-11 11:31:45

标签: wso2 apache-storm distributed wso2cep siddhi

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.

1 个答案:

答案 0 :(得分:2)

你不能拥有>的并行性。当查询包含窗口,连接或模式时查询为1。这是因为当状态分布在多个螺栓上时,这些查询无法正确处理。

但是,如果您使用partitions,则可以使用>的并行度1用于窗口和模式查询,因为一旦分区,每个分区就成为一个独立的处理单元,可以独立地在不同的螺栓上执行。有关此类分区查询的更好理解,请参阅this sample