Updated Branches: refs/heads/branch-0.8 891c57cd5 -> c72d931fb
WHIRR-649. Make install_cdh_hadoop.sh idempotent, fast failing if already run. Contributed by Graham Gear. Project: http://git-wip-us.apache.org/repos/asf/whirr/repo Commit: http://git-wip-us.apache.org/repos/asf/whirr/commit/c72d931f Tree: http://git-wip-us.apache.org/repos/asf/whirr/tree/c72d931f Diff: http://git-wip-us.apache.org/repos/asf/whirr/diff/c72d931f Branch: refs/heads/branch-0.8 Commit: c72d931fb3eeec3169f8b2ced472aea81fec9799 Parents: 891c57c Author: Tom White <[email protected]> Authored: Thu Sep 20 21:45:02 2012 +0100 Committer: Tom White <[email protected]> Committed: Thu Sep 20 21:45:24 2012 +0100 ---------------------------------------------------------------------- CHANGES.txt | 3 +++ .../main/resources/functions/install_cdh_hadoop.sh | 5 +++++ 2 files changed, 8 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/whirr/blob/c72d931f/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 447e8e9..e836495 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,9 @@ Release 0.8.1 (unreleased changes) WHIRR-548. Whirr can now reuse existing compute services. Misc osgi/karaf integration improvements. (Ioannis Canellos) + + WHIRR-649. Make install_cdh_hadoop.sh idempotent, fast failing if already + run. (Graham Gear via tomwhite) BUG FIXES http://git-wip-us.apache.org/repos/asf/whirr/blob/c72d931f/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh ---------------------------------------------------------------------- diff --git a/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh b/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh index 0ccae85..ef666b4 100644 --- a/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh +++ b/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh @@ -60,6 +60,11 @@ function install_cdh_hadoop() { local OPTIND local OPTARG + if [ "$INSTALL_HADOOP_DONE" == "1" ]; then + echo "Hadoop is already installed." + return; + fi + REPO=${REPO:-cdh4} REPO_HOST=${REPO_HOST:-archive.cloudera.com} MAPREDUCE_VERSION=${MAPREDUCE_VERSION:-1}
