Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
Debian 3.16.7, cassandra-tools 2.1.6, cassandra 2.1.6
-
Low
Description
The script 'sstablerepairedset' is not ready out of the box for debian distro, maybe due to the refactoring of CASSANDRA-7160 to pack out tools from the bin directory.
Actually in 'sstablerepairedset' the classapth is calculated with:
if [ "x$CLASSPATH" = "x" ]; then # execute from the build dir. if [ -d `dirname $0`/../../build/classes ]; then for directory in `dirname $0`/../../build/classes/*; do CLASSPATH=$CLASSPATH:$directory done else if [ -f `dirname $0`/../lib/stress.jar ]; then CLASSPATH=`dirname $0`/../lib/stress.jar fi fi for jar in `dirname $0`/../../lib/*.jar; do CLASSPATH=$CLASSPATH:$jar done fi
Whereas in other scripts from the 'bin/tools', the classpath is calculated with:
if [ "x$CASSANDRA_INCLUDE" = "x" ]; then for include in "`dirname "$0"`/cassandra.in.sh" \ "$HOME/.cassandra.in.sh" \ /usr/share/cassandra/cassandra.in.sh \ /usr/local/share/cassandra/cassandra.in.sh \ /opt/cassandra/cassandra.in.sh; do if [ -r "$include" ]; then . "$include" break fi done elif [ -r "$CASSANDRA_INCLUDE" ]; then . "$CASSANDRA_INCLUDE" fi
I think that a little refactoring could be good to extract the common part of these scripts like the computation of the CLASSPATH and the set of JAVA_HOME.
Attachments
Issue Links
- duplicates
-
CASSANDRA-11270 sstablerepairedset loads CLASSPATH improperly (RHEL)
- Resolved