You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2021/09/21 14:25:27 UTC

[cassandra] branch cassandra-3.0 updated: Debian init respects CASSANDRA_HEAPDUMP_DIR

This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new ea3cca0  Debian init respects CASSANDRA_HEAPDUMP_DIR
ea3cca0 is described below

commit ea3cca04eba8844a685142d7d3093b1aa58bb4eb
Author: Brandon Williams <br...@apache.org>
AuthorDate: Tue Sep 21 09:22:25 2021 -0500

    Debian init respects CASSANDRA_HEAPDUMP_DIR
    
    Patch by Brandon Williams; reviewed by adelapena for CASSANDRA-13843
---
 CHANGES.txt | 1 +
 debian/init | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 94340d8..432faa8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.26:
+ * Debian init respects CASSANDRA_HEAPDUMP_DIR (CASSANDRA-13843)
  * Catch UnsatisfiedLinkError in WindowsTimer (CASSANDRA-16085)
  * Avoid removing batch when it's not created during view replication (CASSANDRA-16175)
  * Make the addition of regular column to COMPACT tables throw an InvalidRequestException (CASSANDRA-14564)
diff --git a/debian/init b/debian/init
index 0518cd2..79a9a52 100644
--- a/debian/init
+++ b/debian/init
@@ -73,7 +73,11 @@ do_start()
     ulimit -n "$FD_LIMIT"
 
     cassandra_home=`getent passwd cassandra | awk -F ':' '{ print $6; }'`
-    heap_dump_f="$cassandra_home/java_`date +%s`.hprof"
+    if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then
+        heap_dump_f="$CASSANDRA_HEAPDUMP_DIR/java_`date +%s`.hprof"
+    else
+        heap_dump_f="$cassandra_home/java_`date +%s`.hprof"
+    fi
     error_log_f="$cassandra_home/hs_err_`date +%s`.log"
 
     [ -e `dirname "$PIDFILE"` ] || \

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org