export HADOOP_OPTS="-Djava.net.preferIPv4Stack=true $HADOOP_OPTS"
{% if hadoop_send_to_logstash %}
export ZOO_LOG4J_PROP="{{ hadoop_log_level }},{{ hadoop_logstash_appender }}"
{% else %}
export ZOO_LOG4J_PROP="{{ hadoop_log_level }},{{ hadoop_log_appender }}"
{% endif %}

{% if hadoop_jmx_enabled is defined and hadoop_jmx_enabled %}
#export JMXDISABLE=false
#export JMXLOCALONLY=false
ZOOKEEPER_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false"
ZOOKEEPER_JMX_OPTS="$ZOOKEEPER_JMX_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/zookeeper-jmx/conf/jmxremote.passwd"
ZOOKEEPER_JMX_OPTS="$ZOOKEEPER_JMX_OPTS -Dcom.sun.management.jmxremote.access.file=/etc/zookeeper-jmx/conf/jmxremote.access"
# Command specific options appended to HADOOP_OPTS when specified
export JVMFLAGS="$ZOOKEEPER_JMX_OPTS -Dcom.sun.management.jmxremote.port={{ zookeeper_jmx_port }}"
{% endif %}
