Pages

Sunday, October 13, 2013

Step by step guide to setup Cassandra and cqlsh in windows

Today I started to play with Cassandra by installing it in my windows machine. Though the instructions in the cassandra download site is clear and precise, I faced few issues in setting it up. So I thought of sharing the information for fellow developers.

Step 1: Download Cassandra from http://cassandra.apache.org/download/. The current latest version is 2.0.1. It is a tar.gz file. Download and extract it in some location in your machine. For example C:\3\apache-cassandra-2.0.1

Step 2: You can start cassandra server by calling cassandra.bat available with in the bin directory. It should startup the Cassandra server (Note: You should have Java home environment variable set to start the server)

Step 3: Now to interact with Cassandra database you need the cqlsh interactive command tool. Here is the small twist. There is none in the cassandra download package. So there is a work around we should do before adding records to the database.

3a) Download python from the below location http://www.python.org/download/releases/. Be careful here. Though the python latest version is 3.x, there is problem with installing thrift library with the latest version of Python. So download and install 2.7 version of Python.
3b) Install Thrift library by downloading it from the below location http://pypi.python.org/pypi/thrift. Install thrift module by executing the below command python setup.py install

If the python version not supported you may get this error . Revert back to version 2.7.x version of Python and then it should run like a charm

Step 4 : Now you should install cql module for python which is available with in cassandra download.  The setup.py file is available in the below location C:\3\apache-cassandra-2.0.1\pylib. Again run the command python setup.py install. 

Step 5:  Now you can run the command python cqlsh localhost 9160 and it will start the cql interactive command.  Here you can start issuing the commands llike keyspace creation etc.

CREATE KEYSPACE mykeyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };

CREATE TABLE users (user_id int PRIMARY KEY,  fname text,  lname text);

INSERT INTO users (user_id,  fname, lname) VALUES (1745, 'john', 'smith');
INSERT INTO users (user_id,  fname, lname)  VALUES (1744, 'john', 'doe');
INSERT INTO users (user_id,  fname, lname)  VALUES (1746, 'john', 'smith');


