Apparently, it does not support multiple attributes as partition keys.
but you can use
partition with ( str: concat(srcIp,'-', dstIp) of PacketStream ) ...

or use a previous query to content and send as one data.



On Thu, Sep 28, 2017 at 10:41 PM, Gobinath <[email protected]> wrote:

> Hi,
>
> During my recent testing, Siddhi does not allow partition with two
> attributes of the same stream. For example, the following query throws
> *SiddhiAppValidationException* with a message partition already exists
> because the streamId is used to uniquely identify the partition [1].
>
> define stream PacketStream (srcIp string, dstIp string, packets int);
>
> partition with (srcIp of PacketStream, dstIp of PacketStream)
> begin
>   from PacketStream
>   select srcIp, dstIp, count(packets) as count
>   insert into OutputStream;
> end;
>
> I wonder whether it is not supported due to any constraints. If there is
> nothing like that, I can have a look at it.
>
> FYI: I tried to change the partition id as a combination of stream id and
> the attribute name but it does not register a PartitionReceiver for the
> later one.
>
> [1] https://github.com/slgobinath/siddhi/blob/master/modules/sid
> dhi-query-api/src/main/java/org/wso2/siddhi/query/api/
> execution/partition/Partition.java#L101
>
> Thanks & Regards,
> Gobinath
>
> --
> *Gobinath** Loganathan*
> Graduate Student,
> Electrical and Computer Engineering,
> Western University.
> Email  : [email protected]
> Blog    : javahelps.com <http://www.javahelps.com/>
>
>



-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* <http://wso2.com/>*
lean . enterprise . middleware


*cell: (+94) 779 756 757 <077%20975%206757> | blog:
http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter:
http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to