||
Skip to end of metadata
Go to start of metadata

Follow the below steps to connect WSO2 BAM to an external Cassandra server/cluster.

  1. Do the following changes in the datasources with the type CASSANDRA in the <BAM_HOME>/repository/conf/datasources/bam_datasources.xml file to point to the external Cassandra server/cluster. (According to the default configurations, datasources need to be changed are WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE, WSO2BAM_CASSANDRA_DATASOURCE, WSO2BAM_UTIL_DATASOURCE, WSO2BAM_HIVE_INCREMENTAL_DATASOURCE)

    • Set the externalCassandra property to true within the configuration element as follows.
      <externalCassandra>true</externalCassandra>
    • Change the hosts, port, username, and password properties  accordingly.
  2. In the <BAM_HOME>/repository/conf/etc/hector-config.xml file set the externalCassandra property to true, and change the Cassandra host name and ports accordingly as shown below.

    <Nodes externalCassandra="true">host:port</Nodes>

  3. Change the following properties in the <BAM_HOME>/repository/conf/advanced/hive-site.xml file. 

    Change the below properties if you are using the incremental data processing and notification task features.

    <property>
    <name>hive.incremental.processing.intermediate.results.cassandra.hosts</name>
    <value>localhost:9160</value>
    </property>
    <property>
    <name>hive.incremental.processing.intermediate.results.cassandra.userName</name>
    <value>admin</value>
    </property>
    <property>
    <name>hive.incremental.processing.intermediate.results.cassandra.password</name>
    <value>admin</value>
    </property>
    <!-- Credentials for WSO2BAM_UTILS_KS -->
    <property>
    <name>notification.task.receiver.username</name>
    <value>admin</value>
    </property>
    <property>
    <name>notification.task.receiver.password</name>
    <value>admin</value>
    </property>
  4. To stop running Cassandra, which is bundled with BAM by default, execute the following command (on Linux) when starting the server: 
    sh wso2server.sh -Ddisable.cassandra.server.startup=true
  • No labels