diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-29 07:18:10 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-29 07:18:10 +0000 |
commit | ebe20a9e0d0df1fe24d7c6259dad9e10b733a4d4 (patch) | |
tree | 518dc15059e009282af1509c63926b7a21576a65 /databases/cassandra2/files | |
parent | 7561227a140dae858d47dc644831506ef1d73793 (diff) | |
download | ports-ebe20a9e0d0df1fe24d7c6259dad9e10b733a4d4.tar.gz ports-ebe20a9e0d0df1fe24d7c6259dad9e10b733a4d4.zip |
New port: databases/cassandra2
Cassandra is a highly scalable, eventually consistent, distributed,
structured key-value store. Cassandra brings together the distributed
systems technologies from Dynamo and the data model from Google's
BigTable. Like Dynamo, Cassandra is eventually consistent. Like
BigTable, Cassandra provides a ColumnFamily-based data model richer
than typical key/value systems.
Cassandra was open sourced by Facebook in 2008, where it was designed
by one of the authors of Amazon's Dynamo. In a lot of ways you can
think of Cassandra as Dynamo 2.0. Cassandra is in production use at
Facebook but is still under heavy development.
WWW: http://cassandra.apache.org/
The previous version is still available as databases/cassandra.
PR: 186056
Submitted by: admins@perceptyx.com
Notes
Notes:
svn path=/head/; revision=366464
Diffstat (limited to 'databases/cassandra2/files')
-rw-r--r-- | databases/cassandra2/files/cassandra.in | 67 | ||||
-rw-r--r-- | databases/cassandra2/files/patch-env | 7 | ||||
-rw-r--r-- | databases/cassandra2/files/repaircluster.in | 12 |
3 files changed, 86 insertions, 0 deletions
diff --git a/databases/cassandra2/files/cassandra.in b/databases/cassandra2/files/cassandra.in new file mode 100644 index 000000000000..37ac7468752f --- /dev/null +++ b/databases/cassandra2/files/cassandra.in @@ -0,0 +1,67 @@ +#!/bin/sh +# +# Copyright (c) 2011, Radim Kolar +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + +# PROVIDE: cassandra +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# $FreeBSD: databases/cassandra/files/cassandra.in 319455 2013-05-31 01:32:45Z bdrewery $ + +. /etc/rc.subr + +name="cassandra" +rcvar=cassandra_enable +load_rc_config $name + +cassandra_enable=${cassandra_enable:-"NO"} +cassandra_vmargs=${cassandra_vmargs:-""} +cassandra_memory=${cassandra_memory:-"1000m"} +cassandra_newgen=${cassandra_newgen:-"300m"} + +command=%%DATADIR%%/bin/cassandra +command_args="-p /var/run/cassandra.pid >/dev/null" +stop_precmd="${name}_prestop" +sig_stop="KILL" + +procname="%%LOCALBASE%%/openjdk7/bin/java" +pidfile=/var/run/cassandra.pid + +export MAX_HEAP_SIZE="$cassandra_memory" +export HEAP_NEWSIZE="$cassandra_newgen" +export PATH=$PATH:%%LOCALBASE%%/bin +export CASSANDRA_HOME=%%DATADIR%% +export JVM_OPTS=-javaagent:%%DATADIR%%/lib/jamm-0.2.5.jar +export JVM_OVERRIDE_OPTS="$cassandra_vmargs" + +export JAVA_VENDOR=openjdk +export JAVA_VERSION=1.7 + +cassandra_prestop() { + $CASSANDRA_HOME/bin/nodetool -h localhost drain + return 0 +} + +run_rc_command "$1" diff --git a/databases/cassandra2/files/patch-env b/databases/cassandra2/files/patch-env new file mode 100644 index 000000000000..caacf9cbfe48 --- /dev/null +++ b/databases/cassandra2/files/patch-env @@ -0,0 +1,7 @@ +--- conf/cassandra-env.sh.orig 2011-11-04 11:47:16.000000000 +0100 ++++ conf/cassandra-env.sh 2011-11-09 16:50:50.124144710 +0100 +@@ -192,3 +192,4 @@ + JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT" + JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false" + JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false" ++JVM_OPTS="$JVM_OPTS $JVM_OVERRIDE_OPTS" diff --git a/databases/cassandra2/files/repaircluster.in b/databases/cassandra2/files/repaircluster.in new file mode 100644 index 000000000000..678cfa4f4a4d --- /dev/null +++ b/databases/cassandra2/files/repaircluster.in @@ -0,0 +1,12 @@ +#! /bin/sh +set -e +PATH=/bin:/usr/bin:%%LOCALBASE%%/bin:%%PREFIX%%/bin +NODETOOL=%%DATADIR%%/bin/nodetool + +if test $# -eq 0; then + echo "$0 <any node in cluster> [keyspace]" + exit 1; +fi +for i in `$NODETOOL -h $1 ring | cut -d ' ' -f 1 | grep -e '^[0-9]'`; do + $NODETOOL -h $i repair $2 +done |