Differences between revisions 16 and 17
Revision 16 as of 2011-07-14 23:18:04
Size: 2382
Editor: defmikekoh
Comment:
Revision 17 as of 2013-11-15 00:34:49
Size: 2443
Editor: GehrigKunz
Comment: statcounter
Deletions are marked like this. Additions are marked like this.
Line 64: Line 64:

{{https://c.statcounter.com/9397521/0/fe557aad/1/|stats}}

Startup of a Cassandra node is handled by the bin/cassandra shell script. Options used by bin/cassandra are taken from a shell snippet, bin/cassandra.in.sh by default.

You can override the options script to use with CASSANDRA_INCLUDE. E.g.,

$ cp bin/cassandra.in.sh /tmp/new.in.sh
$ vi /tmp/new.in.sh
$ CASSANDRA_INCLUDE=/tmp/new.in.sh bin/cassandra

Among other things, the defaults in bin/cassandra.in.sh include a maximum heap size (-Xmx) of 1GB, which you'll almost certainly want to considering tailoring for your environment. The port to access Cassandra's JmxInterface is also configured here through the com.sun.management.jmxremote.port property and defaults to 8080 (7199 starting in v0.8.0-beta1).

Additionally, the script recognizes a number of command line arguments, invoking the script with the -h option prints a brief summary of them.

$ bin/cassandra -h
Usage: bin/cassandra [-f] [-h] [-p pidfile]
$

The -f argument will prevent Cassandra from daemonizing and force it to run in the foreground. The -p <pidfile> argument causes the process ID to be written to the named file (useful for shutdown ala kill $(cat pidfile)).

Note: The Debian package makes use of an init script and jsvc to start and stop Cassandra. Startup options should be configured in /etc/default/cassandra (not /usr/share/cassandra/cassandra.in.sh) on Debian systems.

See also Operations

( startup file for Cassandra on Mac OS X 10.6.x )

$ cat /System/Library/LaunchDaemons/org.apache.cassandra.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.apache.cassandra</string>
        <key>RunAtLoad</key>
        <true/>
        <key>Disabled</key>
        <false/>
        <key>GroupName</key>
        <string>wheel</string>
        <key>UserName</key>
        <string>root</string>
        <key>ProgramArguments</key>
        <array>
                <string>/opt/local/bin/cassandra</string>
                <string>-f</string>
        </array>
  <key>KeepAlive</key>
  <true/>
  <key>StandardErrorPath</key>
  <string>/opt/local/var/log/cassandra/stderr.log</string>
  <key>StandardOutPath</key>
  <string>/opt/local/var/log/cassandra/stdout.log</string>
</dict>
</plist>

stats

RunningCassandra (last edited 2013-11-15 00:34:49 by GehrigKunz)