AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d352282 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d352282 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d352282 Branch: refs/heads/branch-dev-patch-upgrade Commit: 6d3522825b962e926fe5e244b706a619c74b0116 Parents: 5af6d54 Author: Attila Doroszlai <[email protected]> Authored: Tue Sep 27 11:20:06 2016 +0200 Committer: Toader, Sebastian <[email protected]> Committed: Tue Sep 27 11:20:06 2016 +0200 ---------------------------------------------------------------------- .../scripts/shared_initialization.py | 2 +- .../MICROSOFT_R/8.0.0/metainfo.xml | 4 ++-- .../MICROSOFT_R/8.0.0/service_advisor.py | 22 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/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 2182fd1..397c22d 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 @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml index 6998efc..709929e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml @@ -27,8 +27,8 @@ <components> <component> - <name>MICROSOFT_R_CLIENT</name> - <displayName>Microsoft R Client</displayName> + <name>MICROSOFT_R_SERVER_CLIENT</name> + <displayName>Microsoft R Server Client</displayName> <category>CLIENT</category> <cardinality>1+</cardinality> <commandScript> http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py ---------------------------------------------------------------------- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py index 891d2c9..58f0dbe 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py @@ -37,19 +37,19 @@ except Exception as e: class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): def colocateService(self, hostsComponentsMap, serviceComponents): - # colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs - rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_CLIENT"] + # colocate R_SERVER_CLIENT with NODEMANAGERs and YARN_CLIENTs + rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_SERVER_CLIENT"] traceback.print_tb(None) rClientComponent = rClientComponent[0] if not self.isComponentHostsPopulated(rClientComponent): for hostName in hostsComponentsMap.keys(): hostComponents = hostsComponentsMap[hostName] if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents) \ - and {"name": "MICROSOFT_R_CLIENT"} not in hostComponents: - hostsComponentsMap[hostName].append({ "name": "MICROSOFT_R_CLIENT" }) + and {"name": "MICROSOFT_R_SERVER_CLIENT"} not in hostComponents: + hostsComponentsMap[hostName].append({ "name": "MICROSOFT_R_SERVER_CLIENT" }) if ({"name": "NODEMANAGER"} not in hostComponents and {"name": "YARN_CLIENT"} not in hostComponents) \ - and {"name": "MICROSOFT_R_CLIENT"} in hostComponents: - hostsComponentsMap[hostName].remove({"name": "MICROSOFT_R_CLIENT"}) + and {"name": "MICROSOFT_R_SERVER_CLIENT"} in hostComponents: + hostsComponentsMap[hostName].remove({"name": "MICROSOFT_R_SERVER_CLIENT"}) def getServiceComponentLayoutValidations(self, services, hosts): componentsListList = [service["components"] for service in services["services"]] @@ -57,17 +57,17 @@ class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): hostsList = [host["Hosts"]["host_name"] for host in hosts["items"]] hostsCount = len(hostsList) - rClientHosts = self.getHosts(componentsList, "MICROSOFT_R_CLIENT") + rClientHosts = self.getHosts(componentsList, "MICROSOFT_R_SERVER_CLIENT") expectedrClientHosts = set(self.getHosts(componentsList, "NODEMANAGER")) | set(self.getHosts(componentsList, "YARN_CLIENT")) items = [] - # Generate WARNING if any R_CLIENT is not colocated with NODEMANAGER or YARN_CLIENT + # Generate WARNING if any R_SERVER_CLIENT is not colocated with NODEMANAGER or YARN_CLIENT mismatchHosts = sorted(expectedrClientHosts.symmetric_difference(set(rClientHosts))) if len(mismatchHosts) > 0: hostsString = ', '.join(mismatchHosts) - message = "Microsoft-R Client must be installed on NodeManagers and YARN Clients. " \ + message = "Microsoft R Server Client must be installed on NodeManagers and YARN Clients. " \ "The following {0} host(s) do not satisfy the colocation recommendation: {1}".format(len(mismatchHosts), hostsString) - items.append( { "type": 'host-component', "level": 'WARN', "message": message, "component-name": 'MICROSOFT_R_CLIENT' } ) + items.append( { "type": 'host-component', "level": 'WARN', "message": message, "component-name": 'MICROSOFT_R_SERVER_CLIENT' } ) - return items \ No newline at end of file + return items
