mirror of https://github.com/apache/cassandra
Set -Dcassandra.storagedir for all tool shell scripts
Patch by Tyler Hobbs; review by Joshua McKenzie for CASSANDRA-7587
This commit is contained in:
parent
638c40e817
commit
83b3f13061
|
@ -12,6 +12,7 @@
|
||||||
v2 protocols (CASSANDRA-7617)
|
v2 protocols (CASSANDRA-7617)
|
||||||
* Fix tracing of range slices and secondary index lookups that are local
|
* Fix tracing of range slices and secondary index lookups that are local
|
||||||
to the coordinator (CASSANDRA-7599)
|
to the coordinator (CASSANDRA-7599)
|
||||||
|
* Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
|
||||||
Merged from 2.0:
|
Merged from 2.0:
|
||||||
* Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
|
* Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
|
||||||
* Always merge ranges owned by a single node (CASSANDRA-6930)
|
* Always merge ranges owned by a single node (CASSANDRA-6930)
|
||||||
|
|
|
@ -134,7 +134,8 @@ launch_service()
|
||||||
props="$3"
|
props="$3"
|
||||||
class="$4"
|
class="$4"
|
||||||
cassandra_parms="-Dlogback.configurationFile=logback.xml"
|
cassandra_parms="-Dlogback.configurationFile=logback.xml"
|
||||||
cassandra_parms="$cassandra_parms -Dcassandra.logdir=$CASSANDRA_HOME/logs -Dcassandra.storagedir=$CASSANDRA_HOME/data"
|
cassandra_parms="$cassandra_parms -Dcassandra.logdir=$CASSANDRA_HOME/logs"
|
||||||
|
cassandra_parms="$cassandra_parms -Dcassandra.storagedir=$cassandra_storagedir"
|
||||||
|
|
||||||
if [ "x$pidpath" != "x" ]; then
|
if [ "x$pidpath" != "x" ]; then
|
||||||
cassandra_parms="$cassandra_parms -Dcassandra-pidfile=$pidpath"
|
cassandra_parms="$cassandra_parms -Dcassandra-pidfile=$pidpath"
|
||||||
|
|
|
@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" -ea -cp "$CLASSPATH" -Xmx256M \
|
"$JAVA" -ea -cp "$CLASSPATH" -Xmx256M \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.cli.CliMain "$@"
|
org.apache.cassandra.cli.CliMain "$@"
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ esac
|
||||||
|
|
||||||
"$JAVA" -cp "$CLASSPATH" \
|
"$JAVA" -cp "$CLASSPATH" \
|
||||||
-Xmx32m \
|
-Xmx32m \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.Shuffle $@
|
org.apache.cassandra.tools.Shuffle $@
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,10 @@ cassandra_bin="$CASSANDRA_HOME/build/classes/main"
|
||||||
cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
|
cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
|
||||||
#cassandra_bin="$cassandra_home/build/cassandra.jar"
|
#cassandra_bin="$cassandra_home/build/cassandra.jar"
|
||||||
|
|
||||||
|
# the default location for commitlogs, sstables, and saved caches
|
||||||
|
# if not set in cassandra.yaml
|
||||||
|
cassandra_storagedir="$CASSANDRA_HOME/data"
|
||||||
|
|
||||||
# JAVA_HOME can optionally be set here
|
# JAVA_HOME can optionally be set here
|
||||||
#JAVA_HOME=/usr/local/jdk6
|
#JAVA_HOME=/usr/local/jdk6
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ esac
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" \
|
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" \
|
||||||
-Xmx32m \
|
-Xmx32m \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
-Dstorage-config="$CASSANDRA_CONF" \
|
-Dstorage-config="$CASSANDRA_CONF" \
|
||||||
org.apache.cassandra.tools.NodeTool -p $JMX_PORT $ARGS
|
org.apache.cassandra.tools.NodeTool -p $JMX_PORT $ARGS
|
||||||
|
|
|
@ -49,6 +49,7 @@ if [ $# -eq "0" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableExport "$@" -e
|
org.apache.cassandra.tools.SSTableExport "$@" -e
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx256M \
|
"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx256M \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.BulkLoader "$@"
|
org.apache.cassandra.tools.BulkLoader "$@"
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx$MAX_HEAP_SIZE \
|
"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx$MAX_HEAP_SIZE \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.StandaloneScrubber "$@"
|
org.apache.cassandra.tools.StandaloneScrubber "$@"
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \
|
$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.StandaloneUpgrader "$@"
|
org.apache.cassandra.tools.StandaloneUpgrader "$@"
|
||||||
|
|
||||||
|
|
|
@ -42,4 +42,6 @@ if [ "x$JAVA" = "x" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA -server -ea -cp $CLASSPATH org.apache.cassandra.stress.Stress $@
|
$JAVA -server -ea -cp "$CLASSPATH" \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
|
org.apache.cassandra.stress.Stress $@
|
||||||
|
|
|
@ -52,7 +52,9 @@ fi
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo "Starting $DESC: "
|
echo "Starting $DESC: "
|
||||||
$JAVA -server -cp $CLASSPATH org.apache.cassandra.stress.StressServer $@ 1> ./stressd.out.log 2> ./stressd.err.log &
|
$JAVA -server -cp $CLASSPATH \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
|
org.apache.cassandra.stress.StressServer $@ 1> ./stressd.out.log 2> ./stressd.err.log &
|
||||||
echo $! > ./stressd.pid
|
echo $! > ./stressd.pid
|
||||||
echo "done."
|
echo "done."
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -31,6 +31,10 @@ cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/stress"
|
||||||
cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
|
cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
|
||||||
#cassandra_bin="$cassandra_home/build/cassandra.jar"
|
#cassandra_bin="$cassandra_home/build/cassandra.jar"
|
||||||
|
|
||||||
|
# the default location for commitlogs, sstables, and saved caches
|
||||||
|
# if not set in cassandra.yaml
|
||||||
|
cassandra_storagedir="$CASSANDRA_HOME/data"
|
||||||
|
|
||||||
# JAVA_HOME can optionally be set here
|
# JAVA_HOME can optionally be set here
|
||||||
#JAVA_HOME=/usr/local/jdk6
|
#JAVA_HOME=/usr/local/jdk6
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableImport "$@"
|
org.apache.cassandra.tools.SSTableImport "$@"
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ if [ -z "$CLASSPATH" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableExport "$@"
|
org.apache.cassandra.tools.SSTableExport "$@"
|
||||||
|
|
||||||
|
|
|
@ -45,5 +45,6 @@ if [ -z $CLASSPATH ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA -cp $CLASSPATH -Dstorage-config=$CASSANDRA_CONF \
|
$JAVA -cp $CLASSPATH -Dstorage-config=$CASSANDRA_CONF \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableLevelResetter "$@"
|
org.apache.cassandra.tools.SSTableLevelResetter "$@"
|
||||||
|
|
|
@ -42,5 +42,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA -cp $CLASSPATH \
|
$JAVA -cp $CLASSPATH \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableMetadataViewer "$@"
|
org.apache.cassandra.tools.SSTableMetadataViewer "$@"
|
||||||
|
|
|
@ -42,5 +42,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA -cp $CLASSPATH \
|
$JAVA -cp $CLASSPATH \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.SSTableRepairedAtSetter "$@"
|
org.apache.cassandra.tools.SSTableRepairedAtSetter "$@"
|
||||||
|
|
|
@ -44,6 +44,7 @@ if [ -z $CLASSPATH ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
|
$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
|
||||||
|
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||||
-Dlogback.configurationFile=logback-tools.xml \
|
-Dlogback.configurationFile=logback-tools.xml \
|
||||||
org.apache.cassandra.tools.StandaloneSplitter "$@"
|
org.apache.cassandra.tools.StandaloneSplitter "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue