#!/bin/bash
set -e

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_HADOOP_VERSION" ]; then
   echo "DIB_HADOOP_VERSION is not set. Impossible to install hadoop. Exit"
   exit 1
fi
if [ $DIB_HADOOP_VERSION != "2.0.0-mr1-cdh4.5.0" ]; then
   echo "CDH version $DIB_HADOOP_VERSION not supported. Exiting."
   exit 1
fi
