Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

WS02 MB with External Cassandra

DZone's Guide to

WS02 MB with External Cassandra

· Database Zone
Free Resource

Whether you work in SQL Server Management Studio or Visual Studio, Redgate tools integrate with your existing infrastructure, enabling you to align DevOps for your applications with DevOps for your SQL Server databases. Discover true Database DevOps, brought to you in partnership with Redgate.

Here are steps to follow for achieving the task

[1] Download cassandra from http://cassandra.apache.org/

[2] Unzip "apache-cassandra-1.2.0-bin.tar.gz" in "C:/" drive

[3] Cassandra configuration files can be found in <CARBON_HOME>/repository/conf/etc

[4] Edit \<apache-cassandra-dir>\confcassandra.yaml

Ensure that the paths exist for
data_file_directories
commitlog_directory
saved_caches_directory
 
Verify storage_port and rpc_port do not conflict on your PC. (By default, Cassandra uses 7000 for storage_port and 9160 for rpc_port)
The storage_port must be identical between Cassandra nodes in a cluster (Cassandra client applications use rpc_port to connect to Cassandra)

*Things on recommended to do.
Change the default cluster_name to avoid conflicts with existing clusters.
initial_token can be left blank, but setting to 0 is recommended if you are configuring your first node.

[5] Set Memory Capacity for Cassandra

image

By default, Cassandra allocates memory based on the physical memory capacity of your system. From editting "<apache-cassandra-dir>\conf\cassandra-env.sh" we can set the memory capacity for cassandra

Search for
#MAX_HEAP_SIZE="4G"
#HEAP_NEWSIZE="800M"

Currently we going to Cassandra test we run on smaller footprint for test drive, (Uncomment those lines)

MAX_HEAP_SIZE="128M"
HEAP_NEWSIZE="32M"

[6] Start cassandra from <apache-cassandra-Dir>\bin>cassandra.bat

image

Now Work on WSO2 MB

[7] Edit "<wso2mb-Dir>\repository\conf\advancedqpid-config.xml"

Uncomment "externalCassandraServerRequired" and make it "true"
<clustering>


        <enabled>false</enabled>
      
            <OnceInOrderSupportEnabled>false</OnceInOrderSupportEnabled>
                <externalCassandraServerRequired>true</externalCassandraServerRequired>

[8] Point WSO2 MB To Cassandra by editting $CARBON_HOME/repository/conf/advanced/qpid-virtualhosts.xml file to point to Cassandra server setup.
<virtualhost>
        <name>carbon</name>
        <carbon>
           <store>
                <class>org.wso2.andes.server.store.CassandraMessageStore</class>
                <username>admin</username>
                <password>admin</password>
                <cluster>ClusterOne</cluster>
                <idGenerator>org.wso2.andes.server.cluster.coordination.TimeStampBasedMessageIdGenerator</idGenerator>
                <connectionString>localhost:9160</connectionString>
            </store>
...
9] Start WSO2 MB \<wso2mb-dir>\bin>wso2server.bat

[10] You can see some logs in Cassandra console.

image

It’s easier than you think to extend DevOps practices to SQL Server with Redgate tools. Discover how to introduce true Database DevOps, brought to you in partnership with Redgate

Topics:

Published at DZone with permission of Madhuka Udantha, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}