Re: Writing Custom Partitioner

2016-02-18 Thread Bhupesh Chawda
Same for me! Does anyone know if this is expected? Or can be a bug? Thanks. -Bhupesh On Thu, Feb 18, 2016 at 6:38 PM, Shubham Pathak wrote: > Extending custom stream codec from DefaultKryoStreamCodec worked for my > case ! > > Thanks, > Shubham > > On Thu, Feb 18, 2016 at 12:48 AM, Tushar Gosav

Re: Writing Custom Partitioner

2016-02-18 Thread Shubham Pathak
Extending custom stream codec from DefaultKryoStreamCodec worked for my case ! Thanks, Shubham On Thu, Feb 18, 2016 at 12:48 AM, Tushar Gosavi wrote: > Hi Bhupesh, > > I also did some experiments and found out that stream codec extended > from DefaultStatefulStreamCodec does not work. Extending

Re: Writing Custom Partitioner

2016-02-17 Thread Tushar Gosavi
Hi Bhupesh, I also did some experiments and found out that stream codec extended from DefaultStatefulStreamCodec does not work. Extending custom stream codec from DefaultKryoStreamCodec worked. Can anyone explain, what is the difference between DefaultStatefulStreamCodec and DefaultKryoStreamCode

Re: Writing Custom Partitioner

2016-02-17 Thread Bhupesh Chawda
Hi, The above code fragment is not working in my case as well. Basically I have a Tuple class which has a "key" component. Here is my dag: A -> B I need to be able to define Key Based stream multiplexing (same key goes to same downstream partition) when the down stream operator B is partitioned

Re: Writing Custom Partitioner

2016-02-10 Thread Shubham Pathak
Thanks Tushar. I implemented the codec as per your suggestion. To test it i did the following : 1. Partitioned Counter operator to have 2 instances using dt.application.APPNAME.operator.counter.attr.PARTITIONERcom.datatorrent.common.partitioner.StatelessPartitioner:2 2. The tokenizer emits .

Re: Writing Custom Partitioner

2016-02-08 Thread Tushar Gosavi
Hi Shubham, You can implement a custom stream codec to define your own hashCode logic, A simple StateFulStreamCodec is as below. You specify indexes on which you want to compute the hashCode in constructor of the stream codec, and while computing hashCode you only use elements at those indexes.

Writing Custom Partitioner

2016-02-08 Thread Shubham Pathak
Hi, I need some suggestions / pointers related to defining a custom partitioner. The operators in my application process a custom tuple class ( lets call it TUPLE) . This data type has a single field ArrayList.. So each tuple represents a list of values. For a typical word count problem, my dag