Author: swagle
Date: Tue Mar 19 00:27:39 2013
New Revision: 1458071
URL: http://svn.apache.org/r1458071
Log:
AMBARI-1657. User directories on HDFS do not get created with custom names
provided from Ambari UI. (swagle)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_mode.rb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_owner.rb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Mar 19 00:27:39 2013
@@ -498,6 +498,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1657. User directories on HDFS do not get created with custom names
+ provided from Ambari UI. (swagle)
+
AMBARI-1655. DELETE is not successful against ClusterStateEntity (ncole)
AMBARI-1439. rrd file location should be read from global config. (swagle)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_mode.rb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_mode.rb?rev=1458071&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_mode.rb
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_mode.rb
Tue Mar 19 00:27:39 2013
@@ -0,0 +1,65 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+#
+#to handle differences in how args passed in
+module Puppet::Parser::Functions
+ newfunction(:hdp_hadoop_get_mode, :type => :rvalue) do |args|
+
+ dir = args[0]
+
+ oozie_dir = lookupvar("::hdp::params::oozie_hdfs_user_dir")
+ oozie_dir_mode = lookupvar("::hdp::params::oozie_hdfs_user_mode")
+
+ hcat_dir = lookupvar("::hdp::params::hcat_hdfs_user_dir")
+ hcat_dir_mode = lookupvar("::hdp::params::hcat_hdfs_user_mode")
+
+ webhcat_dir = lookupvar("::hdp::params::webhcat_hdfs_user_dir")
+ webhcat_dir_mode = lookupvar("::hdp::params::webhcat_hdfs_user_mode")
+
+ hive_dir = lookupvar("::hdp::params::hive_hdfs_user_dir")
+ hive_dir_mode = lookupvar("::hdp::params::hive_hdfs_user_mode")
+
+ smoke_dir = lookupvar("::hdp::params::smoke_hdfs_user_dir")
+ smoke_dir_mode = lookupvar("::hdp::params::smoke_hdfs_user_mode")
+
+ modes = []
+ modes.push({:dir => oozie_dir, :mode => oozie_dir_mode})
+ modes.push({:dir => hcat_dir, :mode => hcat_dir_mode})
+ modes.push({:dir => webhcat_dir, :mode => webhcat_dir_mode})
+ modes.push({:dir => hive_dir, :mode => hive_dir_mode})
+ modes.push({:dir => smoke_dir, :mode => smoke_dir_mode})
+
+ modes_grouped = {}
+ modes.each do |item|
+ if modes_grouped[item[:dir]].nil?
+ modes_grouped[item[:dir]]=[]
+ end
+ modes_grouped[item[:dir]]=modes_grouped[item[:dir]] + [(item[:mode])]
+ end
+
+ modes_max = {}
+
+ modes_grouped.each_key do |key|
+ modes_max[key] = modes_grouped[key].max
+ end
+
+ modes_max[dir]
+ end
+end
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_owner.rb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_owner.rb?rev=1458071&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_owner.rb
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/lib/puppet/parser/functions/hdp_hadoop_get_owner.rb
Tue Mar 19 00:27:39 2013
@@ -0,0 +1,51 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+#
+#to handle differences in how args passed in
+module Puppet::Parser::Functions
+ newfunction(:hdp_hadoop_get_owner, :type => :rvalue) do |args|
+
+ dir = args[0]
+
+ oozie_dir = lookupvar("::hdp::params::oozie_hdfs_user_dir")
+ oozie_user = lookupvar("::hdp::params::oozie_user")
+
+ hcat_dir = lookupvar("::hdp::params::hcat_hdfs_user_dir")
+ hcat_user = lookupvar("::hdp::params::hcat_user")
+
+ webhcat_dir = lookupvar("::hdp::params::webhcat_hdfs_user_dir")
+ webhcat_user = lookupvar("::hdp::params::webhcat_user")
+
+ hive_dir = lookupvar("::hdp::params::hive_hdfs_user_dir")
+ hive_user = lookupvar("::hdp::params::hive_user")
+
+ smoke_dir = lookupvar("::hdp::params::smoke_hdfs_user_dir")
+ smoke_user = lookupvar("::hdp::params::smokeuser")
+
+ dirs_to_owners = {}
+ dirs_to_owners[oozie_dir] = oozie_user
+ dirs_to_owners[hcat_dir] = hcat_user
+ dirs_to_owners[webhcat_dir] = webhcat_user
+ dirs_to_owners[hive_dir] = hive_user
+ dirs_to_owners[smoke_dir] = smoke_user
+
+ dirs_to_owners[dir]
+ end
+end
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
Tue Mar 19 00:27:39 2013
@@ -60,7 +60,7 @@ define hdp-hadoop::hdfs::directory(
if ($mode != undef) {
#TODO: see if there is a good 'unless test'
- if ($recursive_mode == true) {
+ if ($recursive_chmod == true) {
$chmod_cmd = "fs -chmod -R ${mode} ${name}"
} else {
$chmod_cmd = "fs -chmod ${mode} ${name}"
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
Tue Mar 19 00:27:39 2013
@@ -85,10 +85,14 @@ class hdp-hadoop::namenode(
service_state => $service_state
}
+ hdp-hadoop::namenode::create_user_directories { 'create_user_directories' :
+ service_state => $service_state
+ }
+
#top level does not need anchors
Class['hdp-hadoop'] -> Hdp-hadoop::Service['namenode']
Hdp-hadoop::Namenode::Create_name_dirs<||> ->
Hdp-hadoop::Service['namenode']
- Hdp-hadoop::Service['namenode'] ->
Hdp-hadoop::Namenode::Create_app_directories<||>
+ Hdp-hadoop::Service['namenode'] ->
Hdp-hadoop::Namenode::Create_app_directories<||> ->
Hdp-hadoop::Namenode::Create_user_directories<||>
if ($service_state == 'running' and $format == true) {
Class['hdp-hadoop'] -> Class['hdp-hadoop::namenode::format'] ->
Hdp-hadoop::Service['namenode']
Hdp-hadoop::Namenode::Create_name_dirs<||> ->
Class['hdp-hadoop::namenode::format']
@@ -111,15 +115,8 @@ define hdp-hadoop::namenode::create_name
define hdp-hadoop::namenode::create_app_directories($service_state)
{
+
if ($service_state == 'running') {
- $smoke_test_user = $hdp::params::smokeuser
- $smoke_hdfs_user_dir = $hdp::params::smoke_hdfs_user_dir
- hdp-hadoop::hdfs::directory{ $smoke_hdfs_user_dir:
- service_state => $service_state,
- owner => $smoke_test_user,
- mode => '770',
- recursive_chmod => true
- }
hdp-hadoop::hdfs::directory{ "/tmp" :
service_state => $service_state,
@@ -147,46 +144,87 @@ define hdp-hadoop::namenode::create_app_
if ($hdp::params::hive_server_host != "") {
$hive_user = $hdp::params::hive_user
+ $hive_apps_whs_dir = $hdp::params::hive_apps_whs_dir
- hdp-hadoop::hdfs::directory{ '/apps/hive/warehouse':
+ hdp-hadoop::hdfs::directory{ $hive_apps_whs_dir:
service_state => $service_state,
owner => $hive_user,
mode => '777',
recursive_chmod => true
}
- hdp-hadoop::hdfs::directory{ $hive_hdfs_user_dir:
+ }
+
+ if ($hdp::params::webhcat_server_host != "") {
+ $webhcat_user = $hdp::params::webhcat_user
+ $webhcat_apps_dir = $hdp::params::webhcat_apps_dir
+
+ hdp-hadoop::hdfs::directory{ $webhcat_apps_dir:
service_state => $service_state,
- owner => $hive_user
+ owner => $webhcat_user,
+ mode => '755',
+ recursive_chmod => true
}
}
+ }
+}
+
+
+define hdp-hadoop::namenode::create_user_directories($service_state)
+{
+ if ($service_state == 'running') {
+ $smoke_hdfs_user_dir = $hdp::params::smoke_hdfs_user_dir
+
+ $smoke_user_dir_item="$smoke_hdfs_user_dir,"
+
+ if ($hdp::params::hive_server_host != "") {
+ $hive_hdfs_user_dir = $hdp::params::hive_hdfs_user_dir
+ $hive_dir_item="$hive_hdfs_user_dir,"
+ } else {
+ $hive_dir_item=""
+ }
if ($hdp::params::oozie_server != "") {
- $oozie_user = $hdp::params::oozie_user
$oozie_hdfs_user_dir = $hdp::params::oozie_hdfs_user_dir
- hdp-hadoop::hdfs::directory{ $oozie_hdfs_user_dir:
- service_state => $service_state,
- owner => $oozie_user,
- mode => '775',
- recursive_chmod => true
- }
+ $oozie_dir_item="$oozie_hdfs_user_dir,"
+ } else {
+ $oozie_dir_item=""
}
if ($hdp::params::webhcat_server_host != "") {
- $templeton_user = $hdp::params::templeton_user
$hcat_hdfs_user_dir = $hdp::params::hcat_hdfs_user_dir
- hdp-hadoop::hdfs::directory{ $hcat_hdfs_user_dir:
- service_state => $service_state,
- owner => $templeton_user,
- mode => '755',
- recursive_chmod => true
- }
-
- hdp-hadoop::hdfs::directory{ '/apps/webhcat':
- service_state => $service_state,
- owner => $templeton_user,
- mode => '755',
- recursive_chmod => true
+ $webhcat_hdfs_user_dir = $hdp::params::webhcat_hdfs_user_dir
+ $webhcat_dir_item="$webhcat_hdfs_user_dir,"
+ if ($hcat_hdfs_user_dir != webhcat_hdfs_user_dir) {
+ $hcat_dir_item="$hcat_hdfs_user_dir,"
+ } else {
+ $hcat_dir_item=""
}
+ } else {
+ $webhcat_dir_item=""
}
+
+ $users_dir_list_comm_sep = "$smoke_user_dir_item $hive_dir_item
$oozie_dir_item $hcat_dir_item $webhcat_dir_item"
+
+ #Get unique users directories set
+ $users_dirs_set = hdp_set_from_comma_list($users_dir_list_comm_sep)
+
+ hdp-hadoop::namenode::create_user_directory{$users_dirs_set:
+ service_state => $service_state}
}
+
}
+
+define hdp-hadoop::namenode::create_user_directory($service_state)
+{
+
+ $owner = hdp_hadoop_get_owner($name)
+ $mode = hdp_hadoop_get_mode($name)
+ debug("## Creating user directory: $name, owner: $owner, mode: $mode")
+ hdp-hadoop::hdfs::directory{ $name:
+ service_state => $service_state,
+ mode => $mode,
+ owner => $owner,
+ recursive_chmod => true
+ }
+}
+
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
Tue Mar 19 00:27:39 2013
@@ -42,7 +42,7 @@ class hdp-hcat(
service_state => $service_state,
force => true
}
-
+
hdp::directory { $hcat_pid_dir:
service_state => $service_state,
force => true
@@ -59,18 +59,23 @@ class hdp-hcat(
service_state => $service_state,
force => true
}
-
+
hdp::directory_recursive_create { $hcat_pid_dir:
owner => $webhcat_user,
service_state => $service_state,
force => true
}
-
+
hdp::user{ $webhcat_user:}
-
+
+ if ($webhcat_user != $hcat_user) {
+ hdp::user { $hcat_user:}
+ }
+
hdp-hcat::configfile { 'hcat-env.sh':}
- Hdp::Package['hcat'] -> Hdp::User[$webhcat_user] ->
Hdp::Directory[$hcat_config_dir] ->
Hdp::Directory_recursive_create[$hcat_pid_dir] -> Hdp-hcat::Configfile<||>
+ Hdp::Package['hcat'] -> Hdp::User<|title == $webhcat_user or title ==
$hcat_user|> -> Hdp::Directory[$hcat_config_dir] ->
Hdp::Directory_recursive_create[$hcat_pid_dir] -> Hdp-hcat::Configfile<||>
+
} else {
hdp_fail("TODO not implemented yet: service_state = ${service_state}")
}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
Tue Mar 19 00:27:39 2013
@@ -83,7 +83,8 @@ class hdp-templeton::server(
class hdp-templeton::copy-hdfs-directories($service_state)
{
- $templeton_user = $hdp-templeton::params::templeton_user
+ $webhcat_apps_dir = $hdp::params::webhcat_apps_dir
+ $webhcat_user = $hdp::params::webhcat_user
# $pig_src_tar = "$hdp::params::artifact_dir/pig.tar.gz"
# hdp-hadoop::hdfs::copyfromlocal { '/usr/share/templeton/templeton*jar':
@@ -94,25 +95,25 @@ class hdp-templeton::copy-hdfs-directori
# }
hdp-hadoop::hdfs::copyfromlocal {
'/usr/lib/hadoop/contrib/streaming/hadoop-streaming*.jar':
service_state => $service_state,
- owner => $templeton_user,
+ owner => $webhcat_user,
mode => '755',
- dest_dir => '/apps/webhcat/hadoop-streaming.jar',
+ dest_dir => "$webhcat_apps_dir/hadoop-streaming.jar",
kinit_if_needed => $kinit_if_needed
}
#TODO: Use
${hdp::params::artifact_dir}/${hdp-templeton::params::pig_tar_name} instead
hdp-hadoop::hdfs::copyfromlocal { '/usr/share/HDP-webhcat/pig.tar.gz' :
service_state => $service_state,
- owner => $templeton_user,
+ owner => $webhcat_user,
mode => '755',
- dest_dir => '/apps/webhcat/pig.tar.gz',
+ dest_dir => "$webhcat_apps_dir/pig.tar.gz",
kinit_if_needed => $kinit_if_needed
}
#TODO: Use
${hdp::params::artifact_dir}/${hdp-templeton::params::hive_tar_name} instead
hdp-hadoop::hdfs::copyfromlocal { '/usr/share/HDP-webhcat/hive.tar.gz' :
service_state => $service_state,
- owner => $templeton_user,
+ owner => $webhcat_user,
mode => '755',
- dest_dir => '/apps/webhcat/hive.tar.gz',
+ dest_dir => "$webhcat_apps_dir/hive.tar.gz",
kinit_if_needed => $kinit_if_needed
}
}
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb?rev=1458071&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
Tue Mar 19 00:27:39 2013
@@ -0,0 +1,31 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+#
+#to handle differences in how args passed in
+require 'set'
+module Puppet::Parser::Functions
+ newfunction(:hdp_set_from_comma_list, :type => :rvalue) do |args|
+ list = function_hdp_array_from_comma_list(args)
+ list.each_index {|i| list [i]=list [i].strip}
+ #Delete empty strings
+ list.reject! { |e| e.empty? }
+ list.uniq
+ end
+end
\ No newline at end of file
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1458071&r1=1458070&r2=1458071&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
Tue Mar 19 00:27:39 2013
@@ -124,6 +124,7 @@ class hdp::params()
$hive_user = hdp_default("hive_user","hive")
$hcat_user = hdp_default("hcat_user","hcat")
+ $webhcat_user = hdp_default("webhcat_user","hcat")
$oozie_user = hdp_default("oozie_user","oozie")
$templeton_user = hdp_default("templeton_user","hcat")
@@ -134,12 +135,22 @@ class hdp::params()
$smokeuser = hdp_default("smokeuser","ambari_qa")
$smoke_user_group = hdp_default("smoke_user_group","users")
- ############ Hdfs directories
- $hbase_hdfs_root_dir =
hdp_default("hadoop/hbase-site/hbase_hdfs_root_dir","/apps/hbase/data")
- $oozie_hdfs_user_dir = hdp_default("oozie_hdfs_user_dir", "/user/oozie")
- $hcat_hdfs_user_dir = hdp_default("hcat_hdfs_user_dir", "/user/hcat")
- $hive_hdfs_user_dir = hdp_default("hive_hdfs_user_dir", "/user/hive")
+ ############ Hdfs users directories
+ $oozie_hdfs_user_dir = hdp_default("oozie_hdfs_user_dir",
"/user/${oozie_user}")
+ $oozie_hdfs_user_mode = 775
+ $hcat_hdfs_user_dir = hdp_default("hcat_hdfs_user_dir", "/user/${hcat_user}")
+ $hcat_hdfs_user_mode = 755
+ $webhcat_hdfs_user_dir = hdp_default("hcat_hdfs_user_dir",
"/user/${webhcat_user}")
+ $webhcat_hdfs_user_mode = 755
+ $hive_hdfs_user_dir = hdp_default("hive_hdfs_user_dir", "/user/${hive_user}")
+ $hive_hdfs_user_mode = 700
$smoke_hdfs_user_dir = hdp_default("smoke_hdfs_user_dir",
"/user/${smokeuser}")
+ $smoke_hdfs_user_mode = 770
+
+ ############ Hdfs apps directories
+ $hive_apps_whs_dir = hdp_default("hive_apps_whs_dir", "/apps/hive/warehouse")
+ $webhcat_apps_dir = hdp_default("webhcat_apps_dir", "/apps/webhcat")
+ $hbase_hdfs_root_dir =
hdp_default("hadoop/hbase-site/hbase_hdfs_root_dir","/apps/hbase/data")
#because of Puppet user resource issue make sure that $hadoop_user is
different from user_group
if ($security_enabled == true) {