Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB1059EE8 for ; Mon, 20 Feb 2012 11:13:21 +0000 (UTC) Received: (qmail 33876 invoked by uid 500); 20 Feb 2012 11:13:21 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 33842 invoked by uid 500); 20 Feb 2012 11:13:21 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 33831 invoked by uid 500); 20 Feb 2012 11:13:21 -0000 Delivered-To: apmail-incubator-cassandra-commits@incubator.apache.org Received: (qmail 33827 invoked by uid 99); 20 Feb 2012 11:13:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 11:13:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 11:13:14 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 5C6C0DAC for ; Mon, 20 Feb 2012 11:12:53 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Mon, 20 Feb 2012 11:12:53 -0000 Message-ID: <20120220111253.89808.61454@eos.apache.org> Subject: =?utf-8?q?=5BCassandra_Wiki=5D_Update_of_=22VersionsAndBuilds=22_by_MakiW?= =?utf-8?q?atanabe?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for= change notification. The "VersionsAndBuilds" page has been changed by MakiWatanabe: http://wiki.apache.org/cassandra/VersionsAndBuilds?action=3Ddiff&rev1=3D62&= rev2=3D63 Comment: Initial version - ## page was copied from GettingStarted + ## Spawned from GettingStarted - =3D=3D Cassandra documentation from DataStax =3D=3D - !DataStax's latest [[http://www.datastax.com/docs/1.0/index|Cassandra doc= umentation]] covers topics from installation to troubleshooting. Documenta= tion for older releases is also available. = + =3D Cassandra versions & Builds =3D - =3D=3D Introduction =3D=3D - This document aims to provide a few easy to follow steps to take the firs= t-time user from installation, to an operational Cassandra cluster. - = - =3D=3D Step 0: Prerequisites and connection to the community =3D=3D - Cassandra requires the most stable version of Java 1.6 you can deploy. F= or Sun's jvm, this means at least u19; u21 is better. Cassandra also runs = on the IBM jvm, and should run on jrockit as well. - = - The best way to ensure you always have up to date information on the proj= ect, releases, stability, bugs, and features is to subscribe to the users m= ailing list ([[mailto:user-subscribe@cassandra.apache.org|subscription requ= ired]]) and participate in the #cassandra channel on [[http://webchat.freen= ode.net/?channels=3D#cassandra|IRC]]. - = - <> - = - =3D=3D Step 1: Picking a version =3D=3D At any given time, there are a number of different versions available to = install: = - =3D=3D=3D Stable releases =3D=3D=3D + =3D=3D Stable releases =3D=3D Cassandra stable releases are well tested and reasonably free of serious = problems, (or at least the problems are known and well documented). If you = are setting up a production environment, a stable release is what you want. = Download links for the latest stable release can always be found on the [= [http://cassandra.apache.org/download|website]]. = + Users of Debian or Debian-based derivatives can install the latest stable= release in package form, see DebianPackaging for details. + = + Users of RPM-based distributions can get packages from [[http://www.datas= tax.com/blog/announcing-rpms-cassandra|Datastax]. + = - =3D=3D=3D Betas and release candidates =3D=3D=3D + =3D=3D Betas and release candidates =3D=3D Betas are prototype releases considered ready for user testing, and relea= se candidates have the potential to become the next stable release. These r= eleases represent the state-of-the-art so are often the best place to start= , and since APIs and on-disk storage formats can change between major versi= ons this can also save you from an upgrade. The testing and feedback is als= o highly appreciated. = - =3D=3D=3D Nightly builds =3D=3D=3D + =3D=3D Nightly builds =3D=3D Nightly builds represent the current state of development as of the time = of the build. They contain all of the previous day's new features, fixes, a= nd newly introduced bugs. The only guarantee they come with is that they su= ccessfully build and the unit tests pass. Nightly builds are a handy way of= testing recent changes, or accessing the latest features and fixes not fou= nd in beta or release candidates, but there is some risk of them being bugg= y. = The most recent nightly build can be downloaded [[http://hudson.zones.apa= che.org/hudson/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/|= here]]. = - =3D=3D=3D Git =3D=3D=3D + =3D=3D Git =3D=3D Cassandra's git repository is where all active development takes place. A= nyone interested in contributing to the project should use a checkout of tr= unk. If you do run from git, be sure to update frequently, and subscribe to= the [[mailto:dev-subscribe@cassandra.apache.org?subject=3Dsubscribe|mailin= g list]] to stay abreast of the latest developments. = Instructions for checking out the source code can always be found on the = [[http://cassandra.apache.org/download|website]]. = - <> - = - =3D=3D Step 2: Running a single node =3D=3D - Cassandra is meant to run on a cluster of nodes, but will run equally wel= l on a single machine. This is a handy way of getting familiar with the sof= tware while avoiding the complexities of a larger system. - = - Since there isn't currently an installation method per se, the easiest so= lution is to simply run Cassandra from an extracted archive<><> or Git checkout (see: [[#picking_a= _version|Picking a version]]). Also, unless you've downloaded a binary dist= ribution, you'll need to compile the software by invoking `ant` from the to= p-level directory. - = - The distribution's sample configuration `conf/cassandra.yaml` contains re= asonable defaults for single node operation, but you will need to make sure= that the paths exist for `data_file_directories`, `commitlog_directory`, a= nd `saved_caches_directory`. Additionally, take a minute now to look over t= he logging configuration in `conf/log4j.properties` and make sure that dire= ctories exist for the configured log file(s) as well. - = - Some people running OS X have trouble getting Java 6 to work. If you've k= ept up with Apple's updates, Java 6 should already be installed (it comes i= n Mac OS X 10.5 Update 1). Unfortunately, Apple does not default to using i= t. What you have to do is change your `JAVA_HOME` environment setting to `/= System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home` and add `/Sys= tem/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin` to the begin= ning of your `PATH`. - = - And now for the moment of truth, start up Cassandra by invoking `bin/cass= andra -f` from the command line<>. The service shoul= d start in the foreground and log gratuitously to standard-out. Assuming yo= u don't see messages with scary words like "error", or "fatal", or anything= that looks like a Java stack trace, then chances are you've succeeded. To = be certain though, take some time to try out the examples in CassandraCli b= efore moving on (note: if you are using Cassandra 0.7.0, you'll need to loa= d the demo Keyspaces first using JMX, see http://wiki.apache.org/cassandra/= FAQ#no_keyspaces, or even better follow testing instructions on the README = of the installation folder). Also, if you run into problems, Don't Panic, c= almly proceed to [[#if_something_goes_wrong|If Something Goes Wrong]]. - = - Users of recent Linux distributions and Mac OS X Snow Leopard should be a= ble to start up Cassandra simply by untarring and invoking `bin/cassandra -= f` with root privileges. Snow Leopard ships with Java 1.6.0 and does not re= quire changing the `JAVA_HOME` environment variable or adding any directory= to your `PATH`. On Linux just make sure you have a working Java JDK packag= e installed such as the `openjdk-6-jdk` on Ubuntu Lucid Lynx. - = - =3D=3D Step 3: Running a cluster =3D=3D - Setting up a Cassandra cluster is ''almost'' as simple as repeating [[#ru= nning_a_single_node|Step 2]] for each node in your cluster. There are a few= minor exceptions though. - = - Cassandra nodes exchange information about one another using a mechanism = called Gossip, but to get the ball rolling a newly started node needs to kn= ow of at least one other, this is called a `Seed`. It's customary to pick a= small number of relatively stable nodes to serve as your seeds, but there = is no hard-and-fast rule here. Do make sure that each seed also knows of at= least one other, remember, the goal is to avoid a chicken-and-egg scenario= and provide an avenue for all nodes in the cluster to discover one another. - = - In addition to seeds, you'll also need to configure the IP interface to l= isten on for Gossip and Thrift, (`ListenAddress` and `ThriftAddress` respec= tively). Use a `ListenAddress` that will be reachable from the `ListenAddre= ss` used on all other nodes, and a `ThriftAddress` that will be accessible = to clients. - = - Once everything is configured and the nodes are running, use the `bin/nod= etool` utility to verify a properly connected cluster. For example: - = - {{{ - eevans@achilles:~$ bin/nodetool -host 98.139.220.175 ring - Address Status Load Range = Ring - 1690489759985626602697426996243780= 98572 - 98.139.220.175 Up 0.02 GB 1418369682437731005180817338576468= 9249 |<--| - 98.139.169.152 Up 0.4 GB 2835686391007820528861455061931401= 7621 | ^ - 98.139.220.176 Up 0.13 GB 4253082806862507222886393388928923= 8187 |-->| - }}} - Advanced cluster management is described in [[Operations]]. - = - If you don't yet have access to hardware for a Cassandra cluster you can = try it out on EC2 with CloudConfig. - = - =3D=3D Step 4: Write your application =3D=3D - The recommended way to communicate with Cassandra in your application is = to use a [[http://wiki.apache.org/cassandra/ClientOptions|higher-level clie= nt]]. These provide programming language specific API:s for talking to Cass= andra in a variety of languages. The details will vary depending on program= ming language and client, but in general using a higher-level client will m= ean that you have to write less code and get several features for free that= you would otherwise have to write yourself. - = - That said, it is useful to know that Cassandra uses [[http://thrift.apach= e.org/|Thrift]] for its external client-facing API. Cassandra's main API/RP= C/Thrift port is 9160. Thrift supports a [[http://svn.apache.org/viewvc/thr= ift/trunk/lib/|wide variety of languages]] so you can code your application= to use Thrift directly if you so chose (but again we recommend a [[http://= wiki.apache.org/cassandra/ClientOptions|high-level client]] where available= ). - = - Important note: If you intend to use thrift directly, you need to install= a version of thrift that matches the revision that your version of Cassand= ra uses. InstallThrift - = - Cassandra's main API/RPC/Thrift port is 9160. It is a common mistake for = API clients to connect to the JMX port instead. - = - Checking out a demo application like [[http://github.com/twissandra/twiss= andra|Twissandra]] (Python + Django) will also be useful. - = - <> - = - =3D=3D If Something Goes Wrong =3D=3D - If you followed the steps in this guide and failed to get up and running,= we'd love to help. Here's what we need. - = - 1. If you are running anything other than a stable release, please upgra= de first and see if you can still reproduce the problem. - 1. Make sure debug logging is enabled (hint: `conf/log4j.properties`) an= d save a copy of the output. - 1. Search the [[http://news.gmane.org/gmane.comp.db.cassandra.user|maili= ng list archive]] and see if anyone has reported a similar problem and what= , if any resolution they received. - 1. Ditto for the [[https://issues.apache.org/jira/browse/CASSANDRA|bug t= racking system]]. - 1. See if you can put together a unit test, script, or application that = reproduces the problem. - = - Finally, post a message with all relevant details to the list ([[mailto:u= ser-subscribe@cassandra.apache.org|subscription required]]), or hop onto [[= http://webchat.freenode.net/?channels=3D#cassandra|IRC]] (network irc.freen= ode.net, channel #cassandra) and let us know. - = - <
> <
> - = - ---- - '''Footnotes:''' -=20