HBASE-3383 [0.90RC1] bin/hbase script displays "no such file" warning on
target/cached_classpath.txt git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1052093 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1758553f45
commit
0f2700df67
|
@ -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
|
||||
|
|
27
bin/hbase
27
bin/hbase
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue