You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mr...@apache.org on 2018/03/06 06:11:57 UTC

[ambari] branch branch-feature-AMBARI-14714 updated: [Ambari 23133] Hooks scripts has hadoop specific code

This is an automated email from the ASF dual-hosted git repository.

mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push:
     new 28ea5b9  [Ambari 23133] Hooks scripts has hadoop specific code
28ea5b9 is described below

commit 28ea5b98afd08582a2eb8b5d4093b4fae8714fd5
Author: Madhuvanthi Radhakrishnan <mr...@hortonworks.com>
AuthorDate: Mon Mar 5 19:11:08 2018 -0800

    [Ambari 23133] Hooks scripts has hadoop specific code
---
 .../src/main/resources/stack-hooks/before-ANY/scripts/params.py   | 8 ++++++--
 .../stack-hooks/before-ANY/scripts/shared_initialization.py       | 3 +++
 ambari-web/app/models/stack_service.js                            | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
index 09ed2e1..a2c3596 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
@@ -63,7 +63,8 @@ sudo = AMBARI_SUDO_BINARY
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
+stack_version_formatted = config['hostLevelParams']['stack_version']
+#stack_version_formatted = format_stack_version(stack_version_unformatted)
 
 upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 version = default("/commandParams/version", None)
@@ -109,7 +110,10 @@ def is_secure_port(port):
 # force the use of "current" in the hook
 hdfs_user_nofile_limit = default("/configurations/hadoop-env/hdfs_user_nofile_limit", "128000")
 hadoop_home = stack_select.get_hadoop_dir("home")
-hadoop_libexec_dir = stack_select.get_hadoop_dir("libexec")
+stack_name = default("/hostLevelParams/stack_name", None)
+stack_name = stack_name.lower()
+component_directory = "namenode"
+hadoop_libexec_dir = format("/usr/hwx/mpacks/{stack_name}/{stack_version_formatted}/{component_directory}/libexec")
 hadoop_lib_home = stack_select.get_hadoop_dir("lib")
 
 hadoop_dir = "/etc/hadoop"
diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
index 27679e0..b63c1ff 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
@@ -189,6 +189,9 @@ def setup_hadoop_env():
     # create /etc/hadoop
     Directory(params.hadoop_dir, mode=0755)
 
+    #Write out the conf directory
+    #TODO: Change with instance manager
+    Directory(params.hadoop_conf_dir, mode=0755)
     # write out hadoop-env.sh, but only if the directory exists
     if os.path.exists(params.hadoop_conf_dir):
       File(os.path.join(params.hadoop_conf_dir, 'hadoop-env.sh'), owner=tc_owner,
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index 1b583c1..3240ef4 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -340,7 +340,7 @@ App.StackService.componentsOrderForService = {
 
 //@TODO: Write unit test for no two keys in the object should have any intersecting elements in their values
 App.StackService.coSelected = {
-  'YARN': ['MAPREDUCE2']
+
 };
 
 

-- 
To stop receiving notification emails like this one, please contact
mradhakrishnan@apache.org.