Fix DIB_HADOOP_VERSION checks of hadoop-cdh element

We shouldn't begin to build image if specified hadoop version
is not supported for CDH

Change-Id: I592aec1d3d539231db7b2ca421d58b01cd7101de
This commit is contained in:
iberezovskiy 2014-03-05 17:58:43 +04:00
parent deb08683ae
commit d3e3182517
2 changed files with 2 additions and 9 deletions

View File

@ -10,10 +10,6 @@ if [ "$distro" != "Ubuntu" ]; then
exit 1
fi
if [ $DIB_HADOOP_VERSION != "2.0.0-mr1-cdh4.5.0" ]; then
echo "CDH version $DIB_HADOOP_VERSION not supported. Exiting."
fi
echo "Hadoop CDH setup begins for $distro"
tmp_dir=/tmp/hadoop

View File

@ -10,10 +10,7 @@ if [ -z "$DIB_HADOOP_VERSION" ]; then
echo "DIB_HADOOP_VERSION is not set. Impossible to install hadoop. Exit"
exit 1
fi
version_check=$(echo $DIB_HADOOP_VERSION | sed -e '/[0-9]\.[0-9]\.[0-9]/d')
if [[ -z $version_check ]]; then
echo "All variables are set, continue."
else
echo "Version error. Exit"
if [ $DIB_HADOOP_VERSION != "2.0.0-mr1-cdh4.5.0" ]; then
echo "CDH version $DIB_HADOOP_VERSION not supported. Exiting."
exit 1
fi