Skip to content
Browse files

allow solandra to co-exist with a cassandra package install

  • Loading branch information...
1 parent d81d678 commit 8c74f3800916a9e769c826ddbad36be8c5bec1bf @tjake committed Jun 23, 2011
View
4 build.xml
@@ -244,10 +244,10 @@
<copy todir="${app}/conf" overwrite="false">
<fileset dir="${resources}/solr" includes="solrconfig.xml,schema.xml,*.txt,jetty.xml,jetty-logging.xml" />
<fileset dir="${resources}" includes="solandra.properties" />
- <fileset dir="${resources}/cassandra" includes="cassandra-env.sh,solandra.properties,cassandra.yaml,log4j-tools.properties,log4j-server.properties" />
+ <fileset dir="${resources}/cassandra" includes="solandra-env.sh,solandra.properties,cassandra.yaml,log4j-tools.properties,log4j-server.properties" />
</copy>
<copy todir="${app}/bin" overwrite="false">
- <fileset dir="${resources}/cassandra" includes="solandra,cassandra-cli,nodetool,cassandra.in.sh,solandra.bat" />
+ <fileset dir="${resources}/cassandra" includes="solandra,cassandra-cli,nodetool,solandra.in.sh,solandra.bat" />
</copy>
<chmod dir="${app}/bin" perm="755" includes="solandra,cassandra-cli,nodetool" />
<echo>Solandra successfully built</echo>
View
16 resources/cassandra/cassandra-cli
@@ -16,19 +16,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
- for include in /usr/share/cassandra/cassandra.in.sh \
- /usr/local/share/cassandra/cassandra.in.sh \
- /opt/cassandra/cassandra.in.sh \
- ~/.cassandra.in.sh \
- `dirname $0`/cassandra.in.sh; do
+if [ "x$SOLANDRA_INCLUDE" = "x" ]; then
+ for include in /usr/share/solandra/solandra.in.sh \
+ /usr/local/share/solandra/solandra.in.sh \
+ /opt/solandra/solandra.in.sh \
+ ~/.solandra.in.sh \
+ `dirname $0`/solandra.in.sh; do
if [ -r $include ]; then
. $include
break
fi
done
-elif [ -r $CASSANDRA_INCLUDE ]; then
- . $CASSANDRA_INCLUDE
+elif [ -r $SOLANDRA_INCLUDE ]; then
+ . $SOLANDRA_INCLUDE
fi
# Use JAVA_HOME if set, otherwise look for java in PATH
View
22 resources/cassandra/nodetool
@@ -21,18 +21,18 @@ if [ `basename $0` = 'nodeprobe' ]; then
echo "***************************************************************" >&2
fi
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
- for include in /usr/share/cassandra/cassandra.in.sh \
- /usr/local/share/cassandra/cassandra.in.sh \
- /opt/cassandra/cassandra.in.sh \
- `dirname $0`/cassandra.in.sh; do
+if [ "x$SOLANDRA_INCLUDE" = "x" ]; then
+ for include in /usr/share/solandra/solandra.in.sh \
+ /usr/local/share/solandra/solandra.in.sh \
+ /opt/solandra/solandra.in.sh \
+ `dirname $0`/solandra.in.sh; do
if [ -r $include ]; then
. $include
break
fi
done
-elif [ -r $CASSANDRA_INCLUDE ]; then
- . $CASSANDRA_INCLUDE
+elif [ -r $SOLANDRA_INCLUDE ]; then
+ . $SOLANDRA_INCLUDE
fi
# Use JAVA_HOME if set, otherwise look for java in PATH
@@ -42,20 +42,20 @@ else
JAVA=`which java`
fi
-if [ -z $CASSANDRA_CONF -o -z $CLASSPATH ]; then
- echo "You must set the CASSANDRA_CONF and CLASSPATH vars" >&2
+if [ -z $SOLANDRA_CONF -o -z $CLASSPATH ]; then
+ echo "You must set the SOLANDRA_CONF and CLASSPATH vars" >&2
exit 1
fi
# Special-case path variables.
case "`uname`" in
CYGWIN*)
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
- CASSANDRA_CONF=`cygpath -p -w "$CASSANDRA_CONF"`
+ SOLANDRA_CONF=`cygpath -p -w "$SOLANDRA_CONF"`
;;
esac
-$JAVA -cp $CLASSPATH -Dstorage-config=$CASSANDRA_CONF \
+$JAVA -cp $CLASSPATH -Dstorage-config=$SOLANDRA_CONF \
-Dlog4j.configuration=log4j-tools.properties \
org.apache.cassandra.tools.NodeCmd $@
View
26 resources/cassandra/solandra
@@ -62,21 +62,21 @@
# environment variables.
# If an include wasn't specified in the environment, then search for one...
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
+if [ "x$SOLANDRA_INCLUDE" = "x" ]; then
# Locations (in order) to use when searching for an include file.
- for include in /usr/share/cassandra/cassandra.in.sh \
- /usr/local/share/cassandra/cassandra.in.sh \
- /opt/cassandra/cassandra.in.sh \
- ~/.cassandra.in.sh \
- `dirname $0`/cassandra.in.sh; do
+ for include in /usr/share/solandra/solandra.in.sh \
+ /usr/local/share/solandra/solandra.in.sh \
+ /opt/solandra/solandra.in.sh \
+ ~/.solandra.in.sh \
+ `dirname $0`/solandra.in.sh; do
if [ -r $include ]; then
. $include
break
fi
done
# ...otherwise, source the specified include.
-elif [ -r $CASSANDRA_INCLUDE ]; then
- . $CASSANDRA_INCLUDE
+elif [ -r $SOLANDRA_INCLUDE ]; then
+ . $SOLANDRA_INCLUDE
fi
# Use JAVA_HOME if set, otherwise look for java in PATH
@@ -86,20 +86,20 @@ else
JAVA=`which java`
fi
-if [ -z $CASSANDRA_CONF -o -z $CLASSPATH ]; then
- echo "You must set the CASSANDRA_CONF and CLASSPATH vars" >&2
+if [ -z $SOLANDRA_CONF -o -z $CLASSPATH ]; then
+ echo "You must set the SOLANDRA_CONF and CLASSPATH vars" >&2
exit 1
fi
-if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
- . "$CASSANDRA_CONF/cassandra-env.sh"
+if [ -f "$SOLANDRA_CONF/solandra-env.sh" ]; then
+ . "$SOLANDRA_CONF/solandra-env.sh"
fi
# Special-case path variables.
case "`uname`" in
CYGWIN*)
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
- CASSANDRA_CONF=`cygpath -p -w "$CASSANDRA_CONF"`
+ SOLANDRA_CONF=`cygpath -p -w "$SOLANDRA_CONF"`
;;
esac
View
2 resources/cassandra/cassandra-env.sh → resources/cassandra/solandra-env.sh
@@ -95,7 +95,7 @@ JVM_OPTS="$JVM_OPTS -ea"
check_openjdk=$(java -version 2>&1 | awk '{if (NR == 2) {print $1}}')
if [ "$check_openjdk" != "OpenJDK" ]
then
- JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.2.jar"
+ JVM_OPTS="$JVM_OPTS -javaagent:$SOLANDRA_HOME/lib/jamm-0.2.2.jar"
fi
# enable thread priorities, primarily so we can give periodic tasks
View
12 resources/cassandra/cassandra.in.sh → resources/cassandra/solandra.in.sh
@@ -14,26 +14,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-if [ "x$CASSANDRA_HOME" = "x" ]; then
- CASSANDRA_HOME=`dirname $0`/..
+if [ "x$SOLANDRA_HOME" = "x" ]; then
+ SOLANDRA_HOME=`dirname $0`/..
fi
# The directory where Cassandra's configs live (required)
-if [ "x$CASSANDRA_CONF" = "x" ]; then
- CASSANDRA_CONF=$CASSANDRA_HOME/conf
+if [ "x$SOLANDRA_CONF" = "x" ]; then
+ SOLANDRA_CONF=$SOLANDRA_HOME/conf
fi
# This can be the path to a jar file, or a directory containing the
# compiled classes. NOTE: This isn't needed by the startup script,
# it's just used here in constructing the classpath.
-cassandra_bin=$CASSANDRA_HOME/build/classes
+cassandra_bin=$SOLANDRA_HOME/build/classes
#cassandra_bin=$cassandra_home/build/cassandra.jar
# JAVA_HOME can optionally be set here
#JAVA_HOME=/usr/local/jdk6
# The java classpath (required)
-CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
+CLASSPATH=$SOLANDRA_CONF:$cassandra_bin
for jar in lib/*.jar; do
CLASSPATH=$CLASSPATH:$jar

0 comments on commit 8c74f38

Please sign in to comment.
Something went wrong with that request. Please try again.