Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AFCB101ED for ; Tue, 17 Dec 2013 17:19:27 +0000 (UTC) Received: (qmail 25037 invoked by uid 500); 17 Dec 2013 17:19:12 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 24986 invoked by uid 500); 17 Dec 2013 17:19:10 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 24916 invoked by uid 99); 17 Dec 2013 17:19:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 17:19:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 046E08BA484; Tue, 17 Dec 2013 17:18:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mdrob@apache.org To: commits@accumulo.apache.org Date: Tue, 17 Dec 2013 17:18:59 -0000 Message-Id: <4bef4ffcc4084bb9a484dc38c79d8724@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: ACCUMULO-2015 clean up role files for standalone ACCUMULO-2015 clean up role files for standalone Add checks for gc and tracers file existance in start-* scripts, since these files are recommended but not required for cluster operation Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f56e9c6b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f56e9c6b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f56e9c6b Branch: refs/heads/1.5.1-SNAPSHOT Commit: f56e9c6bdc1cc021f8073bd2b27bd59b0f159ebc Parents: 335f693 Author: Mike Drob Authored: Tue Dec 17 09:15:33 2013 -0800 Committer: Mike Drob Committed: Tue Dec 17 09:15:33 2013 -0800 ---------------------------------------------------------------------- bin/config.sh | 10 ++-------- bin/start-all.sh | 14 +++++++++++-- bin/start-here.sh | 54 +++++++++++++++++++++++++++++++++++--------------- 3 files changed, 52 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f56e9c6b/bin/config.sh ---------------------------------------------------------------------- diff --git a/bin/config.sh b/bin/config.sh index 89685fb..8d0672c 100755 --- a/bin/config.sh +++ b/bin/config.sh @@ -114,6 +114,8 @@ if [ -z "${ACCUMULO_VERIFY_ONLY}" ] ; then echo `hostname` > "$ACCUMULO_CONF_DIR/masters" echo "STANDALONE: echo "`hostname`" > $ACCUMULO_CONF_DIR/slaves" echo `hostname` > "$ACCUMULO_CONF_DIR/slaves" + echo "STANDALONE: echo "`hostname`" > $ACCUMULO_CONF_DIR/monitor" + echo `hostname` > "$ACCUMULO_CONF_DIR/monitor" fgrep -s logger.dir.walog "$ACCUMULO_CONF_DIR/accumulo-site.xml" > /dev/null WALOG_CONFIGURED=$? if [ $WALOG_CONFIGURED -ne 0 -a ! -e "$ACCUMULO_HOME/walogs" ] @@ -145,14 +147,6 @@ if [ -z "${MONITOR}" ] ; then exit 1 fi fi -if [ ! -f "$ACCUMULO_CONF_DIR/tracers" -a -z "${ACCUMULO_VERIFY_ONLY}" ]; then - if [ -z "${MASTER1}" ] ; then - echo "Could not find a master node to use as a default for the tracer role. Either set up \"${ACCUMULO_CONF_DIR}/tracers\" or make sure \"${ACCUMULO_CONF_DIR}/masters\" is non-empty." - exit 1 - else - echo "$MASTER1" > "$ACCUMULO_CONF_DIR/tracers" - fi -fi SSH='ssh -qnf -o ConnectTimeout=2' http://git-wip-us.apache.org/repos/asf/accumulo/blob/f56e9c6b/bin/start-all.sh ---------------------------------------------------------------------- diff --git a/bin/start-all.sh b/bin/start-all.sh index e0d4b36..60cf9c3 100755 --- a/bin/start-all.sh +++ b/bin/start-all.sh @@ -62,14 +62,24 @@ do ${bin}/start-server.sh $master master done -for gc in `grep -v '^#' "$ACCUMULO_CONF_DIR/gc"` +if [[ -r $ACCUMULO_CONF_DIR/gc ]]; then + GC=`grep -v '^#' "$ACCUMULO_CONF_DIR/gc"` +else + GC=$MASTER1 +fi +for gc in "$GC" do ${bin}/start-server.sh $gc gc "garbage collector" done ${bin}/start-server.sh $MONITOR monitor -for tracer in `grep -v '^#' "$ACCUMULO_CONF_DIR/tracers"` +if [[ -r $ACCUMULO_CONF_DIR/tracers ]]; then + TRACERS=`grep -v '^#' "$ACCUMULO_CONF_DIR/tracers"` +else + TRACERS=$MASTER1 +fi +for tracer in "$TRACERS" do ${bin}/start-server.sh $tracer tracer done http://git-wip-us.apache.org/repos/asf/accumulo/blob/f56e9c6b/bin/start-here.sh ---------------------------------------------------------------------- diff --git a/bin/start-here.sh b/bin/start-here.sh index 990fb1c..e571b8c 100755 --- a/bin/start-here.sh +++ b/bin/start-here.sh @@ -45,14 +45,25 @@ do fi done -for host in $HOSTS -do - if grep -q "^${host}\$" $ACCUMULO_CONF_DIR/gc - then - ${bin}/start-server.sh $host gc "garbage collector" - break - fi -done +if [[ -r $ACCUMULO_CONF_DIR/gc ]]; then + for host in $HOSTS + do + if grep -q "^${host}\$" $ACCUMULO_CONF_DIR/gc + then + ${bin}/start-server.sh $host gc "garbage collector" + break + fi + done +else + for host in $HOSTS + do + if [[ "$host" == "$MASTER1" ]] + then + ${bin}/start-server.sh $host gc "garbage collector" + break + fi + done +fi for host in $HOSTS do @@ -63,11 +74,22 @@ do fi done -for host in $HOSTS -do - if grep -q "^${host}\$" $ACCUMULO_CONF_DIR/tracers - then - ${bin}/start-server.sh $host tracer - break - fi -done +if [[ -r $ACCUMULO_CONF_DIR/tracers ]]; then + for host in $HOSTS + do + if grep -q "^${host}\$" $ACCUMULO_CONF_DIR/tracers + then + ${bin}/start-server.sh $host tracer + break + fi + done +else + for host in $HOSTS + do + if [[ "$host" == "$MASTER1" ]] + then + ${bin}/start-server.sh $host tracer + break + fi + done +fi