[2/3] accumulo git commit: ACCUMULO-4403 Use FQDN and all hostname aliases
ACCUMULO-4403 Use FQDN and all hostname aliases If there are multiple aliases for a host, stop-here.sh would fail to handle them. Also, fix some related shellcheck warnings in the same file. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/09c38326 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/09c38326 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/09c38326 Branch: refs/heads/master Commit: 09c38326f6f4732afad0c0779b1fc0e242bf4ce3 Parents: 7dc726e Author: Josh ElserAuthored: Sat Aug 13 23:01:15 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 23:01:15 2016 -0400 -- assemble/bin/stop-here.sh | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/09c38326/assemble/bin/stop-here.sh -- diff --git a/assemble/bin/stop-here.sh b/assemble/bin/stop-here.sh index 6f0aa7f..a9973f4 100755 --- a/assemble/bin/stop-here.sh +++ b/assemble/bin/stop-here.sh @@ -31,24 +31,23 @@ bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" . "$bin"/config.sh -ACCUMULO="$ACCUMULO_HOME/lib/accumulo-start.jar" - # Determine hostname without errors to user -HOSTNAME=$(hostname -a 2> /dev/null | head -1) -[[ -z ${HOSTNAME} ]] && HOSTNAME=$(hostname) +HOSTS_TO_CHECK=($(hostname -a 2> /dev/null | head -1) $(hostname -f)) if egrep -q localhost\|127.0.0.1 "$ACCUMULO_CONF_DIR/slaves"; then "$bin/accumulo" admin stop localhost else - for host in "$(hostname -a 2> /dev/null)" "$(hostname)"; do - if grep -q ${host} $ACCUMULO_CONF_DIR/slaves; then + for host in "${HOSTS_TO_CHECK[@]}"; do + if grep -q "$host" "$ACCUMULO_CONF_DIR"/slaves; then "${bin}/accumulo" admin stop "$host" fi done fi -for signal in TERM KILL; do - for svc in tserver gc master monitor tracer; do - $ACCUMULO_HOME/bin/stop-server.sh $HOSTNAME "$ACCUMULO_HOME/lib/accumulo-start.jar" $svc $signal +for HOSTNAME in "${HOSTS_TO_CHECK[@]}"; do + for signal in TERM KILL; do + for svc in tserver gc master monitor tracer; do + "$ACCUMULO_HOME"/bin/stop-server.sh "$HOSTNAME" "$ACCUMULO_HOME/lib/accumulo-start.jar" $svc $signal + done done done
[1/3] accumulo git commit: ACCUMULO-4403 Use FQDN and all hostname aliases
Repository: accumulo Updated Branches: refs/heads/1.8 7dc726e07 -> 09c38326f refs/heads/master 795487392 -> 62ba8ef8c ACCUMULO-4403 Use FQDN and all hostname aliases If there are multiple aliases for a host, stop-here.sh would fail to handle them. Also, fix some related shellcheck warnings in the same file. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/09c38326 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/09c38326 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/09c38326 Branch: refs/heads/1.8 Commit: 09c38326f6f4732afad0c0779b1fc0e242bf4ce3 Parents: 7dc726e Author: Josh ElserAuthored: Sat Aug 13 23:01:15 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 23:01:15 2016 -0400 -- assemble/bin/stop-here.sh | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/09c38326/assemble/bin/stop-here.sh -- diff --git a/assemble/bin/stop-here.sh b/assemble/bin/stop-here.sh index 6f0aa7f..a9973f4 100755 --- a/assemble/bin/stop-here.sh +++ b/assemble/bin/stop-here.sh @@ -31,24 +31,23 @@ bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" . "$bin"/config.sh -ACCUMULO="$ACCUMULO_HOME/lib/accumulo-start.jar" - # Determine hostname without errors to user -HOSTNAME=$(hostname -a 2> /dev/null | head -1) -[[ -z ${HOSTNAME} ]] && HOSTNAME=$(hostname) +HOSTS_TO_CHECK=($(hostname -a 2> /dev/null | head -1) $(hostname -f)) if egrep -q localhost\|127.0.0.1 "$ACCUMULO_CONF_DIR/slaves"; then "$bin/accumulo" admin stop localhost else - for host in "$(hostname -a 2> /dev/null)" "$(hostname)"; do - if grep -q ${host} $ACCUMULO_CONF_DIR/slaves; then + for host in "${HOSTS_TO_CHECK[@]}"; do + if grep -q "$host" "$ACCUMULO_CONF_DIR"/slaves; then "${bin}/accumulo" admin stop "$host" fi done fi -for signal in TERM KILL; do - for svc in tserver gc master monitor tracer; do - $ACCUMULO_HOME/bin/stop-server.sh $HOSTNAME "$ACCUMULO_HOME/lib/accumulo-start.jar" $svc $signal +for HOSTNAME in "${HOSTS_TO_CHECK[@]}"; do + for signal in TERM KILL; do + for svc in tserver gc master monitor tracer; do + "$ACCUMULO_HOME"/bin/stop-server.sh "$HOSTNAME" "$ACCUMULO_HOME/lib/accumulo-start.jar" $svc $signal + done done done
[3/3] accumulo git commit: Merge branch '1.8'
Merge branch '1.8' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/62ba8ef8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/62ba8ef8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/62ba8ef8 Branch: refs/heads/master Commit: 62ba8ef8c8e955f7213c0abf5d9eba46c7d41acc Parents: 7954873 09c3832 Author: Josh ElserAuthored: Sat Aug 13 23:02:35 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 23:02:35 2016 -0400 -- assemble/bin/stop-here.sh | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) --
[3/3] accumulo git commit: Merge branch '1.8'
Merge branch '1.8' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/434a88a3 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/434a88a3 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/434a88a3 Branch: refs/heads/master Commit: 434a88a3e949cf074a3c25e3593cd0dd4597b25b Parents: c4afeff cda493b Author: Josh ElserAuthored: Sat Aug 13 21:45:45 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 21:45:45 2016 -0400 -- .../main/java/org/apache/accumulo/server/init/Initialize.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/434a88a3/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java --
[1/3] accumulo git commit: ACCUMULO-4401 Restore original conditional to avoid infinite loop
Repository: accumulo Updated Branches: refs/heads/1.8 93e188f62 -> cda493bd5 refs/heads/master c4afeffa3 -> 434a88a3e ACCUMULO-4401 Restore original conditional to avoid infinite loop Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cda493bd Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cda493bd Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cda493bd Branch: refs/heads/1.8 Commit: cda493bd5636cd7523f4e0168f1174431a837007 Parents: 93e188f Author: Josh ElserAuthored: Sat Aug 13 21:06:48 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 21:45:41 2016 -0400 -- .../main/java/org/apache/accumulo/server/init/Initialize.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/cda493bd/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index 0ccf51f..d92392f 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@ -575,8 +575,8 @@ public class Initialize implements KeywordExecutable { if (opts.clearInstanceName) { exists = false; break; - } else if (zoo.exists(instanceNamePath)) { -exists = true; +// ACCUMULO-4401 setting exists=false is just as important as setting it to true + } else if (exists = zoo.exists(instanceNamePath)) { String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); if (decision == null) System.exit(0);
[2/3] accumulo git commit: ACCUMULO-4401 Restore original conditional to avoid infinite loop
ACCUMULO-4401 Restore original conditional to avoid infinite loop Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cda493bd Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cda493bd Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cda493bd Branch: refs/heads/master Commit: cda493bd5636cd7523f4e0168f1174431a837007 Parents: 93e188f Author: Josh ElserAuthored: Sat Aug 13 21:06:48 2016 -0400 Committer: Josh Elser Committed: Sat Aug 13 21:45:41 2016 -0400 -- .../main/java/org/apache/accumulo/server/init/Initialize.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/cda493bd/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index 0ccf51f..d92392f 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@ -575,8 +575,8 @@ public class Initialize implements KeywordExecutable { if (opts.clearInstanceName) { exists = false; break; - } else if (zoo.exists(instanceNamePath)) { -exists = true; +// ACCUMULO-4401 setting exists=false is just as important as setting it to true + } else if (exists = zoo.exists(instanceNamePath)) { String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); if (decision == null) System.exit(0);
[3/3] accumulo git commit: Merge branch '1.8'
Merge branch '1.8' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/79548739 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/79548739 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/79548739 Branch: refs/heads/master Commit: 795487392b685487d35357370808bc5a627bdc50 Parents: 434a88a 7dc726e Author: Christopher TubbsAuthored: Sat Aug 13 22:35:09 2016 -0400 Committer: Christopher Tubbs Committed: Sat Aug 13 22:35:09 2016 -0400 -- .../apache/accumulo/server/init/Initialize.java| 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/79548739/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java --
[2/3] accumulo git commit: ACCUMULO-4013 Remove assignment in condition
ACCUMULO-4013 Remove assignment in condition Fix compiler warning about boolean assignment in condition. Move assignment outside of condition to be more explicit that both values matter. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7dc726e0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7dc726e0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7dc726e0 Branch: refs/heads/master Commit: 7dc726e07fe1742f73878b9f9d21314c0f59f0c0 Parents: cda493b Author: Christopher TubbsAuthored: Sat Aug 13 22:16:44 2016 -0400 Committer: Christopher Tubbs Committed: Sat Aug 13 22:16:44 2016 -0400 -- .../apache/accumulo/server/init/Initialize.java| 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7dc726e0/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index d92392f..cc79d05 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@ -575,14 +575,17 @@ public class Initialize implements KeywordExecutable { if (opts.clearInstanceName) { exists = false; break; + } else { // ACCUMULO-4401 setting exists=false is just as important as setting it to true - } else if (exists = zoo.exists(instanceNamePath)) { -String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); -if (decision == null) - System.exit(0); -if (decision.length() == 1 && decision.toLowerCase(Locale.ENGLISH).charAt(0) == 'y') { - opts.clearInstanceName = true; - exists = false; +exists = zoo.exists(instanceNamePath); +if (exists) { + String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); + if (decision == null) +System.exit(0); + if (decision.length() == 1 && decision.toLowerCase(Locale.ENGLISH).charAt(0) == 'y') { +opts.clearInstanceName = true; +exists = false; + } } } } while (exists);
[1/3] accumulo git commit: ACCUMULO-4013 Remove assignment in condition
Repository: accumulo Updated Branches: refs/heads/1.8 cda493bd5 -> 7dc726e07 refs/heads/master 434a88a3e -> 795487392 ACCUMULO-4013 Remove assignment in condition Fix compiler warning about boolean assignment in condition. Move assignment outside of condition to be more explicit that both values matter. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7dc726e0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7dc726e0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7dc726e0 Branch: refs/heads/1.8 Commit: 7dc726e07fe1742f73878b9f9d21314c0f59f0c0 Parents: cda493b Author: Christopher TubbsAuthored: Sat Aug 13 22:16:44 2016 -0400 Committer: Christopher Tubbs Committed: Sat Aug 13 22:16:44 2016 -0400 -- .../apache/accumulo/server/init/Initialize.java| 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7dc726e0/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index d92392f..cc79d05 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@ -575,14 +575,17 @@ public class Initialize implements KeywordExecutable { if (opts.clearInstanceName) { exists = false; break; + } else { // ACCUMULO-4401 setting exists=false is just as important as setting it to true - } else if (exists = zoo.exists(instanceNamePath)) { -String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); -if (decision == null) - System.exit(0); -if (decision.length() == 1 && decision.toLowerCase(Locale.ENGLISH).charAt(0) == 'y') { - opts.clearInstanceName = true; - exists = false; +exists = zoo.exists(instanceNamePath); +if (exists) { + String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : "); + if (decision == null) +System.exit(0); + if (decision.length() == 1 && decision.toLowerCase(Locale.ENGLISH).charAt(0) == 'y') { +opts.clearInstanceName = true; +exists = false; + } } } } while (exists);