[英]how to create execution plan where exported stream and siddhi query insert into have the same name?
I tried creating a plan using the example provided in this link Create execution Plan but I get the following error. 我尝试使用此链接创建执行计划中提供的示例来创建计划,但出现以下错误。
Stream OutStats is already defined as StreamDefinition{streamId='OutStats', attributeList=[Attribute{name='meta_ip', type=STRING}, Attribute{name='userName', type=STRING}, Attribute{name='requestCount', type=LONG}]}, hence cannot define StreamDefinition{streamId='OutStats', attributeList=[Attribute{name='meta_ip', type=STRING}, Attribute{name='userName', type=STRING}, Attribute{name='searchKey', type=STRING}]}
流OutStats已定义为StreamDefinition {streamId ='OutStats',attributeList = [Attribute {name ='meta_ip',type = STRING},Attribute {name ='userName',type = STRING},Attribute {name ='requestCount' ,type = LONG}]},因此无法定义StreamDefinition {streamId ='OutStats',attributeList = [Attribute {name ='meta_ip',type = STRING},Attribute {name ='userName',type = STRING},Attribute { name ='searchKey',类型= STRING}]}
If I change the insert into part of the query to some other name it works fine,but I'm worried it might create problems if the exported stream name and insert into aren't the same. 如果我将插入到查询的一部分中更改为其他名称,它可以正常工作,但是我担心如果导出的流名称和插入到不同的名称可能会产生问题。 I created both org.foo.data.search.stats and org.foo.data.out.stats before creating the execution plan.
在创建执行计划之前,我同时创建了org.foo.data.search.stats和org.foo.data.out.stats。 Is this a bug or am I doing something wrong?
这是一个错误还是我做错了什么? Also their own test case also gives the same error.
同样,他们自己的测试用例也给出了相同的错误。 Link : EventFlowTestCase
链接: EventFlowTestCase
In the first stream you have Attribute{name='requestCount', type=LONG} and in the second stream Attribute{name='searchKey', type=STRING}. 在第一个流中,您具有Attribute {name ='requestCount',类型= LONG},在第二个流中,您具有Attribute {name ='searchKey',类型= STRING}。
This error in your situation means that "The 4-th attribute in defined stream is not the same as 4-th attribute in input/output/other etc. stream". 您遇到的这种错误意味着“已定义流中的第4个属性与输入/输出/其他等流中的第4个属性不同”。
Remeber, name, type and order does matter. 记住,名字,类型和顺序很重要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.