Cassandra
The Cassandra datasource supports Cassandra server versions 1.2.x and upwards, and works with Cassandra Query Language version 3 (CQL3).
You can create your Cassandra datasource as you create the data service: Follow the steps from 1 to 3 in creating a data service using various data sources. When you get to the Add New Data Source screen, select Cassandra as the data source type. The Cassandra-specific options will be available for editing.
See the following links for setting up Cassandra as a data store:
- Get familiar with the basics of Cassandra, including the prerequisites for using Cassandra, by going through the following: https://wiki.apache.org/cassandra/GettingStarted.
- Get familiar with using the Cassandra CLI, by going through the following: http://wiki.apache.org/cassandra/CassandraCli.
- Functionality of the underlying connector used for the Cassandra datasource: https://www.datastax.com/documentation/developer/java-driver/2.0/index.html.
- Also, note that Cassandra requires the most stable version of Java 7 or 8 you can deploy; preferably the Oracle/Sun JVM.
The following describes the properties supported by the Cassandra datasource.
Data Source Property | Description |
---|---|
Cassandra Servers* | Comma separated list of host names of Cassandra servers. |
Keyspace | The default keyspace used by the Cassandra session. |
Port | The port of Cassandra servers. |
Cluster Name | The Cassandra cluster name. |
Compression | Compression used in communication. |
User Name | The authenticating user's username. |
Password | The authenticating user's password. |
Load Balancing Policy | The client load balancing policy on how calls should be made to the provided servers. |
Enable JMX Reporting | Enable JMX statistics of the connector. |
Enable Metrics | Enable metrics of the connector. |
Local Core Connections Per Host | Connection pooling: Local core connections per server host. |
Remote Core Connections Per Host | Connection pooling: Remote core connections per server host. |
Local Max.Connections Per Host | Connection pooling: Maximum local connections per server host. |
Remote Max.Connections Per Host | Connection pooling: Remote max connections per server host. |
Local Max.Simultaneous Requests Per Connection Threshold | Connection pooling: Number of simultaneous requests on all local connections to a host. If the number of requests exceeds this number, new connections are created. |
Remote Max.Simultaneous Requests Per Connection Threshold | Connection pooling: Number of simultaneous requests on all remote connections to a host. If the number of requests exceeds this number, new connections are created. |
Local Min.Simultaneous Requests Per Connection Threshold | Connection pooling: Number of simultaneous requests on a connection. If the number of requests is less than this number, the remote connections in excess are reclaimed. |
Remote Min.Simultaneous Requests Per Connection Threshold | Connection pooling: Number of simultaneous requests on a connection. If the number of requests is less than this number, the remote connections in excess are reclaimed. |
Protocol Version | The native protocol version to use. By default, it auto connects. "2" for Cassandra versions 2.0 and upwards, and "1" for Cassandra version 1.2.x. |
Consistency Level | The consistency level used for queries. |
Fetch Size | Fetch size used by queries. |
Serial Consistency Level | The serial consistency level used for queries. |
Reconnection Policy | The reconnection policy used for the cluster. |
Constant Reconnection Policy Delay | If "ConstantReconnectionPolicy" is used for Reconnection Policy, this represents the constant wait time between reconnection attempts in milliseconds. |
Exponential Reconnection Policy Base Delay | If "ExponentialReconnectionPolicy" is used for Reconnection Policy, this represent the base delay in milliseconds. |
Exponential Reconnection Policy Max. Delay | If "ExponentialReconnectionPolicy" is used for Reconnection Policy, this represent the maximum delay in milliseconds. |
Retry Policy | Configured the retry policy in this cluster. |
Connection Timeout | The socket connection timeout in milliseconds. |
Keep Alive | Set if socket keeps alive. |
Read Timeout | Set per host socket read timeout in milliseconds. |
Receive Buffer Size | The socket receive buffer size. |
Send Buffer Size | The socket send buffer size. |
Reuse Address | The socket re-use address. |
So Linger | The socket linger on value. |
TCP no Delay | Set socket TCP to no delay. |
Enable SSL | Enable SSL. |
Enable OData | From DSS 3.5 onwards, OData protocol version 4 (OASIS standards) is supported, which mainly provides support for CRUD operations. You can easily expose databases as an odata service by selecting this check box. Currently, Odata service feature support is available for RDBMS datasources and Cassandra datasources. If you have enabled Odata for your data service, you can complete the data service creation process. That is, you are not required to define queries or operations for the service. This Odata service will now be accessible from the following endpoints:
|
Disable Native Batch Requests | Disables native Cassandra batch requests, and reverts to emulated batch requests. |
* Mandatory fields.
To write a query to this datasource, see Step 3: Writing Data Service Queries.
Queries based on Cassandra datasources, currently do not support named parameters or array type parameters.
A sample based on the Cassandra datasource can be found here: Cassandra Sample.
You can find a sample demonstration of an OData service here .