Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9598

bad classapth for 'sstablerepairedset' in 'cassandra-tools' package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.1.14, 2.2.6, 3.0.5
    • Legacy/Tools
    • 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

          Activity

            People

              yukim Yuki Morishita
              clardeur Clément Lardeur
              Yuki Morishita
              Jeremiah Jordan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: