Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-3383

[0.90RC1] bin/hbase script displays "no such file" warning on target/cached_classpath.txt

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.90.0
    • 0.90.0
    • shell
    • None
    • Ubuntu 10.10 Server

    • Reviewed

    Description

      HBase version: 0.90 release-candidate-1

      bin/hbase blindly creates "target" directory and fails to generate "target/cached_classpath.txt" if it's in the binary (pre-built) distribution.

      $ bin/hbase shell
      cat: ... /hbase-0.90.0/bin/../target/cached_classpath.txt: No such file or directory
      HBase Shell; enter 'help<RETURN>' for list of supported commands.
      
      bin/hbase
      112: add_maven_deps_to_classpath() {
      113:   # The maven build dir is called 'target'
      114:   target="${HBASE_HOME}/target"
      115:   if [ ! -d "${HBASE_HOME}/target" ]
      116:   then
      117:     mkdir "${target}"
      118:   fi
      119:   # Need to generate classpath from maven pom. This is costly so generate it
      120:   # and cache it. Save the file into our target dir so a mvn clean will get
      121:   # clean it up and force us create a new one.
      122:   f="${target}/cached_classpath.txt"
      123:   if [ ! -f "${f}" ]
      124:   then
      125:     ${MVN} -f "${HBASE_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
      126:   fi
      127:   CLASSPATH=${CLASSPATH}:`cat "${f}"`
      

      Maybe we can simply skip this process if "target" directory doesn't exist.

      Attachments

        1. HBASE-3383.patch
          2 kB
          Jean-Daniel Cryans

        Activity

          People

            jdcryans Jean-Daniel Cryans
            tatsuya6502 Tatsuya Kawano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: