You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jd...@apache.org on 2010/12/23 00:02:42 UTC

svn commit: r1052093 - in /hbase/trunk: CHANGES.txt bin/hbase

Author: jdcryans
Date: Wed Dec 22 23:02:42 2010
New Revision: 1052093

URL: http://svn.apache.org/viewvc?rev=1052093&view=rev
Log:
   HBASE-3383  [0.90RC1] bin/hbase script displays "no such file" warning on
               target/cached_classpath.txt

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/bin/hbase

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1052093&r1=1052092&r2=1052093&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Dec 22 23:02:42 2010
@@ -805,6 +805,8 @@ Release 0.90.0 - Unreleased
    HBASE-3386  NPE in TableRecordReaderImpl.restart
    HBASE-3388  NPE processRegionInTransition(AssignmentManager.java:264)
                doing rolling-restart.sh
+   HBASE-3383  [0.90RC1] bin/hbase script displays "no such file" warning on
+               target/cached_classpath.txt
 
 
   IMPROVEMENTS

Modified: hbase/trunk/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hbase?rev=1052093&r1=1052092&r2=1052093&view=diff
==============================================================================
--- hbase/trunk/bin/hbase (original)
+++ hbase/trunk/bin/hbase Wed Dec 22 23:02:42 2010
@@ -54,9 +54,9 @@ CYGWIN*) cygwin=true;;
 esac
 
 # Detect if we are in hbase sources dir
-in_sources_dir=false
-if [ -f $HBASE_HOME/pom.xml ]; then
-  in_sources_dir=true
+in_dev_env=false
+if [ -d "${HBASE_HOME}/target" ]; then
+  in_dev_env=true
 fi
 
 # if no args specified, show usage
@@ -64,9 +64,6 @@ if [ $# = 0 ]; then
   echo "Usage: hbase <command>"
   echo "where <command> is one of:"
   echo "  shell            run the HBase shell"
-  if $in_sources_dir; then
-    echo "  shell-tests      run the HBase shell tests"
-  fi
   echo "  zkcli            run the ZooKeeper shell"
   echo "  master           run an HBase HMaster node" 
   echo "  regionserver     run an HBase HRegionServer node" 
@@ -110,16 +107,10 @@ CLASSPATH="${HBASE_CONF_DIR}"
 CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar
 
 add_maven_deps_to_classpath() {
-  # The maven build dir is called 'target'
-  target="${HBASE_HOME}/target"
-  if [ ! -d "${HBASE_HOME}/target" ]
-  then
-    mkdir "${target}"
-  fi
   # Need to generate classpath from maven pom. This is costly so generate it
   # and cache it. Save the file into our target dir so a mvn clean will get
   # clean it up and force us create a new one.
-  f="${target}/cached_classpath.txt"
+  f="${HBASE_HOME}/target/cached_classpath.txt"
   if [ ! -f "${f}" ]
   then
     ${MVN} -f "${HBASE_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
@@ -142,7 +133,7 @@ add_maven_test_classes_to_classpath() {
 }
 
 # Add maven target directory
-if $in_sources_dir; then
+if $in_dev_env; then
   add_maven_deps_to_classpath
   add_maven_main_classes_to_classpath
   add_maven_test_classes_to_classpath
@@ -219,14 +210,6 @@ unset IFS
 # figure out which class to run
 if [ "$COMMAND" = "shell" ] ; then
   CLASS="org.jruby.Main ${HBASE_HOME}/bin/hirb.rb"
-elif $in_sources_dir && [ "$COMMAND" = "shell-tests" ] ; then
-  # Finx maven build classpath
-  add_maven_deps_to_classpath
-  add_maven_main_classes_to_classpath
-  add_maven_test_classes_to_classpath
-  # Start the tests
-  CORESRC="${HBASE_HOME}/src"
-  CLASS="org.jruby.Main -I${CORESRC}/main/ruby -I${CORESRC}/test/ruby ${CORESRC}/test/ruby/tests_runner.rb"
 elif [ "$COMMAND" = "master" ] ; then
   CLASS='org.apache.hadoop.hbase.master.HMaster'
   if [ "$1" != "stop" ] ; then