You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Siddharth Verma <ve...@snapdeal.com> on 2016/09/02 07:58:56 UTC

Return value of newQueryPlan

Hi,
I have Dc1(3 nodes), Dc2(3 nodes),
RF:3 on both Dcs

question 1 : when I create my LoadBalancingPolicy, and override
newQueryPlan, the list of hosts from newQueryPlan is the candidate
coordinator list?

question 2 : Can i force the co-ordintor to hit a particular cassandra node
only. I used consistency LOCAL_ONE, but i guess, i doesn't guarantee that
data will be fetched from it.

Thanks
Siddharth Verma

Re: Return value of newQueryPlan

Posted by Eric Stevens <mi...@gmail.com>.
For question 2, you can't inform the coordinator that you want it to use a
certain node to fulfill the answer. It'll ask several and use the first
count which answer that satisfy the consistency constraints.

On Fri, Sep 2, 2016, 1:19 PM Siddharth Verma <ve...@snapdeal.com>
wrote:

> I am debugging an issue at our cluster. Trying to find the RCA of it,
> according to our application behavior.
> Used WhiteList policy(asked a question for the same, some time back) but,
> it was stated that it can not guarantee the desired behavior.
> Yes, I forgot to mention, i was referring to Java driver.
> I used DCAwareRoundRobin, TokenAware Policy for application flow.
> Would ask question1 on driver mailing list, If someone could help with
> question 2.
>
>
>
>
>
>
>
>
>
>
> On Fri, Sep 2, 2016 at 6:59 PM, Eric Stevens <mi...@gmail.com> wrote:
>
>> These sound like driver-side questions that might be better addressed to
>> your specific driver's mailing list.  But from the terminology I'd guess
>> you're using a DataStax driver, possibly the Java one.
>>
>> If so, you can look at WhiteListPolicy if you want to target specific
>> node(s).  However aside from testing specific scenarios (like performance
>> testing coordinated operations) it's unlikely that with a correctly tuned
>> LBP, you'll be able to do a better job of node selection than the driver is
>> able to.  DCAwareRoundRobin with a child policy of TokenAware will choose a
>> primary or replica node for any operations where it can know in advance.
>>
>> With RF == N like your setup, every piece of data is owned by every node,
>> so as long as your LBP is distributive, and outside of performance testing,
>> I can't see why you'd be needing to target specific nodes for anything.
>>
>> On Fri, Sep 2, 2016 at 1:59 AM Siddharth Verma <
>> verma.siddharth@snapdeal.com> wrote:
>>
>>> Hi,
>>> I have Dc1(3 nodes), Dc2(3 nodes),
>>> RF:3 on both Dcs
>>>
>>> question 1 : when I create my LoadBalancingPolicy, and override
>>> newQueryPlan, the list of hosts from newQueryPlan is the candidate
>>> coordinator list?
>>>
>>> question 2 : Can i force the co-ordintor to hit a particular cassandra
>>> node only. I used consistency LOCAL_ONE, but i guess, i doesn't guarantee
>>> that data will be fetched from it.
>>>
>>> Thanks
>>> Siddharth Verma
>>>
>>
>

Re: Return value of newQueryPlan

Posted by Siddharth Verma <ve...@snapdeal.com>.
I am debugging an issue at our cluster. Trying to find the RCA of it,
according to our application behavior.
Used WhiteList policy(asked a question for the same, some time back) but,
it was stated that it can not guarantee the desired behavior.
Yes, I forgot to mention, i was referring to Java driver.
I used DCAwareRoundRobin, TokenAware Policy for application flow.
Would ask question1 on driver mailing list, If someone could help with
question 2.









On Fri, Sep 2, 2016 at 6:59 PM, Eric Stevens <mi...@gmail.com> wrote:

> These sound like driver-side questions that might be better addressed to
> your specific driver's mailing list.  But from the terminology I'd guess
> you're using a DataStax driver, possibly the Java one.
>
> If so, you can look at WhiteListPolicy if you want to target specific
> node(s).  However aside from testing specific scenarios (like performance
> testing coordinated operations) it's unlikely that with a correctly tuned
> LBP, you'll be able to do a better job of node selection than the driver is
> able to.  DCAwareRoundRobin with a child policy of TokenAware will choose a
> primary or replica node for any operations where it can know in advance.
>
> With RF == N like your setup, every piece of data is owned by every node,
> so as long as your LBP is distributive, and outside of performance testing,
> I can't see why you'd be needing to target specific nodes for anything.
>
> On Fri, Sep 2, 2016 at 1:59 AM Siddharth Verma <
> verma.siddharth@snapdeal.com> wrote:
>
>> Hi,
>> I have Dc1(3 nodes), Dc2(3 nodes),
>> RF:3 on both Dcs
>>
>> question 1 : when I create my LoadBalancingPolicy, and override
>> newQueryPlan, the list of hosts from newQueryPlan is the candidate
>> coordinator list?
>>
>> question 2 : Can i force the co-ordintor to hit a particular cassandra
>> node only. I used consistency LOCAL_ONE, but i guess, i doesn't guarantee
>> that data will be fetched from it.
>>
>> Thanks
>> Siddharth Verma
>>
>

Re: Return value of newQueryPlan

Posted by Eric Stevens <mi...@gmail.com>.
These sound like driver-side questions that might be better addressed to
your specific driver's mailing list.  But from the terminology I'd guess
you're using a DataStax driver, possibly the Java one.

If so, you can look at WhiteListPolicy if you want to target specific
node(s).  However aside from testing specific scenarios (like performance
testing coordinated operations) it's unlikely that with a correctly tuned
LBP, you'll be able to do a better job of node selection than the driver is
able to.  DCAwareRoundRobin with a child policy of TokenAware will choose a
primary or replica node for any operations where it can know in advance.

With RF == N like your setup, every piece of data is owned by every node,
so as long as your LBP is distributive, and outside of performance testing,
I can't see why you'd be needing to target specific nodes for anything.

On Fri, Sep 2, 2016 at 1:59 AM Siddharth Verma <ve...@snapdeal.com>
wrote:

> Hi,
> I have Dc1(3 nodes), Dc2(3 nodes),
> RF:3 on both Dcs
>
> question 1 : when I create my LoadBalancingPolicy, and override
> newQueryPlan, the list of hosts from newQueryPlan is the candidate
> coordinator list?
>
> question 2 : Can i force the co-ordintor to hit a particular cassandra
> node only. I used consistency LOCAL_ONE, but i guess, i doesn't guarantee
> that data will be fetched from it.
>
> Thanks
> Siddharth Verma
>