33 comments:

  1. Windows is fine. Is someone iterestet to use it on linux look up here: http://alexander.holbreich.org/2013/10/installing-apache-cassandra/

    ReplyDelete
  2. I get a connection error could not connect to localhost:9160

    ReplyDelete
  3. Okay, the problem was solved. I could not start cassandra due to the bloody UAC. Restarted it with admin rights, and it was able to connect to 9160 and I was able to make keyspaces using cmd. Thanks!

    ReplyDelete
  4. unable to execute CQL script :unconfigured columnfamily

    ReplyDelete
  5. getting error _main_ module not found in cqlshlib

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. play critical ops game on android or iOS its just like counter strike

    ReplyDelete
  8. Recognize your Cassandra Database Technical Issue through Cassandra Technical Support
    With Cassandra database you will get high openness and adjustment to inner disappointment database condition in light of the fact that through our Cassandra Database Consulting and Support you will get complete the process of checking and seeing of your estimations like: arrange, CPU, suspension and garbage amassing time. When you pick our Cognegic's Cassandra Database Support or Apache Cassandra Support then you will never stand up to any kind of specific issue since we 100% ensures the best game plan.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  9. Quickly solve if Cassandra Service not starting through Cassandra Technical Support
    Have you ever try to start your Cassandra database but do not see any response? This is most common question which is asked by numerous of users. To resolve this problem you have to downloading the binary (‘bin’) distribution instead from the download page. Otherwise you can take the best help through Cognegic’s Cassandra Database Consulting or Cassandra Database Support.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  10. Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me on Cassandra.

    ReplyDelete
  11. Step by step instructions to Solve Configuration Error in Cassandra 3.10 with Cassandra Technical Support
    The Cassandra Database is intended to meet the particular requests of your business and with our versatile arrangement we keep your business protected and secure. We generally up your whole business through our Apache Cassandra Support and Cassandra Customer Service. Here clients will likewise get Cassandra Database Consulting and Support. From establishment to setup our specialized specialists gives you best help.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  12. How to Solve Cassandra Installation Issue through Cassandra Technical Support
    Well! If you do not understand the Cassandra installation process and find any complexity during installation process then here one platform who deals with these kinds of issues and make you trouble free and that platform is Cognegic’s Apache Cassandra Support or Cassandra Customer Support. To get the help of our Cassandra Database Consulting and Support you have to simply dial our toll-free number and get connected with our technical experts to fetch out the best support.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  13. he most effective method to secure your Cassandra Database with Cassandra Technical Support |Cognegic|
    The Cassandra dependably accompanies security includes so nobody can undoubtedly hack your Cassandra database and can't access in your database without your non-attendants. A portion of its unfathomable highlights are: SSL encryption, validation et cetera. In any case, if lamentably your Cassandra database is hacked by somebody and confronting issue to recuperate your vital information at that point contact to Apache Cassandra Support or Cassandra Customer Service.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete
  14. The Apache Cassandra is a free and open-source database which recommends you can on an astoundingly fundamental level alter, change and utilize it. It is versatile in nature since it enough changes the information association and handles extensive measure of information when ascended out of some excellent databases. Regardless, in the event that you're Cassandra's information has been lost then what will you do? How to recuperate them? Accreditation, the most ideal approach to manage directs understand this issue is Cassandra Database Support or Apache Cassandra Support. At Cognegic you will get most dazzling help and sensibly get back your information with Cassandra Database Consulting and Support.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com

    ReplyDelete
  15. You can now get an amount of benefits with QuickBooks. Proper analyses are done first. The experts find out from the nature related to trouble. You're going to get an entire knowledge as well. The support specialist will identify the difficulty. The deep real cause is likely to be found out. Every one of the clients are extremely satisfied with us. We've got many businessmen who burn up our QuickBooks Payroll Support Phone Number. You can easily come and find the ideal service for your needs.

    ReplyDelete
  16. However, the QuickBooks Technical Support Phone Number can help you in troubleshooting the all kind of errors by giving a whole and simple stepwise guide. After understanding your problems, our great technical executives supply the best possible support in rectifying them.

    ReplyDelete
  17. The Support for QuickBooks Payroll team at site name is held accountable for removing the errors that pop up in this desirable software. We look after not letting any issue can be found in between your work and trouble you in undergoing your tasks.

    ReplyDelete
  18. It is terribly frustrating, to say the smallest amount when you face one such error. Errors hamper the work pace however additionally disturb your mental peace. QuickBooks 247 Support Phone Number QuickBooks specialists take most of the errors terribly seriously and they will fix all the errors.

    ReplyDelete
  19. Quickbooks Support Telephone Number
    QuickBooks has completely transformed the way people used to operate their business earlier. To get familiar with it, you should welcome this positive change.Supervisors at QuickBooks Support Phone Number have trained all of their executives to combat the issues in this software. Utilizing the introduction of modern tools and approaches to QuickBooks, you can test new techniques to carry out various business activities. Basically, this has automated several tasks that have been being done manually for a long time. There are lots of versions of QuickBooks and each one has a unique features.

    ReplyDelete
  20. QuickBooks Enterprise offers useful features which makes it more reliable along with efficient. You can easily run your online business smoothly with great ease and flexibility utilizing this specialized accounting software. This is the way it can save you your valued time & money using intuit enterprise support. If you're a QuickBooks user and facing any issue regarding this software then turn to the QuickBooks Enterprise Tech Support Number.

    ReplyDelete
  21. Why you ought to choose Quickbooks Support PhoneNumber The principal intent behind QuickBooks Support number would be to give you the technical help 24*7 so as with order in order to prevent wasting your productivity hours. It is completely a toll-free QuickBooks client Service variety that you won’t pay any call charges. Of course, QuickBooks is certainly one among the list of awesome package in the company world. The accounting the main many companies varies based on this package. You will find so many fields it covers like creating invoices, managing taxes, managing payroll etc. However exceptions are typical over, sometimes it creates the negative aspects and user wants QuickBooks Support Phone Number client Service help.

    ReplyDelete
  22. Everyone knows that for the annoying issues in QuickBooks Enterprise software, you will need an intelligent companion who can enable you to get rid of the errors instantly. As a result of this we at QuickBooks Enterprise Technical Support gives you the essential reliable solution of the every single QuickBooks Enterprise errors.

    ReplyDelete
  23. We site name, are leading tech support team provider for your entire QuickBooks Support Phone Number related issues. Either it is day or night, we offer hassle-free tech support team for QuickBooks and its own associated software in minimum possible time.

    ReplyDelete
  24. All of us is oftentimes ready to allow you to when using the best support services you could feasibly ever experience.Stuck in a few basic issue? Will likely not think twice to provide us a call at QuickBooks Support Phone Number Since number of issues are enormous on occasion,

    ReplyDelete
  25. At Intuit QuickBooks Support Number we work with the principle of consumer satisfaction and our effort is directed to give a transparent and customer delight experience. A timely resolution into the minimum span is the targets of QuickBooks Toll-Free Pro-Advisors.

    ReplyDelete
  26. Would you like to Update QuickBooks Pro? We now have was able to allow it to be simple for you at Support For QuickBooks It is almost always safer to concentrate on updated version as it helps you incorporate all the latest features in your software and assists you undergo your task uninterrupted. You will discover simple steps that you need to follow. Firstly, click on file and choose the chance Open & Restore. Now open the file and then click on Update Company File for New Version. And from now on maybe you are all set.

    ReplyDelete
  27. In today’s scenario individuals have got really busy inside their lives and work. They want to grow and learn as many new things as they possibly can. This drive has initiated a feeling of awareness amongst individuals and thus they find approaches to invent alternatives for daily tasks. If you are a small business owner, you need to be aware of the fact that Payroll calculation does demands large amount of time and man force. Then came into existence QuickBooks Payroll and QuickBooks Technical Support Number team.

    ReplyDelete
  28. Invoice Creation Using QuickBooks Support Phone Number software, the user can simply create invoices in QuickBooks and invoice tax payments with the filing invoice tax returns of the organizations. So get proper and complete guidance on how to create many types of invoices by connecting to our amazing QuickBooks customer services.

    ReplyDelete

  29. The moment you find errors or any other issues when making use of your QuickBooks Payroll Support Number software, you don’t have to panic by the thought of your business getting negatively impacted.

    ReplyDelete
  30. Quickbooks is one of such applications which have powerful features and efficient tools for the medium-sized business for User. If you would like to learn How To Troubleshoot Quickbooks Error 9999, you can continue reading this blog.

    ReplyDelete
  31. Hopefully, you understand the concept well by know and know how to take care of this error. He steps will help to fix the problem efficiently. Alternatively, if you are not able to move forward, it is best to speak to technical expert at our QuickBooks error support number. If you would like to learn How To Troubleshoot Quickbooks Error 9999, you can continue reading this blog.

    ReplyDelete
  32. Hello,
    Your blog has a lot of valuable information . Thanks for your time on putting these all together.. Really helpful blog..I just wanted to share information about
    power bi training

    ReplyDelete

 
Blogger Templates