Versions Compared

Key

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

The WSO2BAM_CASSANDRA_EVENT_SOURCEDATASOURCE, which is defined in the <PRODUCT_HOME>/repository/conf/bam-datasources.xml file is used for pointing to the Cassandra node/cluster, from where the data for the analyzer will be sourced.

...

Info

Replace the  url username and  password  settings with your custom values and also the other values accordingly in the  bam-datasources.xml file as shown in the below example.

Code Block
languagexml
   <datasource>
            <name>WSO2BAM_CASSANDRA_EVENT_SOURCE<DATASOURCE</name>
            <description>The datasource used for Cassandra data</description>
            <definition type="RDBMSCASSANDRA">
                <configuration>
                     <url>jdbc:cassandra://localhost:9160/EVENT_KS</url><hosts>localhost</hosts>
                     <username>admin<<port>9160</username>port>
                     <password>admin<<username>admin</password>username>
                    <password>admin</password>
<dataSourceProps>                    <keySpace>EVENT_KS</keySpace>
       <property name="externalCassandra">false</property>            <externalCassandra>false</externalCassandra>
               <property name="replicationFactor">1</property>    <replicationFactor>1</replicationFactor>
                       <property name="strategyClass">org<strategyClass>org.apache.cassandra.locator.SimpleStrategy</property>strategyClass>
                    <readConsistencyLevel>QUORUM</readConsistencyLevel>
      <property name="readConsistencyLevel">QUORUM</property>             <writeConsistencyLevel>QUORUM</writeConsistencyLevel>
              <property name="writeConsistencyLevel">QUORUM</property>     <gcGraceInterval>864000</gcGraceInterval>
                </dataSourceProps>
 configuration>
             </configuration>definition>
        </definition>datasource>The </datasource>

...

datasource configuration options are as follows:

...

  
  • url - The URL of the database.
  • username  - The name of the database user.

  • password - The password of the database user.
  • dataSourceProps  - The properties of the datasource. The following properties can be defined:

    PropertyDescription
    externalCassandra
    Whether an external Cassandra server or the Cassandra server which is bundled with BAM is used.
    replicationFactor
    The total number of nodes on which the data will be replicated across the Cassandra cluster.
    strategyClass
    The strategy class used in arranging the structure of the Cassandra nodes.
    readConsistencyLevel
    The number of replicas which must respond to a read request before returning data to the client application.
    writeConsistencyLevel
    The number of replicas on which the write must succeed before returning an acknowledgment to the client application.