export HADOOP_HOME_WARN_SUPPRESS=true
export HADOOP_PREFIX=/usr/lib/hadoop

export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec
export HADOOP_CONF_DIR=/etc/hadoop/conf

export HADOOP_COMMON_HOME=/usr/lib/hadoop
export HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
export HADOOP_MAPRED_HOME={{ hadoop_mapred_home }}
export YARN_HOME=/usr/lib/hadoop-yarn
export JSVC_HOME=/usr/lib/bigtop-utils
export JAVA_HOME={{ java_home }}
{% if hadoop_send_to_logstash %}
export HADOOP_ROOT_LOGGER="{{ hadoop_log_level }},{{ hadoop_logstash_appender }}"
export HADOOP_MAPRED_ROOT_LOGGER="{{ hadoop_log_level }},{{ hadoop_logstash_appender }}"
{% else %}
export HADOOP_ROOT_LOGGER="{{ hadoop_log_level }},{{ hadoop_log_appender }}"
export HADOOP_MAPRED_ROOT_LOGGER="{{ hadoop_log_level }},{{ hadoop_log_appender }}"
{% endif %}
export HADOOP_CLASSPATH="/usr/lib/hbase/hbase.jar:/etc/hbase/conf:/usr/lib/zookeeper/zookeeper.jar:/etc/zookeeper/conf:$HADOOP_CLASSPATH"


# Disable IPv6.
export HADOOP_OPTS="{{ hadoop_default_java_opts }} $HADOOP_OPTS"

# The maximum amount of heap to use, in MB. Default is 1000.
export HADOOP_HEAPSIZE={{ hadoop_default_heapsize }}

{% if hadoop_jmx_enabled is defined and hadoop_jmx_enabled %}
HADOOP_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false"
HADOOP_JMX_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/hadoop-jmx/conf/jmxremote.passwd"
HADOOP_JMX_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.access.file=/etc/hadoop-jmx/conf/jmxremote.access"
# Command specific options appended to HADOOP_OPTS when specified
export HADOOP_NAMENODE_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ hadoop_namenode_jmx_port }} $HADOOP_NAMENODE_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ hadoop_secondary_namenode_jmx_port }} $HADOOP_SECONDARYNAMENODE_OPTS"
export HADOOP_DATANODE_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ hadoop_datanode_jmx_port }} $HADOOP_DATANODE_OPTS"
export HADOOP_BALANCER_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ hadoop_balancer_jmx_port }} $HADOOP_BALANCER_OPTS"
export HADOOP_JOBTRACKER_OPTS="$HADOOP_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ hadoop_jobtracker_jmx_port }} $HADOOP_JOBTRACKER_OPTS"
{% endif %}


# Where log files are stored.  $HADOOP_HOME/logs by default.
if [ -z "$HADOOP_LOG_DIR " ] ; then
    export HADOOP_LOG_DIR=/var/log/hadoop-0.20-mapreduce
fi 

# A string representing this instance of hadoop. $USER by default.
export HADOOP_IDENT_STRING={{ hadoop_cluster_name }}

