Cassandra Download Mac



The Udemy Getting Started With Apache Cassandra free download also includes 4 hours on-demand video, 6 articles, 22 downloadable resources, Full lifetime access, Access on mobile and TV, Assignments, Certificate of Completion and much more. However, if you’re using a Mac, I have had a lot of problems with the default system Python with the combination of Cassandra and Django. I would recommend reinstalling a new version of Python. If you don’t have the Python version that you want, downloads are available at.

Caution!

Version Number might change!! The versions of all softwares mentioned here, including Cassandra will change as newer versions are launched.

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

Install Python

Mac OS X has a copy of Python preinstalled, but this makes sure you get the newest version.

Two Ways to Install Cassandra

A] Using Homebrew (This led to connection refused and compilatoin errors during cassandra and cqlsh startups for me)B] Using Binaries

A] Using Homebrew

Install cql

To use cqlsh, the Cassandra query language shell, you need to install cql:

Install Cassandra

This installs Apache Cassandra:

Starting Cassandra

At the end of the install, brew will tell you about two ways to launch Cassandra. The first will launch it when the computer restarts, but this isn't recommended because you may not want to always run Cassandra. Instead use this command:

Or even easier:

and to stop:

On Mavericks, Homebrew failed to move the plist file into LaunchAgents. Which gives this error message:

To fix this just issue the following command. Then, try using the launchctl load command again:

Cassandra file locations

Properties: /usr/local/etc/cassandra
Logs: /usr/local/var/log/cassandra
Data: /usr/local/var/lib/cassandra/data

Finally cqlsh should connect to cassandra:

B] Using Binaries

Here, we use Apache Cassandra as well as it's own bundled cqlsh tool instead of an external one.We install Cassandra 3.5 as a standalone, single node cluster. A single node cluster is an easy way to get started learning Cassandra on your laptop.

These installation steps show how to install a local copy of Cassandra. The benefits of a local copy are that you do not need root or sudo to install Cassandra, updating versions is quick and easy, and you can control how/when to install updates.

Install the Oracle JDK

Ensure that you have at least Java JDK version 7 installed.

Install Cassandra

Create data directories for Cassandra

In this step we need to create several directories that are used by Cassandra. Each directory is used by the following configuration variable in conf/cassandra.yaml:

  • data_file_directories: ~/opt/cassandra/data/data
  • commitlog_directory: ~/opt/cassandra/data/commitlog
  • saved_caches_directory: ~/opt/cassandra/data/saved_caches

The logs directory is used by logback which is configured via the conf/logback.xml file.

Add Cassandra to your PATH

Update your PATH to include Cassandra.open -a TextEdit ~/.bash_profilePaste the following into your .bash_profile file.

Source your .bash_profile file.source .bash_profile

Start the Cassandra server

We’re going to run Cassandra in the foreground during development. Cassandra will output a lot of information to the terminal when we start the server. However, this information can be useful during development in case there is a problem with the server.cassandra -fPress Ctrl + C when you are ready to stop the server.

Cassandra Download Windows

Use Apache's bundled cqlsh

One can also use a symlink, but I created an alias in my .zshrc file to point to Cassandra's own cqlsh tool instead of an external one:

Now type and hit return:

You should see this:

Thanks!

References

A combination of below posts and my own workarounds was used to create this.

  • [Download Apache Cassandra] (http://cassandra.apache.org/download/) (This is different from the Datastax distro)
  • [Install Cassandra 2.1 on Mac OS X] (http://exponential.io/blog/2015/01/28/install-cassandra-2_1-on-mac-os-x/)
  • [This Gist] (https://gist.github.com/Micka33/89897e1490240a56c036)

The following document describes setting up Cassandra as a service. If you are interested in running Cassandra in userspace, check out the instructions in MacOS Developer Setup for React, React Native, Node and Cassandra Development.

Cassandra download mac app

Installation using home brew

In order to install Cassandra and cqlsh we will need to run:

In order to check the installation used

Download Cassandra Mac

Here is a typical result:

Starting Cassandra

In order to launch the Cassandra server use:

In order to set Cassandra to start upon login use:

Install Cassandra Mac

In order to verify that Cassandra is running use:

Cassandra Download Mac App

For more detailed explannation please refer to the excellent Christopher Batey's Blog Post.

Troubleshooting

Devcenter Cassandra Download Mac

By default the Cassandra data files are stored at:

Cassandra can also be started manually in terminal by running:

Some components by default are at:

The data by default is stored at:

Reducing the amount of memory used

Very often on a development machine it would be natural to reduce the amount of memory that Cassandra is using. While going below the minimum settings for memory is not advised for production instances, as far as development goes it is perfectly fine. In the example below the total amount of memory for Cassandra will be around 700-800 MB.

Cassandra Download Mac Download

In /usr/local/etc/cassandra/cassandra-env.sh modify: