NoSQL Zone is brought to you in partnership with:

Brian has 10+ years of experience as a technology leader and architect in a wide variety of settings from early startups to Fortune 500 companies. With experience delivering SaaS solutions in business intelligence, artificial intelligence and VoIP, his current focus is big data and analytics. Brian leads the Virgil project on Apache Extras, which is a services layer built on Cassandra that provides REST, Map/Reduce, Search and Distributed Processing capabilities. Brian is a DZone MVB and is not an employee of DZone and has posted 61 posts at DZone. You can read more from them at their website. View Full User Profile

Building CQL Java Driver on Mac OSX

12.18.2012
| 2553 views |
  • submit to reddit

 I wanted to play around with the new CQL java driver.
https://github.com/datastax/java-driver

After git cloning, I had tests failing because it relied on Cassandra Cluster Manager (ccm), found here:
https://github.com/pcmanus/ccm

I quickly grabbed that and ran:


sudo ./setup.py install
But ran into this error when I tried to run:
bone@zen$ ccm
Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 5, in 
    from ccmlib import common
  File "/Library/Python/2.7/site-packages/ccmlib/common.py", line 5, in 
    import os, common, shutil, re, sys, cluster, node, socket
  File "/Library/Python/2.7/site-packages/ccmlib/cluster.py", line 3, in 
    import common, yaml, os, subprocess, shutil, repository, time, re
ImportError: No module named yaml

After a couple tries installing via easy_install, I had to resort to installing libYAML from source:
http://pyyaml.org/wiki/LibYAML

Once, I did that, then the easy install worked with:
sudo easy_install pyyaml
Then, ccm was happy, which allowed me to build CQL java-driver.

bone@zen:~/git/boneill42/java-driver$ mvn clean install 
[INFO] Cassandra Java Driver ............................. SUCCESS [0.496s]
[INFO] Cassandra Java Driver - Core ...................... SUCCESS [4.718s]
[INFO] Cassandra Java Driver Examples .................... SUCCESS [0.008s]
[INFO] Cassandra Java Driver Examples - Stress ........... SUCCESS [4.965s]
[INFO] ------------------------------------------------------------------------
FWIW.
Published at DZone with permission of Brian O' Neill, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)