Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 DAS supports Apache Cassandra for its underlying Data Access Layer (DAL). In order to use the Cassandra DAL component, a pre-configured installation of Apache Cassandra Cassandra (version 2.0.0 and upwards) is .x or 2.1.x version) is required. The Cassandra implementation for the DAS DAL contains both the implementations of Analytics Record Store and Analytics File System

The following sections describe both implementations of the Cassandra DAL component.

...

Info

The Cassandra datasource does not support pagination or record count. Note that this does not affect the functions of the APIM Analytics, ESB Analytics and IS Analytics dashboards because all the records in these dashboards are indexed, and the record counts are obtained via the Apache Lucene functionality.

Enabling the Cassandra datasource provider

In order to use Cassandra as the record store/file system, the Cassandra datasource provider should be enabled as follows.

...

PropertyDescription
<implementation>
The implementation class of the Analytics Record Store relevant for Cassandra, which is org.wso2.carbon.analytics.datasource.cassandra.CassandraAnalyticsRecordStore
<property name="datasource">
The Carbon datasource name of the CASSANDRA type that is used to find the associated Cassandra data source.

Configurations for the Analytics File System

To configure Cassandra as the underlying datasource implementation for the Analytics File System, specify the Cassandra configurations in the <DAS_HOME>repository/conf/analytics/analytics-config.xml file as shown in the example below.

Code Block
languagexml
<analytics-file-system>
    <implementation>org.wso2.carbon.analytics.datasource.cassandra.CassandraAnalyticsFileSystem</implementation>
    <properties>
        <!-- the data source name mentioned in data sources configuration -->
        <property name="datasource">WSO2_ANALYTICS_DS_CASSANDRA</property>
    </properties>
</analytics-file-system>

The properties of the above configuration are described below.

Property
Description
<implementation>
The implementation class of the Analytics File System relevant for Cassandra, which is org.wso2.carbon.analytics.datasource.cassandra.CassandraAnalyticsFileSystem.
<property name="datasource">
The Carbon datasource name of the CASSANDRA type that is used to find the associated Cassandra data source.

Configuring the datasources

Datasources to connect to the above underlying Cassandra implementations should be defined as described below. 

...

Change the configurations of the WSO2_ANALYTICS_EVENT_STORE_DB datasource in the <DAS_HOME>/repository/conf/datasources/analytics-datasources.xml file accordingly. For information on the datasource configurations, see Configuring a Cassandra Datasource.

Configuring the datasource for the Analytics File System datasource

Change the configurations of the WSO2_ANALYTICS_FS_DB datasource in the <DAS_HOME>/repository/conf/datasources/analytics-datasources.xml file accordingly. For information on the datasource configurations, see Configuring a Cassandra Datasource.