You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2013/12/20 21:35:02 UTC
[2/2] git commit: AMBARI-4143. Hive Metastore warehouse dir and
WebHCat apps dir path is being retrieved from wrong property name (Dmytro
Shkvyra via dlysnichenko)
AMBARI-4143. Hive Metastore warehouse dir and WebHCat apps dir path is being retrieved from wrong property name (Dmytro Shkvyra via dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/205b884c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/205b884c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/205b884c
Branch: refs/heads/branch-1.4.3
Commit: 205b884c3614080b1a4a508134dcfcf6ee7011e2
Parents: aaf18db
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Dec 20 22:34:27 2013 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Dec 20 22:34:27 2013 +0200
----------------------------------------------------------------------
.../puppet/modules/hdp-hadoop/manifests/namenode.pp | 2 +-
.../puppet/modules/hdp-templeton/manifests/server.pp | 12 +++++++-----
.../lib/puppet/parser/functions/hdp_get_dir_from_url.rb | 11 ++++++++---
.../src/main/puppet/modules/hdp/manifests/params.pp | 3 +--
4 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/205b884c/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
index 7dee7a3..d0fc226 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
@@ -171,7 +171,7 @@ define hdp-hadoop::namenode::create_app_directories($service_state)
if ($hdp::params::webhcat_server_host != "") {
$webhcat_user = $hdp::params::webhcat_user
- $webhcat_apps_dir = $hdp::params::webhcat_apps_dir
+ $webhcat_apps_dir = hdp_get_directory_from_filepath(hdp_get_dir_from_url(hdp_default("webhcat-site/templeton.streaming.jar",""), "/apps/webhcat"))
hdp-hadoop::hdfs::directory{ $webhcat_apps_dir:
service_state => $service_state,
http://git-wip-us.apache.org/repos/asf/ambari/blob/205b884c/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp b/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
index 73a25cc..82a225b 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
@@ -76,7 +76,9 @@ class hdp-templeton::server(
class hdp-templeton::copy-hdfs-directories($service_state)
{
- $webhcat_apps_dir = $hdp::params::webhcat_apps_dir
+ $streaming_jar = hdp_get_dir_from_url(hdp_default("webhcat-site/templeton.streaming.jar",""), "/apps/webhcat/hadoop-streaming.jar")
+ $pig_archiv = hdp_get_dir_from_url(hdp_default("webhcat-site/templeton.pig.archive",""), "/apps/webhcat/pig.tar.gz")
+ $templeton_hive_archive = hdp_get_dir_from_url(hdp_default("webhcat-site/templeton.hive.archive",""), "/apps/webhcat/hive.tar.gz")
$webhcat_user = $hdp::params::webhcat_user
$smoke_test_user = $hdp::params::smokeuser
$smokeuser_keytab = $hdp::params::smokeuser_keytab
@@ -100,7 +102,7 @@ class hdp-templeton::copy-hdfs-directories($service_state)
service_state => $service_state,
owner => $webhcat_user,
mode => '755',
- dest_dir => "$webhcat_apps_dir/hadoop-streaming.jar",
+ dest_dir => "$streaming_jar",
kinit_if_needed => $kinit_if_needed
}
}
@@ -109,7 +111,7 @@ class hdp-templeton::copy-hdfs-directories($service_state)
service_state => $service_state,
owner => $webhcat_user,
mode => '755',
- dest_dir => "$webhcat_apps_dir/hadoop-streaming.jar",
+ dest_dir => "$streaming_jar",
kinit_if_needed => $kinit_if_needed
}
}
@@ -117,13 +119,13 @@ class hdp-templeton::copy-hdfs-directories($service_state)
service_state => $service_state,
owner => $webhcat_user,
mode => '755',
- dest_dir => "$webhcat_apps_dir/pig.tar.gz",
+ dest_dir => "$pig_archiv",
}
hdp-hadoop::hdfs::copyfromlocal { '/usr/share/HDP-webhcat/hive.tar.gz' :
service_state => $service_state,
owner => $webhcat_user,
mode => '755',
- dest_dir => "$webhcat_apps_dir/hive.tar.gz",
+ dest_dir => "$templeton_hive_archive",
}
Anchor["hdp::hdp-templeton::copy-hdfs-directories::begin"] ->
Exec[$kinit_cmd] ->
http://git-wip-us.apache.org/repos/asf/ambari/blob/205b884c/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
index 22d0ec6..1bd8ee4 100644
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
+++ b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
@@ -36,15 +36,20 @@ module Puppet::Parser::Functions
else
splitArgsResult = args.split(":")
end
- if splitArgsResult.length != 3
+ if splitArgsResult.length < 2
var = default
else
- strWithDir = splitArgsResult[2]
+ strWithDir = splitArgsResult[splitArgsResult.length - 1]
startIndexOfDir = strWithDir.index('/')
+ startIndexOfUri = strWithDir.index('///')
if startIndexOfDir == nil
var = default
else
- var = strWithDir[startIndexOfDir, strWithDir.size - 1]
+ if startIndexOfUri == nil
+ var = strWithDir[startIndexOfDir, strWithDir.size - 1]
+ else
+ var = strWithDir[startIndexOfDir + 2, strWithDir.size - 1]
+ end
end
end
end
http://git-wip-us.apache.org/repos/asf/ambari/blob/205b884c/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
index 08aa89d..012b559 100644
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
@@ -241,8 +241,7 @@ class hdp::params()
$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")
+ $hive_apps_whs_dir = hdp_default("hive-site/hive.metastore.warehouse.dir", "/apps/hive/warehouse")
$hbase_hdfs_root_dir = hdp_get_dir_from_url(hdp_default("hbase-site/hbase.rootdir"),"/apps/hbase/data")
$hbase_staging_dir = hdp_default("hbase-site/hbase.bulkload.staging.dir","/apps/hbase/staging")