#! /bin/bash

################################################
#
#              Generated by Chef
#
################################################

export JAVA_HOME=<%= node["bcpc"]["hadoop"]["java"] %>
export ZOO_LOG_DIR=/var/log/zookeeper
export ZOO_PID_DIR=/var/run/zookeeper
export ZOOPIDFILE=$ZOO_PID_DIR/zookeeper-server
export ZOOCFGDIR=<%= node[:bcpc][:hadoop][:zookeeper][:conf_dir] %>
export ZOO_DATADIR_AUTOCREATE_DISABLE=1
SERVER_JVMFLAGS="$SERVER_JVMFLAGS -Djute.maxbuffer=<%= node['bcpc']['hadoop']['yarn']['opts']['jute_buffer'] %>"
CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djute.maxbuffer=<%= node['bcpc']['hadoop']['yarn']['opts']['jute_buffer'] %>"
<% if node[:bcpc][:hadoop].attribute?(:jmx_enabled) and node[:bcpc][:hadoop][:jmx_enabled] %>
export JMXPORT=<%= @zk_jmx_port %>
<% end %>

<% if node[:bcpc][:hadoop][:kerberos][:enable] == true %>
SERVER_JVMFLAGS="$SERVER_JVMFLAGS -Djava.security.auth.login.config=/etc/zookeeper/conf/zookeeper-server.jaas"
CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djava.security.auth.login.config=/etc/zookeeper/conf/zookeeper-client.jaas"
<% end %>

export SERVER_JVMFLAGS
export CLIENT_JVMFLAGS

#! /bin/bash

################################################
#
#              Generated by Chef
#
################################################

export JAVA_HOME=<%= node["bcpc"]["hadoop"]["java"] %>
export ZOO_LOG_DIR=<%= node[:bcpc][:hadoop][:zookeeper][:log_dir] %>
export ZOO_PID_DIR=/var/run/zookeeper
export ZOOPIDFILE=$ZOO_PID_DIR/zookeeper-server
export ZOOCFGDIR=<%= node[:bcpc][:hadoop][:zookeeper][:conf_dir] %>
export ZOO_DATADIR_AUTOCREATE_DISABLE=1
SERVER_JVMFLAGS="$SERVER_JVMFLAGS -Djute.maxbuffer=<%= node['bcpc']['hadoop']['yarn']['opts']['jute_buffer'] %>"
CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djute.maxbuffer=<%= node['bcpc']['hadoop']['yarn']['opts']['jute_buffer'] %>"
<% if node[:bcpc][:hadoop].attribute?(:jmx_enabled) and node[:bcpc][:hadoop][:jmx_enabled] %>
export JMXPORT=<%= @zk_jmx_port %>
<% end %>

<% if node[:bcpc][:hadoop][:kerberos][:enable] == true %>
SERVER_JVMFLAGS="$SERVER_JVMFLAGS -Djava.security.auth.login.config=/etc/zookeeper/conf/zookeeper-server.jaas"
CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djava.security.auth.login.config=/etc/zookeeper/conf/zookeeper-client.jaas"
<% end %>

export SERVER_JVMFLAGS
export CLIENT_JVMFLAGS

Change export ZOO_LOG_DIR to use node attribute
Change export ZOO_LOG_DIR to use node attribute
