impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarmstr...@apache.org
Subject [2/4] incubator-impala git commit: IMPALA-3417: run-all.sh fails when no services should start
Date Thu, 02 Jun 2016 16:33:01 GMT
IMPALA-3417: run-all.sh fails when no services should start

Change-Id: I268c7ad66c82f2b04b832d520e21662e631572cf
Reviewed-on: http://gerrit.cloudera.org:8080/3250
Reviewed-by: Dan Hecht <dhecht@cloudera.com>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/40b79aec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/40b79aec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/40b79aec

Branch: refs/heads/master
Commit: 40b79aecbc8fff713ae0a1409cc7ea65223c2397
Parents: 5f3996e
Author: Matthew Jacobs <mj@cloudera.com>
Authored: Tue May 31 12:37:44 2016 -0700
Committer: Tim Armstrong <tarmstrong@cloudera.com>
Committed: Thu Jun 2 09:32:54 2016 -0700

----------------------------------------------------------------------
 testdata/cluster/admin | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/40b79aec/testdata/cluster/admin
----------------------------------------------------------------------
diff --git a/testdata/cluster/admin b/testdata/cluster/admin
index 91119ba..fb447f9 100755
--- a/testdata/cluster/admin
+++ b/testdata/cluster/admin
@@ -317,13 +317,15 @@ function start_cluster {
     echo "Starting Kerberized cluster."
   fi
 
-  for SERVICE in ${SUPPORTED_SERVICES[@]}; do
-    start $SERVICE
-  done
+  if [ ${#SUPPORTED_SERVICES[@]} -gt 0 ]; then
+    for SERVICE in ${SUPPORTED_SERVICES[@]-}; do
+      start $SERVICE
+    done
 
-  # Check if the cluster is still alive...
-  sleep 10
-  check_cluster_status
+    # If there any services to start, check that the cluster is still alive...
+    sleep 10
+    check_cluster_status
+  fi
   return $?
 }
 
@@ -408,7 +410,7 @@ function check_cluster_status {
   ROLE_COUNT=0
   NOT_RUNNING=()
   for NODE_DIR in "$NODES_DIR/$NODE_PREFIX"*; do
-    for SERVICE in ${SUPPORTED_SERVICES[@]}; do
+    for SERVICE in ${SUPPORTED_SERVICES[@]-}; do
       for SCRIPT in $(find "$NODE_DIR" -path "*/etc/init.d/$SERVICE*" $FIND_EXECUTABLE_FILTER
\
           -type f); do
         ROLE_COUNT=$((ROLE_COUNT + 1))


Mime
View raw message