diff --git a/elements/hadoop-cdh/root.d/0-check-hadoop-cdh b/elements/hadoop-cdh/root.d/0-check-hadoop-cdh index 278b9b86..e7ad22d4 100755 --- a/elements/hadoop-cdh/root.d/0-check-hadoop-cdh +++ b/elements/hadoop-cdh/root.d/0-check-hadoop-cdh @@ -6,6 +6,13 @@ fi set -eu set -o pipefail +echo "##############################################################" +echo "## ##" +echo "## WARNING: this element (hadoop-cdh) has been deprecated ##" +echo "## Please use the hadoop-cloudera element ##" +echo "## ##" +echo "##############################################################" + if [ -z "${JAVA_DOWNLOAD_URL:-}" ]; then if [ -z "${JAVA_FILE:-}" ]; then echo "JAVA_FILE and JAVA_DOWNLOAD_URL are not set. Proceeding with distro native Java." diff --git a/elements/spark/root.d/0-check-spark b/elements/spark/root.d/0-check-spark index e07fff36..2c13e06c 100755 --- a/elements/spark/root.d/0-check-spark +++ b/elements/spark/root.d/0-check-spark @@ -6,6 +6,28 @@ fi set -eu set -o pipefail +print_deprecation_warning() { + echo "##############################################################" + echo "## ##" + echo "## WARNING: the version of Spark being included in this ##" + echo "## image has been deprecated in the Sahara Spark ##" + echo "## plugin. Please consider upgrading to a ##" + echo "## supported version. ##" + echo "## ##" + echo "## See: https://wiki.openstack.org/wiki/Sahara/SparkPlugin ##" + echo "## ##" + echo "##############################################################" +} + +# Check for deprecated versions in the Spark plugin +major_v=$(echo $DIB_SPARK_VERSION | cut -f1 -d.) +minor_v=$(echo $DIB_SPARK_VERSION | cut -f2 -d.) +if [ "${major_v}" == "0" ]; then + print_deprecation_warning +elif [ "${major_v}" == "1" -a "${minor_v}" == "0" ]; then + print_deprecation_warning +fi + if [ -z "${SPARK_DOWNLOAD_URL:-}" -a -z "${DIB_CDH_VERSION:-}" ]; then echo -e "Neither DIB_CDH_VERSION nor SPARK_DOWNLOAD_URL are set. Impossible to install Spark.\nAborting" exit 1