Thanks for the info Alex!

I read
https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsSwitchSnitch.html
but still have a few questions:

Our clusters are comprised of 2 DCs with no rack configuration, RF=3 on
each DC.
In this scenario, if I wish to seamlessly change the snitch with 0
downtime, do I need to add the cassandra-rackdc.properties file, change the
snitch in cassandra.yaml and restart one by one?
Will this method cause problems?

Thanks!


On Wed, Feb 27, 2019 at 12:18 PM Alexander Dejanovski <
a...@thelastpickle.com> wrote:

> You'll be fine with the SimpleSnitch (which shouldn't be used either
> because it doesn't allow a cluster to use multiple datacenters or racks).
> Just change the IP and upon restart the node will redeclare itself in the
> ring. If your node is a seed node, you'll need to update your seed list
> across the cluster.
>
> On Wed, Feb 27, 2019 at 10:52 AM wxn...@zjqunshuo.com <
> wxn...@zjqunshuo.com> wrote:
>
>> I'm using SimpleSnitch. I have only one DC. Is there any problem to
>> follow the below procedure?
>>
>> -Simon
>>
>> *From:* Alexander Dejanovski <a...@thelastpickle.com>
>> *Date:* 2019-02-27 16:07
>> *To:* user <user@cassandra.apache.org>
>> *Subject:* Re: Question on changing node IP address
>>
>> I confirm what Oleksandr said.
>> Just stop Cassandra, change the IP, and restart Cassandra.
>> If you're using the GossipingPropertyFileSnitch, the node will redeclare
>> its new IP through Gossip and that's it.
>> If you're using the PropertyFileSnitch, well... you shouldn't as it's a
>> rather dangerous and tedious snitch to use. But if you are, it'll require
>> to change the file containing all the IP addresses across the cluster.
>>
>> I've been changing IPs on a whole cluster back in 2.1 this way and it
>> went through seamlessly.
>>
>> Cheers,
>>
>> On Wed, Feb 27, 2019 at 8:54 AM Oleksandr Shulgin <
>> oleksandr.shul...@zalando.de> wrote:
>>
>>> On Wed, Feb 27, 2019 at 4:15 AM wxn...@zjqunshuo.com <
>>> wxn...@zjqunshuo.com> wrote:
>>>
>>>> >After restart with the new address the server will notice it and log a
>>>> warning, but it will keep token ownership as long as it keeps the old host
>>>> id (meaning it must use the same data directory as before restart).
>>>>
>>>> Based on my understanding, token range is binded to host id. As long as
>>>> host id doesn't change, everything is ok. Besides data directory, any other
>>>> thing can lead to host id change? And how host id is caculated? For
>>>> example, if I upgrade Cassandra binary to a new version, after restart,
>>>> will host id change?
>>>>
>>>
>>> I believe host id is calculated once the new node is initialized and
>>> never changes afterwards, even through major upgrades.  It is stored in
>>> system keyspace in data directory, and is stable across restarts.
>>>
>>> --
>>> Alex
>>>
>>> --
>> -----------------
>> Alexander Dejanovski
>> France
>> @alexanderdeja
>>
>> Consultant
>> Apache Cassandra Consulting
>> http://www.thelastpickle.com
>>
>> --
> -----------------
> Alexander Dejanovski
> France
> @alexanderdeja
>
> Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>

Reply via email to