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

Getting Started with Cassandra Development in Eclipse

DZone's Guide to

Getting Started with Cassandra Development in Eclipse

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

I finally got back around to getting my environment setup for Cassandra development.  I ran into one snag, and couple things have changed so I figured I would capture the experience here.

Fork and Build

First, fork and clone from here:
https://github.com/apache/cassandra

Then run,

$> ant generate-eclipse-files 

Eclipse Setup & Run Configuration

Then from Eclipse,
File -> Import -> Existing Projects into Workspace...

Navigate to your cassandra folder, and import the project.

Now, configure the run with:

Run Configurations -> Java Application -> Right-Click -> New

Main class:
org.apache.cassandra.service.CassandraDaemon

Then use the following VM arguments:

-Dcassandra.config=file:///Users/bone/git/boneill42/cassandra/conf/cassandra.yaml -Dcassandra.storagedir=/tmp/cassandra -Dcassandra-foreground=yes

The gotcha: Make sure you are running jdk8_40 and NOT jdk8_40_ea!!!

If you are still running early access (_ea), you may see:

java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent

Logging

Next, it's useful to configure logging.  Cassandra changed from log4j to logback.  You can find the logback configuration in test/conf (logback-test.xml).

If you want to see DEBUG and/or INFO messages, edit this file and change the STDOUT element to:

<appendername="STDOUT"target="System.out"class="ch.qos.logback.core.ConsoleAppender">
...
     <level>INFO</level>
...
</appender>

After that, you are good to go.  Click run, and you should have a live Cassandra in Eclipse

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:
java ,nosql ,tips and tricks

Published at DZone with permission of Brian O' Neill, 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 }}