maulin-vasavada commented on code in PR #3708:
URL: https://github.com/apache/cassandra/pull/3708#discussion_r1866945528


##########
bin/nodetool:
##########
@@ -52,6 +52,11 @@ if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
     JVM_OPTS="$JVM_OPTS_SAVE"
 fi
 
+# Search cassandra.yaml for jmx port
+if [ -f "$CASSANDRA_CONF/cassandra.yaml" ]; then
+    JMX_PORT=`grep jmx_port $CASSANDRA_CONF/cassandra.yaml | cut -d ':' -f 2 | 
tr -d '[[:space:]]'`

Review Comment:
   @smiklosovic Here instead of modifying the nodetool script can we keep 
`JMX_PORT` initialization with this same line in `cassandra-env.sh` (line 
[here](https://github.com/apache/cassandra/pull/3708/files#diff-3d28c4f802dc4b762e5a0012576ff7a6ad7d27c5698563aea54bfa74fe2d0805L224))?
 The reason behind this question is - there could be more tools (e.g. 
`dsetool`) built beyond the open source that may rely on `JMX_PORT` coming from 
the `cassandra-env.sh`.  If this is empty then we can default to the port 
`7199` as we already have in the env sh file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to