ACCUMULO-1873 merging patch
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f2950ab5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f2950ab5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f2950ab5 Branch: refs/heads/master Commit: f2950ab52968ebdb405556aa544f55b79f2b7281 Parents: 487eec3 0927eb8 Author: Eric Newton <eric.new...@gmail.com> Authored: Tue Nov 19 12:45:59 2013 -0500 Committer: Eric Newton <eric.new...@gmail.com> Committed: Tue Nov 19 12:45:59 2013 -0500 ---------------------------------------------------------------------- bin/start-all.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f2950ab5/bin/start-all.sh ---------------------------------------------------------------------- diff --cc bin/start-all.sh index 5b15d86,4e45e4c..20e0728 --- a/bin/start-all.sh +++ b/bin/start-all.sh @@@ -29,28 -23,37 +29,38 @@@ bin="$( cd -P "$( dirname "$SOURCE" )" unset DISPLAY if [ ! -f $ACCUMULO_CONF_DIR/accumulo-env.sh ] ; then - echo "${ACCUMULO_CONF_DIR}/accumulo-env.sh does not exist. Please make sure you configure Accumulo before you run anything" - echo "We provide examples you can copy in ${ACCUMULO_HOME}/conf/examples/ which are set up for your memory footprint" - exit 1 + echo "${ACCUMULO_CONF_DIR}/accumulo-env.sh does not exist. Please make sure you configure Accumulo before you run anything" + echo "We provide examples you can copy in ${ACCUMULO_HOME}/conf/examples/ which are set up for your memory footprint" + exit 1 fi - -if [ -z $ZOOKEEPER_HOME ] ; then - echo "ZOOKEEPER_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh" - exit 1 +if [ -z "$ZOOKEEPER_HOME" ] ; then + echo "ZOOKEEPER_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh" + exit 1 fi + if [ ! -d $ZOOKEEPER_HOME ]; then + echo "ZOOKEEPER_HOME is not a directory: $ZOOKEEPER_HOME" + echo "Please check the setting, either globally or in accumulo-env.sh." + exit 1 + fi - ZOOKEEPER_VERSION=$(cd $ZOOKEEPER_HOME && ls zookeeper-[0-9]*.jar | head -1) - ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION/zookeeper-/} - ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION/.jar/} + ZOOKEEPER_VERSION=$(find $ZOOKEEPER_HOME -maxdepth 1 -name "zookeeper-[0-9]*.jar" | head -1) + if [ -z "$ZOOKEEPER_VERSION" ]; then + echo "A Zookeeper JAR was not found in $ZOOKEEPER_HOME." + echo "Please check ZOOKEEPER_HOME, either globally or in accumulo-env.sh." + exit 1 + fi + ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION##$ZOOKEEPER_HOME/zookeeper-} + ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION%%.jar} -if [ "$ZOOKEEPER_VERSION" '<' "3.3.0" ] ; then - echo "WARN : Using Zookeeper $ZOOKEEPER_VERSION. Use version 3.3.0 or greater to avoid zookeeper deadlock bug."; +if [ "$ZOOKEEPER_VERSION" '<' "3.3.0" ]; then + echo "WARN : Using Zookeeper $ZOOKEEPER_VERSION. Use version 3.3.0 or greater to avoid zookeeper deadlock bug."; fi -if [ "$1" != "--notSlaves" ] ; then - ${bin}/tup.sh +${bin}/start-server.sh $MONITOR monitor + +if [ "$1" != "--notSlaves" ]; then + ${bin}/tup.sh fi ${bin}/accumulo org.apache.accumulo.server.master.state.SetGoalState NORMAL