Repository: bigtop
Updated Branches:
  refs/heads/master 062428f2f -> 84c46ca83


BIGTOP-2543: Some minor problems on provisioner/docker/docker-hadoop.sh

Signed-off-by: Evans Ye <evan...@apache.org>


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

Branch: refs/heads/master
Commit: 84c46ca8302c3ec7b6de24b94fc8e72a1f80e6ad
Parents: 062428f
Author: Kengo Seki <sek...@apache.org>
Authored: Sat Oct 1 09:30:52 2016 +0900
Committer: Evans Ye <evan...@apache.org>
Committed: Sun Oct 16 01:47:42 2016 +0800

----------------------------------------------------------------------
 provisioner/docker/README.md        |  2 +-
 provisioner/docker/docker-hadoop.sh | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/84c46ca8/provisioner/docker/README.md
----------------------------------------------------------------------
diff --git a/provisioner/docker/README.md b/provisioner/docker/README.md
index d1c0f2e..8a8b8ee 100644
--- a/provisioner/docker/README.md
+++ b/provisioner/docker/README.md
@@ -103,7 +103,7 @@ create 5 node cluster => run smoke tests => destroy the 
cluster
 usage: docker-hadoop.sh [-C file ] args
        -C file                                   Use alternate file for 
config.yaml
   commands:
-       -c NUM_INSTANCES, --create=NUM_INSTANCES  Create a Docker based Bigtop 
Hadoop cluster
+       -c NUM_INSTANCES, --create NUM_INSTANCES  Create a Docker based Bigtop 
Hadoop cluster
        -d, --destroy                             Destroy the cluster
        -e, --exec INSTANCE_NO|INSTANCE_NAME      Execute command on a specific 
instance. Instance can be specified by name or number.
                                                  For example: docker-hadoop.sh 
--exec 1 bash

http://git-wip-us.apache.org/repos/asf/bigtop/blob/84c46ca8/provisioner/docker/docker-hadoop.sh
----------------------------------------------------------------------
diff --git a/provisioner/docker/docker-hadoop.sh 
b/provisioner/docker/docker-hadoop.sh
index 3277ed7..d40bd8b 100755
--- a/provisioner/docker/docker-hadoop.sh
+++ b/provisioner/docker/docker-hadoop.sh
@@ -19,7 +19,7 @@ usage() {
     echo "usage: $PROG [-C file ] args"
     echo "       -C file                                   Use alternate file 
for config.yaml"
     echo "  commands:"
-    echo "       -c NUM_INSTANCES, --create=NUM_INSTANCES  Create a Docker 
based Bigtop Hadoop cluster"
+    echo "       -c NUM_INSTANCES, --create NUM_INSTANCES  Create a Docker 
based Bigtop Hadoop cluster"
     echo "       -d, --destroy                             Destroy the cluster"
     echo "       -e, --exec INSTANCE_NO|INSTANCE_NAME      Execute command on 
a specific instance. Instance can be specified by name or number."
     echo "                                                 For example: $PROG 
--exec 1 bash"
@@ -101,7 +101,6 @@ copy-to-instances() {
 
 bootstrap() {
     for node in ${NODES[*]}; do
-        docker cp  $1 $node:$2 &
         docker exec $node bash -c 
"/bigtop-home/bigtop-deploy/vm/utils/setup-env-$1.sh $2" &
     done
     wait
@@ -171,7 +170,12 @@ env-check() {
 }
 
 list() {
-    docker-compose -p $PROVISION_ID ps
+    local msg
+    msg=$(docker-compose -p $PROVISION_ID ps 2>&1)
+    if [ $? -ne 0 ]; then
+        msg="Cluster hasn't been created yet."
+    fi
+    echo "$msg"
 }
 
 PROG=`basename $0`

Reply via email to