cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/6] git commit: Set javaagent for tools. Patch by Sam Tunnecliffe, reviewed by brandonwilliams for CASSANDRA-6404
Date Thu, 12 Dec 2013 18:06:58 GMT
Updated Branches:
  refs/heads/cassandra-1.2 f7f7598a2 -> 79f7d6baf
  refs/heads/cassandra-2.0 f5526d540 -> ca7335e65
  refs/heads/trunk 56e484232 -> 448e4d46f


Set javaagent for tools.
Patch by Sam Tunnecliffe, reviewed by brandonwilliams for CASSANDRA-6404


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

Branch: refs/heads/cassandra-1.2
Commit: 79f7d6baff8644e31d6444fed8a18e85126d4ae9
Parents: f7f7598
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Dec 12 12:04:01 2013 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Dec 12 12:04:01 2013 -0600

----------------------------------------------------------------------
 bin/cassandra.in.sh | 7 +++++++
 bin/json2sstable    | 2 +-
 bin/nodetool        | 2 +-
 bin/sstable2json    | 2 +-
 bin/sstablekeys     | 2 +-
 bin/sstableloader   | 2 +-
 bin/sstablescrub    | 2 +-
 bin/sstablesplit    | 2 +-
 bin/sstableupgrade  | 2 +-
 9 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/bin/cassandra.in.sh b/bin/cassandra.in.sh
index 2d5a932..29e0d0e 100644
--- a/bin/cassandra.in.sh
+++ b/bin/cassandra.in.sh
@@ -39,3 +39,10 @@ CLASSPATH="$CASSANDRA_CONF:$cassandra_bin"
 for jar in "$CASSANDRA_HOME"/lib/*.jar; do
     CLASSPATH="$CLASSPATH:$jar"
 done
+
+# set JVM javaagent opts to avoid warnings/errors
+if [ "$JVM_VENDOR" != "OpenJDK" -o "$JVM_VERSION" \> "1.6.0" ] \
+      || [ "$JVM_VERSION" = "1.6.0" -a "$JVM_PATCH_VERSION" -ge 23 ]
+then
+    JAVA_AGENT="$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar"
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/json2sstable
----------------------------------------------------------------------
diff --git a/bin/json2sstable b/bin/json2sstable
index f41afd3..4a9e7bb 100755
--- a/bin/json2sstable
+++ b/bin/json2sstable
@@ -43,7 +43,7 @@ if [ -z "$CLASSPATH" ]; then
     exit 1
 fi
 
-"$JAVA" -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.SSTableImport "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/nodetool
----------------------------------------------------------------------
diff --git a/bin/nodetool b/bin/nodetool
index d4c0439..3e3824c 100755
--- a/bin/nodetool
+++ b/bin/nodetool
@@ -85,7 +85,7 @@ case "`uname`" in
     ;;
 esac
 
-"$JAVA" -cp "$CLASSPATH" \
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" \
       -Xmx32m \
       -Dlog4j.configuration=log4j-tools.properties \
       -Dstorage-config="$CASSANDRA_CONF" \

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstable2json
----------------------------------------------------------------------
diff --git a/bin/sstable2json b/bin/sstable2json
index 9b116ce..63e904d 100755
--- a/bin/sstable2json
+++ b/bin/sstable2json
@@ -44,7 +44,7 @@ if [ -z "$CLASSPATH" ]; then
     exit 1
 fi
 
-"$JAVA" -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.SSTableExport "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstablekeys
----------------------------------------------------------------------
diff --git a/bin/sstablekeys b/bin/sstablekeys
index 81cffd0..32f0339 100755
--- a/bin/sstablekeys
+++ b/bin/sstablekeys
@@ -48,7 +48,7 @@ if [ $# -eq "0" ]; then
     exit 2
 fi
 
-"$JAVA" -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.SSTableExport "$@" -e
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstableloader
----------------------------------------------------------------------
diff --git a/bin/sstableloader b/bin/sstableloader
index 7696e10..245775f 100755
--- a/bin/sstableloader
+++ b/bin/sstableloader
@@ -43,7 +43,7 @@ if [ -z "$CLASSPATH" ]; then
     exit 1
 fi
 
-"$JAVA" -ea -cp "$CLASSPATH" -Xmx256M \
+"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx256M \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.BulkLoader "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstablescrub
----------------------------------------------------------------------
diff --git a/bin/sstablescrub b/bin/sstablescrub
index 1266ea7..31ecf02 100755
--- a/bin/sstablescrub
+++ b/bin/sstablescrub
@@ -47,7 +47,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
     MAX_HEAP_SIZE="256M"
 fi
 
-"$JAVA" -ea -cp "$CLASSPATH" -Xmx$MAX_HEAP_SIZE \
+"$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" -Xmx$MAX_HEAP_SIZE \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.StandaloneScrubber "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstablesplit
----------------------------------------------------------------------
diff --git a/bin/sstablesplit b/bin/sstablesplit
index 933a67d..81a4232 100755
--- a/bin/sstablesplit
+++ b/bin/sstablesplit
@@ -43,7 +43,7 @@ if [ -z $CLASSPATH ]; then
     exit 1
 fi
 
-$JAVA -ea -cp $CLASSPATH -Xmx256M \
+$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.StandaloneSplitter "$@"
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/79f7d6ba/bin/sstableupgrade
----------------------------------------------------------------------
diff --git a/bin/sstableupgrade b/bin/sstableupgrade
index b5ddd6a..5421786 100755
--- a/bin/sstableupgrade
+++ b/bin/sstableupgrade
@@ -47,7 +47,7 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
     MAX_HEAP_SIZE="256M"
 fi
 
-$JAVA -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \
+$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \
         -Dlog4j.configuration=log4j-tools.properties \
         org.apache.cassandra.tools.StandaloneUpgrader "$@"
 


Mime
View raw message