mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-5.0' into trunk
This commit is contained in:
commit
1e5c07af32
|
|
@ -207,6 +207,7 @@
|
|||
* Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
|
||||
* Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787)
|
||||
Merged from 5.0:
|
||||
* Do not source cassandra-env.sh unnecessarily in nodetool and other tooling (CASSANDRA-20745)
|
||||
* Make source distribution buildable by ant artifacts as doc/scripts/process-native-protocol-specs-in-docker.sh was not executable (CASSANDRA-20802)
|
||||
* SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided (CASSANDRA-20695)
|
||||
* Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce (CASSANDRA-20732)
|
||||
|
|
|
|||
20
bin/nodetool
20
bin/nodetool
|
|
@ -43,20 +43,21 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Run cassandra-env.sh to pick up JMX_PORT
|
||||
JMX_PORT=""
|
||||
|
||||
# Try to parse port from configure_jmx method call, when not commented out
|
||||
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
|
||||
JVM_OPTS_SAVE=$JVM_OPTS
|
||||
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE
|
||||
. "$CASSANDRA_CONF/cassandra-env.sh"
|
||||
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE
|
||||
JVM_OPTS="$JVM_OPTS_SAVE"
|
||||
jmx_method_call=$(grep "^configure_jmx \+[0-9]\+$" "$CASSANDRA_CONF/cassandra-env.sh")
|
||||
if [ ! "x${jmx_method_call}" = "x" ]; then
|
||||
JMX_PORT=$(echo "${jmx_method_call}" | tr -s " " | cut -d " " -f2)
|
||||
fi
|
||||
fi
|
||||
|
||||
# In case JMX_PORT is not set (when configure_jmx in cassandra-env.sh is commented out),
|
||||
# try to parse it from cassandra.yaml.
|
||||
if [ "x$JMX_PORT" = "x" ]; then
|
||||
if [ -f "$CASSANDRA_CONF/cassandra.yaml" ]; then
|
||||
JMX_PORT=`grep jmx_port $CASSANDRA_CONF/cassandra.yaml | cut -d ':' -f 2 | tr -d '[[:space:]]'`
|
||||
JMX_PORT=$(grep jmx_port "$CASSANDRA_CONF/cassandra.yaml" | cut -d ':' -f 2 | tr -d '[[:space:]]')
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -111,6 +112,11 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
|
|||
MAX_HEAP_SIZE="128m"
|
||||
fi
|
||||
|
||||
# Sets the path where logback and GC logs are written.
|
||||
if [ "x$CASSANDRA_LOG_DIR" = "x" ] ; then
|
||||
CASSANDRA_LOG_DIR="$CASSANDRA_HOME/logs"
|
||||
fi
|
||||
|
||||
CMD=$(echo "$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" $JVM_OPTS -Xmx$MAX_HEAP_SIZE \
|
||||
-XX:ParallelGCThreads=1 \
|
||||
-Dcassandra.storagedir="$cassandra_storagedir" \
|
||||
|
|
|
|||
|
|
@ -291,8 +291,8 @@ configure_jmx()
|
|||
# We will be expecting the settings in jmx_server_options and jmx_encryption_options respectively instead.
|
||||
# The argument specifies the default port over which Cassandra will be available for JMX connections.
|
||||
#
|
||||
# If you comment out configure_jmx method call, then JMX_PORT variable will not be set, which means
|
||||
# nodetool which sources this file will not see it either and port from cassandra.yaml will be parsed instead,
|
||||
# If you comment out configure_jmx method call, then the port argument of configure_jmx function will not be used
|
||||
# when nodetool parses this file and port from cassandra.yaml will be parsed instead,
|
||||
# if not found there either, it defaults to 7199.
|
||||
#
|
||||
# For security reasons, you should not expose this port to the internet. Firewall it if needed.
|
||||
|
|
|
|||
|
|
@ -37,17 +37,6 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Run cassandra-env.sh to pick up JMX_PORT
|
||||
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
|
||||
JVM_OPTS_SAVE=$JVM_OPTS
|
||||
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE
|
||||
. "$CASSANDRA_CONF/cassandra-env.sh"
|
||||
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE
|
||||
JVM_OPTS=$JVM_OPTS_SAVE
|
||||
fi
|
||||
|
||||
# JMX Port passed via cmd line args (-p 9999 / --port 9999 / --port=9999)
|
||||
# should override the value from cassandra-env.sh
|
||||
ARGS=""
|
||||
JVM_ARGS=""
|
||||
while true
|
||||
|
|
|
|||
|
|
@ -37,17 +37,6 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Run cassandra-env.sh to pick up JMX_PORT
|
||||
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
|
||||
JVM_OPTS_SAVE=$JVM_OPTS
|
||||
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE
|
||||
. "$CASSANDRA_CONF/cassandra-env.sh"
|
||||
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE
|
||||
JVM_OPTS=$JVM_OPTS_SAVE
|
||||
fi
|
||||
|
||||
# JMX Port passed via cmd line args (-p 9999 / --port 9999 / --port=9999)
|
||||
# should override the value from cassandra-env.sh
|
||||
ARGS=""
|
||||
JVM_ARGS=""
|
||||
while true
|
||||
|
|
|
|||
Loading…
Reference in New Issue