You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
7.6 KiB
172 lines
7.6 KiB
Index: bin/cassandra.in.sh |
|
--- bin/cassandra.in.sh.orig 2020-02-10 23:57:55.000000000 +0100 |
|
+++ bin/cassandra.in.sh 2020-02-15 22:53:08.864493000 +0100 |
|
@@ -15,19 +15,19 @@ |
|
# limitations under the License. |
|
|
|
if [ "x$CASSANDRA_HOME" = "x" ]; then |
|
- CASSANDRA_HOME="`dirname "$0"`/.." |
|
+ CASSANDRA_HOME="`dirname "$0"`/../.." |
|
fi |
|
|
|
# The directory where Cassandra's configs live (required) |
|
if [ "x$CASSANDRA_CONF" = "x" ]; then |
|
- CASSANDRA_CONF="$CASSANDRA_HOME/conf" |
|
+ CASSANDRA_CONF="$CASSANDRA_HOME/etc/cassandra" |
|
fi |
|
|
|
# This can be the path to a jar file, or a directory containing the |
|
# compiled classes. NOTE: This isn't needed by the startup script, |
|
# it's just used here in constructing the classpath. |
|
-cassandra_bin="$CASSANDRA_HOME/build/classes/main" |
|
-cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift" |
|
+#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 |
|
@@ -38,9 +38,9 @@ |
|
#JAVA_HOME=/usr/local/jdk6 |
|
|
|
# The java classpath (required) |
|
-CLASSPATH="$CASSANDRA_CONF:$cassandra_bin" |
|
+CLASSPATH="$CASSANDRA_CONF" |
|
|
|
-for jar in "$CASSANDRA_HOME"/lib/*.jar; do |
|
+for jar in "$CASSANDRA_HOME"/lib/cassandra/*.jar; do |
|
CLASSPATH="$CLASSPATH:$jar" |
|
done |
|
|
|
Index: bin/cqlsh |
|
--- bin/cqlsh.orig 2020-02-10 23:57:55.000000000 +0100 |
|
+++ bin/cqlsh 2020-02-15 22:53:08.864633000 +0100 |
|
@@ -17,8 +17,8 @@ |
|
|
|
# bash code here; finds a suitable python interpreter and execs this file. |
|
# prefer unqualified "python" if suitable: |
|
-python -c 'import sys; sys.exit(not (0x020700b0 < sys.hexversion < 0x03000000))' 2>/dev/null \ |
|
- && exec python "`python -c "import os;print(os.path.dirname(os.path.realpath('$0')))"`/cqlsh.py" "$@" |
|
+@l_prefix@/bin/python -c 'import sys; sys.exit(not (0x020700b0 < sys.hexversion < 0x03000000))' 2>/dev/null \ |
|
+ && exec @l_prefix@/bin/python "`python -c "import os;print(os.path.dirname(os.path.realpath('$0')))"`/cqlsh.py" "$@" |
|
for pyver in 2.7; do |
|
which python$pyver > /dev/null 2>&1 && exec python$pyver "`python$pyver -c "import os;print(os.path.dirname(os.path.realpath('$0')))"`/cqlsh.py" "$@" |
|
done |
|
Index: cassandra-driver-3.14.0/cassandra/io/libevwrapper.c |
|
--- cassandra-driver-3.14.0/cassandra/io/libevwrapper.c.orig 2018-04-02 22:03:29.000000000 +0200 |
|
+++ cassandra-driver-3.14.0/cassandra/io/libevwrapper.c 2020-02-15 22:53:08.864820000 +0100 |
|
@@ -1,5 +1,5 @@ |
|
#include <Python.h> |
|
-#include <ev.h> |
|
+#include "ev.h" |
|
|
|
typedef struct libevwrapper_Loop { |
|
PyObject_HEAD |
|
Index: cassandra-driver-3.14.0/setup.py |
|
--- cassandra-driver-3.14.0/setup.py.orig 2018-04-16 19:16:38.000000000 +0200 |
|
+++ cassandra-driver-3.14.0/setup.py 2020-02-15 22:53:08.864977000 +0100 |
|
@@ -146,9 +146,9 @@ |
|
|
|
libev_ext = Extension('cassandra.io.libevwrapper', |
|
sources=['cassandra/io/libevwrapper.c'], |
|
- include_dirs=['/usr/include/libev', '/usr/local/include', '/opt/local/include'], |
|
+ include_dirs=['@l_prefix@/include/ev'], |
|
libraries=['ev'], |
|
- library_dirs=['/usr/local/lib', '/opt/local/lib']) |
|
+ library_dirs=['@l_prefix@/lib']) |
|
|
|
platform_unsupported_msg = \ |
|
""" |
|
@@ -395,7 +395,7 @@ |
|
# 1.) build_ext eats errors at compile time, letting the install complete while producing useful feedback |
|
# 2.) there could be a case where the python environment has cython installed but the system doesn't have build tools |
|
if pre_build_check(): |
|
- cython_dep = 'Cython>=0.20,!=0.25,<0.28' |
|
+ cython_dep = 'Cython>=0.20' |
|
user_specified_cython_version = os.environ.get('CASS_DRIVER_ALLOWED_CYTHON_VERSION') |
|
if user_specified_cython_version is not None: |
|
cython_dep = 'Cython==%s' % (user_specified_cython_version,) |
|
Index: conf/cassandra-env.sh |
|
--- conf/cassandra-env.sh.orig 2020-02-10 23:57:55.000000000 +0100 |
|
+++ conf/cassandra-env.sh 2020-02-15 22:53:46.416494000 +0100 |
|
@@ -127,7 +127,7 @@ |
|
fi |
|
|
|
#GC log path has to be defined here because it needs to access CASSANDRA_HOME |
|
-JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log" |
|
+JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/var/cassandra/log/cassandra.gc.log" |
|
|
|
# Here we create the arguments that will get passed to the jvm when |
|
# starting cassandra. |
|
@@ -212,7 +212,7 @@ |
|
JVM_OPTS="$JVM_OPTS -XX:CompileCommandFile=$CASSANDRA_CONF/hotspot_compiler" |
|
|
|
# add the jamm javaagent |
|
-JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.3.0.jar" |
|
+JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/cassandra/jamm-0.3.0.jar" |
|
|
|
# set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR |
|
if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then |
|
Index: conf/cassandra.yaml |
|
--- conf/cassandra.yaml.orig 2020-02-10 23:57:55.000000000 +0100 |
|
+++ conf/cassandra.yaml 2020-02-15 22:53:08.865467000 +0100 |
|
@@ -71,6 +71,7 @@ |
|
# Directory where Cassandra should store hints. |
|
# If not set, the default directory is $CASSANDRA_HOME/data/hints. |
|
# hints_directory: /var/lib/cassandra/hints |
|
+hints_directory: @l_prefix@/var/cassandra/db/hints |
|
|
|
# How often hints should be flushed from the internal buffers to disk. |
|
# Will *not* trigger fsync. |
|
@@ -187,13 +188,13 @@ |
|
# will spread data evenly across them, subject to the granularity of |
|
# the configured compaction strategy. |
|
# If not set, the default directory is $CASSANDRA_HOME/data/data. |
|
-# data_file_directories: |
|
-# - /var/lib/cassandra/data |
|
+data_file_directories: |
|
+ - @l_prefix@/var/cassandra/db/data |
|
|
|
# commit log. when running on magnetic HDD, this should be a |
|
# separate spindle than the data directories. |
|
# If not set, the default directory is $CASSANDRA_HOME/data/commitlog. |
|
-# commitlog_directory: /var/lib/cassandra/commitlog |
|
+commitlog_directory: @l_prefix@/var/cassandra/db/commitlog |
|
|
|
# Enable / disable CDC functionality on a per-node basis. This modifies the logic used |
|
# for write path allocation rejection (standard: never reject. cdc: reject Mutation |
|
@@ -365,7 +366,7 @@ |
|
|
|
# saved caches |
|
# If not set, the default directory is $CASSANDRA_HOME/data/saved_caches. |
|
-# saved_caches_directory: /var/lib/cassandra/saved_caches |
|
+saved_caches_directory: @l_prefix@/var/cassandra/db/saved_caches |
|
|
|
# commitlog_sync may be either "periodic" or "batch." |
|
# |
|
Index: conf/logback.xml |
|
--- conf/logback.xml.orig 2020-02-10 23:57:55.000000000 +0100 |
|
+++ conf/logback.xml 2020-02-15 22:53:08.865602000 +0100 |
|
@@ -33,9 +33,9 @@ |
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|
<level>INFO</level> |
|
</filter> |
|
- <file>${cassandra.logdir}/system.log</file> |
|
+ <file>@l_prefix@/var/cassandra/log/cassandra.system.log</file> |
|
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
|
- <fileNamePattern>${cassandra.logdir}/system.log.%i.zip</fileNamePattern> |
|
+ <fileNamePattern>@l_prefix@/var/cassandra/log/cassandra.system.log.%i.zip</fileNamePattern> |
|
<minIndex>1</minIndex> |
|
<maxIndex>20</maxIndex> |
|
</rollingPolicy> |
|
@@ -50,9 +50,9 @@ |
|
<!-- DEBUGLOG rolling file appender to debug.log (all levels) --> |
|
|
|
<appender name="DEBUGLOG" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
- <file>${cassandra.logdir}/debug.log</file> |
|
+ <file>@l_prefix@/var/cassandra/log/cassandra.debug.log</file> |
|
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
|
- <fileNamePattern>${cassandra.logdir}/debug.log.%i.zip</fileNamePattern> |
|
+ <fileNamePattern>@l_prefix@/var/cassandra/log/cassandra.debug.log.%i.zip</fileNamePattern> |
|
<minIndex>1</minIndex> |
|
<maxIndex>20</maxIndex> |
|
</rollingPolicy>
|
|
|