ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-8809. Core Masters (YARN, ZK) to use server libs to start daemon processes (alejandro)
Date Fri, 19 Dec 2014 20:44:03 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk dcab10878 -> 613bdd763


AMBARI-8809. Core Masters (YARN, ZK) to use server libs to start daemon processes (alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/613bdd76
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/613bdd76
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/613bdd76

Branch: refs/heads/trunk
Commit: 613bdd763d25aeb51fe71a8394d9412de256fa21
Parents: dcab108
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Thu Dec 18 16:12:42 2014 -0800
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Fri Dec 19 12:25:36 2014 -0800

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/params.py    |  2 +-
 .../3.4.5.2.0/package/scripts/params.py         | 18 +++++++---
 .../services/YARN/package/scripts/params.py     | 35 +++++++++++++++-----
 3 files changed, 41 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/613bdd76/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py
index 12353de..c9c81bb 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py
@@ -50,7 +50,7 @@ secure_dn_ports_are_in_use = False
 if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
   mapreduce_libs_path = "/usr/hdp/current/hadoop-mapreduce-client/*"
   hadoop_libexec_dir = "/usr/hdp/current/hadoop-client/libexec"
-  hadoop_bin = "/usr/hdp/current/hadoop-client/sbin"    # TODO Rolling Upgrade, switch from
hadoop-client to server when starting daemon.
+  hadoop_bin = "/usr/hdp/current/hadoop-client/sbin"
   hadoop_bin_dir = "/usr/hdp/current/hadoop-client/bin"
   hadoop_home = "/usr/hdp/current/hadoop-client"
   if not security_enabled:

http://git-wip-us.apache.org/repos/asf/ambari/blob/613bdd76/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params.py
index b52d6e3..1bdc698 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params.py
@@ -36,14 +36,22 @@ version = default("/commandParams/version", None)
 
 #hadoop params
 if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  zk_home = '/usr/hdp/current/zookeeper-client'
-  zk_bin = '/usr/hdp/current/zookeeper-client/bin'    # TODO Rolling Upgrade, needs to be
server binary when starting server daemon...
-  zk_cli_shell = '/usr/hdp/current/zookeeper-client/bin/zkCli.sh'
+  role_root = ""
+  command_role = default("/role", "")
+  if command_role == "ZOOKEEPER_SERVER":
+    role_root = "zookeeper-server"
+  elif command_role == "ZOOKEEPER_CLIENT":
+    role_root = "zookeeper-client"
+
+  zk_home = format("/usr/hdp/current/{role_root}")
+  zk_bin = format("/usr/hdp/current/{role_root}/bin")
+  zk_cli_shell = format("/usr/hdp/current/{role_root}/bin/zkCli.sh")
 else:
-  zk_home = '/usr'
-  zk_bin = '/usr/lib/zookeeper/bin'
+  zk_home = "/usr"
+  zk_bin = "/usr/lib/zookeeper/bin"
   zk_cli_shell = "/usr/lib/zookeeper/bin/zkCli.sh"
 
+
 config_dir = "/etc/zookeeper/conf"
 zk_user =  config['configurations']['zookeeper-env']['zk_user']
 hostname = config['hostname']

http://git-wip-us.apache.org/repos/asf/ambari/blob/613bdd76/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
index 67422d9..fda08a0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
@@ -39,14 +39,33 @@ hostname = config['hostname']
 
 #hadoop params
 if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  hadoop_libexec_dir = "/usr/hdp/current/hadoop-client/libexec"
-  hadoop_bin = "/usr/hdp/current/hadoop-client/sbin"
-  hadoop_bin_dir = "/usr/hdp/current/hadoop-client/bin"
-  hadoop_yarn_home = '/usr/hdp/current/hadoop-yarn-client'
-  hadoop_mapred2_jar_location = '/usr/hdp/current/hadoop-mapreduce-client'
-  mapred_bin = '/usr/hdp/current/hadoop-mapreduce-client/sbin'
-  yarn_bin = '/usr/hdp/current/hadoop-yarn-client/sbin'
-  yarn_container_bin = '/usr/hdp/current/hadoop-yarn-client/bin'
+  yarn_role_root = "hadoop-yarn-client"
+  mapred_role_root = "hadoop-mapreduce-client"
+
+  command_role = default("/role", "")
+  if command_role == "APP_TIMELINE_SERVER":
+    yarn_role_root = "hadoop-yarn-timelineserver"
+  elif command_role == "HISTORYSERVER":
+    mapred_role_root = "hadoop-mapreduce-historyserver"
+  elif command_role == "MAPREDUCE2_CLIENT":
+    mapred_role_root = "hadoop-mapreduce-client"
+  elif command_role == "NODEMANAGER":
+    yarn_role_root = "hadoop-yarn-nodemanager"
+  elif command_role == "RESOURCEMANAGER":
+    yarn_role_root = "hadoop-yarn-resourcemanager"
+  elif command_role == "YARN_CLIENT":
+    yarn_role_root = "hadoop-yarn-client"
+
+  hadoop_libexec_dir          = "/usr/hdp/current/hadoop-client/libexec"
+  hadoop_bin                  = "/usr/hdp/current/hadoop-client/sbin"
+  hadoop_bin_dir              = "/usr/hdp/current/hadoop-client/bin"
+
+  hadoop_mapred2_jar_location = format("/usr/hdp/current/{mapred_role_root}")
+  mapred_bin                  = format("/usr/hdp/current/{mapred_role_root}/sbin")
+
+  hadoop_yarn_home            = format("/usr/hdp/current/{yarn_role_root}")
+  yarn_bin                    = format("/usr/hdp/current/{yarn_role_root}/sbin")
+  yarn_container_bin          = format("/usr/hdp/current/{yarn_role_root}/bin")
 else:
   hadoop_libexec_dir = "/usr/lib/hadoop/libexec"
   hadoop_bin = "/usr/lib/hadoop/sbin"


Mime
View raw message