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

how to create execution plan where exported stream and siddhi query insert into have the same name?

我尝试使用此 link Create execution Plan 中提供的示例创建计划,但出现以下错误。

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}]}

如果我将查询的插入部分更改为其他名称,它工作正常,但我担心如果导出的流名称和插入到不相同,它可能会产生问题。在创建执行计划之前,我创建了 org.foo.data.search.stats 和 org.foo.data.out.stats。 这是一个错误还是我做错了什么? 他们自己的测试用例也给出了同样的错误。 Link : EventFlowTestCase

在第一个流中你有 Attribute{name='requestCount', type=LONG} 在第二个流中 Attribute{name='searchKey', type=STRING}.

在你的情况下这个错误意味着"The 4-th attribute in defined stream is not the same as 4-th attribute in input/output/other etc. stream"。

记住,名称、类型和顺序很重要。