Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Commit

Permalink
Add a workaround for bug where Ambari setup silently fails to copy out
Browse files Browse the repository at this point in the history
  mapreduce.tar.gz, pig.tar.gz, etc., into hdfs:///hdp/apps/...; with this fix
  Ambari should work out-of-the-box again.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=94583118
  • Loading branch information
dennishuo committed May 27, 2015
1 parent ac8d0b0 commit 246eeca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
6. Removed datastore-connector installation options and samples; the connector
has been deprecated since February 17th, 2015. For alternatives see:
https://groups.google.com/forum/#!topic/gcp-hadoop-announce/D3_OZuqn4_o
7. Added workaround for a bug where ambari_env.sh and ambari_manual_env.sh
would fail to copy mapreduce.tar.gz, pig.tar.gz, etc., into
hdfs:///hdp/apps/... during setup. Ambari should now work out-of-the-box.


1.2.1 - 2015-05-05
Expand Down
17 changes: 17 additions & 0 deletions platforms/hdp/install_ambari.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,20 @@ if [ "$(hostname)" = "${MASTER_HOSTNAME}" ]; then
fi
chkconfig ambari-server on
fi

# Workaround for issue between 2.2.0.0 and 2.2.4.2-X where hdp-select finds
# 2.2.4.2-X but params.hdp_stack_version is 2.2.0.0, causing setup to silently
# fail to copy all the component tarballs like mapreduce.tar.gz and pig.tar.gz
# into hdfs:///hdp/apps/...
AMBARI_FUNCTIONS_DIR='lib/resource_management/libraries/functions'
SCRIPT_BAD_CONDITION=' or not out.startswith(params.hdp_stack_version)'
AMBARI_LIB_BASE='/usr/lib/ambari-server'
AMBARI_COPY_TARBALLS_SCRIPT="${AMBARI_LIB_BASE}/${AMBARI_FUNCTIONS_DIR}/dynamic_variable_interpretation.py"
if [[ -e ${AMBARI_COPY_TARBALLS_SCRIPT} ]]; then
sed -i "s/${SCRIPT_BAD_CONDITION}//" ${AMBARI_COPY_TARBALLS_SCRIPT}
fi
AMBARI_LIB_BASE='/usr/lib/ambari-agent'
AMBARI_COPY_TARBALLS_SCRIPT="${AMBARI_LIB_BASE}/${AMBARI_FUNCTIONS_DIR}/dynamic_variable_interpretation.py"
if [[ -e ${AMBARI_COPY_TARBALLS_SCRIPT} ]]; then
sed -i "s/${SCRIPT_BAD_CONDITION}//" ${AMBARI_COPY_TARBALLS_SCRIPT}
fi

0 comments on commit 246eeca

Please sign in to comment.