crowbar/crowbar-hadoop

View on GitHub
chef/cookbooks/hadoop/templates/default/hadoop-env.sh.erb

Summary

Maintainability
Test Coverage
#
# Cookbook Name: hadoop
# File: hadoop-env.sh
#
# Copyright (c) 2011 Dell Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Generated by Chef for <%= @node[:fqdn] %>

<% if @node[:hadoop][:env][:hadoop_log_dir] && !@node[:hadoop][:env][:hadoop_log_dir].empty? %>
export HADOOP_LOG_DIR=<%= @node[:hadoop][:env][:hadoop_log_dir] %>
<% end %>

<% if @node[:hadoop][:env][:hadoop_heapsize] && !@node[:hadoop][:env][:hadoop_heapsize].empty? %>
export HADOOP_HEAPSIZE=<%= @node[:hadoop][:env][:hadoop_heapsize] %>
<% end %>

<% if @node[:hadoop][:env][:hadoop_namenode_opts] && !@node[:hadoop][:env][:hadoop_namenode_opts].empty? %>
export HADOOP_NAMENODE_OPTS="<%= @node[:hadoop][:env][:hadoop_namenode_opts] %>"
<% end %>

<% if @node[:hadoop][:env][:hadoop_secondarynamenode_opts] && !@node[:hadoop][:env][:hadoop_secondarynamenode_opts].empty? %>
export HADOOP_SECONDARYNAMENODE_OPTS="<%= @node[:hadoop][:env][:hadoop_secondarynamenode_opts] %>"
<% end %>

<% if @node[:hadoop][:env][:hadoop_datanode_opts] && !@node[:hadoop][:env][:hadoop_datanode_opts].empty? %>
export HADOOP_DATANODE_OPTS="<%= @node[:hadoop][:env][:hadoop_datanode_opts] %>"
<% end %>

<% if @node[:hadoop][:env][:hadoop_jobtracker_opts] && !@node[:hadoop][:env][:hadoop_jobtracker_opts].empty? %>
export HADOOP_JOBTRACKER_OPTS="<%= @node[:hadoop][:env][:hadoop_jobtracker_opts] %>"
<% end %>

<% if @node[:hadoop][:env][:hadoop_balancer_opts] && !@node[:hadoop][:env][:hadoop_balancer_opts].empty? %>
export HADOOP_BALANCER_OPTS="<%= @node[:hadoop][:env][:hadoop_balancer_opts] %>"
<% end %>

<% if @node[:hadoop][:env][:hadoop_tasktracker_opts] && !@node[:hadoop][:env][:hadoop_tasktracker_opts].empty? %>
export HADOOP_TASKTRACKER_OPTS="<%= @node[:hadoop][:env][:hadoop_tasktracker_opts] %>"
<% end %>