if you force routing key, then the replica that owns the data will be selected as coordinator
On Wed, Nov 11, 2020 at 12:35 PM onmstester onmstester <onmstes...@zoho.com.invalid> wrote: > Thanx, > > But i'm OK with coordinator part, actually i was looking for kind of read > CL to force to read from the coordinator only with no other connections to > other nodes! > > Sent using Zoho Mail <https://www.zoho.com/mail/> > > > > ============ Forwarded message ============ > From: Alex Ott <alex...@gmail.com> > To: "user"<user@cassandra.apache.org> > Date: Wed, 11 Nov 2020 11:28:56 +0330 > Subject: Re: local read from coordinator > ============ Forwarded message ============ > > token-aware policy doesn't work for token range queries (at least in the > Java driver 3.x). You need to force the driver to do the reading using a > specific token as a routing key. Here is Java implementation of the token > range scanning algorithm that Spark uses: > https://github.com/alexott/cassandra-dse-playground/blob/master/driver-1.x/src/main/java/com/datastax/alexott/demos/TokenRangesScan.java > > I'm not aware if Python driver is able to set routing key explicitly, but > whitelist policy should help > > > > On Wed, Nov 11, 2020 at 7:03 AM Erick Ramirez <erick.rami...@datastax.com> > wrote: > > Yes, use a token-aware policy so the driver will pick a coordinator where > the token (partition) exists. Cheers! > > > > -- > With best wishes, Alex Ott > http://alexott.net/ > Twitter: alexott_en (English), alexott (Russian) > > > > -- With best wishes, Alex Ott http://alexott.net/ Twitter: alexott_en (English), alexott (Russian)