From 14139455a5f88b1d64a0686f1d02162293f0d8c9 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 14 May 2013 14:08:12 -0500 Subject: [PATCH] sstablescrub respects MAX_HEAP_SIZE Patch by Mina Naguib, reviewed by brandonwilliams for CASSANDRA-5562 --- CHANGES.txt | 1 + bin/sstablescrub | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 643277504b..498f4474f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,7 @@ Merged from 1.1 * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463) * fsync leveled manifest to avoid corruption (CASSANDRA-5535) * Fix Bound intersection computation (CASSANDRA-5551) + * sstablescrub now respects max memory size in cassandra.in.sh (CASSANDRA-5562) 1.2.4 diff --git a/bin/sstablescrub b/bin/sstablescrub index 437bee0264..fdf23a59c2 100755 --- a/bin/sstablescrub +++ b/bin/sstablescrub @@ -43,7 +43,11 @@ if [ -z $CLASSPATH ]; then exit 1 fi -$JAVA -ea -cp $CLASSPATH -Xmx256M \ +if [ "x$MAX_HEAP_SIZE" = "x" ]; then + MAX_HEAP_SIZE="256M" +fi + +$JAVA -ea -cp $CLASSPATH -Xmx$MAX_HEAP_SIZE \ -Dlog4j.configuration=log4j-tools.properties \ org.apache.cassandra.tools.StandaloneScrubber "$@"