Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 30799163e -> bfa20dd07
  refs/heads/1.6.0-SNAPSHOT 5a58538e4 -> d60a38c08
  refs/heads/master 00db80b65 -> 66230c939


ACCUMULO-2329 Infer the GC role from master when gc file is not present.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/bfa20dd0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/bfa20dd0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/bfa20dd0

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: bfa20dd07710c244140fd7fd8844b60739962c0e
Parents: 3079916
Author: Josh Elser <els...@apache.org>
Authored: Mon Feb 10 14:05:40 2014 -0500
Committer: Josh Elser <els...@apache.org>
Committed: Mon Feb 10 14:05:40 2014 -0500

----------------------------------------------------------------------
 bin/config.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bfa20dd0/bin/config.sh
----------------------------------------------------------------------
diff --git a/bin/config.sh b/bin/config.sh
index 07b7487..2b6c8dc 100755
--- a/bin/config.sh
+++ b/bin/config.sh
@@ -132,6 +132,15 @@ if [ ! -f "$ACCUMULO_CONF_DIR/tracers" -a -z 
"${ACCUMULO_VERIFY_ONLY}" ]; then
 
 fi
 
+if [ ! -f "$ACCUMULO_CONF_DIR/gc" -a -z "${ACCUMULO_VERIFY_ONLY}" ]; then
+  if [ -z "${MASTER1}" ] ; then
+    echo "Could not infer a GC role. You need to either set up 
\"${ACCUMULO_CONF_DIR}/gc\" or make sure \"${ACCUMULO_CONF_DIR}/masters\" is 
non-empty."
+    exit 1
+  else
+    echo "$MASTER1" > "$ACCUMULO_CONF_DIR/gc"
+  fi
+fi
+
 SSH='ssh -qnf -o ConnectTimeout=2'
 
 export HADOOP_HOME=$HADOOP_PREFIX

Reply via email to