Repository: ambari
Updated Branches:
  refs/heads/branch-3.0-perf 1fcf4a759 -> 21e590b81


AMBARI-21827. Fix config paths in libraries folder (aonishuk)


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

Branch: refs/heads/branch-3.0-perf
Commit: 21e590b811bac086d045add4e0dd3334f72240bc
Parents: 1fcf4a7
Author: Andrew Onishuk <[email protected]>
Authored: Mon Aug 28 16:23:42 2017 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Mon Aug 28 16:23:42 2017 +0300

----------------------------------------------------------------------
 .../resource_management/libraries/functions/conf_select.py       | 2 +-
 .../resource_management/libraries/functions/copy_tarball.py      | 2 +-
 .../libraries/functions/get_not_managed_resources.py             | 2 +-
 .../libraries/functions/package_conditions.py                    | 2 +-
 .../resource_management/libraries/functions/stack_features.py    | 4 ++--
 .../resource_management/libraries/functions/stack_select.py      | 2 +-
 .../libraries/functions/version_select_util.py                   | 2 +-
 .../main/python/resource_management/libraries/providers/msi.py   | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index ce00f0c..fb1efc6 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -404,7 +404,7 @@ def get_hadoop_conf_dir(force_latest_on_upgrade=False):
 
     if stack_version and check_stack_feature(StackFeature.CONFIG_VERSIONING, 
stack_version):
       hadoop_conf_dir = os.path.join(stack_root, "current", "hadoop-client", 
"conf")
-      stack_name = default("/hostLevelParams/stack_name", None)
+      stack_name = default("/clusterLevelParams/stack_name", None)
       version = default("/commandParams/version", None)
 
       if not os.path.islink(hadoop_conf_dir) and stack_name and version:

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 82a732b..0bb56c5 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -79,7 +79,7 @@ SERVICE_MAP = {
 
 def get_sysprep_skip_copy_tarballs_hdfs():
   import params
-  host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)
+  host_sys_prepped = default("/ambariLevelParams/host_sys_prepped", False)
 
   # By default, copy the tarballs to HDFS. If the cluster is sysprepped, then 
set based on the config.
   sysprep_skip_copy_tarballs_hdfs = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/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 b636607..404a976 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
@@ -29,7 +29,7 @@ from resource_management.libraries.functions.default import 
default
 def get_not_managed_resources():
   """
   Returns a list of not managed hdfs paths.
-  The result contains all paths from hostLevelParams/not_managed_hdfs_path_list
+  The result contains all paths from 
clusterLevelParams/not_managed_hdfs_path_list
   except config values from cluster-env/managed_hdfs_resource_property_names
   """
   config = Script.get_config()

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
index 5a16061..46bfc2e 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
@@ -96,7 +96,7 @@ def should_install_hive_atlas():
 
 def should_install_falcon_atlas_hook():
   config = Script.get_config()
-  stack_version_unformatted = config['hostLevelParams']['stack_version']
+  stack_version_unformatted = config['clusterLevelParams']['stack_version']
   stack_version_formatted = format_stack_version(stack_version_unformatted)
   if check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT_2_3, 
stack_version_formatted) \
       or check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT, 
stack_version_formatted):

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/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 c3856e4..4335b03 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
@@ -83,7 +83,7 @@ def get_stack_feature_version(config):
   """
   from resource_management.libraries.functions.default import default
 
-  if "hostLevelParams" not in config or "commandParams" not in config:
+  if "clusterLevelParams" not in config or "commandParams" not in config:
     raise Fail("Unable to determine the correct version since hostLevelParams 
and commandParams were not present in the configuration dictionary")
 
   # should always be there
@@ -167,7 +167,7 @@ def _is_stop_command(config):
   if role_command == _ROLE_COMMAND_STOP:
     return True
 
-  custom_command = default("/hostLevelParams/custom_command", None)
+  custom_command = default("/commandParams/custom_command", None)
   if role_command == _ROLE_COMMAND_CUSTOM and custom_command == 
_ROLE_COMMAND_STOP:
     return True
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
index 79393b9..0441569 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
@@ -282,7 +282,7 @@ def _get_upgrade_stack():
   """
   from resource_management.libraries.functions.default import default
   direction = default("/commandParams/upgrade_direction", None)
-  stack_name = default("/hostLevelParams/stack_name", None)
+  stack_name = default("/clusterLevelParams/stack_name", None)
   stack_version = default("/commandParams/version", None)
 
   if direction and stack_name and stack_version:

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
index 79dc874..347e963 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
@@ -34,7 +34,7 @@ def get_component_version(stack_name, component_name):
   For any stack name, returns the version currently installed for a given 
component.
   Because each stack name may have different logic, the input is a generic 
dictionary.
   :param stack_name: one of HDP, HDPWIN, BIGTOP, PHD, etc. usually retrieved 
from
-  the command-#.json file's ["hostLevelParams"]["stack_name"]
+  the command-#.json file's ["clusterLevelParams"]["stack_name"]
   :param component_name: Component name as a string necessary to get the 
version
   :return: Returns a string if found, e.g., 2.2.1.0-2175, otherwise, returns 
None
   """

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e590b8/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py 
b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
index 7f4deeb..f615d76 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
@@ -32,7 +32,7 @@ class MsiProvider(Provider):
     msi_file_path = name
     dict_args = self.resource.dict_args
     list_args = self.resource.list_args
-    working_dir = 
os.path.abspath(Script.get_config()["hostLevelParams"]["agentCacheDir"])
+    working_dir = 
os.path.abspath(Script.get_config()["agentLevelParams"]["agentCacheDir"])
     http_source = self.resource.http_source
 
     # name can be a path to file in local file system

Reply via email to