Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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 (version 2.0.0 and upwards) 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.

The Cassandra datasource does not support pagination or record count.

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.

  1. Open the <DAS_HOME>/repository/conf/datasources/analytics-datasources.xml file.  The Cassandra datasource provider is commented out by default as shown below.

    <!--<provider>org.wso2.carbon.datasource.reader.cassandra.CassandraDataSourceReader</provider>-->
  2. Uncomment the Cassandra datasource provider as shown below.

    <provider>org.wso2.carbon.datasource.reader.cassandra.CassandraDataSourceReader</provider>

Configurations for the Analytics Record Store

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

<analytics-record-store name="EVENT_STORE">
    <implementation>org.wso2.carbon.analytics.datasource.cassandra.CassandraAnalyticsRecordStore</implementation>
    <properties>
        <!-- the data source name mentioned in data sources configuration -->
        <property name="datasource">WSO2_ANALYTICS_DS_CASSANDRA</property>
    </properties>
</analytics-record-store>

The properties of the above configuration are described below.

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.

<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. 

Configuring the datasource for the Analytics Record Store 

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.

  • No labels