You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/07/17 13:53:24 UTC
ambari git commit: AMBARI-21493. Fix PERF stack scripts to handle
changed config paths (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-3.0-perf 650e23df8 -> e41dcd30d
AMBARI-21493. Fix PERF stack scripts to handle changed config paths (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e41dcd30
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e41dcd30
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e41dcd30
Branch: refs/heads/branch-3.0-perf
Commit: e41dcd30df69ec7522332eb1f38e24d33d11c002
Parents: 650e23d
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Jul 17 16:52:58 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Jul 17 16:52:58 2017 +0300
----------------------------------------------------------------------
.../functions/get_not_managed_resources.py | 2 +-
.../libraries/functions/stack_features.py | 2 +-
.../libraries/providers/xml_config.py | 4 ++-
.../libraries/script/dummy.py | 6 +++--
.../libraries/script/script.py | 28 ++++++++++----------
.../2.0.6/hooks/after-INSTALL/scripts/params.py | 12 ++++-----
.../scripts/shared_initialization.py | 2 +-
.../2.0.6/hooks/before-ANY/scripts/params.py | 20 +++++++-------
.../hooks/before-INSTALL/scripts/params.py | 28 ++++++++++----------
.../scripts/repo_initialization.py | 6 ++---
.../2.0.6/hooks/before-START/scripts/params.py | 22 +++++++--------
.../scripts/shared_initialization.py | 2 +-
.../3.0/hooks/after-INSTALL/scripts/params.py | 8 +++---
.../scripts/shared_initialization.py | 2 +-
.../HDP/3.0/hooks/before-ANY/scripts/params.py | 18 ++++++-------
.../3.0/hooks/before-INSTALL/scripts/params.py | 26 +++++++++---------
.../3.0/hooks/before-START/scripts/params.py | 20 +++++++-------
.../PERF/1.0/hooks/before-ANY/scripts/params.py | 8 +++---
.../PERF/1.0/services/FAKEHBASE/metainfo.xml | 2 +-
.../PERF/1.0/services/FAKEHDFS/metainfo.xml | 2 +-
.../services/FAKEHDFS/package/scripts/params.py | 2 +-
.../services/KERBEROS/package/scripts/params.py | 4 +--
22 files changed, 114 insertions(+), 112 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py
index 4af636b..b636607 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py
@@ -33,7 +33,7 @@ def get_not_managed_resources():
except config values from cluster-env/managed_hdfs_resource_property_names
"""
config = Script.get_config()
- not_managed_hdfs_path_list = json.loads(config['hostLevelParams']['not_managed_hdfs_path_list'])[:]
+ not_managed_hdfs_path_list = json.loads(config['clusterLevelParams']['not_managed_hdfs_path_list'])[:]
if 'managed_hdfs_resource_property_names' in config['configurations']['cluster-env']:
managed_hdfs_resource_property_names = config['configurations']['cluster-env']['managed_hdfs_resource_property_names']
managed_hdfs_resource_property_list = filter(None, [property.strip() for property in managed_hdfs_resource_property_names.split(',')])
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
index 2b3df5f..c3856e4 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
@@ -87,7 +87,7 @@ def get_stack_feature_version(config):
raise Fail("Unable to determine the correct version since hostLevelParams and commandParams were not present in the configuration dictionary")
# should always be there
- stack_version = config['hostLevelParams']['stack_version']
+ stack_version = config['clusterLevelParams']['stack_version']
# something like 2.4.0.0-1234; represents the version for the command
# (or None if this is a cluster install and it hasn't been calculated yet)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py b/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
index 28697bf..eebd0dd 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
@@ -29,11 +29,13 @@ from resource_management.core.source import InlineTemplate
from resource_management.libraries.functions.format import format
from resource_management.core.environment import Environment
from resource_management.core.logger import Logger
+from resource_management.libraries.functions.is_empty import is_empty
class XmlConfigProvider(Provider):
def action_create(self):
filename = self.resource.filename
xml_config_provider_config_dir = self.resource.conf_dir
+ configuration_attrs = {} if is_empty(self.resource.configuration_attributes) else self.resource.configuration_attributes
# |e - for html-like escaping of <,>,',"
config_content = InlineTemplate(''' <configuration>
@@ -53,7 +55,7 @@ class XmlConfigProvider(Provider):
</property>
{% endfor %}
</configuration>''', extra_imports=[time, resource_management, resource_management.core, resource_management.core.source], configurations_dict=self.resource.configurations,
- configuration_attrs=self.resource.configuration_attributes)
+ configuration_attrs=configuration_attrs)
xml_config_dest_file_path = os.path.join(xml_config_provider_config_dir, filename)
Logger.info("Generating config: {0}".format(xml_config_dest_file_path))
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
index ad5f2a6..c9f94d0 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
@@ -56,7 +56,7 @@ class Dummy(Script):
self.config = Script.get_config()
# Cannot rely on system hostname since will run multiple Ambari agents on the same host.
- self.host_name = self.config["hostname"]
+ self.host_name = self.config["agentLevelParams"]["hostname"]
# Should still define self.component_name which is needed for status commands.
if "role" in self.config:
@@ -74,8 +74,9 @@ class Dummy(Script):
def install(self, env):
print "Install"
self.prepare()
+ """
component_name = self.get_component_name()
- repo_info = str(default("/hostLevelParams/repo_info", "1.1.1.1-1"))
+ repo_info = str(default("/hostLevelParams/repoInfo", "1.1.1.1-1"))
matches = re.findall(r"([\d\.]+\-\d+)", repo_info)
version = matches[0] if matches and len(matches) > 0 else "1.1.1.1-1"
@@ -87,6 +88,7 @@ class Dummy(Script):
if component_name:
conf_select.select("PERF", component_name, version)
stack_select.select(component_name, version)
+ """
def configure(self, env):
print "Configure"
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index a08feab..269fc72 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -29,6 +29,7 @@ import platform
import inspect
import tarfile
import time
+import traceback
from optparse import OptionParser
import resource_management
from ambari_commons import OSCheck, OSConst
@@ -113,7 +114,7 @@ class LockedConfigureMeta(type):
def locking_configure(obj, *args, **kw):
# local import to avoid circular dependency (default imports Script)
from resource_management.libraries.functions.default import default
- parallel_execution_enabled = int(default("/agentConfigParams/agent/parallel_execution", 0)) == 1
+ parallel_execution_enabled = int(default("/agentLevelParams/agentConfigParams/agent/parallel_execution", 0)) == 1
lock = FcntlBasedProcessLock(get_config_lock_file(), skip_fcntl_failures = True, enabled = parallel_execution_enabled)
with lock:
original_configure(obj, *args, **kw)
@@ -535,7 +536,7 @@ class Script(object):
:return: a stack name or None
"""
from resource_management.libraries.functions.default import default
- return default("/hostLevelParams/stack_name", "HDP")
+ return default("/clusterLevelParams/stack_name", "HDP")
@staticmethod
def get_stack_root():
@@ -555,10 +556,10 @@ class Script(object):
:return: a normalized stack version or None
"""
config = Script.get_config()
- if 'hostLevelParams' not in config or 'stack_version' not in config['hostLevelParams']:
+ if 'clusterLevelParams' not in config or 'stack_version' not in config['clusterLevelParams']:
return None
- stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
+ stack_version_unformatted = str(config['clusterLevelParams']['stack_version'])
if stack_version_unformatted is None or stack_version_unformatted == '':
return None
@@ -647,16 +648,15 @@ class Script(object):
"""
config = self.get_config()
- if 'host_sys_prepped' in config['hostLevelParams']:
+ if 'host_sys_prepped' in config['ambariLevelParams']:
# do not install anything on sys-prepped host
- if config['hostLevelParams']['host_sys_prepped'] == True:
+ if config['ambariLevelParams']['host_sys_prepped'] == True:
Logger.info("Node has all packages pre-installed. Skipping.")
return
- pass
try:
- package_list_str = config['hostLevelParams']['package_list']
- agent_stack_retry_on_unavailability = bool(config['hostLevelParams']['agent_stack_retry_on_unavailability'])
- agent_stack_retry_count = int(config['hostLevelParams']['agent_stack_retry_count'])
+ package_list_str = config['commandParams']['package_list']
+ agent_stack_retry_on_unavailability = bool(config['ambariLevelParams']['agent_stack_retry_on_unavailability'])
+ agent_stack_retry_count = int(config['ambariLevelParams']['agent_stack_retry_count'])
if isinstance(package_list_str, basestring) and len(package_list_str) > 0:
package_list = json.loads(package_list_str)
@@ -674,15 +674,15 @@ class Script(object):
retry_on_repo_unavailability=agent_stack_retry_on_unavailability,
retry_count=agent_stack_retry_count)
except KeyError:
- pass # No reason to worry
+ traceback.print_exc()
if OSCheck.is_windows_family():
#TODO hacky install of windows msi, remove it or move to old(2.1) stack definition when component based install will be implemented
hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"]
- install_windows_msi(config['hostLevelParams']['jdk_location'],
- config["hostLevelParams"]["agentCacheDir"], ["hdp-2.3.0.0.winpkg.msi", "hdp-2.3.0.0.cab", "hdp-2.3.0.0-01.cab"],
+ install_windows_msi(config['ambariLevelParams']['jdk_location'],
+ config["agentLevelParams"]["agentCacheDir"], ["hdp-2.3.0.0.winpkg.msi", "hdp-2.3.0.0.cab", "hdp-2.3.0.0-01.cab"],
hadoop_user, self.get_password(hadoop_user),
- str(config['hostLevelParams']['stack_version']))
+ str(config['clusterLevelParams']['stack_version']))
reload_windows_env()
def check_package_condition(self, package):
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
index 9abd2fe..4f4386d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/params.py
@@ -35,11 +35,11 @@ tmp_dir = Script.get_tmp_dir()
dfs_type = default("/commandParams/dfs_type", "")
is_parallel_execution_enabled = int(default("/agentConfigParams/agent/parallel_execution", 0)) == 1
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
sudo = AMBARI_SUDO_BINARY
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
# current host stack version
@@ -51,8 +51,8 @@ service_name = config['serviceName']
# logsearch configuration
logsearch_logfeeder_conf = "/etc/ambari-logsearch-logfeeder/conf"
-agent_cache_dir = config['hostLevelParams']['agentCacheDir']
-service_package_folder = config['commandParams']['service_package_folder']
+agent_cache_dir = config['agentLevelParams']['agentCacheDir']
+service_package_folder = config['serviceLevelParams']['service_package_folder']
logsearch_service_name = service_name.lower().replace("_", "-")
logsearch_config_file_name = 'input.config-' + logsearch_service_name + ".json"
logsearch_config_file_path = agent_cache_dir + "/" + service_package_folder + "/templates/" + logsearch_config_file_name + ".j2"
@@ -76,7 +76,7 @@ versioned_stack_root = '/usr/hdp/current'
security_enabled = config['configurations']['cluster-env']['security_enabled']
#java params
-java_home = config['hostLevelParams']['java_home']
+java_home = config['ambariLevelParams']['java_home']
#hadoop params
hdfs_log_dir_prefix = config['configurations']['hadoop-env']['hdfs_log_dir_prefix']
@@ -105,7 +105,7 @@ mapred_log_dir_prefix = default("/configurations/mapred-env/mapred_log_dir_prefi
hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
user_group = config['configurations']['cluster-env']['user_group']
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
has_namenode = not len(namenode_host) == 0
if has_namenode or dfs_type == 'HCFS':
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
index 36a202f..fbf09c5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -71,7 +71,7 @@ def setup_config():
XmlConfig("core-site.xml",
conf_dir=params.hadoop_conf_dir,
configurations=params.config['configurations']['core-site'],
- configuration_attributes=params.config['configuration_attributes']['core-site'],
+ configuration_attributes=params.config['configurationAttributes']['core-site'],
owner=params.hdfs_user,
group=params.user_group,
only_if=format("ls {hadoop_conf_dir}"))
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
index 4052d1d..ea08470 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
@@ -48,16 +48,16 @@ architecture = get_architecture()
dfs_type = default("/commandParams/dfs_type", "")
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
-jdk_name = default("/hostLevelParams/jdk_name", None)
-java_home = config['hostLevelParams']['java_home']
-java_version = expect("/hostLevelParams/java_version", int)
-jdk_location = config['hostLevelParams']['jdk_location']
+jdk_name = default("/ambariLevelParams/jdk_name", None)
+java_home = config['ambariLevelParams']['java_home']
+java_version = expect("/ambariLevelParams/java_version", int)
+jdk_location = config['ambariLevelParams']['jdk_location']
sudo = AMBARI_SUDO_BINARY
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
@@ -181,7 +181,7 @@ zeppelin_group = config['configurations']['zeppelin-env']["zeppelin_group"]
user_group = config['configurations']['cluster-env']['user_group']
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
falcon_server_hosts = default("/clusterHostInfo/falcon_server_hosts", [])
@@ -232,7 +232,7 @@ smoke_user_dirs = format("/tmp/hadoop-{smoke_user},/tmp/hsperfdata_{smoke_user},
if has_hbase_masters:
hbase_user_dirs = format("/home/{hbase_user},/tmp/{hbase_user},/usr/bin/{hbase_user},/var/log/{hbase_user},{hbase_tmp_dir}")
#repo params
-repo_info = config['hostLevelParams']['repo_info']
+repo_info = config['hostLevelParams']['repoInfo']
service_repo_info = default("/hostLevelParams/service_repo_info",None)
user_to_groups_dict = collections.defaultdict(lambda:[user_group])
@@ -259,9 +259,9 @@ except ValueError:
print('User Group mapping (user_group) is missing in the hostLevelParams')
user_to_gid_dict = collections.defaultdict(lambda:user_group)
-user_list = json.loads(config['hostLevelParams']['user_list'])
-group_list = json.loads(config['hostLevelParams']['group_list'])
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+user_list = json.loads(config['clusterLevelParams']['user_list'])
+group_list = json.loads(config['clusterLevelParams']['group_list'])
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
tez_am_view_acls = config['configurations']['tez-site']["tez.am.view-acls"]
override_uid = str(default("/configurations/cluster-env/override_uid", "true")).lower()
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
index 6193c11..a72f3da 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
@@ -28,9 +28,9 @@ config = Script.get_config()
tmp_dir = Script.get_tmp_dir()
sudo = AMBARI_SUDO_BINARY
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-agent_stack_retry_on_unavailability = config['hostLevelParams']['agent_stack_retry_on_unavailability']
-agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count", int)
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+agent_stack_retry_on_unavailability = config['ambariLevelParams']['agent_stack_retry_on_unavailability']
+agent_stack_retry_count = expect("/ambariLevelParams/agent_stack_retry_count", int)
stack_version_formatted = format_stack_version(stack_version_unformatted)
#users and groups
@@ -50,17 +50,17 @@ repo_rhel_suse = config['configurations']['cluster-env']['repo_suse_rhel_templa
repo_ubuntu = config['configurations']['cluster-env']['repo_ubuntu_template']
#hosts
-hostname = config["hostname"]
+hostname = config['agentLevelParams']['hostname']
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-rm_host = default("/clusterHostInfo/rm_host", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+rm_host = default("/clusterHostInfo/resourcemanager_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
hive_server_host = default("/clusterHostInfo/hive_server_host", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-hs_host = default("/clusterHostInfo/hs_host", [])
+hs_host = default("/clusterHostInfo/historyserver_hosts", [])
jtnode_host = default("/clusterHostInfo/jtnode_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
storm_server_hosts = default("/clusterHostInfo/nimbus_hosts", [])
@@ -96,18 +96,18 @@ hbase_tmp_dir = "/tmp/hbase-hbase"
security_enabled = config['configurations']['cluster-env']['security_enabled']
#java params
-java_home = config['hostLevelParams']['java_home']
+java_home = config['ambariLevelParams']['java_home']
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
-jdk_name = default("/hostLevelParams/jdk_name", None) # None when jdk is already installed by user
+jdk_name = default("/ambariLevelParams/jdk_name", None) # None when jdk is already installed by user
jce_policy_zip = default("/hostLevelParams/jce_name", None) # None when jdk is already installed by user
-jce_location = config['hostLevelParams']['jdk_location']
-jdk_location = config['hostLevelParams']['jdk_location']
+jce_location = config['ambariLevelParams']['jdk_location']
+jdk_location = config['ambariLevelParams']['jdk_location']
ignore_groupsusers_create = default("/configurations/cluster-env/ignore_groupsusers_create", False)
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
smoke_user_dirs = format("/tmp/hadoop-{smoke_user},/tmp/hsperfdata_{smoke_user},/home/{smoke_user},/tmp/{smoke_user},/tmp/sqoop-{smoke_user}")
if has_hbase_masters:
hbase_user_dirs = format("/home/{hbase_user},/tmp/{hbase_user},/usr/bin/{hbase_user},/var/log/{hbase_user},{hbase_tmp_dir}")
#repo params
-repo_info = config['hostLevelParams']['repo_info']
+repo_info = config['hostLevelParams']['repoInfo']
service_repo_info = default("/hostLevelParams/service_repo_info",None)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
index a35dce7..28f5df4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -25,13 +25,11 @@ import ambari_simplejson as json # simplejson is much faster comparing to Python
# components_lits = repoName + postfix
_UBUNTU_REPO_COMPONENTS_POSTFIX = ["main"]
-def _alter_repo(action, repo_string, repo_template):
+def _alter_repo(action, repo_dicts, repo_template):
"""
@param action: "delete" or "create"
- @param repo_string: e.g. "[{\"baseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\",\"osType\":\"centos6\",\"repoId\":\"HDP-2.0._\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\"}]"
+ @param repo_dicts: e.g. "[{\"baseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\",\"osType\":\"centos6\",\"repoId\":\"HDP-2.0._\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\"}]"
"""
- repo_dicts = json.loads(repo_string)
-
if not isinstance(repo_dicts, list):
repo_dicts = [repo_dicts]
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
index 70ebfeb..be16b63 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
@@ -36,7 +36,7 @@ tmp_dir = Script.get_tmp_dir()
artifact_dir = tmp_dir + "/AMBARI-artifacts"
# Global flag enabling or disabling the sysprep feature
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
# Whether to skip copying fast-hdfs-resource.jar to /var/lib/ambari-agent/lib/
# This is required if tarballs are going to be copied to HDFS, so set to False
@@ -45,7 +45,7 @@ sysprep_skip_copy_fast_jar_hdfs = host_sys_prepped and default("/configurations/
# Whether to skip setting up the unlimited key JCE policy
sysprep_skip_setup_jce = host_sys_prepped and default("/configurations/cluster-env/sysprep_skip_setup_jce", False)
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
dfs_type = default("/commandParams/dfs_type", "")
@@ -85,7 +85,7 @@ if ambari_server_resources_url is not None and ambari_server_resources_url.endsw
# Unlimited key JCE policy params
jce_policy_zip = default("/hostLevelParams/jce_name", None) # None when jdk is already installed by user
unlimited_key_jce_required = default("/hostLevelParams/unlimited_key_jce_required", False)
-jdk_name = default("/hostLevelParams/jdk_name", None)
+jdk_name = default("/ambariLevelParams/jdk_name", None)
java_home = default("/hostLevelParams/java_home", None)
java_exec = "{0}/bin/java".format(java_home) if java_home is not None else "/bin/java"
@@ -98,17 +98,17 @@ yarn_user = config['configurations']['yarn-env']['yarn_user']
user_group = config['configurations']['cluster-env']['user_group']
#hosts
-hostname = config["hostname"]
+hostname = config['agentLevelParams']['hostname']
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-rm_host = default("/clusterHostInfo/rm_host", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+rm_host = default("/clusterHostInfo/resourcemanager_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
hive_server_host = default("/clusterHostInfo/hive_server_host", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-hs_host = default("/clusterHostInfo/hs_host", [])
+hs_host = default("/clusterHostInfo/historyserver_hosts", [])
jtnode_host = default("/clusterHostInfo/jtnode_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
@@ -164,7 +164,7 @@ if has_zk_host:
zookeeper_clientPort = config['configurations']['zoo.cfg']['clientPort']
else:
zookeeper_clientPort = '2181'
- zookeeper_quorum = (':' + zookeeper_clientPort + ',').join(config['clusterHostInfo']['zookeeper_hosts'])
+ zookeeper_quorum = (':' + zookeeper_clientPort + ',').join(config['clusterHostInfo']['zookeeper_server_hosts'])
# last port config
zookeeper_quorum += ':' + zookeeper_clientPort
@@ -258,7 +258,7 @@ default_fs = config['configurations']['core-site']['fs.defaultFS']
all_hosts = default("/clusterHostInfo/all_hosts", [])
all_racks = default("/clusterHostInfo/all_racks", [])
all_ipv4_ips = default("/clusterHostInfo/all_ipv4_ips", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
#topology files
net_topology_script_file_path = "/etc/hadoop/conf/topology_script.py"
@@ -270,7 +270,7 @@ net_topology_mapping_data_file_path = os.path.join(net_topology_script_dir, net_
has_core_site = 'core-site' in config['configurations']
hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
kinit_path_local = get_kinit_path()
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
hdfs_principal_name = default('/configurations/hadoop-env/hdfs_principal_name', None)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index 148d235..e246fbd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -205,7 +205,7 @@ def setup_unlimited_key_jce_policy():
The following criteria must be met:
* The cluster has not been previously prepared (sys preped) - cluster-env/sysprep_skip_setup_jce = False
- * Ambari is managing the host's JVM - /hostLevelParams/jdk_name is set
+ * Ambari is managing the host's JVM - /ambariLevelParams/jdk_name is set
* Either security is enabled OR a service requires it - /hostLevelParams/unlimited_key_jce_required = True
* The unlimited key JCE policy has not already been installed
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/params.py
index 5dcd39b..d2979bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/params.py
@@ -36,11 +36,11 @@ dfs_type = default("/commandParams/dfs_type", "")
stack_root = Script.get_stack_root()
is_parallel_execution_enabled = int(default("/agentConfigParams/agent/parallel_execution", 0)) == 1
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
sudo = AMBARI_SUDO_BINARY
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
# current host stack version
@@ -57,7 +57,7 @@ versioned_stack_root = format('{stack_root}/current')
security_enabled = config['configurations']['cluster-env']['security_enabled']
#java params
-java_home = config['hostLevelParams']['java_home']
+java_home = config['ambariLevelParams']['java_home']
#hadoop params
hdfs_log_dir_prefix = config['configurations']['hadoop-env']['hdfs_log_dir_prefix']
@@ -86,7 +86,7 @@ mapred_log_dir_prefix = default("/configurations/mapred-env/mapred_log_dir_prefi
hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
user_group = config['configurations']['cluster-env']['user_group']
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
has_namenode = not len(namenode_host) == 0
if has_namenode or dfs_type == 'HCFS':
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/shared_initialization.py
index e9f2283..939c815 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -67,7 +67,7 @@ def setup_config():
XmlConfig("core-site.xml",
conf_dir=params.hadoop_conf_dir,
configurations=params.config['configurations']['core-site'],
- configuration_attributes=params.config['configuration_attributes']['core-site'],
+ configuration_attributes=params.config['configurationAttributes']['core-site'],
owner=params.hdfs_user,
group=params.user_group,
only_if=format("ls {hadoop_conf_dir}"))
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/params.py
index 9be9101..ab061c6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/params.py
@@ -48,15 +48,15 @@ stack_root = Script.get_stack_root()
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
jdk_name = default("/hostLevelParams/jdk_name", None)
-java_home = config['hostLevelParams']['java_home']
-java_version = expect("/hostLevelParams/java_version", int)
-jdk_location = config['hostLevelParams']['jdk_location']
+java_home = config['ambariLevelParams']['java_home']
+java_version = expect("/ambariLevelParams/java_version", int)
+jdk_location = config['ambariLevelParams']['jdk_location']
sudo = AMBARI_SUDO_BINARY
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
@@ -172,7 +172,7 @@ zeppelin_group = config['configurations']['zeppelin-env']["zeppelin_group"]
user_group = config['configurations']['cluster-env']['user_group']
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
falcon_server_hosts = default("/clusterHostInfo/falcon_server_hosts", [])
@@ -223,7 +223,7 @@ smoke_user_dirs = format("/tmp/hadoop-{smoke_user},/tmp/hsperfdata_{smoke_user},
if has_hbase_masters:
hbase_user_dirs = format("/home/{hbase_user},/tmp/{hbase_user},/usr/bin/{hbase_user},/var/log/{hbase_user},{hbase_tmp_dir}")
#repo params
-repo_info = config['hostLevelParams']['repo_info']
+repo_info = config['hostLevelParams']['repoInfo']
service_repo_info = default("/hostLevelParams/service_repo_info",None)
user_to_groups_dict = collections.defaultdict(lambda:[user_group])
@@ -244,9 +244,9 @@ if has_zeppelin_master:
user_to_gid_dict = collections.defaultdict(lambda:user_group)
-user_list = json.loads(config['hostLevelParams']['user_list'])
-group_list = json.loads(config['hostLevelParams']['group_list'])
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+user_list = json.loads(config['clusterLevelParams']['user_list'])
+group_list = json.loads(config['clusterLevelParams']['group_list'])
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
tez_am_view_acls = config['configurations']['tez-site']["tez.am.view-acls"]
override_uid = str(default("/configurations/cluster-env/override_uid", "true")).lower()
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
index 6193c11..f9a17d6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
@@ -28,9 +28,9 @@ config = Script.get_config()
tmp_dir = Script.get_tmp_dir()
sudo = AMBARI_SUDO_BINARY
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-agent_stack_retry_on_unavailability = config['hostLevelParams']['agent_stack_retry_on_unavailability']
-agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count", int)
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+agent_stack_retry_on_unavailability = config['ambariLevelParams']['agent_stack_retry_on_unavailability']
+agent_stack_retry_count = expect("/ambariLevelParams/agent_stack_retry_count", int)
stack_version_formatted = format_stack_version(stack_version_unformatted)
#users and groups
@@ -50,17 +50,17 @@ repo_rhel_suse = config['configurations']['cluster-env']['repo_suse_rhel_templa
repo_ubuntu = config['configurations']['cluster-env']['repo_ubuntu_template']
#hosts
-hostname = config["hostname"]
+hostname = config['agentLevelParams']['hostname']
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-rm_host = default("/clusterHostInfo/rm_host", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+rm_host = default("/clusterHostInfo/resourcemanager_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
hive_server_host = default("/clusterHostInfo/hive_server_host", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-hs_host = default("/clusterHostInfo/hs_host", [])
+hs_host = default("/clusterHostInfo/historyserver_hosts", [])
jtnode_host = default("/clusterHostInfo/jtnode_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
storm_server_hosts = default("/clusterHostInfo/nimbus_hosts", [])
@@ -96,18 +96,18 @@ hbase_tmp_dir = "/tmp/hbase-hbase"
security_enabled = config['configurations']['cluster-env']['security_enabled']
#java params
-java_home = config['hostLevelParams']['java_home']
+java_home = config['ambariLevelParams']['java_home']
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
jdk_name = default("/hostLevelParams/jdk_name", None) # None when jdk is already installed by user
jce_policy_zip = default("/hostLevelParams/jce_name", None) # None when jdk is already installed by user
-jce_location = config['hostLevelParams']['jdk_location']
-jdk_location = config['hostLevelParams']['jdk_location']
+jce_location = config['ambariLevelParams']['jdk_location']
+jdk_location = config['ambariLevelParams']['jdk_location']
ignore_groupsusers_create = default("/configurations/cluster-env/ignore_groupsusers_create", False)
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
smoke_user_dirs = format("/tmp/hadoop-{smoke_user},/tmp/hsperfdata_{smoke_user},/home/{smoke_user},/tmp/{smoke_user},/tmp/sqoop-{smoke_user}")
if has_hbase_masters:
hbase_user_dirs = format("/home/{hbase_user},/tmp/{hbase_user},/usr/bin/{hbase_user},/var/log/{hbase_user},{hbase_tmp_dir}")
#repo params
-repo_info = config['hostLevelParams']['repo_info']
+repo_info = config['hostLevelParams']['repoInfo']
service_repo_info = default("/hostLevelParams/service_repo_info",None)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
index 5a5361c..e2735d9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
@@ -36,7 +36,7 @@ tmp_dir = Script.get_tmp_dir()
artifact_dir = tmp_dir + "/AMBARI-artifacts"
# Global flag enabling or disabling the sysprep feature
-host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
# Whether to skip copying fast-hdfs-resource.jar to /var/lib/ambari-agent/lib/
# This is required if tarballs are going to be copied to HDFS, so set to False
@@ -45,7 +45,7 @@ sysprep_skip_copy_fast_jar_hdfs = host_sys_prepped and default("/configurations/
# Whether to skip setting up the unlimited key JCE policy
sysprep_skip_setup_jce = host_sys_prepped and default("/configurations/cluster-env/sysprep_skip_setup_jce", False)
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
dfs_type = default("/commandParams/dfs_type", "")
@@ -92,17 +92,17 @@ yarn_user = config['configurations']['yarn-env']['yarn_user']
user_group = config['configurations']['cluster-env']['user_group']
#hosts
-hostname = config["hostname"]
+hostname = config['agentLevelParams']['hostname']
ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-rm_host = default("/clusterHostInfo/rm_host", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+rm_host = default("/clusterHostInfo/resourcemanager_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
oozie_servers = default("/clusterHostInfo/oozie_server", [])
hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
hive_server_host = default("/clusterHostInfo/hive_server_host", [])
hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-hs_host = default("/clusterHostInfo/hs_host", [])
+hs_host = default("/clusterHostInfo/historyserver_hosts", [])
jtnode_host = default("/clusterHostInfo/jtnode_host", [])
-namenode_host = default("/clusterHostInfo/namenode_host", [])
+namenode_host = default("/clusterHostInfo/namenode_hosts", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
@@ -158,7 +158,7 @@ if has_zk_host:
zookeeper_clientPort = config['configurations']['zoo.cfg']['clientPort']
else:
zookeeper_clientPort = '2181'
- zookeeper_quorum = (':' + zookeeper_clientPort + ',').join(config['clusterHostInfo']['zookeeper_hosts'])
+ zookeeper_quorum = (':' + zookeeper_clientPort + ',').join(config['clusterHostInfo']['zookeeper_server_hosts'])
# last port config
zookeeper_quorum += ':' + zookeeper_clientPort
@@ -242,7 +242,7 @@ default_fs = config['configurations']['core-site']['fs.defaultFS']
all_hosts = default("/clusterHostInfo/all_hosts", [])
all_racks = default("/clusterHostInfo/all_racks", [])
all_ipv4_ips = default("/clusterHostInfo/all_ipv4_ips", [])
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
+slave_hosts = default("/clusterHostInfo/datanode_hosts", [])
#topology files
net_topology_script_file_path = "/etc/hadoop/conf/topology_script.py"
@@ -254,7 +254,7 @@ net_topology_mapping_data_file_path = os.path.join(net_topology_script_dir, net_
has_core_site = 'core-site' in config['configurations']
hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
kinit_path_local = get_kinit_path()
-stack_version_unformatted = config['hostLevelParams']['stack_version']
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
stack_version_formatted = format_stack_version(stack_version_unformatted)
hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
hdfs_principal_name = default('/configurations/hadoop-env/hdfs_principal_name', None)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
index 2c2c901..836c809 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
@@ -26,15 +26,15 @@ from ambari_commons.constants import AMBARI_SUDO_BINARY
config = Script.get_config()
tmp_dir = Script.get_tmp_dir()
-group_list = json.loads(config['hostLevelParams']['group_list'])
-user_list = json.loads(config['hostLevelParams']['user_list'])
+group_list = json.loads(config['clusterLevelParams']['group_list'])
+user_list = json.loads(config['clusterLevelParams']['user_list'])
user_group = config['configurations']['cluster-env']['user_group']
user_to_gid_dict = collections.defaultdict(lambda:user_group)
user_to_groups_dict = collections.defaultdict(lambda:[user_group])
-jdk_name = default("/hostLevelParams/jdk_name", None)
-java_home = config['hostLevelParams']['java_home']
+jdk_name = default("/ambariLevelParams/jdk_name", None)
+java_home = config['ambariLevelParams']['java_home']
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
jdk_location = config['hostLevelParams']['jdk_location']
java_version = expect("/hostLevelParams/java_version", int)
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHBASE/metainfo.xml
index 66d5a29..3f38ca0 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHBASE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHBASE/metainfo.xml
@@ -187,7 +187,7 @@
</commandScript>
<requiredServices>
- <service>FAKEZOOKEEPER</service>
+ <service>ZOOKEEPER</service>
<service>FAKEHDFS</service>
</requiredServices>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/metainfo.xml
index 13b10e0..6203427 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/metainfo.xml
@@ -223,7 +223,7 @@
</commandScript>
<requiredServices>
- <service>FAKEZOOKEEPER</service>
+ <service>ZOOKEEPER</service>
</requiredServices>
<configuration-dependencies>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/params.py
index 8068441..294e0f4 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/params.py
@@ -27,7 +27,7 @@ tmp_dir = Script.get_tmp_dir()
architecture = get_architecture()
-stack_name = default("/hostLevelParams/stack_name", None)
+stack_name = default("/clusterLevelParams/stack_name", None)
# New Cluster Stack Version that is defined during the RESTART of a Stack Upgrade
version = default("/commandParams/version", None)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/e41dcd30/ambari-server/src/main/resources/stacks/PERF/1.0/services/KERBEROS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/KERBEROS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/PERF/1.0/services/KERBEROS/package/scripts/params.py
index 4eb5b02..e73df3a 100644
--- a/ambari-server/src/main/resources/stacks/PERF/1.0/services/KERBEROS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/KERBEROS/package/scripts/params.py
@@ -65,8 +65,8 @@ manage_identities = 'true'
artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
jce_policy_zip = default("/hostLevelParams/jce_name", None) # None when jdk is already installed by user
jce_location = config['hostLevelParams']['jdk_location']
-jdk_name = default("/hostLevelParams/jdk_name", None)
-java_home = config['hostLevelParams']['java_home']
+jdk_name = default("/ambariLevelParams/jdk_name", None)
+java_home = config['ambariLevelParams']['java_home']
java_version = expect("/hostLevelParams/java_version", int)
security_enabled = config['configurations']['cluster-env']['security_enabled']