You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Manu Chadha <ma...@hotmail.com> on 2020/07/26 17:07:49 UTC

How to specify a configuration in cass-operator for Cassandra.yaml

Hi

I am using cass-operator to run Cassandra in Kubernetes. I am also using ScalarDB to provide ACID support in Cassandra.

One pre-requisite for ScalarDB is to change the commitlog_sync to batch.

“Change commitlog_sync from periodic to batch in cassandra.yaml not to lose data when quorum of replica nodes go down”

What is the way to set this value in Cassandra using Cass-Operator?

I note that in example-cassdc-minimal.yaml, certain properties are defined which seem to be values for Cassandra.yaml.


authenticator: org.apache.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
role_manager: org.apache.cassandra.auth.CassandraRoleManager

I suppose the default value for commitlog_sync is periodic

commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000

Do I just add the commitlog_sync property in this list like the following to override the default value?


commitlog_sync: batch
commitlog_sync_batch_window_in_ms: 2

thanks
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10


RE: How to specify a configuration in cass-operator for Cassandra.yaml

Posted by Manu Chadha <ma...@hotmail.com>.
Thanks. I am making a personal project so stopping K8S isn’t an issue for me personally.

The reason I asked about stopping K8S is because I could run the `kubectl edit` command on the cass-operator...yaml file but not on example..yaml file. As the configuration is in the example...yaml file, I do not know if the changes will be applied on the running cluster.



$ kubectl edit -f example-cassdc-minimal.yaml

Error from server (NotFound): cassandradatacenters.cassandra.datastax.com "dc1" not found



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Erick Ramirez<ma...@datastax.com>
Sent: 27 July 2020 12:51
To: user@cassandra.apache.org<ma...@cassandra.apache.org>
Subject: Re: How to specify a configuration in cass-operator for Cassandra.yaml

Is it possible you don't have the k8s cluster running?

To answer your question, you can edit your k8s cluster configuration with the new settings and the cass-operator will apply the changes then it will perform a rolling restart of the pods for the changes to take effect. Cheers!


Re: How to specify a configuration in cass-operator for Cassandra.yaml

Posted by Erick Ramirez <er...@datastax.com>.
Is it possible you don't have the k8s cluster running?

To answer your question, you can edit your k8s cluster configuration with
the new settings and the cass-operator will apply the changes then it will
perform a rolling restart of the pods for the changes to take effect.
Cheers!

>

RE: How to specify a configuration in cass-operator for Cassandra.yaml

Posted by Manu Chadha <ma...@hotmail.com>.
Thanks. Would I need to delete and restart the Kubernetes cluster for the configurations to apply?

Sorry, new to K8S as well so not sure how to go about doing it. It seems I can edit the cass-oprator-manifests yaml but that is not the file which needs editing. When I edit the example-cassdc file then I am getting error


$ kubectl edit -f example-cassdc-minimal.yaml

Error from server (NotFound): cassandradatacenters.cassandra.datastax.com "dc1" not found

I can delete the cluster and start it again with new file but I’ll prefer to understand how to make changes when the system is running (if possible).

thanks
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Erick Ramirez<ma...@datastax.com>
Sent: 27 July 2020 03:00
To: user@cassandra.apache.org<ma...@cassandra.apache.org>
Subject: Re: How to specify a configuration in cass-operator for Cassandra.yaml

Yes, you're right -- you need to override the defaults by specifying the configuration in the operator yaml spec:

spec:
  ...
  config:
    cassandra-yaml:
      ...
      commitlog_sync: batch
      ...

Cheers!


On Mon, 27 Jul 2020 at 03:08, Manu Chadha <ma...@hotmail.com>> wrote:
Hi

I am using cass-operator to run Cassandra in Kubernetes. I am also using ScalarDB to provide ACID support in Cassandra.

One pre-requisite for ScalarDB is to change the commitlog_sync to batch.

“Change commitlog_sync from periodic to batch in cassandra.yaml not to lose data when quorum of replica nodes go down”

What is the way to set this value in Cassandra using Cass-Operator?

I note that in example-cassdc-minimal.yaml, certain properties are defined which seem to be values for Cassandra.yaml.


authenticator: org.apache.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
role_manager: org.apache.cassandra.auth.CassandraRoleManager

I suppose the default value for commitlog_sync is periodic

commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000

Do I just add the commitlog_sync property in this list like the following to override the default value?


commitlog_sync: batch
commitlog_sync_batch_window_in_ms: 2

thanks
Sent from Mail<https://urldefense.proofpoint.com/v2/url?u=https-3A__go.microsoft.com_fwlink_-3FLinkId-3D550986&d=DwMF-g&c=adz96Xi0w1RHqtPMowiL2g&r=DPfYm4e7OLSdVEGyWr82F_m1fTjoAHtX5mdHEINlrQw&m=_UAyEIS0iYVbcNS7XQbGxHBojQXEuwvA-4uhHB1x-Wo&s=ayrp92NOkuxRVDbxHBun-SmW8P1fgkRcPqcIqRnzNA4&e=> for Windows 10



Re: How to specify a configuration in cass-operator for Cassandra.yaml

Posted by Erick Ramirez <er...@datastax.com>.
Yes, you're right -- you need to override the defaults by specifying the
configuration in the operator yaml spec:

spec:
  ...

  config:

    cassandra-yaml:
      ...

      commitlog_sync: batch
      ...


Cheers!


On Mon, 27 Jul 2020 at 03:08, Manu Chadha <ma...@hotmail.com> wrote:

> Hi
>
>
>
> I am using cass-operator to run Cassandra in Kubernetes. I am also using
> ScalarDB to provide ACID support in Cassandra.
>
>
>
> One pre-requisite for ScalarDB is to change the commitlog_sync to batch.
>
>
>
> “Change commitlog_sync from periodic to batch in cassandra.yaml not to
> lose data when quorum of replica nodes go down”
>
>
>
> What is the way to set this value in Cassandra using Cass-Operator?
>
>
>
> I note that in example-cassdc-minimal.yaml, certain properties are defined
> which seem to be values for Cassandra.yaml.
>
>
>
> authenticator: org.apache.cassandra.auth.PasswordAuthenticator
> authorizer: org.apache.cassandra.auth.CassandraAuthorizer
> role_manager: org.apache.cassandra.auth.CassandraRoleManager
>
>
>
> I suppose the default value for commitlog_sync is periodic
>
>
>
> commitlog_sync: periodic
>
> commitlog_sync_period_in_ms: 10000
>
>
>
> Do I just add the commitlog_sync property in this list like the following
> to override the default value?
>
>
>
> commitlog_sync: batch
>
> commitlog_sync_batch_window_in_ms: 2
>
>
>
> thanks
>
> Sent from Mail
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__go.microsoft.com_fwlink_-3FLinkId-3D550986&d=DwMF-g&c=adz96Xi0w1RHqtPMowiL2g&r=DPfYm4e7OLSdVEGyWr82F_m1fTjoAHtX5mdHEINlrQw&m=_UAyEIS0iYVbcNS7XQbGxHBojQXEuwvA-4uhHB1x-Wo&s=ayrp92NOkuxRVDbxHBun-SmW8P1fgkRcPqcIqRnzNA4&e=>
> for Windows 10
>
>
>