简体   繁体   English

如何在导出的流和siddhi查询插入到具有相同名称的地方创建执行计划?

[英]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.

相关问题 如何从 BigQuery 流式传输(查询)数据作为 Siddhi 应用程序中的源 - How to stream (query) data from BigQuery as source in a Siddhi App 如何检查查询执行计划? - How can i check the query execution plan? Java Stream API如何选择执行计划? - How does the Java Stream API select an execution plan? 如何在硒中找到具有相同名称和属性的元素并插入一些文本 - How to locate an element which have same name and same atrributes in selenium and insert some text 如何通过Selenium和Java在同一标签中定位多个元素具有相同id、名称和属性的元素 - How to locate an element where multiple elements have same id, name and attributes in same tags through Selenium and Java 如何避免多次执行相同的查询? - How to avoid same query execution multiple times? 如何映射主键组件和外键具有相同列名的Hibernate实体? - How to map Hibernate entity where a primary key component and the foreign key have the same column name? Retrofit - 动态设置名称的多个同名查询参数 - Retrofit — Multiple query parameters of same name where name is set dynamically 如何在Flink中打印执行计划以进行批处理? - How to print the Execution Plan for batch processing in Flink? 如何加快收集“包含”执行计划的速度? - How to speed collection “contains” execution plan?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM