Contact Us 1-800-596-4880

Apache Cassandra Connector 5.0 Additional Configuration Information

Configure Anypoint Connector for Apache Cassandra (Apache Cassandra Connector) to work in your environment with basic authentication and DataSense functionality.

Enable Apache Cassandra Authentication

By default, accessing the Apache Cassandra database does not require credentials. You need to configure Apache Cassandra to enable authentication. The Apache Cassandra Connector configuration must match the Apache Cassandra configuration for basic authentication.

After enabling authentication, run the cqlsh command from the Apache Cassandra installation home directory as shown in this example, which uses default credentials with username cassandra and password cassandra:

bin/cqlsh localhost -u cassandra -p cassandra
Connected to Test Cluster at localhost:9042.
[cqlsh 5.0.1 | Cassandra 5.0 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
  1. After installing Apache Cassandra, open the conf\cassandra.yaml file for editing.

  2. Optionally, change the value of AllowAllAuthenticator to PasswordAuthenticator.

  3. Restart Apache Cassandra.

  4. In a separate terminal tab, verify that Apache Cassandra is running:

    bin/nodetool status

Configure the Local Datacenter

The DataStax Java Driver 4.x load-balancing policy requires a local datacenter when contact points don’t share one datacenter.

  1. In the Apache Cassandra Connector global element, open the Advanced Settings tab.

  2. In Local Datacenter, enter the datacenter name, for example datacenter1.

  3. Test the connection.

You can omit Local Datacenter for single-DC clusters because the driver can infer the datacenter from the contact points.

Configure the Request Timeout

The DataStax Java Driver 4.x default request timeout is 2 seconds. The connector default of 12000 milliseconds keeps the 12-second deadline from version 4.1.

  1. In the Apache Cassandra Connector global element, open the Advanced Settings tab.

  2. In Request Timeout (ms), enter the timeout in milliseconds, or leave the default 12000.

Configure the Protocol Version

Don’t select native protocol V1 or V2. Those values fail at application initialization with an InitialisationException. Leave Protocol Version unset so the driver can negotiate, including native protocol V5 on Apache Cassandra 5.x. You can also select V3 or V4.

POJO Configuration

The connector exposes multiple operations in the Apache Cassandra Connector Reference. The following operations accept some POJOs as input parameters, which are needed for the DataSense functionality:

  • addNewColumn

  • changeColumnType

  • createKeyspace

  • createTable

  • deleteColumnsValue

  • deleteRows

  • dropColumn

  • dropKeyspace

  • dropTable

  • executeCQLQuery

  • getTableNamesFromKeyspace

  • renameColumn

  • select

  • update