Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-152

Flume shell script does not work from bin directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.1
    • 0.9.1u1, 0.9.2
    • Master, Node, Shell
    • None
    • All Unix.

    Description

      If you go to the flume/bin directory and run ./flume shell, or ./flume node, or any other command, it will fail with a ClassNotFound exception.

      Steps to reproduce:
      1. Check out flume
      2. Cd to flume/bin directory
      3. Run ./flume shell or ./flume node

      Expected:
      It runs

      Actual:
      java.lang.ClassNotFoundException

      The problem is in the shell script. Jon helped me debug it, and here's the patch:

      — a/bin/flume
      +++ b/bin/flume
      @@ -43,6 +43,13 @@ function usage {
      }

      CMDPATH=`dirname $0`
      +
      +# This is to make CMDPATH correct if you go to the bin directory
      +# and run ./flume <command>.
      +pushd $CMDPATH
      +CMDPATH=`pwd`
      +popd
      +

      1. name of path
        CMDPATH=`dirname $CMDPATH`

      @@ -78,8 +85,6 @@ function append_jars_onto_classpath() {

      1. name of script
        BINPATH=`dirname $0`
        1. name of path
          -CMDPATH=`dirname $BINPATH`

      if [ -f "${BINPATH}/flume-env.sh" ]; then
      source "$BINPATH/flume-env.sh"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              flume_aditya Disabled imported user
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: