cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject git commit: Set -Dcassandra.storagedir for all tool shell scripts
Date Fri, 25 Jul 2014 19:27:03 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 638c40e81 -> 83b3f1306


Set -Dcassandra.storagedir for all tool shell scripts

Patch by Tyler Hobbs; review by Joshua McKenzie for CASSANDRA-7587


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83b3f130
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83b3f130
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83b3f130

Branch: refs/heads/cassandra-2.1.0
Commit: 83b3f1306140fec625c405fa263878eeefe1a728
Parents: 638c40e
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Fri Jul 25 14:26:18 2014 -0500
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Fri Jul 25 14:26:18 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                  | 1 +
 bin/cassandra                | 3 ++-
 bin/cassandra-cli            | 1 +
 bin/cassandra-shuffle        | 1 +
 bin/cassandra.in.sh          | 4 ++++
 bin/nodetool                 | 1 +
 bin/sstablekeys              | 1 +
 bin/sstableloader            | 1 +
 bin/sstablescrub             | 1 +
 bin/sstableupgrade           | 1 +
 tools/bin/cassandra-stress   | 4 +++-
 tools/bin/cassandra-stressd  | 4 +++-
 tools/bin/cassandra.in.sh    | 4 ++++
 tools/bin/json2sstable       | 1 +
 tools/bin/sstable2json       | 1 +
 tools/bin/sstablelevelreset  | 1 +
 tools/bin/sstablemetadata    | 1 +
 tools/bin/sstablerepairedset | 1 +
 tools/bin/sstablesplit       | 1 +
 19 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4e0284b..d6dcfc9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
    v2 protocols (CASSANDRA-7617)
  * Fix tracing of range slices and secondary index lookups that are local
    to the coordinator (CASSANDRA-7599)
+ * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 Merged from 2.0:
  * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
  * Always merge ranges owned by a single node (CASSANDRA-6930)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/cassandra
----------------------------------------------------------------------
diff --git a/bin/cassandra b/bin/cassandra
index 47c6c88..53a529e 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -134,7 +134,8 @@ launch_service()
     props="$3"
     class="$4"
     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
         cassandra_parms="$cassandra_parms -Dcassandra-pidfile=$pidpath"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/cassandra-cli
----------------------------------------------------------------------
diff --git a/bin/cassandra-cli b/bin/cassandra-cli
index 80069d4..a2696da 100755
--- a/bin/cassandra-cli
+++ b/bin/cassandra-cli
@@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
 fi
 
 "$JAVA" -ea -cp "$CLASSPATH" -Xmx256M \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.cli.CliMain "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/cassandra-shuffle
----------------------------------------------------------------------
diff --git a/bin/cassandra-shuffle b/bin/cassandra-shuffle
index 31975d4..10a409d 100755
--- a/bin/cassandra-shuffle
+++ b/bin/cassandra-shuffle
@@ -51,6 +51,7 @@ esac
 
 "$JAVA" -cp "$CLASSPATH" \
       -Xmx32m \
+      -Dcassandra.storagedir="$cassandra_storagedir" \
       -Dlogback.configurationFile=logback-tools.xml \
       org.apache.cassandra.tools.Shuffle $@
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/bin/cassandra.in.sh b/bin/cassandra.in.sh
index 1212418..50e6eaf 100644
--- a/bin/cassandra.in.sh
+++ b/bin/cassandra.in.sh
@@ -30,6 +30,10 @@ cassandra_bin="$CASSANDRA_HOME/build/classes/main"
 cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
 #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=/usr/local/jdk6
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/nodetool
----------------------------------------------------------------------
diff --git a/bin/nodetool b/bin/nodetool
index 36a7016..9c6b7bd 100755
--- a/bin/nodetool
+++ b/bin/nodetool
@@ -88,6 +88,7 @@ esac
 
 "$JAVA" $JAVA_AGENT -cp "$CLASSPATH" \
       -Xmx32m \
+      -Dcassandra.storagedir="$cassandra_storagedir" \
       -Dlogback.configurationFile=logback-tools.xml \
       -Dstorage-config="$CASSANDRA_CONF" \
       org.apache.cassandra.tools.NodeTool -p $JMX_PORT $ARGS

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/sstablekeys
----------------------------------------------------------------------
diff --git a/bin/sstablekeys b/bin/sstablekeys
index 34f3d1b..8308b88 100755
--- a/bin/sstablekeys
+++ b/bin/sstablekeys
@@ -49,6 +49,7 @@ if [ $# -eq "0" ]; then
 fi
 
 "$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableExport "$@" -e
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/sstableloader
----------------------------------------------------------------------
diff --git a/bin/sstableloader b/bin/sstableloader
index cd4598e..2ee4f51 100755
--- a/bin/sstableloader
+++ b/bin/sstableloader
@@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
 fi
 
 "$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx256M \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.BulkLoader "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/sstablescrub
----------------------------------------------------------------------
diff --git a/bin/sstablescrub b/bin/sstablescrub
index 3b7ca6c..a5f9a67 100755
--- a/bin/sstablescrub
+++ b/bin/sstablescrub
@@ -48,6 +48,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
 fi
 
 "$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx$MAX_HEAP_SIZE \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.StandaloneScrubber "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/bin/sstableupgrade
----------------------------------------------------------------------
diff --git a/bin/sstableupgrade b/bin/sstableupgrade
index bca52c3..6248ac8 100755
--- a/bin/sstableupgrade
+++ b/bin/sstableupgrade
@@ -48,6 +48,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
 fi
 
 $JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.StandaloneUpgrader "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/cassandra-stress
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra-stress b/tools/bin/cassandra-stress
index c855cf5..53440ac 100755
--- a/tools/bin/cassandra-stress
+++ b/tools/bin/cassandra-stress
@@ -42,4 +42,6 @@ if [ "x$JAVA" = "x" ]; then
     exit 1
 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 $@

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/cassandra-stressd
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra-stressd b/tools/bin/cassandra-stressd
index 9110c5d..6532707 100755
--- a/tools/bin/cassandra-stressd
+++ b/tools/bin/cassandra-stressd
@@ -52,7 +52,9 @@ fi
 case "$1" in
   start)
     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 "done."
   ;;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra.in.sh b/tools/bin/cassandra.in.sh
index 4b81514..004f394 100644
--- a/tools/bin/cassandra.in.sh
+++ b/tools/bin/cassandra.in.sh
@@ -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_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=/usr/local/jdk6
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/json2sstable
----------------------------------------------------------------------
diff --git a/tools/bin/json2sstable b/tools/bin/json2sstable
index fff559f..bb10b51 100755
--- a/tools/bin/json2sstable
+++ b/tools/bin/json2sstable
@@ -44,6 +44,7 @@ if [ -z "$CLASSPATH" ]; then
 fi
 
 "$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableImport "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/sstable2json
----------------------------------------------------------------------
diff --git a/tools/bin/sstable2json b/tools/bin/sstable2json
index bcd346c..a7882bf 100755
--- a/tools/bin/sstable2json
+++ b/tools/bin/sstable2json
@@ -45,6 +45,7 @@ if [ -z "$CLASSPATH" ]; then
 fi
 
 "$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableExport "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/sstablelevelreset
----------------------------------------------------------------------
diff --git a/tools/bin/sstablelevelreset b/tools/bin/sstablelevelreset
index f6b3b1e..497d604 100755
--- a/tools/bin/sstablelevelreset
+++ b/tools/bin/sstablelevelreset
@@ -45,5 +45,6 @@ if [ -z $CLASSPATH ]; then
 fi
 
 $JAVA -cp $CLASSPATH  -Dstorage-config=$CASSANDRA_CONF \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableLevelResetter "$@"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/sstablemetadata
----------------------------------------------------------------------
diff --git a/tools/bin/sstablemetadata b/tools/bin/sstablemetadata
index d9d8d6f..f7ce141 100755
--- a/tools/bin/sstablemetadata
+++ b/tools/bin/sstablemetadata
@@ -42,5 +42,6 @@ else
 fi
 
 $JAVA -cp $CLASSPATH \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableMetadataViewer "$@"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/sstablerepairedset
----------------------------------------------------------------------
diff --git a/tools/bin/sstablerepairedset b/tools/bin/sstablerepairedset
index 73201ad..1aa30a3 100755
--- a/tools/bin/sstablerepairedset
+++ b/tools/bin/sstablerepairedset
@@ -42,5 +42,6 @@ else
 fi
 
 $JAVA -cp $CLASSPATH \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.SSTableRepairedAtSetter "$@"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b3f130/tools/bin/sstablesplit
----------------------------------------------------------------------
diff --git a/tools/bin/sstablesplit b/tools/bin/sstablesplit
index 13a81ef..73e736e 100755
--- a/tools/bin/sstablesplit
+++ b/tools/bin/sstablesplit
@@ -44,6 +44,7 @@ if [ -z $CLASSPATH ]; then
 fi
 
 $JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
+        -Dcassandra.storagedir="$cassandra_storagedir" \
         -Dlogback.configurationFile=logback-tools.xml \
         org.apache.cassandra.tools.StandaloneSplitter "$@"
 


Mime
View raw message