The default hasher does not formally provide any guarantee, but it should work ok in most cases.
If not (usually due to a very specific workload), you can define and use your own implementation. Regards, Matthieu On Jul 22, 2013, at 07:01 , Sky Zhao <[email protected]> wrote: > Yes,I rewrote the onInit method in AdaterApp and set keyFinder into it, then > partition works, the default Hash method always keep even distribution right? > Thanks Matthieu. > > > > > From: Matthieu Morel [mailto:[email protected]] > Sent: Wednesday, July 17, 2013 9:44 PM > To: [email protected] > Subject: Re: About Data send to Nodes > > > On Jul 17, 2013, at 09:01 , Sky Zhao <[email protected]> wrote: > > > Hi Matthieu, > > Can you give concrete example to do this, > > I tried A,B use same key, C,D also does, but result still A,C in NODE1, B,D > in NODE2, > > I don't see how this can happen with same key values and correct key finder. > Please make sure you have the same key values and that the keyfinder is > indeed extracting the key value. > > I think the zk has average assignment follow the sequence orders, how to > change this, thanks first. > > The issue is not related to zookeeper. The problem might be your keyfinder. > > Regards, > > > Matthieu > > > > From: Matthieu Morel [mailto:[email protected]] > Sent: Friday, July 12, 2013 10:17 PM > To: [email protected] > Subject: Re: About Data send to Nodes > > > On Jul 12, 2013, at 06:17 , Sky Zhao <[email protected]> wrote: > > > > e.g. > If having data sequence A,B,C,D, > And two Nodes, node1, node2, > Can we specify the AB sent to Node1, CD sent to Node2, > Is there any way to handle specified data. > > > One way would be to use the same key for A,B and C,D, and use a custom > hashing function that guarantees those 2 keys are hashed to 2 different > nodes. > > Matthieu > > > > > > /Sky > >
