sahara-image-elements/elements/hadoop-cdh/root.d/0-check-hadoop-cdh

22 lines
520 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
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."
fi
fi
if [ -z "$DIB_CDH_VERSION" ]; then
echo "DIB_CDH_VERSION is not set. Impossible to install hadoop. Exit"
exit 1
fi
if [ $DIB_CDH_VERSION != "CDH4" ]; then
echo "CDH version $DIB_CDH_VERSION not supported. Exiting."
exit 1
fi