ambari git commit: AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan Shridhar via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 539a4149a -> 35d277399 AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan Shridhar via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/35d27739 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/35d27739 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/35d27739 Branch: refs/heads/trunk Commit: 35d27739976ccce1c1211def122b3dc7f404662d Parents: 539a414 Author: Sumit MohantyAuthored: Wed Jan 25 19:49:21 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 19:53:16 2017 -0800 -- .../package/scripts/hive_server_interactive.py | 181 ++ .../HIVE/configuration/hive-interactive-env.xml | 13 + .../stacks/2.5/HIVE/test_hive_server_int.py | 341 --- 3 files changed, 413 insertions(+), 122 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/35d27739/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index dd0d1c4..924c88c 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -253,6 +253,7 @@ class HiveServerInteractiveDefault(HiveServerInteractive): """ def _llap_start(self, env, cleanup=False): import params + Logger.info("Entered _llap_start()") env.set_params(params) if params.hive_server_interactive_ha: @@ -260,7 +261,11 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Check llap app state """ Logger.info("HSI HA is enabled. Checking if LLAP is already running ...") -status = self.check_llap_app_status(params.llap_app_name, 2, params.hive_server_interactive_ha) +if params.stack_supports_hive_interactive_ga: + status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, 2, params.hive_server_interactive_ha) +else: + status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, 2, params.hive_server_interactive_ha) + if status: Logger.info("LLAP app '{0}' is already running.".format(params.llap_app_name)) return True @@ -347,7 +352,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive): # We need to check the status of LLAP app to figure out it got # launched properly and is in running state. Then go ahead with Hive Interactive Server start. -status = self.check_llap_app_status(params.llap_app_name, params.num_retries_for_checking_llap_status) +if params.stack_supports_hive_interactive_ga: + status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, params.num_retries_for_checking_llap_status) +else: + status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, params.num_retries_for_checking_llap_status) if status: Logger.info("LLAP app '{0}' deployed successfully.".format(params.llap_app_name)) return True @@ -420,9 +428,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Execute(llap_kinit_cmd, user=params.hive_user) """ -Get llap app status data. +Get llap app status data for LLAP Tech Preview code base. """ -def _get_llap_app_status_info(self, app_name): +def _get_llap_app_status_info_in_llap_tp(self, app_name): import status_params LLAP_APP_STATUS_CMD_TIMEOUT = 0 @@ -432,6 +440,29 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Logger.info("Received 'llapstatus' command 'output' : {0}".format(output)) return self._make_valid_json(output) +""" +Get llap app status data for LLAP GA code base. + +Parameters: 'percent_desired_instances_to_be_up' : A value b/w 0.0 and 1.0. +'total_timeout' : Total wait time while checking the status via llapstatus command +'refresh_rate' : Frequency of polling for llapstatus. +""" +def _get_llap_app_status_info_in_llap_ga(self, percent_desired_instances_to_be_up, total_timeout, refresh_rate): + import status_params + + # llapstatus comamnd : llapstatus -w -r -i -t + # -w : Watch mode waits until all LLAP daemons are running or subset of the nodes are running
ambari git commit: AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan Shridhar via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 be21bf95b -> 924d117a5 AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan Shridhar via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/924d117a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/924d117a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/924d117a Branch: refs/heads/branch-2.5 Commit: 924d117a5e67663d84f016555dd97e0a73bec5c2 Parents: be21bf9 Author: Sumit MohantyAuthored: Wed Jan 25 19:49:21 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 19:49:21 2017 -0800 -- .../package/scripts/hive_server_interactive.py | 179 ++ .../HIVE/configuration/hive-interactive-env.xml | 13 + .../stacks/2.5/HIVE/test_hive_server_int.py | 343 --- 3 files changed, 415 insertions(+), 120 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/924d117a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index acfddc2..5c56823 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -254,6 +254,7 @@ class HiveServerInteractiveDefault(HiveServerInteractive): """ def _llap_start(self, env, cleanup=False): import params + Logger.info("Entered _llap_start()") env.set_params(params) if params.hive_server_interactive_ha: @@ -261,7 +262,11 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Check llap app state """ Logger.info("HSI HA is enabled. Checking if LLAP is already running ...") -status = self.check_llap_app_status(params.llap_app_name, 2, params.hive_server_interactive_ha) +if params.stack_supports_hive_interactive_ga: + status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, 2, params.hive_server_interactive_ha) +else: + status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, 2, params.hive_server_interactive_ha) + if status: Logger.info("LLAP app '{0}' is already running.".format(params.llap_app_name)) return True @@ -348,7 +353,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive): # We need to check the status of LLAP app to figure out it got # launched properly and is in running state. Then go ahead with Hive Interactive Server start. -status = self.check_llap_app_status(params.llap_app_name, params.num_retries_for_checking_llap_status) +if params.stack_supports_hive_interactive_ga: + status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, params.num_retries_for_checking_llap_status) +else: + status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, params.num_retries_for_checking_llap_status) if status: Logger.info("LLAP app '{0}' deployed successfully.".format(params.llap_app_name)) return True @@ -421,9 +429,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Execute(llap_kinit_cmd, user=params.hive_user) """ -Get llap app status data. +Get llap app status data for LLAP Tech Preview code base. """ -def _get_llap_app_status_info(self, app_name): +def _get_llap_app_status_info_in_llap_tp(self, app_name): import status_params LLAP_APP_STATUS_CMD_TIMEOUT = 0 @@ -433,6 +441,29 @@ class HiveServerInteractiveDefault(HiveServerInteractive): Logger.info("Received 'llapstatus' command 'output' : {0}".format(output)) return self._make_valid_json(output) +""" +Get llap app status data for LLAP GA code base. + +Parameters: 'percent_desired_instances_to_be_up' : A value b/w 0.0 and 1.0. +'total_timeout' : Total wait time while checking the status via llapstatus command +'refresh_rate' : Frequency of polling for llapstatus. +""" +def _get_llap_app_status_info_in_llap_ga(self, percent_desired_instances_to_be_up, total_timeout, refresh_rate): + import status_params + + # llapstatus comamnd : llapstatus -w -r -i -t + # -w : Watch mode waits until all LLAP daemons are running or subset of the nodes are
[1/3] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)
Repository: ambari Updated Branches: refs/heads/trunk 5a02a2ad1 -> 539a4149a http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 55f3d30..af4539d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -197,7 +197,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): if "referenceNodeManagerHost" in clusterData: nodemanagerMinRam = min(clusterData["referenceNodeManagerHost"]["total_mem"]/1024, nodemanagerMinRam) -callContext = getCallContext(services) +callContext = self.getCallContext(services) putYarnProperty('yarn.nodemanager.resource.memory-mb', int(round(min(clusterData['containers'] * clusterData['ramPerContainer'], nodemanagerMinRam # read from the supplied config #if 'recommendConfigurations' != callContext and \ @@ -248,7 +248,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor): putYarnPropertyAttribute("yarn.timeline-service.http-authentication.proxyuser.{0}.hosts".format(old_ambari_user), 'delete', 'true') putYarnPropertyAttribute("yarn.timeline-service.http-authentication.proxyuser.{0}.groups".format(old_ambari_user), 'delete', 'true') - def recommendMapReduce2Configurations(self, configurations, clusterData, services, hosts): putMapredProperty = self.putProperty(configurations, "mapred-site", services) putMapredProperty('yarn.app.mapreduce.am.resource.mb', int(clusterData['amMemory'])) @@ -269,27 +268,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor): if mr_queue is not None: putMapredProperty("mapreduce.job.queuename", mr_queue) - def getAmbariUser(self, services): -ambari_user = services['ambari-server-properties']['ambari-server.user'] -if "cluster-env" in services["configurations"] \ - and "ambari_principal_name" in services["configurations"]["cluster-env"]["properties"] \ -and "security_enabled" in services["configurations"]["cluster-env"]["properties"] \ -and services["configurations"]["cluster-env"]["properties"]["security_enabled"].lower() == "true": - ambari_user = services["configurations"]["cluster-env"]["properties"]["ambari_principal_name"] - ambari_user = ambari_user.split('@')[0] -return ambari_user - - def getOldAmbariUser(self, services): -ambari_user = None -if "cluster-env" in services["configurations"]: - if "security_enabled" in services["configurations"]["cluster-env"]["properties"] \ - and services["configurations"]["cluster-env"]["properties"]["security_enabled"].lower() == "true": - ambari_user = services['ambari-server-properties']['ambari-server.user'] - elif "ambari_principal_name" in services["configurations"]["cluster-env"]["properties"]: - ambari_user = services["configurations"]["cluster-env"]["properties"]["ambari_principal_name"] - ambari_user = ambari_user.split('@')[0] -return ambari_user - def getAmbariProxyUsersForHDFSValidationItems(self, properties, services): validationItems = [] servicesList = self.get_services_list(services) @@ -828,148 +806,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor): zookeeper_port = services['configurations']['zoo.cfg']['properties']['clientPort'] return zookeeper_port - def getConfigurationClusterSummary(self, servicesList, hosts, components, services): - -hBaseInstalled = False -if 'HBASE' in servicesList: - hBaseInstalled = True - -cluster = { - "cpu": 0, - "disk": 0, - "ram": 0, - "hBaseInstalled": hBaseInstalled, - "components": components -} - -if len(hosts["items"]) > 0: - nodeManagerHosts = self.getHostsWithComponent("YARN", "NODEMANAGER", services, hosts) - # NodeManager host with least memory is generally used in calculations as it will work in larger hosts. - if nodeManagerHosts is not None and len(nodeManagerHosts) > 0: -nodeManagerHost = nodeManagerHosts[0]; -for nmHost in nodeManagerHosts: - if nmHost["Hosts"]["total_mem"] < nodeManagerHost["Hosts"]["total_mem"]: -nodeManagerHost = nmHost -host = nodeManagerHost["Hosts"] -cluster["referenceNodeManagerHost"] = host - else: -host = hosts["items"][0]["Hosts"] - cluster["referenceHost"] = host - cluster["cpu"] = host["cpu_count"] - cluster["disk"] = len(host["disk_info"]) - cluster["ram"] = int(host["total_mem"] / (1024 * 1024)) - -ramRecommendations = [ - {"os":1, "hbase":1}, -
[3/3] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)
AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/539a4149 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/539a4149 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/539a4149 Branch: refs/heads/trunk Commit: 539a4149ae7cddfb4b30c2b1deed9fdd9517abaa Parents: 5a02a2a Author: Alejandro FernandezAuthored: Mon Jan 16 17:59:59 2017 -0800 Committer: Alejandro Fernandez Committed: Wed Jan 25 19:13:39 2017 -0800 -- .../HDFS/3.0.0.3.0/service_advisor.py |4 - .../common-services/YARN/3.0.0.3.0/metainfo.xml | 73 +- .../YARN/3.0.0.3.0/service_advisor.py | 1789 ++ .../stacks/HDP/2.0.6/services/stack_advisor.py | 343 +--- .../stacks/HDP/2.1/services/stack_advisor.py| 19 +- .../stacks/HDP/2.2/services/stack_advisor.py|1 - .../stacks/HDP/2.3/services/stack_advisor.py| 18 +- .../stacks/HDP/2.5/services/stack_advisor.py| 47 +- .../stacks/HDP/3.0/role_command_order.json | 27 +- .../stacks/HDP/3.0/services/YARN/metainfo.xml |3 +- .../src/main/resources/stacks/stack_advisor.py | 287 ++- 11 files changed, 2162 insertions(+), 449 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py index eb7f35c..2291c94 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py +++ b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py @@ -22,13 +22,9 @@ import imp import os import traceback import inspect -import re -import socket -from urlparse import urlparse # Local imports from resource_management.core.logger import Logger -from resource_management.libraries.functions.data_structure_utils import get_from_dict from resource_management.libraries.functions.mounted_dirs_helper import get_mounts_with_multiple_data_dirs http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml index 48352e8..a094cba 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml @@ -27,38 +27,40 @@ - -APP_TIMELINE_SERVER -App Timeline Server -MASTER -1 -true -true + APP_TIMELINE_SERVER + App Timeline Server + MASTER + 1 + true + true - - scripts/application_timeline_server.py - PYTHON - 1200 - + +scripts/application_timeline_server.py +PYTHON +1200 + - - -TEZ/TEZ_CLIENT -host - - true - - - -SPARK/SPARK_CLIENT -host - - true - - - - + + + RESOURCEMANAGER ResourceManager MASTER @@ -70,6 +72,8 @@ PYTHON 1200 + + + yarn_resourcemanager @@ -91,6 +97,7 @@ yarn_jobsummary + DECOMMISSION @@ -109,6 +116,7 @@ + capacity-scheduler hdfs-site @@ -245,7 +253,7 @@ MAPREDUCE2 MapReduce2 Apache Hadoop NextGen MapReduce (YARN) - 2.1.0.2.0.6.0 + 3.0.0.3.0 @@ -259,6 +267,8 @@ true YARN/RESOURCEMANAGER + + + scripts/historyserver.py PYTHON @@ -369,6 +381,7 @@ hdfs-site hadoop-env core-site +yarn-site mapred-site mapred-env ssl-client
[2/3] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)
http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py new file mode 100644 index 000..cd35b68 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py @@ -0,0 +1,1789 @@ +#!/usr/bin/env ambari-python-wrap +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# Python imports +import imp +import os +import traceback +import inspect +import socket +from math import floor, ceil + +# Local imports +from resource_management.core.logger import Logger + + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/') +PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py') + +try: + with open(PARENT_FILE, 'rb') as fp: +service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE)) +except Exception as e: + traceback.print_exc() + print "Failed to load parent" + + +class YARNServiceAdvisor(service_advisor.ServiceAdvisor): + + def __init__(self, *args, **kwargs): +self.as_super = super(YARNServiceAdvisor, self) +self.as_super.__init__(*args, **kwargs) + +# Always call these methods +self.modifyMastersWithMultipleInstances() +self.modifyCardinalitiesDict() +self.modifyHeapSizeProperties() +self.modifyNotValuableComponents() +self.modifyComponentsNotPreferableOnServer() +self.modifyComponentLayoutSchemes() + + def modifyMastersWithMultipleInstances(self): +""" +Modify the set of masters with multiple instances. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyCardinalitiesDict(self): +""" +Modify the dictionary of cardinalities. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyHeapSizeProperties(self): +""" +Modify the dictionary of heap size properties. +Must be overriden in child class. +""" +self.heap_size_properties = {} + + def modifyNotValuableComponents(self): +""" +Modify the set of components whose host assignment is based on other services. +Must be overriden in child class. +""" +self.notValuableComponents.add("APP_TIMELINE_SERVER") + + def modifyComponentsNotPreferableOnServer(self): +""" +Modify the set of components that are not preferable on the server. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentLayoutSchemes(self): +""" +Modify layout scheme dictionaries for components. +The scheme dictionary basically maps the number of hosts to +host index where component should exist. +Must be overriden in child class. +""" +self.componentLayoutSchemes.update({ + 'APP_TIMELINE_SERVER': {31: 1, "else": 2}, +}) + + def getServiceComponentLayoutValidations(self, services, hosts): +""" +Get a list of errors. +Must be overriden in child class. +""" +Logger.info("Class: %s, Method: %s. Validating Service Component Layout." % +(self.__class__.__name__, inspect.stack()[0][3])) + +return self.as_super.getServiceComponentLayoutValidations(services, hosts) + + def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts): +""" +Entry point. +Must be overriden in child class. +""" +Logger.info("Class: %s, Method: %s. Recommending Service Configurations." % +(self.__class__.__name__, inspect.stack()[0][3])) + +# Due to the existing stack inheritance, make it clear where each calculation came from. +recommender = YARNRecommender() + +# YARN +recommender.recommendYARNConfigurationsFromHDP206(configurations, clusterData, services, hosts) +recommender.recommendYARNConfigurationsFromHDP22(configurations, clusterData, services, hosts) +recommender.recommendYARNConfigurationsFromHDP23(configurations,
[1/2] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 71b743450 -> 5a02a2ad1 http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json -- diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json new file mode 100644 index 000..52b3983 --- /dev/null +++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json @@ -0,0 +1,1256 @@ +{ +"roleCommand": "CUSTOM_COMMAND", +"clusterName": "c1", +"hostname": "c6401.ambari.apache.org", +"hostLevelParams": { +"not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]", +"agent_stack_retry_count": "5", +"agent_stack_retry_on_unavailability": "false", +"agentCacheDir": "/var/lib/ambari-agent/cache", +"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;, +"ambari_db_rca_password": "mapred", +"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", +"repo_info": "[{\"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\"}];, +"jce_name": "UnlimitedJCEPolicyJDK7.zip", +"stack_version": "2.5", +"stack_name": "HDP", +"ambari_db_rca_driver": "org.postgresql.Driver", +"jdk_name": "jdk-7u67-linux-x64.tar.gz", +"ambari_db_rca_username": "mapred", +"java_home": "/usr/jdk64/jdk1.7.0_45", +"java_version": "8", +"db_name": "ambari", +"group_list": "[\"hadoop\",\"nobody\",\"users\"]", +"user_list": "[\"hive\",\"oozie\",\"nobody\",\"ambari-qa\",\"flume\",\"hdfs\",\"storm\",\"mapred\",\"hbase\",\"tez\",\"zookeeper\",\"falcon\",\"sqoop\",\"yarn\",\"hcat\"]", +"custom_mysql_jdbc_name" : "mysql-connector-java.jar", +"custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar", +"custom_postgres_jdbc_name" : "test-postgres-jdbc.jar", +"custom_sqlanywhere_jdbc_name" : "sqla-client-jdbc.tar.gz", +"custom_command" : "RESTART" +}, +"commandType": "EXECUTION_COMMAND", +"roleParams": {"component_category": "MASTER"}, +"serviceName": "HIVE", +"role": "HIVE_SERVER_INTERACTIVE", +"commandParams": { +"command_timeout": "300", +"service_package_folder": "OOZIE", +"script_type": "PYTHON", +"script": "scripts/service_check.py", +"excluded_hosts": "host1,host2", +"mark_draining_only" : "false", +"update_exclude_file_only" : "false", +"xml_configs_list":[{"hdfs-site.xml":"hdfs-site"}], + "env_configs_list":[{"hadoop-env.sh":"hadoop-env"},{"log4j.properties":"hdfs-log4j,yarn-log4j"}], + "properties_configs_list":[{"runtime.properties":"falcon-runtime.properties"},{"startup.properties":"falcon-startup.properties"}], +"output_file":"HDFS_CLIENT-configs.tar.gz", +"refresh_topology": "True" +}, +"taskId": 152, +"public_hostname": "c6401.ambari.apache.org", +"configurations": { +"llap-daemon-log4j": { + "content" : "con\ntent" +}, +"llap-cli-log4j2": { + "content" : "con\ntent" +}, +"hive-log4j2": { +"content" : "con\ntent" +}, +"hive-exec-log4j2": { +"content" : "con\ntent" +}, +"beeline-log4j2": { +"content" : "con\ntent" +}, +"sqoop-site": { +"atlas.cluster.name": "c1", +"sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook" +}, +"mapred-site": { +"mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020", +"mapreduce.cluster.administrators": " hadoop", +"mapreduce.reduce.input.buffer.percent": "0.0", +"mapreduce.output.fileoutputformat.compress": "false", +"mapreduce.framework.name": "yarn", +"mapreduce.map.speculative": "false", +"mapreduce.reduce.shuffle.merge.percent": "0.66", +"yarn.app.mapreduce.am.resource.mb": "683", +"mapreduce.map.java.opts": "-Xmx273m", +"mapreduce.application.classpath": "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*", +"mapreduce.job.reduce.slowstart.completedmaps": "0.05", +"mapreduce.output.fileoutputformat.compress.type": "BLOCK", +"mapreduce.reduce.speculative": "false", +"mapreduce.reduce.java.opts": "-Xmx546m", +"mapreduce.am.max-attempts": "2", +
[2/2] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)
AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5a02a2ad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5a02a2ad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5a02a2ad Branch: refs/heads/trunk Commit: 5a02a2ad15b9e29e72b8ea55aa7bce4ea52c8aea Parents: 71b7434 Author: Sumit MohantyAuthored: Wed Jan 25 17:04:36 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 17:05:05 2017 -0800 -- .../package/scripts/hive_server_interactive.py |5 +- .../0.12.0.2.0/package/scripts/params_linux.py |7 + .../stacks/2.5/HIVE/test_hive_server_int.py | 80 ++ .../2.5/configs/hsi_default_for_restart.json| 1256 ++ 4 files changed, 1347 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index 1b6b3f2..dd0d1c4 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -137,7 +137,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive): # Stop Hive Interactive Server first hive_service_interactive('hiveserver2', action='stop') - self._llap_stop(env) + if not params.is_restart_command: +self._llap_stop(env) + else: +Logger.info("LLAP stop is skipped as its a restart command") def status(self, env): import status_params http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index e9e6337..997975e 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -227,9 +227,16 @@ if hive_metastore_db_type == "mssql": #users hive_user = config['configurations']['hive-env']['hive_user'] +# is it a restart command +is_restart_command = False +if 'roleCommand' in config and 'CUSTOM_COMMAND' == config['roleCommand']: + if 'custom_command' in config['hostLevelParams'] and 'RESTART' == config['hostLevelParams']['custom_command']: +is_restart_command = True + #JDBC driver jar name hive_jdbc_driver = config['configurations']['hive-site']['javax.jdo.option.ConnectionDriverName'] jdk_location = config['hostLevelParams']['jdk_location'] + java_share_dir = '/usr/share/java' hive_database_name = config['configurations']['hive-env']['hive_database_name'] hive_database = config['configurations']['hive-env']['hive_database'] http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py -- diff --git a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py index 8c47d99..69a7ad5 100644 --- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py +++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py @@ -242,6 +242,85 @@ class TestHiveServerInteractive(RMFTestCase): ) self.assertNoMoreResources() + ''' + restart should not call slider destroy + ''' + @patch("os.path.isfile") + @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs") + @patch("socket.socket") + @patch("time.sleep") + def test_restart_default_with_llap_multi_line_output(self, sleep_mock, socket_mock, copy_to_hfds_mock, is_file_mock): +self.maxDiff = None +copy_to_hfds_mock.return_value = False +s = socket_mock.return_value +is_file_mock.return_value = True +self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hive_server_interactive.py", +
[1/2] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ff412f9f8 -> be21bf95b http://git-wip-us.apache.org/repos/asf/ambari/blob/be21bf95/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json -- diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json new file mode 100644 index 000..52b3983 --- /dev/null +++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json @@ -0,0 +1,1256 @@ +{ +"roleCommand": "CUSTOM_COMMAND", +"clusterName": "c1", +"hostname": "c6401.ambari.apache.org", +"hostLevelParams": { +"not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]", +"agent_stack_retry_count": "5", +"agent_stack_retry_on_unavailability": "false", +"agentCacheDir": "/var/lib/ambari-agent/cache", +"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;, +"ambari_db_rca_password": "mapred", +"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", +"repo_info": "[{\"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\"}];, +"jce_name": "UnlimitedJCEPolicyJDK7.zip", +"stack_version": "2.5", +"stack_name": "HDP", +"ambari_db_rca_driver": "org.postgresql.Driver", +"jdk_name": "jdk-7u67-linux-x64.tar.gz", +"ambari_db_rca_username": "mapred", +"java_home": "/usr/jdk64/jdk1.7.0_45", +"java_version": "8", +"db_name": "ambari", +"group_list": "[\"hadoop\",\"nobody\",\"users\"]", +"user_list": "[\"hive\",\"oozie\",\"nobody\",\"ambari-qa\",\"flume\",\"hdfs\",\"storm\",\"mapred\",\"hbase\",\"tez\",\"zookeeper\",\"falcon\",\"sqoop\",\"yarn\",\"hcat\"]", +"custom_mysql_jdbc_name" : "mysql-connector-java.jar", +"custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar", +"custom_postgres_jdbc_name" : "test-postgres-jdbc.jar", +"custom_sqlanywhere_jdbc_name" : "sqla-client-jdbc.tar.gz", +"custom_command" : "RESTART" +}, +"commandType": "EXECUTION_COMMAND", +"roleParams": {"component_category": "MASTER"}, +"serviceName": "HIVE", +"role": "HIVE_SERVER_INTERACTIVE", +"commandParams": { +"command_timeout": "300", +"service_package_folder": "OOZIE", +"script_type": "PYTHON", +"script": "scripts/service_check.py", +"excluded_hosts": "host1,host2", +"mark_draining_only" : "false", +"update_exclude_file_only" : "false", +"xml_configs_list":[{"hdfs-site.xml":"hdfs-site"}], + "env_configs_list":[{"hadoop-env.sh":"hadoop-env"},{"log4j.properties":"hdfs-log4j,yarn-log4j"}], + "properties_configs_list":[{"runtime.properties":"falcon-runtime.properties"},{"startup.properties":"falcon-startup.properties"}], +"output_file":"HDFS_CLIENT-configs.tar.gz", +"refresh_topology": "True" +}, +"taskId": 152, +"public_hostname": "c6401.ambari.apache.org", +"configurations": { +"llap-daemon-log4j": { + "content" : "con\ntent" +}, +"llap-cli-log4j2": { + "content" : "con\ntent" +}, +"hive-log4j2": { +"content" : "con\ntent" +}, +"hive-exec-log4j2": { +"content" : "con\ntent" +}, +"beeline-log4j2": { +"content" : "con\ntent" +}, +"sqoop-site": { +"atlas.cluster.name": "c1", +"sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook" +}, +"mapred-site": { +"mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020", +"mapreduce.cluster.administrators": " hadoop", +"mapreduce.reduce.input.buffer.percent": "0.0", +"mapreduce.output.fileoutputformat.compress": "false", +"mapreduce.framework.name": "yarn", +"mapreduce.map.speculative": "false", +"mapreduce.reduce.shuffle.merge.percent": "0.66", +"yarn.app.mapreduce.am.resource.mb": "683", +"mapreduce.map.java.opts": "-Xmx273m", +"mapreduce.application.classpath": "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*", +"mapreduce.job.reduce.slowstart.completedmaps": "0.05", +"mapreduce.output.fileoutputformat.compress.type": "BLOCK", +"mapreduce.reduce.speculative": "false", +"mapreduce.reduce.java.opts": "-Xmx546m", +"mapreduce.am.max-attempts":
[2/2] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)
AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be21bf95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be21bf95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be21bf95 Branch: refs/heads/branch-2.5 Commit: be21bf95ba9874615f86e3bb71af2cac64e7b064 Parents: ff412f9 Author: Sumit MohantyAuthored: Wed Jan 25 17:04:36 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 17:04:36 2017 -0800 -- .../package/scripts/hive_server_interactive.py |5 +- .../0.12.0.2.0/package/scripts/params_linux.py |7 + .../stacks/2.5/HIVE/test_hive_server_int.py | 80 ++ .../2.5/configs/hsi_default_for_restart.json| 1256 ++ 4 files changed, 1347 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be21bf95/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index 053c009..acfddc2 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -137,7 +137,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive): # Stop Hive Interactive Server first hive_service_interactive('hiveserver2', action='stop') - self._llap_stop(env) + if not params.is_restart_command: +self._llap_stop(env) + else: +Logger.info("LLAP stop is skipped as its a restart command") def status(self, env): import status_params http://git-wip-us.apache.org/repos/asf/ambari/blob/be21bf95/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 5e55ff0..10bdd45 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -227,9 +227,16 @@ if hive_metastore_db_type == "mssql": #users hive_user = config['configurations']['hive-env']['hive_user'] +# is it a restart command +is_restart_command = False +if 'roleCommand' in config and 'CUSTOM_COMMAND' == config['roleCommand']: + if 'custom_command' in config['hostLevelParams'] and 'RESTART' == config['hostLevelParams']['custom_command']: +is_restart_command = True + #JDBC driver jar name hive_jdbc_driver = config['configurations']['hive-site']['javax.jdo.option.ConnectionDriverName'] jdk_location = config['hostLevelParams']['jdk_location'] + java_share_dir = '/usr/share/java' hive_database_name = config['configurations']['hive-env']['hive_database_name'] hive_database = config['configurations']['hive-env']['hive_database'] http://git-wip-us.apache.org/repos/asf/ambari/blob/be21bf95/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py -- diff --git a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py index ab6528b..9de0378 100644 --- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py +++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py @@ -242,6 +242,85 @@ class TestHiveServerInteractive(RMFTestCase): ) self.assertNoMoreResources() + ''' + restart should not call slider destroy + ''' + @patch("os.path.isfile") + @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs") + @patch("socket.socket") + @patch("time.sleep") + def test_restart_default_with_llap_multi_line_output(self, sleep_mock, socket_mock, copy_to_hfds_mock, is_file_mock): +self.maxDiff = None +copy_to_hfds_mock.return_value = False +s = socket_mock.return_value +is_file_mock.return_value = True +self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hive_server_interactive.py", +
ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang)
Repository: ambari Updated Branches: refs/heads/trunk 5162a5931 -> 71b743450 AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/71b74345 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/71b74345 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/71b74345 Branch: refs/heads/trunk Commit: 71b743450442d62192c1aa25ebc0269c3cdd3d2b Parents: 5162a59 Author: Richard ZangAuthored: Wed Jan 25 16:57:24 2017 -0800 Committer: Richard Zang Committed: Wed Jan 25 16:59:33 2017 -0800 -- ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/71b74345/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 0e3f59b..c86f132 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -313,17 +313,17 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP var controllerName = this.get('content.controllerName'); var changes = dataToSend.changed_configurations; if (changes) { - dataToSend['user-context'] = {"operation" : "EditConfig"}; + dataToSend['user_context'] = {"operation" : "EditConfig"}; } else { if (!controllerName) { -dataToSend['user-context'] = {"operation" : "RecommendAttribute"}; +dataToSend['user_context'] = {"operation" : "RecommendAttribute"}; } else if (controllerName == 'addServiceController') { -dataToSend['user-context'] = { +dataToSend['user_context'] = { "operation" : "AddService", "operation_details" : (this.get('content.services')|| []).filterProperty('isSelected').filterProperty('isInstalled', false).mapProperty('serviceName').join(',') }; } else if (controllerName == 'installerController'){ -dataToSend['user-context'] = {"operation" : "ClusterCreate"}; +dataToSend['user_context'] = {"operation" : "ClusterCreate"}; } } },
ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang)
Repository: ambari Updated Branches: refs/heads/branch-2.5 f35667653 -> ff412f9f8 AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ff412f9f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ff412f9f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ff412f9f Branch: refs/heads/branch-2.5 Commit: ff412f9f84e47466aae34b0dc0e8674fda905671 Parents: f356676 Author: Richard ZangAuthored: Wed Jan 25 16:57:24 2017 -0800 Committer: Richard Zang Committed: Wed Jan 25 16:57:24 2017 -0800 -- ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ff412f9f/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 4bdc25f..882f69d 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -245,17 +245,17 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP var controllerName = this.get('content.controllerName'); var changes = dataToSend.changed_configurations; if (changes) { - dataToSend['user-context'] = {"operation" : "EditConfig"}; + dataToSend['user_context'] = {"operation" : "EditConfig"}; } else { if (!controllerName) { -dataToSend['user-context'] = {"operation" : "RecommendAttribute"}; +dataToSend['user_context'] = {"operation" : "RecommendAttribute"}; } else if (controllerName == 'addServiceController') { -dataToSend['user-context'] = { +dataToSend['user_context'] = { "operation" : "AddService", "operation_details" : (this.get('content.services')|| []).filterProperty('isSelected').filterProperty('isInstalled', false).mapProperty('serviceName').join(',') }; } else if (controllerName == 'installerController'){ -dataToSend['user-context'] = {"operation" : "ClusterCreate"}; +dataToSend['user_context'] = {"operation" : "ClusterCreate"}; } } },
ambari git commit: AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. (Vivek Subramanian via yusaku)
Repository: ambari Updated Branches: refs/heads/branch-2.5 dd8848deb -> f35667653 AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. (Vivek Subramanian via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3566765 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3566765 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3566765 Branch: refs/heads/branch-2.5 Commit: f356676537cf110718d9883660f69f758c2143b3 Parents: dd8848d Author: Yusaku SakoAuthored: Wed Jan 25 16:45:35 2017 -0800 Committer: Yusaku Sako Committed: Wed Jan 25 16:46:32 2017 -0800 -- .../HDP/grafana-hdfs-topn.json | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3566765/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json index 688d113..90fd37c 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json @@ -82,11 +82,11 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount", + "metric": "dfs.NNTopUserOpCounts.windowMs=6.op=%.TotalCount", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -152,11 +152,11 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount", + "metric": "dfs.NNTopUserOpCounts.windowMs=30.op=%.TotalCount", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -222,7 +222,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -305,7 +305,7 @@ "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count", + "metric": "dfs.NNTopUserOpCounts.windowMs=6.op=*.user=%.count", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -375,7 +375,7 @@ "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count", + "metric": "dfs.NNTopUserOpCounts.windowMs=30.op=*.user=%.count", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -526,7 +526,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -614,7 +614,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -702,7 +702,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {},
ambari git commit: AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. (Vivek Subramanian via yusaku)
Repository: ambari Updated Branches: refs/heads/trunk 6f78e611c -> 5162a5931 AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. (Vivek Subramanian via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5162a593 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5162a593 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5162a593 Branch: refs/heads/trunk Commit: 5162a5931f7b29d4eb9b952fcebd8d7dc3b81273 Parents: 6f78e61 Author: Yusaku SakoAuthored: Wed Jan 25 16:45:35 2017 -0800 Committer: Yusaku Sako Committed: Wed Jan 25 16:45:35 2017 -0800 -- .../HDP/grafana-hdfs-topn.json | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5162a593/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json index 688d113..90fd37c 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json @@ -82,11 +82,11 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount", + "metric": "dfs.NNTopUserOpCounts.windowMs=6.op=%.TotalCount", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -152,11 +152,11 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount", + "metric": "dfs.NNTopUserOpCounts.windowMs=30.op=%.TotalCount", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -222,7 +222,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -305,7 +305,7 @@ "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count", + "metric": "dfs.NNTopUserOpCounts.windowMs=6.op=*.user=%.count", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -375,7 +375,7 @@ "app": "namenode", "downsampleAggregator": "avg", "errors": {}, - "metric": "dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count", + "metric": "dfs.NNTopUserOpCounts.windowMs=30.op=*.user=%.count", "precision": "default", "refId": "A", "seriesAggregator": "none", @@ -526,7 +526,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -614,7 +614,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {}, @@ -702,7 +702,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "app": "namenode", "downsampleAggregator": "avg", "errors": {},
ambari git commit: AMBARI-19714. Style Fix.Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk e3a53ba39 -> 6f78e611c AMBARI-19714. Style Fix.Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6f78e611 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6f78e611 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6f78e611 Branch: refs/heads/trunk Commit: 6f78e611cbe4f1de7fa77e8caa56b59559a5e12e Parents: e3a53ba Author: Vitaly BrodetskyiAuthored: Thu Jan 26 02:40:34 2017 +0200 Committer: Vitaly Brodetskyi Committed: Thu Jan 26 02:40:34 2017 +0200 -- .../ambari/server/controller/AmbariManagementControllerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6f78e611/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 2882db8..0b3869b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -18,7 +18,6 @@ package org.apache.ambari.server.controller; -import javax.persistence.RollbackException; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL; @@ -65,6 +64,8 @@ import java.util.Set; import java.util.TreeMap; import java.util.concurrent.TimeUnit; +import javax.persistence.RollbackException; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException;
ambari git commit: AMBARI-19714. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk fda3de6e8 -> e3a53ba39 AMBARI-19714. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3a53ba3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3a53ba3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3a53ba3 Branch: refs/heads/trunk Commit: e3a53ba398d675b62d5ebf8c5324fbce2f3b2f79 Parents: fda3de6 Author: Vitaly BrodetskyiAuthored: Thu Jan 26 01:34:23 2017 +0200 Committer: Vitaly Brodetskyi Committed: Thu Jan 26 01:34:23 2017 +0200 -- .../AmbariManagementControllerImpl.java | 23 +--- contrib/utils/perf/deploy-gce-perf-cluster.py | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3a53ba3/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index d03b2bb..2882db8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.controller; +import javax.persistence.RollbackException; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL; @@ -64,8 +65,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.concurrent.TimeUnit; -import javax.persistence.RollbackException; - import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -2186,7 +2185,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle RoleCommand roleCommand, Map commandParamsInp, ServiceComponentHostEvent event, -boolean skipFailure +boolean skipFailure, +ClusterVersionEntity effectiveClusterVersion, +boolean isUpgradeSuspended ) throws AmbariException { @@ -2302,7 +2303,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle commandParams.put(MAX_DURATION_OF_RETRIES, Integer.toString(retryMaxTime)); commandParams.put(COMMAND_RETRY_ENABLED, Boolean.toString(retryEnabled)); -ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); if (effectiveClusterVersion != null) { commandParams.put(VERSION, effectiveClusterVersion.getRepositoryVersion().getVersion()); } @@ -2360,7 +2360,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle // in the context of an upgrade and we should send the repo ID which matches // the version being send down RepositoryVersionEntity repoVersion = null; -ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); if (null != effectiveClusterVersion) { repoVersion = effectiveClusterVersion.getRepositoryVersion(); } else { @@ -2426,7 +2425,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle // !!! consistent with where custom commands put variables // !!! after-INSTALL hook checks this such that the stack selection tool won't // select-all to a version that is not being upgraded, breaking RU -if (cluster.isUpgradeSuspended()) { +if (isUpgradeSuspended) { cluster.addSuspendedUpgradeParameters(commandParams, roleParams); } @@ -2561,6 +2560,12 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle return requestStages; } +// caching effective cluster version +ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); + +// caching upgrade suspended +boolean isUpgradeSuspended = cluster.isUpgradeSuspended();
ambari git commit: AMBARI-19714. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 66a2518cb -> dd8848deb AMBARI-19714. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dd8848de Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd8848de Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd8848de Branch: refs/heads/branch-2.5 Commit: dd8848deb3dc886949dd28887110a84de06e47ed Parents: 66a2518 Author: Vitaly BrodetskyiAuthored: Thu Jan 26 01:32:13 2017 +0200 Committer: Vitaly Brodetskyi Committed: Thu Jan 26 01:32:13 2017 +0200 -- .../AmbariManagementControllerImpl.java | 23 +--- contrib/utils/perf/deploy-gce-perf-cluster.py | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dd8848de/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index c1f7943..cb4fdbe 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.controller; +import javax.persistence.RollbackException; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL; @@ -64,8 +65,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.concurrent.TimeUnit; -import javax.persistence.RollbackException; - import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -2186,7 +2185,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle RoleCommand roleCommand, Map commandParamsInp, ServiceComponentHostEvent event, -boolean skipFailure +boolean skipFailure, +ClusterVersionEntity effectiveClusterVersion, +boolean isUpgradeSuspended ) throws AmbariException { @@ -2302,7 +2303,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle commandParams.put(MAX_DURATION_OF_RETRIES, Integer.toString(retryMaxTime)); commandParams.put(COMMAND_RETRY_ENABLED, Boolean.toString(retryEnabled)); -ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); if (effectiveClusterVersion != null) { commandParams.put(VERSION, effectiveClusterVersion.getRepositoryVersion().getVersion()); } @@ -2360,7 +2360,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle // in the context of an upgrade and we should send the repo ID which matches // the version being send down RepositoryVersionEntity repoVersion = null; -ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); if (null != effectiveClusterVersion) { repoVersion = effectiveClusterVersion.getRepositoryVersion(); } else { @@ -2426,7 +2425,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle // !!! consistent with where custom commands put variables // !!! after-INSTALL hook checks this such that the stack selection tool won't // select-all to a version that is not being upgraded, breaking RU -if (cluster.isUpgradeSuspended()) { +if (isUpgradeSuspended) { cluster.addSuspendedUpgradeParameters(commandParams, roleParams); } @@ -2561,6 +2560,12 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle return requestStages; } +// caching effective cluster version +ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion(); + +// caching upgrade suspended +boolean isUpgradeSuspended =
ambari git commit: AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for Hiveserver2 (also floods HS2 log with error messages) (smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 501492c44 -> 66a2518cb AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for Hiveserver2 (also floods HS2 log with error messages) (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/66a2518c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/66a2518c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/66a2518c Branch: refs/heads/branch-2.5 Commit: 66a2518cb5832c32820ea7779844e103346a18b4 Parents: 501492c Author: Sumit MohantyAuthored: Wed Jan 25 13:49:56 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 13:53:03 2017 -0800 -- .../libraries/functions/hive_check.py | 13 --- .../alert_hive_interactive_thrift_port.py | 15 ++-- .../package/alerts/alert_hive_thrift_port.py| 15 ++-- .../services/HIVE/configuration/hive-env.xml| 36 +++- .../stacks/HDP/2.5/services/stack_advisor.py| 23 - .../services/HIVE/configuration/hive-env.xml| 2 +- .../2.0.6/HIVE/test_hive_service_check.py | 10 +++--- 7 files changed, 98 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/66a2518c/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py index ebcf4f9..92d16a2 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py @@ -25,7 +25,7 @@ from resource_management.libraries.functions import format def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd=None, smokeuser='ambari-qa', transport_mode="binary", http_endpoint="cliservice", ssl=False, ssl_keystore=None, - ssl_password=None, check_command_timeout=30): + ssl_password=None, check_command_timeout=30, ldap_username="", ldap_password=""): """ Hive thrift SASL port check """ @@ -49,12 +49,17 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd if hive_auth == "NOSASL": beeline_url.append('auth=noSasl') + credential_str = "" + # append username and password for LDAP + if hive_auth == "LDAP": +credential_str = "-n '{ldap_username}' -p '{ldap_password!p}'" + # append url according to ssl configuration if ssl and ssl_keystore is not None and ssl_password is not None: beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', 'trustStorePassword={ssl_password!p}']) # append url according to principal and execute kinit - if kinitcmd: + if kinitcmd and hive_auth != "LDAP": beeline_url.append('principal={key}') # prevent concurrent kinit @@ -65,8 +70,8 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd finally: kinit_lock.release() - cmd = "! beeline -u '%s' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ -format(";".join(beeline_url)) + cmd = "! beeline -u '%s' %s -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ +(format(";".join(beeline_url)), format(credential_str)) Execute(cmd, user=smokeuser, http://git-wip-us.apache.org/repos/asf/ambari/blob/66a2518c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py index 1386c36..25c4b28 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py @@ -45,6 +45,8 @@ SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' HIVE_SSL = '{{hive-site/hive.server2.use.SSL}}' HIVE_SSL_KEYSTORE_PATH = '{{hive-interactive-site/hive.server2.keystore.path}}' HIVE_SSL_KEYSTORE_PASSWORD = '{{hive-interactive-site/hive.server2.keystore.password}}' +HIVE_LDAP_USERNAME = '{{hive-env/alert_ldap_username}}' +HIVE_LDAP_PASSWORD =
ambari git commit: AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for Hiveserver2 (also floods HS2 log with error messages) (smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 114f0e8ba -> fda3de6e8 AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for Hiveserver2 (also floods HS2 log with error messages) (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fda3de6e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fda3de6e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fda3de6e Branch: refs/heads/trunk Commit: fda3de6e892a8f19d363f49860122929b4589e3d Parents: 114f0e8 Author: Sumit MohantyAuthored: Wed Jan 25 13:49:56 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 13:49:56 2017 -0800 -- .../libraries/functions/hive_check.py | 13 --- .../alert_hive_interactive_thrift_port.py | 15 ++-- .../package/alerts/alert_hive_thrift_port.py| 15 ++-- .../services/HIVE/configuration/hive-env.xml| 36 +++- .../stacks/HDP/2.5/services/stack_advisor.py| 23 - .../services/HIVE/configuration/hive-env.xml| 2 +- .../2.0.6/HIVE/test_hive_service_check.py | 10 +++--- 7 files changed, 98 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fda3de6e/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py index ebcf4f9..92d16a2 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py @@ -25,7 +25,7 @@ from resource_management.libraries.functions import format def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd=None, smokeuser='ambari-qa', transport_mode="binary", http_endpoint="cliservice", ssl=False, ssl_keystore=None, - ssl_password=None, check_command_timeout=30): + ssl_password=None, check_command_timeout=30, ldap_username="", ldap_password=""): """ Hive thrift SASL port check """ @@ -49,12 +49,17 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd if hive_auth == "NOSASL": beeline_url.append('auth=noSasl') + credential_str = "" + # append username and password for LDAP + if hive_auth == "LDAP": +credential_str = "-n '{ldap_username}' -p '{ldap_password!p}'" + # append url according to ssl configuration if ssl and ssl_keystore is not None and ssl_password is not None: beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', 'trustStorePassword={ssl_password!p}']) # append url according to principal and execute kinit - if kinitcmd: + if kinitcmd and hive_auth != "LDAP": beeline_url.append('principal={key}') # prevent concurrent kinit @@ -65,8 +70,8 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd finally: kinit_lock.release() - cmd = "! beeline -u '%s' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ -format(";".join(beeline_url)) + cmd = "! beeline -u '%s' %s -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ +(format(";".join(beeline_url)), format(credential_str)) Execute(cmd, user=smokeuser, http://git-wip-us.apache.org/repos/asf/ambari/blob/fda3de6e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py index 1386c36..25c4b28 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py @@ -45,6 +45,8 @@ SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' HIVE_SSL = '{{hive-site/hive.server2.use.SSL}}' HIVE_SSL_KEYSTORE_PATH = '{{hive-interactive-site/hive.server2.keystore.path}}' HIVE_SSL_KEYSTORE_PASSWORD = '{{hive-interactive-site/hive.server2.keystore.password}}' +HIVE_LDAP_USERNAME = '{{hive-env/alert_ldap_username}}' +HIVE_LDAP_PASSWORD = '{{hive-env/alert_ldap_password}}'
ambari git commit: AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle)
Repository: ambari Updated Branches: refs/heads/trunk c00399c85 -> 114f0e8ba AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/114f0e8b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/114f0e8b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/114f0e8b Branch: refs/heads/trunk Commit: 114f0e8ba660170d700ac3a5b47d6697f9ac90c5 Parents: c00399c Author: Siddharth WagleAuthored: Wed Jan 25 12:33:21 2017 -0800 Committer: Siddharth Wagle Committed: Wed Jan 25 12:33:21 2017 -0800 -- .../kafka/KafkaTimelineMetricsReporter.java | 26 +++- .../kafka/KafkaTimelineMetricsReporterTest.java | 26 2 files changed, 41 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/114f0e8b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java -- diff --git a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java index fef1f24..5892599 100644 --- a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java +++ b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java @@ -60,17 +60,21 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink private final static Log LOG = LogFactory.getLog(KafkaTimelineMetricsReporter.class); - private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = "kafka.timeline.metrics.sendInterval"; - private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = "kafka.timeline.metrics.maxRowCacheSize"; - private static final String TIMELINE_HOSTS_PROPERTY = "kafka.timeline.metrics.hosts"; - private static final String TIMELINE_PORT_PROPERTY = "kafka.timeline.metrics.port"; - private static final String TIMELINE_PROTOCOL_PROPERTY = "kafka.timeline.metrics.protocol"; - private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = "kafka.timeline.metrics.reporter.enabled"; - private static final String EXCLUDED_METRICS_PROPERTY = "external.kafka.metrics.exclude.prefix"; - private static final String INCLUDED_METRICS_PROPERTY = "external.kafka.metrics.include.prefix"; + private static final String TIMELINE_METRICS_KAFKA_PREFIX = "kafka.timeline.metrics."; + private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = "sendInterval"; + private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "maxRowCacheSize"; + private static final String TIMELINE_HOSTS_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "hosts"; + private static final String TIMELINE_PORT_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "port"; + private static final String TIMELINE_PROTOCOL_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "protocol"; + private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "reporter.enabled"; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_PATH_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PATH_PROPERTY; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_TYPE_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_TYPE_PROPERTY; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_PASSWORD_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PASSWORD_PROPERTY; private static final String TIMELINE_DEFAULT_HOST = "localhost"; private static final String TIMELINE_DEFAULT_PORT = "6188"; private static final String TIMELINE_DEFAULT_PROTOCOL = "http"; + private static final String EXCLUDED_METRICS_PROPERTY = "external.kafka.metrics.exclude.prefix"; + private static final String INCLUDED_METRICS_PROPERTY = "external.kafka.metrics.include.prefix"; private volatile boolean initialized = false; private boolean running = false; @@ -159,9 +163,9 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink setMetricsCache(new TimelineMetricsCache(maxRowCacheSize, metricsSendInterval)); if (metricCollectorProtocol.contains("https")) { - String trustStorePath = props.getString(SSL_KEYSTORE_PATH_PROPERTY).trim(); - String trustStoreType = props.getString(SSL_KEYSTORE_TYPE_PROPERTY).trim(); - String trustStorePwd =
ambari git commit: AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.5 2ddbf61be -> 501492c44 AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/501492c4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/501492c4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/501492c4 Branch: refs/heads/branch-2.5 Commit: 501492c44ac248067f2e6dd09a9c97015095ee2a Parents: 2ddbf61 Author: Siddharth WagleAuthored: Wed Jan 25 12:33:02 2017 -0800 Committer: Siddharth Wagle Committed: Wed Jan 25 12:33:02 2017 -0800 -- .../kafka/KafkaTimelineMetricsReporter.java | 26 +++- .../kafka/KafkaTimelineMetricsReporterTest.java | 26 2 files changed, 41 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/501492c4/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java -- diff --git a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java index fef1f24..5892599 100644 --- a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java +++ b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java @@ -60,17 +60,21 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink private final static Log LOG = LogFactory.getLog(KafkaTimelineMetricsReporter.class); - private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = "kafka.timeline.metrics.sendInterval"; - private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = "kafka.timeline.metrics.maxRowCacheSize"; - private static final String TIMELINE_HOSTS_PROPERTY = "kafka.timeline.metrics.hosts"; - private static final String TIMELINE_PORT_PROPERTY = "kafka.timeline.metrics.port"; - private static final String TIMELINE_PROTOCOL_PROPERTY = "kafka.timeline.metrics.protocol"; - private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = "kafka.timeline.metrics.reporter.enabled"; - private static final String EXCLUDED_METRICS_PROPERTY = "external.kafka.metrics.exclude.prefix"; - private static final String INCLUDED_METRICS_PROPERTY = "external.kafka.metrics.include.prefix"; + private static final String TIMELINE_METRICS_KAFKA_PREFIX = "kafka.timeline.metrics."; + private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = "sendInterval"; + private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "maxRowCacheSize"; + private static final String TIMELINE_HOSTS_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "hosts"; + private static final String TIMELINE_PORT_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "port"; + private static final String TIMELINE_PROTOCOL_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "protocol"; + private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + "reporter.enabled"; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_PATH_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PATH_PROPERTY; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_TYPE_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_TYPE_PROPERTY; + private static final String TIMELINE_METRICS_SSL_KEYSTORE_PASSWORD_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PASSWORD_PROPERTY; private static final String TIMELINE_DEFAULT_HOST = "localhost"; private static final String TIMELINE_DEFAULT_PORT = "6188"; private static final String TIMELINE_DEFAULT_PROTOCOL = "http"; + private static final String EXCLUDED_METRICS_PROPERTY = "external.kafka.metrics.exclude.prefix"; + private static final String INCLUDED_METRICS_PROPERTY = "external.kafka.metrics.include.prefix"; private volatile boolean initialized = false; private boolean running = false; @@ -159,9 +163,9 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink setMetricsCache(new TimelineMetricsCache(maxRowCacheSize, metricsSendInterval)); if (metricCollectorProtocol.contains("https")) { - String trustStorePath = props.getString(SSL_KEYSTORE_PATH_PROPERTY).trim(); - String trustStoreType = props.getString(SSL_KEYSTORE_TYPE_PROPERTY).trim(); - String trustStorePwd
ambari git commit: AMBARI-19685. Stack advisor needs to enforce component dependency for slaves and masters. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk f571cebdb -> c00399c85 AMBARI-19685. Stack advisor needs to enforce component dependency for slaves and masters. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c00399c8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c00399c8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c00399c8 Branch: refs/heads/trunk Commit: c00399c8505212086c8d7d2deffcc5df74d4e770 Parents: f571ceb Author: Jaimin JetlyAuthored: Wed Jan 25 12:23:36 2017 -0800 Committer: Jaimin Jetly Committed: Wed Jan 25 12:23:36 2017 -0800 -- .../commands/StackAdvisorCommand.java | 6 +- .../StackDependencyResourceProvider.java| 8 ++ .../server/state/DependencyConditionInfo.java | 13 +++ .../src/main/resources/properties.json | 1 + .../stacks/HDP/2.3/services/stack_advisor.py| 25 .../src/main/resources/stacks/stack_advisor.py | 63 ++ .../services-master_ambari_colo-3-hosts.json| 33 +++--- .../services-master_standby_colo-3-hosts.json | 33 +++--- .../configs/services-normal-hawq-3-hosts.json | 33 +++--- .../configs/services-normal-nohawq-3-hosts.json | 10 +- .../services-standby_ambari_colo-3-hosts.json | 33 +++--- .../stacks/2.0.6/common/test_stack_advisor.py | 107 - .../2.3/common/services-sparkts-hive.json | 102 - .../stacks/2.3/common/services-sparkts.json | 77 ++--- .../stacks/2.3/common/test_stack_advisor.py | 2 +- .../2.5/common/services-normal-his-2-hosts.json | 114 ++- 16 files changed, 466 insertions(+), 194 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c00399c8/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java index adcb5b5..2cfa8e7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java @@ -78,11 +78,11 @@ public abstract class StackAdvisorCommand extend private static final String GET_SERVICES_INFO_URI = "/api/v1/stacks/%s/versions/%s/" + "?fields=Versions/stack_name,Versions/stack_version,Versions/parent_stack_version" + ",services/StackServices/service_name,services/StackServices/service_version" - + ",services/components/StackServiceComponents,services/components/dependencies,services/components/auto_deploy" + + ",services/components/StackServiceComponents,services/components/dependencies/Dependencies/scope" + + ",services/components/dependencies/Dependencies/conditions,services/components/auto_deploy" + ",services/configurations/StackConfigurations/property_depends_on" + ",services/configurations/dependencies/StackConfigurationDependency/dependency_name" - + ",services/configurations/dependencies/StackConfigurationDependency/dependency_type" - + ",services/configurations/StackConfigurations/type" + + ",services/configurations/dependencies/StackConfigurationDependency/dependency_type,services/configurations/StackConfigurations/type" + "/StackServices/service_name.in(%s)"; private static final String SERVICES_PROPERTY = "services"; private static final String SERVICES_COMPONENTS_PROPERTY = "components"; http://git-wip-us.apache.org/repos/asf/ambari/blob/c00399c8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java index 5fc5f52..d9cd557 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java @@ -39,6 +39,7 @@ import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.controller.spi.UnsupportedPropertyException; import org.apache.ambari.server.controller.utilities.PropertyHelper; import
ambari git commit: Revert "AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul)"
Repository: ambari Updated Branches: refs/heads/trunk 21c18a78b -> 3217fbc06 Revert "AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul)" This reverts commit 0de31d6a59c2ec847fc060dffb9e69431eee4ebc. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3217fbc0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3217fbc0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3217fbc0 Branch: refs/heads/trunk Commit: 3217fbc06f9882e47e021472b819e1791b44e9a6 Parents: 21c18a7 Author: pallavkulAuthored: Thu Jan 26 00:58:36 2017 +0530 Committer: pallavkul Committed: Thu Jan 26 00:58:36 2017 +0530 -- .../src/main/resources/ui/app/components/query-editor.js| 8 .../views/hive20/src/main/resources/ui/app/styles/app.scss | 9 - contrib/views/hive20/src/main/resources/ui/bower.json | 1 - contrib/views/hive20/src/main/resources/ui/package.json | 1 - 4 files changed, 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js index 7bfe223..27d43d5 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js @@ -74,14 +74,6 @@ export default Ember.Component.extend({ }); }); -this.$('.CodeMirror').resizable({ - handles: 's', - - resize: function () { -Ember.run.debounce(this, updateSize, 150); - } -}).find('.ui-resizable-s').addClass('grip fa fa-reorder'); - }.on('didInsertElement'), http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss index 7ab6992..5ae65d1 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss +++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss @@ -221,15 +221,6 @@ pre { overflow-y: scroll; } -.grip { - height: 20px; - border: 0 1px 1px solid #ddd; - background-color: #f5f5f5; - color: #bbb; - text-align: center; - font-size: inherit; -} - .hv-dropdown { position: absolute; .dropdown-menu { http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/bower.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json b/contrib/views/hive20/src/main/resources/ui/bower.json index fcd11cf..4eadee7 100644 --- a/contrib/views/hive20/src/main/resources/ui/bower.json +++ b/contrib/views/hive20/src/main/resources/ui/bower.json @@ -6,7 +6,6 @@ "ember-qunit-notifications": "0.1.0", "font-awesome": "~4.5.0", "codemirror": "~5.15.0", -"jquery-ui": "~1.12.1", "bootstrap-treeview": "~1.2.0" } } http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/package.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/package.json b/contrib/views/hive20/src/main/resources/ui/package.json index d04a092..ed7a299 100644 --- a/contrib/views/hive20/src/main/resources/ui/package.json +++ b/contrib/views/hive20/src/main/resources/ui/package.json @@ -34,7 +34,6 @@ "ember-cli-htmlbars": "^1.0.3", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.4.0", -"ember-cli-jquery-ui": "0.0.20", "ember-cli-jshint": "^1.0.0", "ember-cli-moment-shim": "3.0.1", "ember-cli-qunit": "^2.0.0",
ambari git commit: AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without the build level digits (dili)
Repository: ambari Updated Branches: refs/heads/trunk 6a2aca64e -> 21c18a78b AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without the build level digits (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21c18a78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21c18a78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21c18a78 Branch: refs/heads/trunk Commit: 21c18a78beb397da324c80d6943d55038167d855 Parents: 6a2aca6 Author: Di LiAuthored: Wed Jan 25 14:16:56 2017 -0500 Committer: Di Li Committed: Wed Jan 25 14:16:56 2017 -0500 -- .../libraries/functions/get_stack_version.py| 2 +- .../libraries/functions/version_select_util.py | 5 ++- .../src/test/python/TestVersionSelectUtil.py| 40 3 files changed, 44 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py index 7274a59..463d61f 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py @@ -85,7 +85,7 @@ def get_stack_version(package_name): stack_version = re.sub(package_name + ' - ', '', stack_output) stack_version = stack_version.rstrip() - match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version) + match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version) if match is None: Logger.info('Failed to get extracted version with ' + stack_selector_path) http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/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 615a0cd..ff00a1f 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 @@ -67,8 +67,9 @@ def get_component_version(stack_name, component_name): raise Exception("Code is nonzero or output is empty") Logger.debug("Command: %s\nOutput: %s" % (get_stack_comp_version_cmd, str(out))) -matches = re.findall(r"([\d\.]+\-\d+)", out) -version = matches[0] if matches and len(matches) > 0 else None +matches = re.findall(r"( [\d\.]+(\-\d+)?)", out) +version = matches[0][0].strip() if matches and len(matches) > 0 and len(matches[0]) > 0 else None +Logger.debug("Version for component %s: %s" % (component_name, str(version))) except Exception, e: Logger.error("Could not determine stack version for component %s by calling '%s'. Return Code: %s, Output: %s." % (component_name, get_stack_comp_version_cmd, str(code), str(out))) http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/ambari-server/src/test/python/TestVersionSelectUtil.py -- diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py b/ambari-server/src/test/python/TestVersionSelectUtil.py index 38798e2..5facf31 100644 --- a/ambari-server/src/test/python/TestVersionSelectUtil.py +++ b/ambari-server/src/test/python/TestVersionSelectUtil.py @@ -97,3 +97,43 @@ class TestVersionSelectUtil(TestCase): self.assertEquals(version, stack_expected_version) version = self.module.get_component_version("HDP", "hadoop-hdfs-datanode") self.assertEquals(version, stack_expected_version) + + @patch('__builtin__.open') + @patch("resource_management.core.shell.call") + @patch('os.path.exists') + @patch("resource_management.libraries.functions.stack_tools.get_stack_tool") + def test_get_component_version_no_build_ids(self, get_stack_tool_mock, os_path_exists_mock, call_mock, open_mock): +stack_expected_version = "2.2.1.0" + +# Mock classes for reading from a file +class MagicFile(object): + allowed_names = set(["hive-server2", + "zookeeper-server"]) + def read(self, value): +return (value + " - " + stack_expected_version) if value in
[18/50] [abbrv] ambari git commit: AMBARI-19676. ZKFC start failed (aonishuk)
AMBARI-19676. ZKFC start failed (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/796658f6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/796658f6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/796658f6 Branch: refs/heads/branch-dev-patch-upgrade Commit: 796658f679a8176a62445211234426f02172cdbd Parents: b2d78ac Author: Andrew OnishukAuthored: Mon Jan 23 19:54:05 2017 +0200 Committer: Andrew Onishuk Committed: Mon Jan 23 19:54:05 2017 +0200 -- .../stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml | 2 +- .../stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml | 2 +- .../stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/796658f6/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml index 114c965..ef111e0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hadoop-env.xml @@ -183,7 +183,7 @@ fi # Enable ACLs on zookeper znodes if required {% if hadoop_zkfc_opts is defined %} - export HADOOP_ZKFC_OPTS={{hadoop_zkfc_opts}} + export HADOOP_ZKFC_OPTS="{{hadoop_zkfc_opts}}" {% endif %} http://git-wip-us.apache.org/repos/asf/ambari/blob/796658f6/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml index 6d9eaf0..0212ba0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/configuration/hadoop-env.xml @@ -159,7 +159,7 @@ fi # Enable ACLs on zookeper znodes if required {% if hadoop_zkfc_opts is defined %} - export HADOOP_ZKFC_OPTS={{hadoop_zkfc_opts}} + export HADOOP_ZKFC_OPTS="{{hadoop_zkfc_opts}}" {% endif %} http://git-wip-us.apache.org/repos/asf/ambari/blob/796658f6/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml index 6d9eaf0..0212ba0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/configuration/hadoop-env.xml @@ -159,7 +159,7 @@ fi # Enable ACLs on zookeper znodes if required {% if hadoop_zkfc_opts is defined %} - export HADOOP_ZKFC_OPTS={{hadoop_zkfc_opts}} + export HADOOP_ZKFC_OPTS="{{hadoop_zkfc_opts}}" {% endif %}
[01/50] [abbrv] ambari git commit: AMBARI-19647. Issue while submitting workflow as its not able to register as a project (Madhan Mohan Reddy via pallavkul)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade eb2c904e1 -> 551f17b42 AMBARI-19647. Issue while submitting workflow as its not able to register as a project (Madhan Mohan Reddy via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9abe8da6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9abe8da6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9abe8da6 Branch: refs/heads/branch-dev-patch-upgrade Commit: 9abe8da6e582f8a011bec1889d87f2186a79550f Parents: f4a3dbc Author: pallavkulAuthored: Mon Jan 23 12:25:22 2017 +0530 Committer: pallavkul Committed: Mon Jan 23 12:25:22 2017 +0530 -- contrib/views/wfmanager/pom.xml | 1 + contrib/views/wfmanager/src/main/resources/view.xml | 6 ++ 2 files changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9abe8da6/contrib/views/wfmanager/pom.xml -- diff --git a/contrib/views/wfmanager/pom.xml b/contrib/views/wfmanager/pom.xml index ae01a4f..fff793c 100644 --- a/contrib/views/wfmanager/pom.xml +++ b/contrib/views/wfmanager/pom.xml @@ -31,6 +31,7 @@ org.apache.ambari ambari-views + provided org.apache.ambari.contrib.views http://git-wip-us.apache.org/repos/asf/ambari/blob/9abe8da6/contrib/views/wfmanager/src/main/resources/view.xml -- diff --git a/contrib/views/wfmanager/src/main/resources/view.xml b/contrib/views/wfmanager/src/main/resources/view.xml index f2f520d..85cf3e5 100644 --- a/contrib/views/wfmanager/src/main/resources/view.xml +++ b/contrib/views/wfmanager/src/main/resources/view.xml @@ -104,14 +104,13 @@ false core-site/hadoop.security.auth_to_local - + webhdfs.auth Semicolon-separated authentication configs. @@ -146,11 +145,10 @@ - + org.apache.oozie.ambari.view.assets.model.ActionAssetDefinition id
[03/50] [abbrv] ambari git commit: AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Fix failing test with xml validation (dlysnichenko)
AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Fix failing test with xml validation (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8362dcef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8362dcef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8362dcef Branch: refs/heads/branch-dev-patch-upgrade Commit: 8362dcefd6550323f94fabdf40dfcbedd2db4fc2 Parents: 3e5185a Author: Lisnichenko DmitroAuthored: Mon Jan 23 12:12:07 2017 +0200 Committer: Lisnichenko Dmitro Committed: Mon Jan 23 12:13:14 2017 +0200 -- .../stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8362dcef/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml index 5aef1e9..09a9081 100644 --- a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/configuration/hadoop-env.xml @@ -202,7 +202,7 @@ /tmp FAKEHDFS tmp Dir FAKEHDFS tmp Dir -NOT_MANAGED_FAKEHDFS_PATH +NOT_MANAGED_HDFS_PATH true false
[28/50] [abbrv] ambari git commit: AMBARI-19592 : Create grafana dashboards for Druid Metrics and configure druid to send metrics to AMS. (Nishant Bangarwa via avijayan)
http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0f4ecc/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py index 032b019..558087d 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py @@ -145,3 +145,39 @@ HdfsResource = functools.partial( immutable_paths=get_not_managed_resources(), dfs_type=dfs_type ) + + +# Ambari Metrics +metric_emitter_type = "noop" +metric_collector_host = "" +metric_collector_port = "" +metric_collector_protocol = "" +metric_truststore_path= default("/configurations/ams-ssl-client/ssl.client.truststore.location", "") +metric_truststore_type= default("/configurations/ams-ssl-client/ssl.client.truststore.type", "") +metric_truststore_password= default("/configurations/ams-ssl-client/ssl.client.truststore.password", "") + +ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", []) +has_metric_collector = not len(ams_collector_hosts) == 0 + +if has_metric_collector: +metric_emitter_type = "ambari-metrics-emitter" +if 'cluster-env' in config['configurations'] and \ +'metrics_collector_vip_host' in config['configurations']['cluster-env']: +metric_collector_host = config['configurations']['cluster-env']['metrics_collector_vip_host'] +else: +metric_collector_host = ams_collector_hosts[0] +if 'cluster-env' in config['configurations'] and \ +'metrics_collector_vip_port' in config['configurations']['cluster-env']: +metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port'] +else: +metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "localhost:6188") +if metric_collector_web_address.find(':') != -1: +metric_collector_port = metric_collector_web_address.split(':')[1] +else: +metric_collector_port = '6188' +if default("/configurations/ams-site/timeline.metrics.service.http.policy", "HTTP_ONLY") == "HTTPS_ONLY": +metric_collector_protocol = 'https' +else: +metric_collector_protocol = 'http' +pass + http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0f4ecc/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py index c9c590d..465f218 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py @@ -105,6 +105,9 @@ class HDP26StackAdvisor(HDP25StackAdvisor): if "KAFKA" in servicesList: extensions_load_list = self.addToList(extensions_load_list, "druid-kafka-indexing-service") + if 'AMBARI_METRICS' in servicesList: +extensions_load_list = self.addToList(extensions_load_list, "ambari-metrics-emitter") + putCommonProperty('druid.extensions.loadList', extensions_load_list) # JVM Configs go to env properties
[36/50] [abbrv] ambari git commit: AMBARI-19688 - Ubuntu14 base url fields on "Select version" page are duplicates (rzang)
AMBARI-19688 - Ubuntu14 base url fields on "Select version" page are duplicates (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b3a070c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b3a070c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b3a070c0 Branch: refs/heads/branch-dev-patch-upgrade Commit: b3a070c0011a542504c9fd586b26bccfaf1568f1 Parents: 6046200 Author: Richard ZangAuthored: Tue Jan 24 15:15:47 2017 -0800 Committer: Richard Zang Committed: Tue Jan 24 15:28:38 2017 -0800 -- ambari-web/app/controllers/installer.js | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a070c0/ambari-web/app/controllers/installer.js -- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 44e7907..35056f7 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -21,7 +21,7 @@ var App = require('app'); var stringUtils = require('utils/string_utils'); var validator = require('utils/validator'); -App.InstallerController = App.WizardController.extend({ +App.InstallerController = App.WizardController.extend(App.UserPref, { name: 'installerController', @@ -754,6 +754,16 @@ App.InstallerController = App.WizardController.extend({ this.setSelected(data.stackInfo.isStacksExistInDb); } } + // log diagnosis data for abnormal number of repos + var post_diagnosis = false; + data.versionDefinition.operating_systems.map(function(item) { +if (item.repositories.length > 2) { + post_diagnosis = true; +} + }); + if (post_diagnosis) { +this.postUserPref('stack_response_diagnosis', data); + } } },
[17/50] [abbrv] ambari git commit: AMBARI-19636: Provide default values for Kafka nofile and nproc limit properties (dili)
AMBARI-19636: Provide default values for Kafka nofile and nproc limit properties (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b2d78ac5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2d78ac5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2d78ac5 Branch: refs/heads/branch-dev-patch-upgrade Commit: b2d78ac5f3136bc9d55e3f8806726146278bd654 Parents: 918fd59 Author: Di LiAuthored: Mon Jan 23 12:03:55 2017 -0500 Committer: Di Li Committed: Mon Jan 23 12:03:55 2017 -0500 -- .../common-services/KAFKA/0.8.1/package/scripts/params.py| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d78ac5/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py index 6c7ff69..1d3a195 100644 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py @@ -76,8 +76,8 @@ limits_conf_dir = "/etc/security/limits.d" # Used while upgrading the stack in a kerberized cluster and running kafka-acls.sh zookeeper_connect = default("/configurations/kafka-broker/zookeeper.connect", None) -kafka_user_nofile_limit = config['configurations']['kafka-env']['kafka_user_nofile_limit'] -kafka_user_nproc_limit = config['configurations']['kafka-env']['kafka_user_nproc_limit'] +kafka_user_nofile_limit = default('/configurations/kafka-env/kafka_user_nofile_limit', 128000) +kafka_user_nproc_limit = default('/configurations/kafka-env/kafka_user_nproc_limit', 65536) # parameters for 2.2+ if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
[31/50] [abbrv] ambari git commit: AMBARI-19681: Credential store should add hadoop credential provider path property to all affected configuration types
AMBARI-19681: Credential store should add hadoop credential provider path property to all affected configuration types Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4f7571d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4f7571d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4f7571d Branch: refs/heads/branch-dev-patch-upgrade Commit: f4f7571d8f9a7709f030cd2587052492e40e8527 Parents: d77f3a5 Author: Nahappan SomasundaramAuthored: Tue Jan 24 09:53:58 2017 -0800 Committer: Nahappan Somasundaram Committed: Tue Jan 24 12:34:25 2017 -0800 -- .../ambari_agent/CustomServiceOrchestrator.py | 8 ++ .../libraries/functions/security_commons.py | 29 +--- 2 files changed, 15 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f4f7571d/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py index 02f4212..8f1848c 100644 --- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py +++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py @@ -266,7 +266,6 @@ class CustomServiceOrchestrator(): serviceName = commandJson['serviceName'] # Gather the password values and remove them from the configuration -provider_paths = [] # A service may depend on multiple configs configtype_credentials = self.getConfigTypeCredentials(commandJson) for config_type, credentials in configtype_credentials.items(): config = commandJson['configurations'][config_type] @@ -274,7 +273,6 @@ class CustomServiceOrchestrator(): if os.path.exists(file_path): os.remove(file_path) provider_path = 'jceks://file{file_path}'.format(file_path=file_path) - provider_paths.append(provider_path) logger.info('provider_path={0}'.format(provider_path)) for alias, pwd in credentials.items(): logger.debug("config={0}".format(config)) @@ -286,10 +284,8 @@ class CustomServiceOrchestrator(): cmd_result = subprocess.call(cmd) logger.info('cmd_result = {0}'.format(cmd_result)) os.chmod(file_path, 0644) # group and others should have read access so that the service user can read - -if provider_paths: - # Add JCEKS provider paths instead - config[self.CREDENTIAL_PROVIDER_PROPERTY_NAME] = ','.join(provider_paths) + # Add JCEKS provider path instead + config[self.CREDENTIAL_PROVIDER_PROPERTY_NAME] = provider_path return cmd_result http://git-wip-us.apache.org/repos/asf/ambari/blob/f4f7571d/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py index cca244d..96d60da 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py @@ -46,22 +46,19 @@ def update_credential_provider_path(config, config_type, dest_provider_path, fil """ # Get the path to the provider .jceks if HADOOP_CREDENTIAL_PROVIDER_PROPERTY_NAME in config: -provider_paths = config[HADOOP_CREDENTIAL_PROVIDER_PROPERTY_NAME].split(',') -for path_index in range(len(provider_paths)): - provider_path = provider_paths[path_index] - if config_type == os.path.splitext(os.path.basename(provider_path))[0]: -src_provider_path = provider_path[len('jceks://file'):] -File(dest_provider_path, - owner = file_owner, - group = file_group, - mode = 0640, - content = StaticFile(src_provider_path) - ) -provider_paths[path_index] = 'jceks://file{0}'.format(dest_provider_path) -# make a copy of the config dictionary since it is read-only -config_copy = config.copy() -config_copy[HADOOP_CREDENTIAL_PROVIDER_PROPERTY_NAME] = ','.join(provider_paths) -return config_copy +provider_path = config[HADOOP_CREDENTIAL_PROVIDER_PROPERTY_NAME] +src_provider_path = provider_path[len('jceks://file'):] +File(dest_provider_path, +owner = file_owner, +group = file_group, +mode = 0640, +content = StaticFile(src_provider_path) +) +# make a copy of
[46/50] [abbrv] ambari git commit: AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty)
AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b60fabad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b60fabad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b60fabad Branch: refs/heads/branch-dev-patch-upgrade Commit: b60fabade46fc5f38c7a33a6ee0044ce1931756a Parents: 8642a46 Author: Sumit MohantyAuthored: Wed Jan 25 06:47:12 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 06:47:12 2017 -0800 -- .../HIVE/0.12.0.2.0/package/scripts/webhcat_server.py | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b60fabad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py index 86ecec6..93fa411 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py @@ -119,8 +119,6 @@ class WebHCatServerDefault(WebHCatServer): ) security_params = {} - security_params.update(get_params_from_filesystem(status_params.hive_conf_dir, -{'hive-site.xml': FILE_TYPE_XML})) security_params.update(get_params_from_filesystem(status_params.webhcat_conf_dir, {'webhcat-site.xml': FILE_TYPE_XML})) result_issues = validate_security_config_properties(security_params, expectations)
[37/50] [abbrv] ambari git commit: AMBARI-19699. Axis units and aggregators are wrong in some graphs of ambari grafana dashboards. (Vivek Subramanian via yusaku)
AMBARI-19699. Axis units and aggregators are wrong in some graphs of ambari grafana dashboards. (Vivek Subramanian via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb8b44cf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb8b44cf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb8b44cf Branch: refs/heads/branch-dev-patch-upgrade Commit: bb8b44cff641c49397d1eb72481398036e90f459 Parents: b3a070c Author: Yusaku SakoAuthored: Tue Jan 24 17:05:15 2017 -0800 Committer: Yusaku Sako Committed: Tue Jan 24 17:05:15 2017 -0800 -- .../default/grafana-ambari-server-database.json | 4 +-- .../default/grafana-ambari-server.json | 26 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb8b44cf/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server-database.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server-database.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server-database.json index aea7520..229db83 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server-database.json +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server-database.json @@ -309,7 +309,7 @@ "x-axis": true, "y-axis": true, "y_formats": [ -"ns", +"none", "short" ] } @@ -757,7 +757,7 @@ "grid": { "leftLogBase": 1, "leftMax": null, -"leftMin": null, +"leftMin": 0, "rightLogBase": 1, "rightMax": null, "rightMin": null, http://git-wip-us.apache.org/repos/asf/ambari/blob/bb8b44cf/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server.json index 2cdd6d9..c458931 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server.json +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/default/grafana-ambari-server.json @@ -81,7 +81,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "alias": "MemHeapMax", "app": "ambari_server", "downsampleAggregator": "avg", @@ -93,7 +93,7 @@ "transform": "none" }, { - "aggregator": "max", + "aggregator": "none", "alias": "MemHeapUsed", "app": "ambari_server", "downsampleAggregator": "avg", @@ -105,7 +105,7 @@ "transform": "none" }, { - "aggregator": "max", + "aggregator": "none", "alias": "MemHeapCommitted", "app": "ambari_server", "downsampleAggregator": "avg", @@ -176,7 +176,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "max", + "aggregator": "none", "alias": "MemNonHeapMax", "app": "ambari_server", "downsampleAggregator": "avg", @@ -280,7 +280,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "ambari_server", "downsampleAggregator": "avg", "errors": {}, @@ -350,7 +350,7 @@ "steppedLine": false, "targets": [ { - "aggregator": "avg", + "aggregator": "none", "app": "ambari_server", "downsampleAggregator": "avg", "errors": {}, @@ -420,7 +420,7 @@
[27/50] [abbrv] ambari git commit: AMBARI-19668. Supporting zookeeper security only from HDP 2.6. (Attila Magyar via stoader)
AMBARI-19668. Supporting zookeeper security only from HDP 2.6. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0dc19e0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0dc19e0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0dc19e0 Branch: refs/heads/branch-dev-patch-upgrade Commit: d0dc19e0c95000a87884029ddb6c7ab4f3f32fb7 Parents: 75b30a4 Author: Attila MagyarAuthored: Tue Jan 24 16:04:08 2017 +0100 Committer: Toader, Sebastian Committed: Tue Jan 24 16:04:24 2017 +0100 -- .../libraries/functions/constants.py| 1 + .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 5 - .../HDFS/2.1.0.2.0/kerberos.json| 3 +- .../2.1.0.2.0/package/scripts/params_linux.py | 5 + .../2.1.0.2.0/package/scripts/zkfc_slave.py | 18 +- .../3.0.0.3.0/package/scripts/params_linux.py | 7 +- .../3.0.0.3.0/package/scripts/zkfc_slave.py | 18 +- .../4.0.0.2.0/package/scripts/oozie_server.py | 4 + .../4.0.0.2.0/package/scripts/params_linux.py | 3 + .../OOZIE/4.2.0.2.3/kerberos.json | 3 +- .../YARN/2.1.0.2.0/kerberos.json| 1 - .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../package/scripts/resourcemanager.py | 5 +- .../YARN/3.0.0.3.0/kerberos.json| 3 +- .../2.0.6/hooks/before-ANY/scripts/params.py| 9 +- .../HDP/2.0.6/properties/stack_features.json| 5 + .../services/HDFS/configuration/hadoop-env.xml | 5 - .../stacks/HDP/2.2/services/YARN/kerberos.json | 3 +- .../HDP/2.3.ECS/services/YARN/kerberos.json | 3 +- .../services/HDFS/configuration/hadoop-env.xml | 5 - .../stacks/HDP/2.3/services/YARN/kerberos.json | 3 +- .../services/HDFS/configuration/hadoop-env.xml | 5 - .../stacks/HDP/2.5/services/HDFS/kerberos.json | 3 +- .../stacks/HDP/2.5/services/YARN/kerberos.json | 3 +- .../services/HDFS/configuration/hadoop-env.xml | 181 .../stacks/HDP/2.6/services/HDFS/kerberos.json | 247 .../stacks/HDP/2.6/services/OOZIE/kerberos.json | 70 + .../stacks/HDP/2.6/services/YARN/kerberos.json | 278 +++ .../HDP/3.0/hooks/before-ANY/scripts/params.py | 8 +- .../HDP/3.0/properties/stack_features.json | 5 + .../services/HDFS/configuration/hadoop-env.xml | 2 +- .../PERF/1.0/properties/stack_features.json | 5 + .../test/python/stacks/2.0.6/HDFS/test_zkfc.py | 7 - .../HDF/2.0/properties/stack_features.json | 5 + 34 files changed, 874 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d0dc19e0/ambari-common/src/main/python/resource_management/libraries/functions/constants.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py index 02ce194..8fd5c8d 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py @@ -49,6 +49,7 @@ class StackFeature: CONFIG_VERSIONING = "config_versioning" FALCON_EXTENSIONS = "falcon_extensions" DATANODE_NON_ROOT = "datanode_non_root" + SECURE_ZOOKEEPER = "secure_zookeeper" REMOVE_RANGER_HDFS_PLUGIN_ENV = "remove_ranger_hdfs_plugin_env" RANGER = "ranger" RANGER_TAGSYNC_COMPONENT = "ranger_tagsync_component" http://git-wip-us.apache.org/repos/asf/ambari/blob/d0dc19e0/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml index bc64d1f..89d5001 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml @@ -377,11 +377,6 @@ if [ "$command" == "datanode" ] [ "$EUID" -eq 0 ] [ -n "$H ulimit -l {{datanode_max_locked_memory}} fi {% endif %} - -# Enable ACLs on zookeper znodes if required -{% if hadoop_zkfc_opts is defined %} - export HADOOP_ZKFC_OPTS="{{hadoop_zkfc_opts}} $HADOOP_ZKFC_OPTS" -{% endif %} content http://git-wip-us.apache.org/repos/asf/ambari/blob/d0dc19e0/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json
[14/50] [abbrv] ambari git commit: AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Another fix of concurrent cp (dlysnichenko)
AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Another fix of concurrent cp (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9bb27b42 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9bb27b42 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9bb27b42 Branch: refs/heads/branch-dev-patch-upgrade Commit: 9bb27b42b85643b4fae89e54801171abbc3ec2ad Parents: 203e9fa Author: Lisnichenko DmitroAuthored: Mon Jan 23 18:00:45 2017 +0200 Committer: Lisnichenko Dmitro Committed: Mon Jan 23 18:00:45 2017 +0200 -- .../PERF/1.0/hooks/before-INSTALL/scripts/hook.py| 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9bb27b42/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py index 0865ef5..f030cfc 100644 --- a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py @@ -17,6 +17,8 @@ limitations under the License. """ import os + +from resource_management import ExecutionFailed from resource_management.core.resources.system import Directory, File, Execute from resource_management.libraries.script import Hook @@ -37,12 +39,17 @@ class BeforeInstallHook(Hook): cache_dir = self.extrakt_var_from_pythonpath(AMBARI_AGENT_CACHE_DIR) conf_select = os.path.join(cache_dir, CONF_SELECT_PY) dist_select = os.path.join(cache_dir, DISTRO_SELECT_PY) -if not os.path.exists(CONF_SELECT_DEST): - Execute("cp -f %s %s" % (conf_select, CONF_SELECT_DEST), user="root") +try: + Execute("cp -n %s %s" % (conf_select, CONF_SELECT_DEST), user="root") Execute("chmod a+x %s" % (CONF_SELECT_DEST), user="root") -if not os.path.exists(DISTRO_SELECT_DEST): - Execute("cp -f %s %s" % (dist_select, DISTRO_SELECT_DEST), user="root") +except ExecutionFailed: + pass # Due to concurrent execution, may produce error + +try: + Execute("cp -n %s %s" % (dist_select, DISTRO_SELECT_DEST), user="root") Execute("chmod a+x %s" % (DISTRO_SELECT_DEST), user="root") +except ExecutionFailed: + pass # Due to concurrent execution, may produce error def extrakt_var_from_pythonpath(self, name):
[30/50] [abbrv] ambari git commit: AMBARI-13324 automate creating Flume Keytab and principal (Shi Wang via dili)
AMBARI-13324 automate creating Flume Keytab and principal (Shi Wang via dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d77f3a54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d77f3a54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d77f3a54 Branch: refs/heads/branch-dev-patch-upgrade Commit: d77f3a54fcbb79e9a2518a56bb78b0468a8a8b4f Parents: ad0f4ec Author: Di LiAuthored: Tue Jan 24 15:19:41 2017 -0500 Committer: Di Li Committed: Tue Jan 24 15:19:41 2017 -0500 -- .../FLUME/1.4.0.2.0/kerberos.json | 44 .../1.4.0.2.0/package/scripts/flume_check.py| 6 +-- .../FLUME/1.4.0.2.0/package/scripts/params.py | 12 +- .../stacks/2.0.6/FLUME/test_service_check.py| 1 + 4 files changed, 59 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d77f3a54/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/kerberos.json new file mode 100644 index 000..ab46912 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/kerberos.json @@ -0,0 +1,44 @@ +{ + "services": [ +{ + "name": "FLUME", + "components": [ +{ + "name": "FLUME_HANDLER", + "identities": [ +{ + "name": "flume_principal", + "principal": { +"value": "${flume-env/flume_user}/_HOST@${realm}", +"type" : "service", +"configuration": "flume-env/flume_principal_name", +"local_username": "${flume-env/flume_user}" + + }, + "keytab": { +"file": "${keytab_dir}/flume.service.keytab", +"owner": { + "name": "${flume-env/flume_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "flume-env/flume_keytab_path" + } +} + ], + "configurations": [ +{ + "core-site": { +"hadoop.proxyuser.flume.groups": "${hadoop-env/proxyuser_group}", +"hadoop.proxyuser.flume.hosts": "*" + } +} + ] +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/d77f3a54/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py index c5450bb..80f4de2 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py @@ -38,11 +38,11 @@ class FlumeServiceCheck(Script): import params env.set_params(params) if params.security_enabled: - principal_replaced = params.http_principal.replace("_HOST", params.hostname) - Execute(format("{kinit_path_local} -kt {http_keytab} {principal_replaced}"), - user=params.smoke_user) + Execute(format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}"), + user=params.smokeuser) Execute(format('env JAVA_HOME={java_home} {flume_bin} version'), +user=params.smokeuser, logoutput=True, tries = 3, try_sleep = 20) http://git-wip-us.apache.org/repos/asf/ambari/blob/d77f3a54/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py index a44b461..b143941 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py @@ -22,6 +22,7 @@ from resource_management.libraries.functions import format from resource_management.libraries.functions.version import format_stack_version
[08/50] [abbrv] ambari git commit: AMBARI-19624. Missing fields for workflow SLA (Padma Priya via pallavkul)
AMBARI-19624. Missing fields for workflow SLA (Padma Priya via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6fd5cb0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6fd5cb0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6fd5cb0 Branch: refs/heads/branch-dev-patch-upgrade Commit: a6fd5cb04e47d85a6de43b403276fd5992361745 Parents: b6b4378 Author: pallavkulAuthored: Mon Jan 23 18:18:33 2017 +0530 Committer: pallavkul Committed: Mon Jan 23 18:18:33 2017 +0530 -- .../main/resources/ui/app/domain/actionjob_hanlder.js | 1 + .../src/main/resources/ui/app/domain/mapping-utils.js | 13 - .../resources/ui/app/templates/components/sla-info.hbs | 12 3 files changed, 25 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a6fd5cb0/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js index 34a9a4a..c9d9887 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js @@ -367,6 +367,7 @@ var FSActionJobHandler=ActionJobHandler.extend({ {xml:"delete"}, {xml:"mkdir"}, {xml:"move"}, + {xml:"chmod"}, {xml:"touchz"}, {xml:"chgrp"} ]; http://git-wip-us.apache.org/repos/asf/ambari/blob/a6fd5cb0/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js index 1929ddf..b918d70 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js @@ -233,7 +233,12 @@ var SLAMapper= Ember.Object.extend({ if (sla.alertContact){ slaInfo[slaPrefix+":"+"alert-contact"]=sla.alertContact; } - + if(sla.notificationMessage){ +slaInfo[slaPrefix+":"+"notification-msg"]=sla.notificationMessage; + } + if(sla.upstreamApps){ +slaInfo[slaPrefix+":"+"upstream-apps"]=sla.upstreamApps; + } } return nodeObj; }, @@ -248,6 +253,12 @@ var SLAMapper= Ember.Object.extend({ if (infoJson["alert-events"] && infoJson["alert-events"].__text){ sla.alertEvents=infoJson["alert-events"].__text; } +if (infoJson["notification-msg"] && infoJson["notification-msg"].__text){ + sla.notificationMessage=infoJson["notification-msg"].__text; +} +if (infoJson["upstream-apps"] && infoJson["upstream-apps"].__text){ + sla.upstreamApps=infoJson["upstream-apps"].__text; +} this.processTimePeriods(sla,infoJson,"should-start","shouldStart"); this.processTimePeriods(sla,infoJson,"should-end","shouldEnd"); this.processTimePeriods(sla,infoJson,"max-duration","maxDuration"); http://git-wip-us.apache.org/repos/asf/ambari/blob/a6fd5cb0/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs index 28bdf15..447bac2 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs @@ -90,5 +90,17 @@ {{input type="text" class="form-control" name="name" value=slaInfo.alertContact placeholder="Comma seperated Email IDs"}} + +Notification Message + + {{input type="text" class="form-control" name="name" value=slaInfo.notificationMessage placeholder="Notification Message"}} + + + +Upstream Apps + + {{input type="text" class="form-control" name="name" value=slaInfo.upstreamApps placeholder="Upstream Apps"}} + +
[22/50] [abbrv] ambari git commit: AMBARI-19657: Downgrade button does not work after restart Ambari server when upgrade wizard was left open (dili)
AMBARI-19657: Downgrade button does not work after restart Ambari server when upgrade wizard was left open (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b0ee28e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b0ee28e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b0ee28e Branch: refs/heads/branch-dev-patch-upgrade Commit: 7b0ee28ef2a313335ff81ef62574c37ca6fe1347 Parents: a51ede8 Author: Di LiAuthored: Mon Jan 23 15:26:52 2017 -0500 Committer: Di Li Committed: Mon Jan 23 15:26:52 2017 -0500 -- .../main/admin/stack_and_upgrade_controller.js | 21 +--- 1 file changed, 14 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7b0ee28e/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js index 4f88d2f..a585615 100644 --- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js @@ -385,13 +385,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, self.loadStackVersionsToModel(true).done(function () { self.loadRepoVersionsToModel().done(function() { self.loadCompatibleVersions().done(function() { -var currentVersion = App.StackVersion.find().findProperty('state', 'CURRENT'); -if (currentVersion) { - self.set('currentVersion', { -repository_version: currentVersion.get('repositoryVersion.repositoryVersion'), -repository_name: currentVersion.get('repositoryVersion.displayName') - }); -} +self.updateCurrentStackVersion(); dfd.resolve(); }); }); @@ -400,6 +394,16 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, return dfd.promise(); }, + updateCurrentStackVersion: function(){ +var currentVersion = App.StackVersion.find().findProperty('state', 'CURRENT'); +if (currentVersion) { + this.set('currentVersion', { +repository_version: currentVersion.get('repositoryVersion.repositoryVersion'), +repository_name: currentVersion.get('repositoryVersion.displayName') + }); +} + }, + /** * load upgrade tasks by upgrade id * @return {$.Deferred} @@ -656,6 +660,9 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, */ confirmDowngrade: function (event) { var self = this; +if(!this.get('currentVersion')){ + this.updateCurrentStackVersion(); +} var currentVersion = this.get('currentVersion'); return App.showConfirmationPopup( function() {
[34/50] [abbrv] ambari git commit: AMBARI-19660. Add log rotation settings - handle upgrade scenario - Storm, Hive (Madhuvanthi Radhakrishnan via smohanty)
AMBARI-19660. Add log rotation settings - handle upgrade scenario - Storm, Hive (Madhuvanthi Radhakrishnan via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78fefdd4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78fefdd4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78fefdd4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 78fefdd4c327390062d16a15594b32bb816f65cf Parents: 1b630eb Author: Sumit MohantyAuthored: Tue Jan 24 14:05:34 2017 -0800 Committer: Sumit Mohanty Committed: Tue Jan 24 14:08:16 2017 -0800 -- .../stacks/HDP/2.3/upgrades/config-upgrade.xml | 46 +++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 29 +++- .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 29 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 30 - .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 6 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml | 5 +++ .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml | 45 ++- .../stacks/HDP/2.4/upgrades/config-upgrade.xml | 44 ++ .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 28 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 27 +++ .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml | 9 +++- .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml | 8 .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 47 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 30 - .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 8 15 files changed, 384 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/78fefdd4/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index c9adb8c..efa6e70 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -177,6 +177,21 @@ + +hive-log4j + + + + + + +llap-daemon-log4j + + + + + + @@ -198,6 +213,14 @@ + + +webhcat-log4j + + + + + @@ -547,6 +570,29 @@ if-type="storm-site" if-value="15000" /> + + +storm-worker-log4j + + + + + + + + + + + +storm-cluster-log4j + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/78fefdd4/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml index d674af7..619fa5d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml @@ -318,6 +318,22 @@ + + + Updating the Hive Log4J properties to include parameterizations + + + + + Updating the Hive llap Log4J properties to include parameterizations + + + + + Updating the Webhcat Log4J properties to include parameterizations + + + @@ -368,7 +384,18 @@ - + + + Updating the Storm worker Log4J properties to include parameterizations + + + + + Updating the Storm cluster Log4J properties to include parameterizations + + + + Updating the Zookeeper Log4J properties to include parameterizations http://git-wip-us.apache.org/repos/asf/ambari/blob/78fefdd4/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml -- diff --git
[06/50] [abbrv] ambari git commit: AMBARI-19664. Log Search: Snapshot tour fix & configurable CORS filter (oleewere)
AMBARI-19664. Log Search: Snapshot tour fix & configurable CORS filter (oleewere) Change-Id: I763e9ac69d1058f85a2be3a2aa036e008ff89b95 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9bd8b7f2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9bd8b7f2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9bd8b7f2 Branch: refs/heads/branch-dev-patch-upgrade Commit: 9bd8b7f2ff1c7d2ca2cfd4bf8b0833a1bec98bb9 Parents: 09c1894 Author: oleewereAuthored: Sun Jan 22 22:29:19 2017 +0100 Committer: oleewere Committed: Mon Jan 23 13:33:53 2017 +0100 -- .../conf/LogSearchHttpHeaderConfig.java | 70 .../ambari/logsearch/conf/SecurityConfig.java | 11 +++ .../web/filters/LogsearchCorsFilter.java| 59 + .../src/main/webapp/scripts/utils/Tour.js | 30 - 4 files changed, 154 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd8b7f2/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/LogSearchHttpHeaderConfig.java -- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/LogSearchHttpHeaderConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/LogSearchHttpHeaderConfig.java new file mode 100644 index 000..cb8c097 --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/LogSearchHttpHeaderConfig.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.ambari.logsearch.conf; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class LogSearchHttpHeaderConfig { + + @Value("${logsearch.http.header.access-control-allow-origin:*}") + private String accessControlAllowOrigin; + + @Value("${logsearch.http.header.access-control-allow-headers:origin, content-type, accept, authorization}") + private String accessControlAllowHeaders; + + @Value("${logsearch.http.header.access-control-allow-credentials:true}") + private String accessControlAllowCredentials; + + @Value("${logsearch.http.header.access-control-allow-methods:GET, POST, PUT, DELETE, OPTIONS, HEAD}") + private String accessControlAllowMethods; + + public String getAccessControlAllowOrigin() { +return accessControlAllowOrigin; + } + + public void setAccessControlAllowOrigin(String accessControlAllowOrigin) { +this.accessControlAllowOrigin = accessControlAllowOrigin; + } + + public String getAccessControlAllowHeaders() { +return accessControlAllowHeaders; + } + + public void setAccessControlAllowHeaders(String accessControlAllowHeaders) { +this.accessControlAllowHeaders = accessControlAllowHeaders; + } + + public String getAccessControlAllowCredentials() { +return accessControlAllowCredentials; + } + + public void setAccessControlAllowCredentials(String accessControlAllowCredentials) { +this.accessControlAllowCredentials = accessControlAllowCredentials; + } + + public String getAccessControlAllowMethods() { +return accessControlAllowMethods; + } + + public void setAccessControlAllowMethods(String accessControlAllowMethods) { +this.accessControlAllowMethods = accessControlAllowMethods; + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/9bd8b7f2/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java -- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java index 115dcc3..b15ae43 100644 ---
[23/50] [abbrv] ambari git commit: AMBARI-19645. Log Search: support credential store api - part 1 (oleewere)
AMBARI-19645. Log Search: support credential store api - part 1 (oleewere) Change-Id: I00e5229da73b78dd0da998f947c208cbc631b81b Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c952c30 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c952c30 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c952c30 Branch: refs/heads/branch-dev-patch-upgrade Commit: 9c952c300881623de5911dab06fa24f2a934b1a7 Parents: 7b0ee28 Author: oleewereAuthored: Tue Jan 24 00:15:09 2017 +0100 Committer: oleewere Committed: Tue Jan 24 00:30:25 2017 +0100 -- .../apache/ambari/logfeeder/util/SSLUtil.java | 52 +++-- .../src/main/scripts/run.sh | 78 ++-- .../apache/ambari/logsearch/util/SSLUtil.java | 65 3 files changed, 135 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c952c30/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java -- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java index ea9f45d..80b34e0 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/util/SSLUtil.java @@ -21,19 +21,27 @@ package org.apache.ambari.logfeeder.util; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.log4j.Logger; import java.io.File; public class SSLUtil { + private static final Logger LOG = Logger.getLogger(SSLUtil.class); + private static final String KEYSTORE_LOCATION_ARG = "javax.net.ssl.keyStore"; private static final String TRUSTSTORE_LOCATION_ARG = "javax.net.ssl.trustStore"; private static final String KEYSTORE_TYPE_ARG = "javax.net.ssl.keyStoreType"; private static final String TRUSTSTORE_TYPE_ARG = "javax.net.ssl.trustStoreType"; private static final String KEYSTORE_PASSWORD_ARG = "javax.net.ssl.keyStorePassword"; private static final String TRUSTSTORE_PASSWORD_ARG = "javax.net.ssl.trustStorePassword"; + private static final String KEYSTORE_PASSWORD_PROPERTY_NAME = "logfeeder_keystore_password"; + private static final String TRUSTSTORE_PASSWORD_PROPERTY_NAME = "logfeeder_truststore_password"; private static final String KEYSTORE_PASSWORD_FILE = "ks_pass.txt"; private static final String TRUSTSTORE_PASSWORD_FILE = "ts_pass.txt"; - + + private static final String CREDENTIAL_STORE_PROVIDER_PATH = "hadoop.security.credential.provider.path"; private static final String LOGFEEDER_CERT_DEFAULT_FOLDER = "/etc/ambari-logsearch-portal/conf/keys"; private static final String LOGFEEDER_STORE_DEFAULT_PASSWORD = "bigdata"; @@ -66,17 +74,48 @@ public class SSLUtil { } public static void ensureStorePasswords() { -ensureStorePassword(KEYSTORE_LOCATION_ARG, KEYSTORE_PASSWORD_ARG, KEYSTORE_PASSWORD_FILE); -ensureStorePassword(TRUSTSTORE_LOCATION_ARG, TRUSTSTORE_PASSWORD_ARG, TRUSTSTORE_PASSWORD_FILE); +ensureStorePassword(KEYSTORE_LOCATION_ARG, KEYSTORE_PASSWORD_ARG, KEYSTORE_PASSWORD_PROPERTY_NAME, KEYSTORE_PASSWORD_FILE); +ensureStorePassword(TRUSTSTORE_LOCATION_ARG, TRUSTSTORE_PASSWORD_ARG, TRUSTSTORE_PASSWORD_PROPERTY_NAME, TRUSTSTORE_PASSWORD_FILE); } - private static void ensureStorePassword(String locationArg, String pwdArg, String pwdFile) { + private static void ensureStorePassword(String locationArg, String pwdArg, String propertyName, String fileName) { if (StringUtils.isNotEmpty(System.getProperty(locationArg)) && StringUtils.isEmpty(System.getProperty(pwdArg))) { - String password = getPasswordFromFile(pwdFile); + String password = getPassword(propertyName, fileName); System.setProperty(pwdArg, password); } } + private static String getPassword(String propertyName, String fileName) { +String credentialStorePassword = getPasswordFromCredentialStore(propertyName); +if (credentialStorePassword != null) { + return credentialStorePassword; +} + +String filePassword = getPasswordFromFile(fileName); +if (filePassword != null) { + return filePassword; +} + +return LOGFEEDER_STORE_DEFAULT_PASSWORD; + } + + private static String getPasswordFromCredentialStore(String propertyName) { +try { + String providerPath
[50/50] [abbrv] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Merge branch 'trunk' into branch-dev-patch-upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/551f17b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/551f17b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/551f17b4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 551f17b427465f1a3420a1158fa75f6498fd0fd2 Parents: eb2c904 6a81155 Author: Nate ColeAuthored: Wed Jan 25 13:56:33 2017 -0500 Committer: Nate Cole Committed: Wed Jan 25 13:56:33 2017 -0500 -- .../controllers/ambariViews/ViewsListCtrl.js|6 + .../controllers/groups/GroupsListCtrl.js|3 + .../remoteClusters/RemoteClustersListCtrl.js|3 + .../stackVersions/StackVersionsCreateCtrl.js| 17 - .../stackVersions/StackVersionsEditCtrl.js | 17 +- .../stackVersions/StackVersionsListCtrl.js |3 + .../scripts/controllers/users/UsersListCtrl.js |3 + .../resources/ui/admin-web/app/styles/main.css | 11 +- .../app/views/ambariViews/listTable.html|5 +- .../app/views/ambariViews/listUrls.html |5 +- .../ui/admin-web/app/views/groups/list.html |5 +- .../app/views/remoteClusters/list.html |5 +- .../admin-web/app/views/stackVersions/list.html |5 +- .../ui/admin-web/app/views/users/list.html |5 +- .../src/main/python/ambari_agent/Controller.py | 20 +- .../ambari_agent/CustomServiceOrchestrator.py |8 +- .../src/main/python/ambari_agent/Facter.py | 44 +- .../main/python/ambari_agent/PythonExecutor.py | 19 +- .../test/python/ambari_agent/TestActionQueue.py | 43 + .../test/python/ambari_agent/TestController.py | 20 +- .../test/python/ambari_agent/TestHardware.py| 47 + .../src/main/python/ambari_commons/os_linux.py |6 +- .../libraries/functions/constants.py|2 + .../libraries/functions/security_commons.py | 29 +- .../libraries/functions/setup_atlas_hook.py | 14 +- .../libraries/functions/solr_cloud_util.py | 22 +- .../libraries/functions/stack_select.py |5 +- .../libraries/script/dummy.py | 29 +- .../HDP/2.0.8/services/HDFS/kerberos.json |2 +- .../logfeeder/metrics/LogFeederAMSClient.java | 40 +- .../apache/ambari/logfeeder/util/SSLUtil.java | 78 +- .../src/main/scripts/run.sh | 78 +- .../ambari-logsearch-portal/pom.xml | 13 +- .../configsets/audit_logs/conf/managed-schema | 100 +- .../logsearch/common/ACLPropertiesSplitter.java | 70 + .../ambari/logsearch/common/MessageEnums.java |3 + .../ambari/logsearch/conf/ApiDocConfig.java |1 - .../conf/LogSearchHttpHeaderConfig.java | 70 + .../ambari/logsearch/conf/SecurityConfig.java | 68 +- .../logsearch/conf/SolrAuditLogPropsConfig.java | 27 + .../ambari/logsearch/conf/SolrConfig.java | 71 +- .../conf/SolrConnectionPropsConfig.java | 29 + .../ambari/logsearch/conf/SolrPropsConfig.java | 12 + .../conf/global/SolrAuditLogsState.java | 68 + .../conf/global/SolrCollectionState.java| 33 + .../conf/global/SolrServiceLogsState.java | 59 + .../conf/global/SolrUserConfigState.java| 60 + .../configurer/LogfeederFilterConfigurer.java | 66 + .../configurer/SolrAuditAliasConfigurer.java| 136 + .../configurer/SolrCollectionConfigurer.java| 230 + .../logsearch/configurer/SolrConfigurer.java| 23 + .../ambari/logsearch/dao/AuditSolrDao.java | 38 +- .../logsearch/dao/ServiceLogsSolrDao.java | 30 +- .../ambari/logsearch/dao/SolrAliasDao.java | 121 - .../ambari/logsearch/dao/SolrCollectionDao.java | 313 - .../ambari/logsearch/dao/SolrDaoBase.java | 18 +- .../logsearch/dao/SolrSchemaFieldDao.java | 38 +- .../ambari/logsearch/dao/UserConfigSolrDao.java | 71 +- .../ambari/logsearch/doc/DocConstants.java |7 + .../ambari/logsearch/handler/ACLHandler.java| 97 + .../handler/CreateCollectionHandler.java| 222 + .../handler/ListCollectionHandler.java | 51 + .../handler/ReloadCollectionHandler.java| 45 + .../logsearch/handler/SolrZkRequestHandler.java | 26 + .../handler/UploadConfigurationHandler.java | 100 + .../ambari/logsearch/rest/StatusResource.java | 91 + .../ambari/logsearch/util/RESTErrorUtil.java| 10 +- .../apache/ambari/logsearch/util/SSLUtil.java | 65 +- .../AbstractLogsearchGlobalStateFilter.java | 100 + .../filters/LogsearchAuditLogsStateFilter.java | 51 + .../web/filters/LogsearchCorsFilter.java| 59 + .../LogsearchServiceLogsStateFilter.java| 51 + .../filters/LogsearchUserConfigStateFilter.java | 52 + .../src/main/resources/swagger/swagger.html |
[42/50] [abbrv] ambari git commit: AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach)
AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dab389d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dab389d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dab389d9 Branch: refs/heads/branch-dev-patch-upgrade Commit: dab389d94634e6c21935a7034a0389a70390176e Parents: b9200e0 Author: Andrii TkachAuthored: Tue Jan 24 21:44:43 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 12:42:27 2017 +0200 -- .../main/service/reassign/step4_controller.js | 29 +++- .../manage_alert_groups_controller_test.js | 6 +- .../service/reassign/step4_controller_test.js | 78 3 files changed, 92 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dab389d9/ambari-web/app/controllers/main/service/reassign/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index b383da7..2e9d431 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -70,6 +70,8 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro hostComponents: [], + dependentHostComponents: [], + dbPropertyMap: { 'HIVE_SERVER': { type: 'hive-site', @@ -89,16 +91,35 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro * load step info */ loadStep: function () { -if (this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) { +var componentName = this.get('content.reassign.component_name'); +if (componentName === 'NAMENODE' && App.get('isHaEnabled')) { this.set('hostComponents', ['NAMENODE', 'ZKFC']); } else { - this.set('hostComponents', [this.get('content.reassign.component_name')]); + this.set('hostComponents', [componentName]); } +this.setDependentHostComponents(componentName); this.set('serviceName', [this.get('content.reassign.service_id')]); this._super(); }, /** + * Set dependent host-components to dependentHostComponents + * @param {string} componentName + */ + setDependentHostComponents: function(componentName) { +var installedComponents = App.Host.find(this.get('content.reassignHosts.target')) + .get('hostComponents') + .mapProperty('componentName'); +var dependenciesToInstall = App.StackServiceComponent.find(componentName) + .get('dependencies') + .mapProperty('componentName') + .filter(function(component) { +return !installedComponents.contains(component); + }); +this.set('dependentHostComponents', dependenciesToInstall); + }, + + /** * concat host-component names into string * @return {String} */ @@ -213,7 +234,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, createHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { @@ -245,7 +266,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, installHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { http://git-wip-us.apache.org/repos/asf/ambari/blob/dab389d9/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js -- diff --git a/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js b/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js index 2c58017..7a2f35b 100644 --- a/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js +++ b/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js @@ -21,7 +21,11 @@ var App = require('app'); var manageAlertGroupsController; function getController() { - return App.ManageAlertGroupsController.create({}); + return
[15/50] [abbrv] ambari git commit: AMBARI-19670. Trailing slash (/) on cluster resource causes incorrect authorization logic flow (rlevas)
AMBARI-19670. Trailing slash (/) on cluster resource causes incorrect authorization logic flow (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a64be42 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a64be42 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a64be42 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8a64be42043380ad5c35b0517a92e9c0239d2d4b Parents: 9bb27b4 Author: Robert LevasAuthored: Mon Jan 23 11:36:53 2017 -0500 Committer: Robert Levas Committed: Mon Jan 23 11:36:53 2017 -0500 -- .../security/authorization/AmbariAuthorizationFilter.java | 2 +- .../authorization/AmbariAuthorizationFilterTest.java | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a64be42/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java index 1faadb6..ce9a790 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java @@ -68,7 +68,7 @@ public class AmbariAuthorizationFilter implements Filter { private static final String API_USERS_ALL_PATTERN = API_VERSION_PREFIX + "/users.*"; private static final String API_PRIVILEGES_ALL_PATTERN = API_VERSION_PREFIX + "/privileges.*"; private static final String API_GROUPS_ALL_PATTERN = API_VERSION_PREFIX + "/groups.*"; - private static final String API_CLUSTERS_PATTERN = API_VERSION_PREFIX + "/clusters/(\\w+)?"; + private static final String API_CLUSTERS_PATTERN = API_VERSION_PREFIX + "/clusters/(\\w+/?)?"; private static final String API_WIDGET_LAYOUTS_PATTERN = API_VERSION_PREFIX + "/clusters/.*?/widget_layouts.*?"; private static final String API_CLUSTERS_ALL_PATTERN = API_VERSION_PREFIX + "/clusters.*"; private static final String API_VIEWS_ALL_PATTERN = API_VERSION_PREFIX + "/views.*"; http://git-wip-us.apache.org/repos/asf/ambari/blob/8a64be42/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java index 0ab75c5..15e243e 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java @@ -72,6 +72,8 @@ public class AmbariAuthorizationFilterTest { final Table urlTests = HashBasedTable.create(); urlTests.put("/api/v1/clusters/cluster", "GET", true); urlTests.put("/api/v1/clusters/cluster", "POST", true); +urlTests.put("/api/v1/clusters/cluster/", "GET", true); // This should probably be an invalid URL, but Ambari seems to allow it. +urlTests.put("/api/v1/clusters/cluster/", "POST", true); // This should probably be an invalid URL, but Ambari seems to allow it. urlTests.put("/api/v1/views", "GET", true); urlTests.put("/api/v1/views", "POST", true); urlTests.put("/api/v1/persist/SomeValue", "GET", true); @@ -113,6 +115,8 @@ public class AmbariAuthorizationFilterTest { final Table urlTests = HashBasedTable.create(); urlTests.put("/api/v1/clusters/cluster", "GET", true); urlTests.put("/api/v1/clusters/cluster", "POST", true); +urlTests.put("/api/v1/clusters/cluster/", "GET", true); // This should probably be an invalid URL, but Ambari seems to allow it. +urlTests.put("/api/v1/clusters/cluster/", "POST", true); // This should probably be an invalid URL, but Ambari seems to allow it. urlTests.put("/api/v1/views", "GET", true); urlTests.put("/api/v1/views", "POST", true); urlTests.put("/api/v1/persist/SomeValue", "GET", true); @@ -154,6 +158,8 @@ public class AmbariAuthorizationFilterTest { final Table urlTests = HashBasedTable.create(); urlTests.put("/api/v1/clusters/cluster", "GET", true); urlTests.put("/api/v1/clusters/cluster", "POST", true); +
[24/50] [abbrv] ambari git commit: AMBARI-19686. Add condition for detecting Blueprint call so that 'llap' named queue can be created on 1st BP invocation, if deemed required.
AMBARI-19686. Add condition for detecting Blueprint call so that 'llap' named queue can be created on 1st BP invocation, if deemed required. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/796f52a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/796f52a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/796f52a4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 796f52a47acb8a04c4e8a7e225863cd848460ed7 Parents: 9c952c3 Author: Swapan ShridharAuthored: Mon Jan 23 17:46:59 2017 -0800 Committer: Swapan Shridhar Committed: Mon Jan 23 17:46:59 2017 -0800 -- .../src/main/resources/stacks/HDP/2.5/services/stack_advisor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/796f52a4/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py index 04ada3e..d2c0459 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py @@ -778,7 +778,9 @@ class HDP25StackAdvisor(HDP24StackAdvisor): # Check if it's 1st invocation after enabling Hive Server Interactive (config: enable_hive_interactive). changed_configs_has_enable_hive_int = self.isConfigPropertiesChanged(services, "hive-interactive-env", ['enable_hive_interactive'], False) llap_named_queue_selected_in_curr_invocation = None - if changed_configs_has_enable_hive_int \ + # Check if its : 1. 1st invocation from UI ('enable_hive_interactive' in changed-configurations) + # OR 2. 1st invocation from BP (services['changed-configurations'] should be empty in this case) + if (changed_configs_has_enable_hive_int or 0 == len(services['changed-configurations']))\ and services['configurations']['hive-interactive-env']['properties']['enable_hive_interactive']: if len(leafQueueNames) == 1 or (len(leafQueueNames) == 2 and llap_queue_name in leafQueueNames): llap_named_queue_selected_in_curr_invocation = True
[09/50] [abbrv] ambari git commit: AMBARI-19674. Asset Manager import and validation issues (Madhan Mohan Reddy via pallavkul)
AMBARI-19674. Asset Manager import and validation issues (Madhan Mohan Reddy via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74aff7c6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74aff7c6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74aff7c6 Branch: refs/heads/branch-dev-patch-upgrade Commit: 74aff7c645c987b692188e0a48e627896e6cf70a Parents: a6fd5cb Author: pallavkulAuthored: Mon Jan 23 18:23:57 2017 +0530 Committer: pallavkul Committed: Mon Jan 23 18:23:57 2017 +0530 -- .../org/apache/oozie/ambari/view/Constants.java | 16 +++-- .../apache/oozie/ambari/view/HDFSFileUtils.java | 19 ++ .../ambari/view/OozieProxyImpersonator.java | 40 ++- .../oozie/ambari/view/WorkflowFilesService.java | 70 .../oozie/ambari/view/assets/AssetRepo.java | 10 +++ .../oozie/ambari/view/assets/AssetResource.java | 7 ++ .../oozie/ambari/view/assets/AssetService.java | 4 ++ .../workflowmanager/WorkflowManagerService.java | 46 ++--- .../view/workflowmanager/WorkflowsRepo.java | 19 +- .../resources/ui/app/components/asset-config.js | 18 - .../resources/ui/app/components/asset-list.js | 20 +- .../ui/app/components/asset-manager.js | 51 -- .../ui/app/components/designer-workspace.js | 23 +-- .../ui/app/components/flow-designer.js | 59 - .../resources/ui/app/services/asset-manager.js | 19 ++ .../src/main/resources/ui/app/styles/app.less | 4 ++ .../app/templates/components/asset-config.hbs | 8 +++ .../ui/app/templates/components/asset-list.hbs | 12 +++- .../app/templates/components/asset-manager.hbs | 26 +++- .../templates/components/designer-workspace.hbs | 2 +- .../app/templates/components/flow-designer.hbs | 4 +- 21 files changed, 347 insertions(+), 130 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74aff7c6/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java index 238b002..f7c1936 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java @@ -17,9 +17,15 @@ */ package org.apache.oozie.ambari.view; -public class Constants { - public static final String STATUS_FAILED = "failed"; - public static final String STATUS_OK = "ok"; - public static final String STATUS_KEY = "status"; - public static final String MESSAGE_KEY = "message"; +public interface Constants { + String STATUS_FAILED = "failed"; + String STATUS_OK = "ok"; + String STATUS_KEY = "status"; + String MESSAGE_KEY = "message"; + String WF_DRAFT_EXTENSION = ".wfdraft"; + String WF_EXTENSION = ".xml"; + String DEFAULT_WORKFLOW_FILENAME="workflow.xml"; + String DEFAULT_DRAFT_FILENAME="workflow"+WF_DRAFT_EXTENSION; + String WF_ASSET_EXTENSION = ".wfasset"; + String DEFAULT_WORKFLOW_ASSET_FILENAME="asset"+WF_ASSET_EXTENSION; } http://git-wip-us.apache.org/repos/asf/ambari/blob/74aff7c6/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/HDFSFileUtils.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/HDFSFileUtils.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/HDFSFileUtils.java index 53b43f9..d06eb07 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/HDFSFileUtils.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/HDFSFileUtils.java @@ -19,6 +19,7 @@ package org.apache.oozie.ambari.view; import com.google.common.base.Optional; import org.apache.ambari.view.ViewContext; +import org.apache.ambari.view.commons.hdfs.UserService; import org.apache.ambari.view.commons.hdfs.ViewPropertyHelper; import org.apache.ambari.view.utils.hdfs.HdfsApi; import org.apache.ambari.view.utils.hdfs.HdfsUtil; @@ -30,6 +31,7 @@ import org.slf4j.LoggerFactory; import java.io.FileNotFoundException; import java.io.IOException; +import java.util.HashMap; import java.util.Map; public class HDFSFileUtils { @@ -118,5 +120,22 @@ public class HDFSFileUtils { } } + public boolean hdfsCheck() { + try { + getHdfsgetApi().getStatus(); + return true; + } catch (Exception e) { +
[35/50] [abbrv] ambari git commit: AMBARI-19658. LogSearch Integration Cache Timeout should be configurable. (rnettleton)
AMBARI-19658. LogSearch Integration Cache Timeout should be configurable. (rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60462002 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60462002 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60462002 Branch: refs/heads/branch-dev-patch-upgrade Commit: 604620021908995d7b4581176ceecf6c44ffea26 Parents: 78fefdd Author: Bob NettletonAuthored: Tue Jan 24 17:15:07 2017 -0500 Committer: Bob Nettleton Committed: Tue Jan 24 17:15:29 2017 -0500 -- .../server/configuration/Configuration.java | 26 +- .../logging/LogSearchDataRetrievalService.java | 28 +--- .../LogSearchDataRetrievalServiceTest.java | 27 ++- 3 files changed, 76 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60462002/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index df1b627..73c70dc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2601,7 +2601,6 @@ public class Configuration { public static final ConfigurationProperty LOGSEARCH_PORTAL_READ_TIMEOUT = new ConfigurationProperty<>( "logsearch.portal.read.timeout", 5000); - /** * Global disable flag for AmbariServer Metrics. */ @@ -2609,6 +2608,18 @@ public class Configuration { public static final ConfigurationProperty AMBARISERVER_METRICS_DISABLE = new ConfigurationProperty<>( "ambariserver.metrics.disable", false); + /** + * The time, in hours, that the Ambari Server will hold Log File metadata in its internal cache before making + * a request to the LogSearch Portal to get the latest metadata. + * + * The logging metadata (in this case, log file names) is generally quite static, so the default should + * generally be quite long. + * + */ + @Markdown(description = "The time, in hours, that the Ambari Server will hold Log File metadata in its internal cache before making a request to the LogSearch Portal to get the latest metadata.") + public static final ConfigurationProperty LOGSEARCH_METADATA_CACHE_EXPIRE_TIMEOUT = new ConfigurationProperty<>( +"logsearch.metadata.cache.expire.timeout", 24); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -5406,6 +5417,19 @@ public class Configuration { return NumberUtils.toInt(getProperty(LOGSEARCH_PORTAL_READ_TIMEOUT)); } + + /** + * + * Get the max time, in hours, to hold data in the LogSearch + * metadata cache prior to expiring the cache and re-loading + * the data from the LogSearch Portal service. + * + * @return max number of hours that the LogSearch metadata is cached + */ + public int getLogSearchMetadataCacheExpireTimeout() { +return NumberUtils.toInt(getProperty(LOGSEARCH_METADATA_CACHE_EXPIRE_TIMEOUT)); + } + /** * Generates a markdown table which includes: * http://git-wip-us.apache.org/repos/asf/ambari/blob/60462002/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java index ce6094c..6b484a4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java @@ -23,6 +23,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.apache.ambari.server.AmbariService; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.AmbariServer; import org.apache.commons.collections.CollectionUtils; @@ -77,6 +78,11 @@ public class LogSearchDataRetrievalService extends AbstractService { @Inject private Injector injector; + @Inject + private Configuration ambariServerConfiguration; + + + /** * A Cache of host+component names to a set of log
[11/50] [abbrv] ambari git commit: AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko)
AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aaa99316 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aaa99316 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aaa99316 Branch: refs/heads/branch-dev-patch-upgrade Commit: aaa99316f42b5f7633bb8b2ace3d2557c73a5500 Parents: cacb1cc Author: Oleg NechiporenkoAuthored: Mon Jan 23 13:31:45 2017 +0200 Committer: Oleg Nechiporenko Committed: Mon Jan 23 15:07:04 2017 +0200 -- ambari-web/app/views/common/modal_popups/alert_popup.js | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aaa99316/ambari-web/app/views/common/modal_popups/alert_popup.js -- diff --git a/ambari-web/app/views/common/modal_popups/alert_popup.js b/ambari-web/app/views/common/modal_popups/alert_popup.js index 413d33c..3364fcb 100644 --- a/ambari-web/app/views/common/modal_popups/alert_popup.js +++ b/ambari-web/app/views/common/modal_popups/alert_popup.js @@ -23,19 +23,19 @@ var App = require('app'); * * @param {String} header - header of the popup * @param {String} body - body of the popup - * @param {Function} primary - function to call upon clicking the OK button + * @param {Function} callback - function to call upon clicking the OK button, clicking "x" or pressing "Esc" * @return {*} */ -App.showAlertPopup = function (header, body, primary) { +App.showAlertPopup = function (header, body, callback) { return App.ModalPopup.show({ primary: Em.I18n.t('ok'), secondary: null, header: header, body: body, -onPrimary: function () { - this.hide(); - if (primary) { -primary(); +hide: function () { + this._super(); + if (callback) { +callback(); } } });
[29/50] [abbrv] ambari git commit: AMBARI-19592 : Create grafana dashboards for Druid Metrics and configure druid to send metrics to AMS. (Nishant Bangarwa via avijayan)
AMBARI-19592 : Create grafana dashboards for Druid Metrics and configure druid to send metrics to AMS. (Nishant Bangarwa via avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad0f4ecc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad0f4ecc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad0f4ecc Branch: refs/heads/branch-dev-patch-upgrade Commit: ad0f4ecc67e39d109449e945b5108440059b4240 Parents: d0dc19e Author: Aravindan VijayanAuthored: Tue Jan 24 10:52:56 2017 -0800 Committer: Aravindan Vijayan Committed: Tue Jan 24 10:52:56 2017 -0800 -- .../ambari-metrics/datasource.js| 97 ++ .../HDP/grafana-druid-home.json | 995 +++ .../HDP/grafana-druid-ingestion.json| 776 +++ .../HDP/grafana-druid-query.json| 858 .../DRUID/0.9.2/configuration/druid-common.xml | 57 ++ .../DRUID/0.9.2/package/scripts/params.py | 36 + .../stacks/HDP/2.6/services/stack_advisor.py| 3 + 7 files changed, 2822 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0f4ecc/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js -- diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js index a1e6164..3a0fb66 100644 --- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js +++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js @@ -136,6 +136,12 @@ define([ if(!_.isEmpty(templateSrv.variables[1]) && templateSrv.variables[1].name === "component") { alias = alias + ' on ' + target.sTopology + ' for ' + target.sComponent; } + +// Aliases for Druid Datasources. +if(!_.isEmpty(templateSrv.variables) && templateSrv.variables[0].query === "druidDataSources" && +!templateSrv.variables[1]) { + alias = alias.replace('$druidDataSource', target.sDataSource); +} return function (res) { console.log('processing metric ' + target.metric); if (!res.metrics[0] || target.hide) { @@ -320,6 +326,19 @@ define([ ); }; + // Druid calls. + var getDruidData = function(target) { +var precision = target.precision === 'default' || typeof target.precision == 'undefined' ? '' : '=' ++ target.precision; +var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator; +var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform; +var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '=' + target.seriesAggregator; +return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.sDataSourceMetric + metricTransform + + metricAggregator + '=druid=' + from + '=' + to + precision + seriesAggregator).then( + allHostMetricsData(target) +); + }; + // Time Ranges var from = Math.floor(options.range.from.valueOf() / 1000); var to = Math.floor(options.range.to.valueOf() / 1000); @@ -469,6 +488,23 @@ define([ })); } +//Templatized Dashboards for Druid +if (templateSrv.variables[0].query === "druidDataSources" && !templateSrv.variables[1]) { + var allDataSources = templateSrv.variables.filter(function(variable) { return variable.query === "druidDataSources";}); + var selectedDataSources = (_.isEmpty(allDataSources)) ? "" : allDataSources[0].options.filter(function(dataSource) +{ return dataSource.selected; }).map(function(dataSourceName) { return dataSourceName.value; }); + selectedDataSources = templateSrv._values.druidDataSources.lastIndexOf('}') > 0 ? templateSrv._values.druidDataSources.slice(1,-1) : + templateSrv._values.druidDataSources; + var selectedDataSource = selectedDataSources.split(','); + _.forEach(selectedDataSource, function(processDataSource) { +metricsPromises.push(_.map(options.targets, function(target) { + target.sDataSource = processDataSource; + target.sDataSourceMetric = target.metric.replace('*', target.sDataSource); + return getDruidData(target); +
[07/50] [abbrv] ambari git commit: AMBARI-19665. Add basic auth support for Log Search Swagger UI (oleewere)
AMBARI-19665. Add basic auth support for Log Search Swagger UI (oleewere) Change-Id: I369d3e994e178a98a1a925bb32fdb400232f71d4 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b6b43785 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6b43785 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6b43785 Branch: refs/heads/branch-dev-patch-upgrade Commit: b6b43785ea2f335734a647771cb468ccf89da06b Parents: 9bd8b7f Author: oleewereAuthored: Mon Jan 23 11:32:08 2017 +0100 Committer: oleewere Committed: Mon Jan 23 13:33:54 2017 +0100 -- .../ambari/logsearch/conf/ApiDocConfig.java | 1 - .../src/main/resources/swagger/swagger.html | 26 +--- 2 files changed, 11 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b6b43785/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApiDocConfig.java -- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApiDocConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApiDocConfig.java index 0ddad65..86c1edd 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApiDocConfig.java +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApiDocConfig.java @@ -45,7 +45,6 @@ public class ApiDocConfig { public BeanConfig swaggerConfig() throws UnknownHostException { BeanConfig beanConfig = new BeanConfig(); beanConfig.setSchemes(new String[]{"http", "https"}); -beanConfig.setHost(InetAddress.getLocalHost().getHostAddress() + ":61888"); // TODO: port from property beanConfig.setBasePath("/api/v1"); beanConfig.setTitle("Log Search REST API"); beanConfig.setDescription("Log aggregation, analysis, and visualization."); http://git-wip-us.apache.org/repos/asf/ambari/blob/b6b43785/ambari-logsearch/ambari-logsearch-portal/src/main/resources/swagger/swagger.html -- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/resources/swagger/swagger.html b/ambari-logsearch/ambari-logsearch-portal/src/main/resources/swagger/swagger.html index e1b052a..33346d3 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/resources/swagger/swagger.html +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/resources/swagger/swagger.html @@ -17,7 +17,7 @@ --> -Swagger UI +Log Search REST API @@ -43,7 +43,7 @@ if (url && url.length > 1) { url = decodeURIComponent(url[1]); } else { -var urlPrefix = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); +var urlPrefix = location.protocol +'//'+ location.hostname+(location.port ? ':'+location.port: ''); url = urlPrefix + "/api/v1/swagger.yaml"; } window.swaggerUi = new SwaggerUi({ @@ -74,21 +74,16 @@ }); function addApiKeyAuthorization(){ -var key = encodeURIComponent($('#input_apiKey')[0].value); -if(key && key.trim() != "") { -var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query"); -window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth); -log("added key " + key); +var username = encodeURIComponent($('#input_username')[0].value); +var password = encodeURIComponent($('#input_password')[0].value); +if (username && username.trim() != "" && password && password != "") { +var apiKeyAuth = new SwaggerClient.PasswordAuthorization("Authorization", username, password); +window.swaggerUi.api.clientAuthorizations.add("key", apiKeyAuth); +log("added authorization header: " + 'Basic ' + btoa(username + ':' + password)); } } -$('#input_apiKey').change(addApiKeyAuthorization); - -// if you have an apiKey you would like to pre-populate on the page for demonstration purposes... -/* - var apiKey = "myApiKey123456789"; - $('#input_apiKey').val(apiKey); - */ +$('#input_username, #input_password').change(addApiKeyAuthorization); window.swaggerUi.load(); @@ -107,7 +102,8 @@ http://swagger.io;>swagger http://example.com/api;
[49/50] [abbrv] ambari git commit: AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya)
AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a811557 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a811557 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a811557 Branch: refs/heads/branch-dev-patch-upgrade Commit: 6a8115572b328785532aed27c1dc44a1bac17a01 Parents: e555230 Author: Jayush LuniyaAuthored: Wed Jan 25 09:40:56 2017 -0800 Committer: Jayush Luniya Committed: Wed Jan 25 09:40:56 2017 -0800 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 60 +- .../stacks/HDP/2.5/services/stack_advisor.py| 33 +- .../src/main/resources/stacks/stack_advisor.py | 18 +++ .../stacks/2.0.6/common/test_stack_advisor.py | 113 ++- .../stacks/2.5/common/test_stack_advisor.py | 4 +- 5 files changed, 191 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a811557/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 7ed1b77..55f3d30 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -1350,6 +1350,35 @@ class HDP206StackAdvisor(DefaultStackAdvisor): totalMemoryRequired += self.formatXmxSizeToBytes(heapsize) return totalMemoryRequired + def get_yarn_nm_mem_in_mb(self, services, configurations): +""" +Gets YARN NodeManager memory in MB (yarn.nodemanager.resource.memory-mb). +Reads from: + - configurations (if changed as part of current Stack Advisor invocation (output)), and services["changed-configurations"] +is empty, else + - services['configurations'] (input). + +services["changed-configurations"] would be empty is Stack Advisor call if made from Blueprints (1st invocation). Subsequent +Stack Advisor calls will have it non-empty. We do this because in subsequent invocations, even if Stack Advsior calculates this +value (configurations), it is finally not recommended, making 'input' value to survive. +""" +yarn_nm_mem_in_mb = None + +yarn_site = getServicesSiteProperties(services, "yarn-site") +yarn_site_properties = getSiteProperties(configurations, "yarn-site") + +# Check if services["changed-configurations"] is empty and 'yarn.nodemanager.resource.memory-mb' is modified in current ST invocation. +if not ("changed-configurations" in services and services["changed-configurations"]) and yarn_site_properties and 'yarn.nodemanager.resource.memory-mb' in yarn_site_properties: + yarn_nm_mem_in_mb = float(yarn_site_properties['yarn.nodemanager.resource.memory-mb']) +elif yarn_site and 'yarn.nodemanager.resource.memory-mb' in yarn_site: + # Check if 'yarn.nodemanager.resource.memory-mb' is input in services array. + yarn_nm_mem_in_mb = float(yarn_site['yarn.nodemanager.resource.memory-mb']) + +if yarn_nm_mem_in_mb <= 0.0: + Logger.warning("'yarn.nodemanager.resource.memory-mb' current value : {0}. Expected value : > 0".format(yarn_nm_mem_in_mb)) + +return yarn_nm_mem_in_mb + def getPreferredMountPoints(self, hostInfo): # '/etc/resolv.conf', '/etc/hostname', '/etc/hosts' are docker specific mount points @@ -1438,10 +1467,37 @@ class HDP206StackAdvisor(DefaultStackAdvisor): def validateYARNConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): clusterEnv = getSiteProperties(configurations, "cluster-env") -validationItems = [ {"config-name": 'yarn.nodemanager.resource.memory-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'yarn.nodemanager.resource.memory-mb')}, + +validationItems = [ {"config-name": 'yarn.nodemanager.resource.memory-mb', "item": self.validatorGreaterThenDefaultValue(properties, recommendedDefaults, 'yarn.nodemanager.resource.memory-mb')}, {"config-name": 'yarn.scheduler.minimum-allocation-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'yarn.scheduler.minimum-allocation-mb')}, {"config-name": 'yarn.nodemanager.linux-container-executor.group', "item": self.validatorEqualsPropertyItem(properties, "yarn.nodemanager.linux-container-executor.group", clusterEnv, "user_group")}, -{"config-name": 'yarn.scheduler.maximum-allocation-mb',
[02/50] [abbrv] ambari git commit: AMBARI-19622. Need abilities to add a custom action node and import a workflow xml with custom action (Padma Priya via pallavkul)
AMBARI-19622. Need abilities to add a custom action node and import a workflow xml with custom action (Padma Priya via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e5185ac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e5185ac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e5185ac Branch: refs/heads/branch-dev-patch-upgrade Commit: 3e5185acaea24bfeb28f4b10da6d3a94c90dcacd Parents: 9abe8da Author: pallavkulAuthored: Mon Jan 23 15:00:03 2017 +0530 Committer: pallavkul Committed: Mon Jan 23 15:00:03 2017 +0530 -- .../ui/app/components/flow-designer.js | 11 +++ .../ui/app/components/workflow-action-editor.js | 77 .../ui/app/components/workflow-actions.js | 5 ++ .../ui/app/domain/action-type-resolver.js | 10 ++- .../ui/app/domain/actionjob_hanlder.js | 22 +- .../resources/ui/app/domain/node-handler.js | 10 +-- .../src/main/resources/ui/app/styles/app.less | 4 + .../app/templates/components/flow-designer.hbs | 25 +++ .../components/workflow-action-editor.hbs | 16 .../templates/components/workflow-actions.hbs | 3 + .../main/resources/ui/app/utils/common-utils.js | 4 + .../main/resources/ui/app/utils/constants.js| 3 +- 12 files changed, 169 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3e5185ac/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 8bbe831..1822a20 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -775,6 +775,17 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.set('showCreateKillNode', false); }, addNode(type){ + if(type === 'custom'){ +this.$('#customTypeModal').modal('show'); + }else{ +this.send('addAction', type); + } +}, +createCustomAction(type){ + this.send('addAction', type); + this.set('customActionType', ''); +}, +addAction(type){ this.createSnapshot(); var currentTransition=this.get("currentTransition"); this.get("workflow").addNode(this.findTransition(this.get("workflow").startNode, currentTransition.sourceNodeId, currentTransition.targetNode.id),type); http://git-wip-us.apache.org/repos/asf/ambari/blob/3e5185ac/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js index 8a3c7cf..f2d3ba8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js @@ -17,6 +17,7 @@ import Ember from 'ember'; import Constants from '../utils/constants'; +import CommonUtils from '../utils/common-utils'; import {SlaInfo} from '../domain/sla-info'; export default Ember.Component.extend( Ember.Evented,{ @@ -40,6 +41,7 @@ export default Ember.Component.extend( Ember.Evented,{ clonedActionModel : {}, showingFileBrowser : false, childComponents : new Map(), + errors : Ember.A([]), isActionNode : Ember.computed('nodeType',function(){ if(this.get('nodeType') === 'action'){ return true; @@ -58,13 +60,43 @@ export default Ember.Component.extend( Ember.Evented,{ return this.get('actionIcons')[this.get('actionType')]; }), saveClicked : false, - containsUnsupportedProperties : Ember.computed('actionModel.unsupportedProperties', function(){ -return this.get('actionModel.unsupportedProperties') ? !Ember.isEmpty(Object.keys(this.get('actionModel.unsupportedProperties'))) : false; - }), - unsupportedPropertiesXml : Ember.computed('actionModel.unsupportedProperties', function(){ -if(this.get('containsUnsupportedProperties')){ - var x2js = new X2JS(); + unsupportedPropertiesXml : Ember.computed('actionModel.unsupportedProperties', { +get(key){ + let x2js = new X2JS(); return vkbeautify.xml(x2js.json2xml_str(this.get('actionModel.unsupportedProperties'))); +}, +set(key, value) { + let x2js = new X2JS(); + var temp =
[44/50] [abbrv] ambari git commit: AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach)
AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75bf160c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75bf160c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75bf160c Branch: refs/heads/branch-dev-patch-upgrade Commit: 75bf160ce8dfd2fdd148f0dc7f857336c57a8b81 Parents: 18e58ff Author: Andrii TkachAuthored: Wed Jan 25 14:31:16 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 14:37:01 2017 +0200 -- .../controllers/stackVersions/StackVersionsCreateCtrl.js | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/75bf160c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 3c16963..b3c27dc 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -284,6 +284,12 @@ angular.module('ambariAdminConsole') $scope.editVersionDisabled = true; delete $scope.updateObj.href; $scope.updateObj.operating_systems = []; +angular.forEach($scope.osList, function (os) { + os.OperatingSystems.ambari_managed_repositories = !$scope.useRedhatSatellite; + if (os.selected) { +$scope.updateObj.operating_systems.push(os); + } +}); var skip = $scope.skipValidation || $scope.useRedhatSatellite; return Stack.validateBaseUrls(skip, $scope.osList, $scope.upgradeStack).then(function (invalidUrls) {
[19/50] [abbrv] ambari git commit: AMBARI-19678 Confirmation for adding host component from service summary page should be displayed once. (ababiichuk)
AMBARI-19678 Confirmation for adding host component from service summary page should be displayed once. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3871f4a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3871f4a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3871f4a8 Branch: refs/heads/branch-dev-patch-upgrade Commit: 3871f4a8d31aff1f61bad695ec5eb884820638c0 Parents: 796658f Author: ababiichukAuthored: Mon Jan 23 19:47:11 2017 +0200 Committer: ababiichuk Committed: Mon Jan 23 20:36:07 2017 +0200 -- ambari-web/app/controllers/main/host/details.js | 202 +++ ambari-web/app/controllers/main/service/item.js | 58 +- .../host/details/addDeleteComponentPopup.hbs| 34 +++- .../templates/main/service/add_host_popup.hbs | 33 --- .../test/controllers/main/host/details_test.js | 144 +++-- 5 files changed, 317 insertions(+), 154 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3871f4a8/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 1fcc14d..093603e 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -89,27 +89,32 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow 'HIVE_METASTORE': { deletePropertyName: 'deleteHiveMetaStore', hostPropertyName: 'hiveMetastoreHost', - configsCallbackName: 'loadHiveConfigs' + configTagsCallbackName: 'loadHiveConfigs', + configsCallbackName: 'onLoadHiveConfigs' }, 'WEBHCAT_SERVER': { deletePropertyName: 'deleteWebHCatServer', hostPropertyName: 'webhcatServerHost', - configsCallbackName: 'loadWebHCatConfigs' + configTagsCallbackName: 'loadWebHCatConfigs', + configsCallbackName: 'onLoadHiveConfigs' }, 'HIVE_SERVER': { addPropertyName: 'addHiveServer', deletePropertyName: 'deleteHiveServer', - configsCallbackName: 'loadHiveConfigs' + configTagsCallbackName: 'loadHiveConfigs', + configsCallbackName: 'onLoadHiveConfigs' }, 'NIMBUS': { deletePropertyName: 'deleteNimbusHost', hostPropertyName: 'nimbusHost', - configsCallbackName: 'loadStormConfigs' + configTagsCallbackName: 'loadStormConfigs', + configsCallbackName: 'onLoadStormConfigs' }, 'RANGER_KMS_SERVER': { deletePropertyName: 'deleteRangerKMSServer', hostPropertyName: 'rangerKMSServerHost', - configsCallbackName: 'loadRangerConfigs' + configTagsCallbackName: 'loadRangerConfigs', + configsCallbackName: 'onLoadRangerConfigs' } }, @@ -158,6 +163,12 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow isReconfigureRequired: false, /** + * Contains component-related config properties loaded from server + * @type {Object|null} + */ + configs: null, + + /** * Array of all properties affected by adding/deleting host component * @type {Array} */ @@ -189,16 +200,38 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow manualKerberosWarning: App.get('router.mainAdminKerberosController.isManualKerberos') ? Em.I18n.t('hosts.host.manualKerberosWarning') : '', lastComponent: false, -lastComponentError: '' +lastComponentError: '', +hasHostsSelect: false, +selectedHost: null, +anyHostsWithoutComponent: true }), - clearConfigsChanges: function () { + saveLoadedConfigs: function (data) { +var configs = { + items: [] +}; +data.items.forEach(function (item) { + var configTypeObject = Em.getProperties(item, ['type', 'properties_attributes']), +properties = {}; + Em.keys(item.properties).forEach(function (propertyName) { +properties[propertyName] = item.properties[propertyName]; + }); + configTypeObject.properties = properties; + configs.items.push(configTypeObject); +}); +this.set('configs', configs); + }, + + clearConfigsChanges: function (shouldKeepLoadedConfigs) { var arrayNames = ['allPropertiesToChange', 'recommendedPropertiesToChange', 'requiredPropertiesToChange', 'groupedPropertiesToChange']; this.abortRequests(); arrayNames.forEach(function (arrayName) { this.get(arrayName).clear(); }, this); this.set('isReconfigureRequired', false); +if (!shouldKeepLoadedConfigs) { + this.set('configs', null); +} }, applyConfigsCustomization: function () { @@ -456,7
[25/50] [abbrv] ambari git commit: AMBARI-19684. Agent registration fails as local OS is not compatible with primary OS family.(vbrodetskyi)
AMBARI-19684. Agent registration fails as local OS is not compatible with primary OS family.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6c3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6c3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6c3 Branch: refs/heads/branch-dev-patch-upgrade Commit: c6c3eb157f3cd80397db428d21441d3ec5e6 Parents: 796f52a Author: Vitaly BrodetskyiAuthored: Tue Jan 24 13:19:28 2017 +0200 Committer: Vitaly Brodetskyi Committed: Tue Jan 24 13:19:28 2017 +0200 -- ambari-server/conf/unix/create-python-wrap.sh | 40 + ambari-server/src/main/assemblies/server.xml | 5 +++ ambari-server/src/main/python/bootstrap.py | 31 ambari-server/src/main/python/os_check_type.py | 2 +- ambari-server/src/test/python/TestBootstrap.py | 4 +-- 5 files changed, 79 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c6c3/ambari-server/conf/unix/create-python-wrap.sh -- diff --git a/ambari-server/conf/unix/create-python-wrap.sh b/ambari-server/conf/unix/create-python-wrap.sh new file mode 100644 index 000..3190073 --- /dev/null +++ b/ambari-server/conf/unix/create-python-wrap.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +PYTHON_WRAPER_DIR="${ROOT}/usr/bin/" +PYTHON_WRAPER_TARGET="${PYTHON_WRAPER_DIR}/ambari-python-wrap" + +# remove old python wrapper +rm -f "$PYTHON_WRAPER_TARGET" + +AMBARI_PYTHON="" +python_binaries=( "/usr/bin/python" "/usr/bin/python2" "/usr/bin/python2.7" "/usr/bin/python2.6" ) +for python_binary in "${python_binaries[@]}" +do + $python_binary -c "import sys ; ver = sys.version_info ; sys.exit(not (ver >= (2,6) and ver<(3,0)))" 1>/dev/null 2>/dev/null + + if [ $? -eq 0 ] ; then +AMBARI_PYTHON="$python_binary" +break; + fi +done + +if [ -z "$AMBARI_PYTHON" ] ; then + >&2 echo "Cannot detect python for ambari to use. Please manually set $PYTHON_WRAPER link to point to correct python binary" +else + mkdir -p "$PYTHON_WRAPER_DIR" + ln -s "$AMBARI_PYTHON" "$PYTHON_WRAPER_TARGET" +fi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c6c3/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 5055d46..d65232c 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -237,6 +237,11 @@ /var/lib/ambari-server/ + 755 + conf/unix/create-python-wrap.sh + /var/lib/ambari-server/ + + 700 conf/unix/install-helper.sh /var/lib/ambari-server/ http://git-wip-us.apache.org/repos/asf/ambari/blob/c6c3/ambari-server/src/main/python/bootstrap.py -- diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index e576fc8..d836040 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -54,6 +54,8 @@ DEFAULT_AGENT_DATA_FOLDER = "/var/lib/ambari-agent/data" DEFAULT_AGENT_LIB_FOLDER = "/var/lib/ambari-agent" PYTHON_ENV="env PYTHONPATH=$PYTHONPATH:" + DEFAULT_AGENT_TEMP_FOLDER SERVER_AMBARI_SUDO = os.getenv('ROOT','/').rstrip('/') + "/var/lib/ambari-server/ambari-sudo.sh" +CREATE_PYTHON_WRAP_SCRIPT = os.getenv('ROOT','/').rstrip('/') + "/var/lib/ambari-server/create-python-wrap.sh" +REMOTE_CREATE_PYTHON_WRAP_SCRIPT = os.path.join(DEFAULT_AGENT_TEMP_FOLDER, 'create-python-wrap.sh') AMBARI_SUDO = os.path.join(DEFAULT_AGENT_TEMP_FOLDER, 'ambari-sudo.sh') class HostLog: @@ -466,6 +468,19 @@ class BootstrapDefault(Bootstrap): self.host_log.write("\n")
[13/50] [abbrv] ambari git commit: AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Fix of concurrent cp (dlysnichenko)
AMBARI-18739. Perf: Create Rolling and Express Upgrade Packs. Fix of concurrent cp (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/203e9fab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/203e9fab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/203e9fab Branch: refs/heads/branch-dev-patch-upgrade Commit: 203e9fab7b6c4ae1895a8c545991ada8b9e7503e Parents: c32eb48 Author: Lisnichenko DmitroAuthored: Mon Jan 23 16:45:54 2017 +0200 Committer: Lisnichenko Dmitro Committed: Mon Jan 23 16:46:45 2017 +0200 -- .../stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/203e9fab/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py index 175f39a..0865ef5 100644 --- a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py @@ -38,10 +38,10 @@ class BeforeInstallHook(Hook): conf_select = os.path.join(cache_dir, CONF_SELECT_PY) dist_select = os.path.join(cache_dir, DISTRO_SELECT_PY) if not os.path.exists(CONF_SELECT_DEST): - Execute("cp %s %s" % (conf_select, CONF_SELECT_DEST), user="root") + Execute("cp -f %s %s" % (conf_select, CONF_SELECT_DEST), user="root") Execute("chmod a+x %s" % (CONF_SELECT_DEST), user="root") if not os.path.exists(DISTRO_SELECT_DEST): - Execute("cp %s %s" % (dist_select, DISTRO_SELECT_DEST), user="root") + Execute("cp -f %s %s" % (dist_select, DISTRO_SELECT_DEST), user="root") Execute("chmod a+x %s" % (DISTRO_SELECT_DEST), user="root") def extrakt_var_from_pythonpath(self, name):
[05/50] [abbrv] ambari git commit: AMBARI-19651 Allow user to add custom property for log4j. (atkach)
AMBARI-19651 Allow user to add custom property for log4j. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09c1894f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09c1894f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09c1894f Branch: refs/heads/branch-dev-patch-upgrade Commit: 09c1894f7544067e5ab53fedafabea030815be9e Parents: 49ba635 Author: Andrii TkachAuthored: Mon Jan 23 12:35:28 2017 +0200 Committer: Andrii Tkach Committed: Mon Jan 23 14:30:09 2017 +0200 -- .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml | 2 +- .../ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml| 2 +- .../FALCON/0.5.0.2.1/configuration/falcon-log4j.xml | 2 +- .../HBASE/0.96.0.2.0/configuration/hbase-log4j.xml | 2 +- .../common-services/HDFS/2.1.0.2.0/configuration/hdfs-log4j.xml | 2 +- .../common-services/HDFS/3.0.0.3.0/configuration/hdfs-log4j.xml | 4 ++-- .../HIVE/0.12.0.2.0/configuration/hive-exec-log4j.xml| 2 +- .../common-services/HIVE/0.12.0.2.0/configuration/hive-log4j.xml | 2 +- .../HIVE/0.12.0.2.0/configuration/webhcat-log4j.xml | 2 +- .../common-services/KAFKA/0.8.1/configuration/kafka-log4j.xml| 2 +- .../KNOX/0.5.0.2.2/configuration/gateway-log4j.xml | 2 +- .../common-services/KNOX/0.5.0.2.2/configuration/ldap-log4j.xml | 2 +- .../OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml| 2 +- .../OOZIE/4.2.0.2.3/configuration/oozie-log4j.xml| 2 +- .../common-services/RANGER/0.6.0/configuration/admin-log4j.xml | 2 +- .../common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml | 2 +- .../RANGER/0.6.0/configuration/usersync-log4j.xml| 2 +- .../RANGER_KMS/0.5.0.2.3/configuration/kms-log4j.xml | 2 +- .../STORM/0.10.0/configuration/storm-cluster-log4j.xml | 2 +- .../STORM/0.10.0/configuration/storm-worker-log4j.xml| 2 +- .../STORM/1.0.1/configuration/storm-cluster-log4j.xml| 2 +- .../STORM/1.0.1/configuration/storm-worker-log4j.xml | 2 +- .../common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml | 2 +- .../common-services/YARN/3.0.0.3.0/configuration/yarn-log4j.xml | 2 +- .../ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml| 2 +- .../stacks/HDP/2.2/services/HDFS/configuration/hdfs-log4j.xml| 2 +- .../stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml| 2 +- .../HDP/2.5/services/HIVE/configuration/hive-exec-log4j2.xml | 2 +- .../stacks/HDP/2.5/services/HIVE/configuration/hive-log4j2.xml | 2 +- .../HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml | 2 +- .../HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml| 2 +- .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml | 2 +- 32 files changed, 33 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/09c1894f/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml index 5a97804..f5a2640 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml @@ -19,7 +19,7 @@ * limitations under the License. */ --> - + ams_hbase_log_maxfilesize 256 http://git-wip-us.apache.org/repos/asf/ambari/blob/09c1894f/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml index 05c8f0a..e5e4d23 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/atlas-log4j.xml @@ -19,7 +19,7 @@ * limitations under the License. */ --> - + atlas_log_level info http://git-wip-us.apache.org/repos/asf/ambari/blob/09c1894f/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-log4j.xml -- diff --git
[16/50] [abbrv] ambari git commit: AMBARI-19677 - Storm service check failed after HOU to HDP-2.5.3 due to CNF for StormAtlasHook (jonathanhurley)
AMBARI-19677 - Storm service check failed after HOU to HDP-2.5.3 due to CNF for StormAtlasHook (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/918fd597 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/918fd597 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/918fd597 Branch: refs/heads/branch-dev-patch-upgrade Commit: 918fd597bc19958ed16f45b8bfce63debd325fd4 Parents: 8a64be4 Author: Jonathan HurleyAuthored: Mon Jan 23 09:54:15 2017 -0500 Committer: Jonathan Hurley Committed: Mon Jan 23 11:39:53 2017 -0500 -- .../libraries/functions/setup_atlas_hook.py | 14 ++- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 2 +- .../0.1.0.2.3/package/scripts/status_params.py | 3 +- .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 6 +-- .../0.5.0.2.1/package/scripts/params_linux.py | 4 +- .../STORM/0.9.1/package/scripts/params_linux.py | 2 +- .../stacks/2.3/ATLAS/test_metadata_server.py| 40 ++-- .../stacks/2.5/ATLAS/test_atlas_server.py | 16 8 files changed, 47 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py index eeae4bc..367afc8 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py @@ -24,9 +24,11 @@ __all__ = ["has_atlas_in_cluster", "setup_atlas_hook", "setup_atlas_jar_symlinks import os # Local Imports +from resource_management.libraries.functions import stack_features from resource_management.libraries.resources.properties_file import PropertiesFile from resource_management.libraries.functions.format import format from resource_management.libraries.functions.default import default +from resource_management.libraries.script import Script from resource_management.core.resources.system import Link from resource_management.core.resources.packaging import Package from resource_management.core.logger import Logger @@ -159,11 +161,19 @@ def setup_atlas_jar_symlinks(hook_name, jar_source_dir): """ import params - atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ \ -else format("{stack_root}/current/atlas-server") + stack_root = Script.get_stack_root() + atlas_home_dir = os.path.join(stack_root, "current", "atlas-server") + + # if this is an upgrade/downagrade, then we must link in the correct version + # which may not be "current", so change the home directory location + upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", "")) + if upgrade_type is not None: +version_dir_segment = stack_features.get_stack_feature_version(Script.get_config()) +atlas_home_dir = os.path.join(stack_root, version_dir_segment, "atlas") # Will only exist if this host contains Atlas Server atlas_hook_dir = os.path.join(atlas_home_dir, "hook", hook_name) + if os.path.exists(atlas_hook_dir): Logger.info("Atlas Server is present on this host, will symlink jars inside of %s to %s if not already done." % (jar_source_dir, atlas_hook_dir)) http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index c74d046..afd6dde 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -94,7 +94,7 @@ version = default("/commandParams/version", None) stack_version_unformatted = config['hostLevelParams']['stack_version'] stack_version_formatted = format_stack_version(stack_version_unformatted) -metadata_home = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server') +metadata_home = format('{stack_root}/current/atlas-server') metadata_bin = format("{metadata_home}/bin") python_binary = os.environ['PYTHON_EXE'] if 'PYTHON_EXE' in os.environ else sys.executable
[39/50] [abbrv] ambari git commit: AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul)
AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0de31d6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0de31d6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0de31d6a Branch: refs/heads/branch-dev-patch-upgrade Commit: 0de31d6a59c2ec847fc060dffb9e69431eee4ebc Parents: 72e02ab Author: pallavkulAuthored: Wed Jan 25 09:14:58 2017 +0530 Committer: pallavkul Committed: Wed Jan 25 09:14:58 2017 +0530 -- .../src/main/resources/ui/app/components/query-editor.js| 8 .../views/hive20/src/main/resources/ui/app/styles/app.scss | 9 + contrib/views/hive20/src/main/resources/ui/bower.json | 1 + contrib/views/hive20/src/main/resources/ui/package.json | 1 + 4 files changed, 19 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js index 27d43d5..7bfe223 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js @@ -74,6 +74,14 @@ export default Ember.Component.extend({ }); }); +this.$('.CodeMirror').resizable({ + handles: 's', + + resize: function () { +Ember.run.debounce(this, updateSize, 150); + } +}).find('.ui-resizable-s').addClass('grip fa fa-reorder'); + }.on('didInsertElement'), http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss index 5ae65d1..7ab6992 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss +++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss @@ -221,6 +221,15 @@ pre { overflow-y: scroll; } +.grip { + height: 20px; + border: 0 1px 1px solid #ddd; + background-color: #f5f5f5; + color: #bbb; + text-align: center; + font-size: inherit; +} + .hv-dropdown { position: absolute; .dropdown-menu { http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/bower.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json b/contrib/views/hive20/src/main/resources/ui/bower.json index 4eadee7..fcd11cf 100644 --- a/contrib/views/hive20/src/main/resources/ui/bower.json +++ b/contrib/views/hive20/src/main/resources/ui/bower.json @@ -6,6 +6,7 @@ "ember-qunit-notifications": "0.1.0", "font-awesome": "~4.5.0", "codemirror": "~5.15.0", +"jquery-ui": "~1.12.1", "bootstrap-treeview": "~1.2.0" } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/package.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/package.json b/contrib/views/hive20/src/main/resources/ui/package.json index ed7a299..d04a092 100644 --- a/contrib/views/hive20/src/main/resources/ui/package.json +++ b/contrib/views/hive20/src/main/resources/ui/package.json @@ -34,6 +34,7 @@ "ember-cli-htmlbars": "^1.0.3", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.4.0", +"ember-cli-jquery-ui": "0.0.20", "ember-cli-jshint": "^1.0.0", "ember-cli-moment-shim": "3.0.1", "ember-cli-qunit": "^2.0.0",
[47/50] [abbrv] ambari git commit: AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk)
AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c115bc1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c115bc1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c115bc1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 1c115bc184d386f588f601d8f7f517c1fd09658d Parents: b60faba Author: Andrew OnishukAuthored: Wed Jan 25 16:52:11 2017 +0200 Committer: Andrew Onishuk Committed: Wed Jan 25 16:52:11 2017 +0200 -- .../src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml | 3 +++ .../src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml | 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1c115bc1/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml index 07a9ef8..8c2ec8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml @@ -55,6 +55,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel + http://git-wip-us.apache.org/repos/asf/ambari/blob/1c115bc1/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml index 63e85e3..ccf9a4e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml @@ -87,6 +87,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel +
[26/50] [abbrv] ambari git commit: AMBARI-19689. Error on Files view-SIMPLE authentication is not enabled. (gauravn7)
AMBARI-19689. Error on Files view-SIMPLE authentication is not enabled. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75b30a4e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75b30a4e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75b30a4e Branch: refs/heads/branch-dev-patch-upgrade Commit: 75b30a4e974bce0df3cd9d2d0efc428f101d8601 Parents: c6c3555 Author: Gaurav NagarAuthored: Tue Jan 24 20:28:17 2017 +0530 Committer: Gaurav Nagar Committed: Tue Jan 24 20:29:12 2017 +0530 -- .../org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/75b30a4e/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java -- diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java index d1d1bb0..714e229 100644 --- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java +++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java @@ -321,10 +321,10 @@ public class ConfigurationBuilder { * @throws HdfsApiException if configuration parsing failed */ public Configuration buildConfig() throws HdfsApiException { -parseProperties(); -setAuthParams(buildAuthenticationConfig()); copyPropertiesBySite(CORE_SITE); copyPropertiesBySite(HDFS_SITE); +parseProperties(); +setAuthParams(buildAuthenticationConfig()); String umask = context.getProperties().get(UMASK_INSTANCE_PROPERTY); if (umask != null && !umask.isEmpty()) conf.set(UMASK_CLUSTER_PROPERTY, umask);
[41/50] [abbrv] ambari git commit: AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere)
AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere) Change-Id: I3ae59596f5817dbd60bed37f259ce54a5f16de39 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b9200e0e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9200e0e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9200e0e Branch: refs/heads/branch-dev-patch-upgrade Commit: b9200e0e57111b33b7b998fa59a5d25c0b700869 Parents: ff4babb Author: Laszlo PuskasAuthored: Wed Jan 25 11:01:45 2017 +0100 Committer: oleewere Committed: Wed Jan 25 11:03:58 2017 +0100 -- .../users/CsvFilePersisterService.java | 24 +- .../CsvFilePersisterServiceFunctionalTest.java | 91 2 files changed, 113 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b9200e0e/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java index d8ffe98..fe6bf35 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java @@ -18,12 +18,21 @@ package org.apache.ambari.server.serveraction.users; +import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileAttribute; +import java.nio.file.attribute.PosixFilePermission; +import java.nio.file.attribute.PosixFilePermissions; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import javax.inject.Inject; import javax.inject.Singleton; @@ -51,10 +60,21 @@ public class CsvFilePersisterService implements CollectionPersisterService getCsvPermissions() { +Set permissionsSet = new HashSet<>(); +permissionsSet.add(PosixFilePermission.OWNER_READ); +permissionsSet.add(PosixFilePermission.OWNER_WRITE); +permissionsSet.add(PosixFilePermission.GROUP_READ); +permissionsSet.add(PosixFilePermission.OTHERS_READ); +return permissionsSet; + } + @Inject public void init() throws IOException { -// make 3rd party dependencies be managed by the container (probably constructor binding or factory is needed) -fileWriter = new FileWriter(csvFile); + +Path csv = Files.createFile(Paths.get(csvFile), PosixFilePermissions.asFileAttribute(getCsvPermissions())); +fileWriter = new FileWriter(csv.toFile()); + csvPrinter = new CSVPrinter(fileWriter, CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/b9200e0e/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java new file mode 100644 index 000..97529fe --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java @@ -0,0 +1,91 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.serveraction.users; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import
[45/50] [abbrv] ambari git commit: AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)
AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8642a463 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8642a463 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8642a463 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8642a4634b230755f5c285ed340a7636abe54b8f Parents: 75bf160 Author: Oleg NechiporenkoAuthored: Wed Jan 25 11:58:52 2017 +0200 Committer: Oleg Nechiporenko Committed: Wed Jan 25 15:53:37 2017 +0200 -- .../app/views/common/configs/service_configs_by_category_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8642a463/ambari-web/app/views/common/configs/service_configs_by_category_view.js -- diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js index 4148197..25f7dfb 100644 --- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js +++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js @@ -664,8 +664,8 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri var controller = (App.router.get('currentState.name') == 'configs') ? App.router.get('mainServiceInfoConfigsController') : App.router.get('wizardStep7Controller'); - this.get('mainView').onClose(); - controller.set('filter', event.view.get('serviceConfigObj.name')); + controller.set('filter', this.get('serviceConfigObj.name')); + this.get('parentView').onClose(); } }) });
[04/50] [abbrv] ambari git commit: AMBARI-19662. Unknown attributes should not be allowed in quick link filter definitions (Balazs Bence Sari via magyari_sandor)
AMBARI-19662. Unknown attributes should not be allowed in quick link filter definitions (Balazs Bence Sari via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49ba6359 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49ba6359 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49ba6359 Branch: refs/heads/branch-dev-patch-upgrade Commit: 49ba635950d2632dcac406e242df94f8a131ce2f Parents: 8362dce Author: Balazs Bence SariAuthored: Mon Jan 23 11:54:37 2017 +0100 Committer: Sandor Magyari Committed: Mon Jan 23 12:55:15 2017 +0100 -- .../QuickLinksProfileBuilder.java | 26 +++- .../QuickLinksProfileParser.java| 21 +--- .../QuickLinksProfileBuilderTest.java | 13 -- .../QuickLinksProfileParserTest.java| 11 +++-- .../inconsistent_quicklinks_profile_3.json | 9 +++ 5 files changed, 67 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49ba6359/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java index fca1155..627b1bc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java @@ -26,10 +26,14 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; +import java.util.Set; import javax.annotation.Nullable; +import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; /** * Class to create a {@link QuickLinksProfile} based on data received in a request @@ -39,6 +43,8 @@ public class QuickLinksProfileBuilder { public static final String NAME = "name"; public static final String COMPONENTS = "components"; public static final String FILTERS = "filters"; + public static final Set ALLOWED_FILTER_ATTRIBUTES = + ImmutableSet.of(VISIBLE, LINK_NAME, LINK_ATTRIBUTE); /** * @@ -102,16 +108,24 @@ public class QuickLinksProfileBuilder { } List filters = new ArrayList<>(); for (Map filterAsMap: (Collection
[12/50] [abbrv] ambari git commit: AMBARI-19640. Hue - Ambari Migration is not working in Kerberized envirionment. (Ishan Bhatt via gauravn7)
AMBARI-19640. Hue - Ambari Migration is not working in Kerberized envirionment. (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c32eb48e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c32eb48e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c32eb48e Branch: refs/heads/branch-dev-patch-upgrade Commit: c32eb48ed8421d0445ae7cace9421b9eb1bcc41a Parents: aaa9931 Author: Gaurav NagarAuthored: Mon Jan 23 19:38:01 2017 +0530 Committer: Gaurav Nagar Committed: Mon Jan 23 19:38:01 2017 +0530 -- ...HiveHistoryQueryMigrationImplementation.java | 24 .../HiveSavedQueryMigrationImplementation.java | 24 .../pigjob/PigJobMigrationImplementation.java | 23 +++ .../PigScriptMigrationImplementation.java | 24 .../pigudf/PigUdfMigrationImplementation.java | 24 5 files changed, 95 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c32eb48e/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryQueryMigrationImplementation.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryQueryMigrationImplementation.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryQueryMigrationImplementation.java index e827b09..f154b39 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryQueryMigrationImplementation.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryQueryMigrationImplementation.java @@ -50,6 +50,7 @@ import java.net.URI; public class HiveHistoryQueryMigrationImplementation { static final Logger logger = Logger.getLogger(HiveHistoryQueryMigrationImplementation.class); + final String USER_DIRECTORY = "/user"; public void wrtitetoalternatesqlfile(String dirname, String content, String instance, int i) throws IOException { @@ -449,10 +450,16 @@ public class HiveHistoryQueryMigrationImplementation { public Boolean run() throws Exception { URI uri = new URI(dir); - FileSystem fs = FileSystem.get(uri, conf, username); - + FileSystem fs = FileSystem.get(conf); Path src = new Path(dir); Boolean b = fs.mkdirs(src); + + String[] subDirs = dir.split("/"); + String dirPath = USER_DIRECTORY; + for(int i=2;i
[32/50] [abbrv] ambari git commit: AMBARI-19693. Permission issues with conf.server/hive-site.xml across several hive components (Dmytro Grinenko via smohanty)
AMBARI-19693. Permission issues with conf.server/hive-site.xml across several hive components (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a2b4e94 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a2b4e94 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a2b4e94 Branch: refs/heads/branch-dev-patch-upgrade Commit: 2a2b4e94feacfff56097293810867ce627b1778a Parents: f4f7571 Author: Sumit MohantyAuthored: Tue Jan 24 13:46:21 2017 -0800 Committer: Sumit Mohanty Committed: Tue Jan 24 13:47:54 2017 -0800 -- .../common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py | 2 +- .../src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2b4e94/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py index eecbcff..faa8c7e 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py @@ -51,7 +51,7 @@ def hcat(): Directory(params.hive_conf_dir, create_parents = True, -owner=params.webhcat_user, +owner=params.hive_user, group=params.user_group, ) http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2b4e94/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py index c09cd06..ff7e728 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py @@ -34,7 +34,7 @@ class TestHcatClient(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf', - owner = 'hcat', + owner = 'hive', group = 'hadoop', create_parents = True, ) @@ -74,7 +74,7 @@ class TestHcatClient(RMFTestCase): ) self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf', create_parents = True, - owner = 'hcat', + owner = 'hive', group = 'hadoop', ) self.assertResourceCalled('Directory', '/etc/hive-hcatalog/conf',
[20/50] [abbrv] ambari git commit: AMBARI-19619. Ranger load balancer url needs to be updated for dependent properties during HA. (Vivek Ratnavel Subramanian via Jaimin)
AMBARI-19619. Ranger load balancer url needs to be updated for dependent properties during HA. (Vivek Ratnavel Subramanian via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ade3214 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ade3214 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ade3214 Branch: refs/heads/branch-dev-patch-upgrade Commit: 3ade321478499ba9eff7cb703b13760130a2cf60 Parents: 3871f4a Author: Jaimin JetlyAuthored: Mon Jan 23 11:11:16 2017 -0800 Committer: Jaimin Jetly Committed: Mon Jan 23 11:11:16 2017 -0800 -- .../rangerAdmin/step4_controller.js | 82 +++- ambari-web/app/messages.js | 2 +- 2 files changed, 79 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3ade3214/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js index 3c32af9..c03c680 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js @@ -51,11 +51,29 @@ App.RAHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo }, onLoadConfigsTags: function (data) { +var urlParams = []; +urlParams.push('(type=admin-properties=' + data.Clusters.desired_configs['admin-properties'].tag + ')'); +var siteNamesToFetch = [ + 'ranger-hdfs-security', + 'ranger-yarn-security', + 'ranger-hbase-security', + 'ranger-hive-security', + 'ranger-knox-security', + 'ranger-kafka-security', + 'ranger-kms-security', + 'ranger-storm-security', + 'ranger-atlas-security' +]; +siteNamesToFetch.map(function(siteName) { + if(siteName in data.Clusters.desired_configs) { +urlParams.push('(type=' + siteName + '=' + data.Clusters.desired_configs[siteName].tag + ')'); + } +}); App.ajax.send({ name: 'reassign.load_configs', sender: this, data: { -urlParams: '(type=admin-properties=' + data.Clusters.desired_configs['admin-properties'].tag + ')' +urlParams: urlParams.join('|') }, success: 'onLoadConfigs', error: 'onTaskError' @@ -63,14 +81,70 @@ App.RAHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo }, onLoadConfigs: function (data) { +var configs = []; +var self = this; data.items.findProperty('type', 'admin-properties').properties['policymgr_external_url'] = this.get('content.policymgrExternalURL'); -var configData = this.reconfigureSites(['admin-properties'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('RANGER_ADMIN', false))); +configs.push({ + Clusters: { +desired_config: this.reconfigureSites(['admin-properties'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('RANGER_ADMIN', false))) + } +}); + +var configsToChange = [ + { +siteName: 'ranger-hdfs-security', +property: 'ranger.plugin.hdfs.policy.rest.url' + }, + { +siteName: 'ranger-yarn-security', +property: 'ranger.plugin.yarn.policy.rest.url' + }, + { +siteName: 'ranger-hbase-security', +property: 'ranger.plugin.hbase.policy.rest.url' + }, + { +siteName: 'ranger-hive-security', +property: 'ranger.plugin.hive.policy.rest.url' + }, + { +siteName: 'ranger-knox-security', +property: 'ranger.plugin.knox.policy.rest.url' + }, + { +siteName: 'ranger-kafka-security', +property: 'ranger.plugin.kafka.policy.rest.url' + }, + { +siteName: 'ranger-kms-security', +property: 'ranger.plugin.kms.policy.rest.url' + }, + { +siteName: 'ranger-storm-security', +property: 'ranger.plugin.storm.policy.rest.url' + }, + { +siteName: 'ranger-atlas-security', +property: 'ranger.plugin.atlas.policy.rest.url' + } +]; +configsToChange.map(function(item) { + var config = data.items.findProperty('type', item.siteName); + if(config) { +config.properties[item.property] = self.get('content.loadBalancerURL'); +configs.push({ + Clusters: { +desired_config: self.reconfigureSites([item.siteName], data,
[33/50] [abbrv] ambari git commit: AMBARI-19682. Small fixes for common log rotation (Madhuvanthi Radhakrishnan via smohanty)
AMBARI-19682. Small fixes for common log rotation (Madhuvanthi Radhakrishnan via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b630ebc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b630ebc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b630ebc Branch: refs/heads/branch-dev-patch-upgrade Commit: 1b630ebc6406ac2d81b375d4b503e028f6609c0e Parents: 2a2b4e9 Author: Sumit MohantyAuthored: Tue Jan 24 13:59:57 2017 -0800 Committer: Sumit Mohanty Committed: Tue Jan 24 14:00:24 2017 -0800 -- .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml | 8 .../LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml| 4 ++-- .../LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml| 4 ++-- .../YARN/2.1.0.2.0/configuration/yarn-log4j.xml | 4 ++-- .../ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml| 4 ++-- .../HDP/2.3/services/YARN/configuration/yarn-log4j.xml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b630ebc/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml index f5a2640..742cfe4 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml @@ -24,7 +24,7 @@ ams_hbase_log_maxfilesize 256 The maximum size of backup file before the log is rotated -HBase Log: backup file size +AMS HBase Log: backup file size MB @@ -34,7 +34,7 @@ ams_hbase_log_maxbackupindex 20 The number of backup files -HBase Log: # of backup files +AMS HBase Log: # of backup files int 0 @@ -45,7 +45,7 @@ ams_hbase_security_log_maxfilesize 256 The maximum size of backup file before the log is rotated -HBase Security Log: backup file size +AMS HBase Security Log: backup file size MB @@ -55,7 +55,7 @@ ams_hbase_security_log_maxbackupindex 20 The number of backup files -HBase Security Log: # of backup files +AMS HBase Security Log: # of backup files int 0 http://git-wip-us.apache.org/repos/asf/ambari/blob/1b630ebc/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml index 33749ff..ba33a00 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-log4j.xml @@ -46,7 +46,7 @@ logfeeder_json_log_maxfilesize 10 The maximum size of backup file before the log is rotated -Log Feeder Json Log: backup file size +Log Feeder JSON Log: backup file size MB @@ -56,7 +56,7 @@ logfeeder_json_log_maxbackupindex 10 The number of backup files -Log Feeder Json Log: # of backup files +Log Feeder JSON Log: # of backup files int 0 http://git-wip-us.apache.org/repos/asf/ambari/blob/1b630ebc/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml index a845741..31f7d57 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml @@ -47,7 +47,7 @@ logsearch_json_log_maxfilesize 10 The maximum size of backup file before the log is rotated -Log Search Json Log: backup file size +Log Search JSON Log: backup file size MB @@ -57,7 +57,7 @@ logsearch_json_log_maxbackupindex 10 The number of
[38/50] [abbrv] ambari git commit: AMBARI-19671. Hive View 2.0: Incorrect behaviour on select of database (Abhishek Kumar via pallavkul)
AMBARI-19671. Hive View 2.0: Incorrect behaviour on select of database (Abhishek Kumar via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/72e02ab0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/72e02ab0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/72e02ab0 Branch: refs/heads/branch-dev-patch-upgrade Commit: 72e02ab089b07246b2c79eb5e94825f1c19ad3cf Parents: bb8b44c Author: pallavkulAuthored: Wed Jan 25 09:09:47 2017 +0530 Committer: pallavkul Committed: Wed Jan 25 09:09:47 2017 +0530 -- .../main/resources/ui/app/templates/queries/query.hbs | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/72e02ab0/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs index 950e4f3..9e9e542 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs @@ -84,21 +84,21 @@ - + {{#each selectedTablesModels as |tableModel|}} - + - -{{ tableModel.dbname }} {{#if tableModel.isSelected}} {{fa-icon "check"}} {{/if}} + aria-controls={{concat 'db_body_' tableModel.dbname}}> +{{ tableModel.dbname }} {{#if (eq tableModel.dbname worksheet.selectedDb)}} {{fa-icon "check"}} {{/if}} Tables({{tableModel.tables.length}}) - + {{#if tableModel.tables.length }} {{#list-filter header="tables" items=tableModel.tables
[21/50] [abbrv] ambari git commit: AMBARI-19679. Dangling config-group hostmapping entries result in partial loading of config groups. (swagle)
AMBARI-19679. Dangling config-group hostmapping entries result in partial loading of config groups. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a51ede84 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a51ede84 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a51ede84 Branch: refs/heads/branch-dev-patch-upgrade Commit: a51ede8480e22e21a738bfe9921eb49d7e10a3aa Parents: 3ade321 Author: Siddharth WagleAuthored: Mon Jan 23 11:14:35 2017 -0800 Committer: Siddharth Wagle Committed: Mon Jan 23 11:14:35 2017 -0800 -- .../apache/ambari/server/state/configgroup/ConfigGroupImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a51ede84/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java index fe1f338..03edcf8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java @@ -172,8 +172,9 @@ public class ConfigGroupImpl implements ConfigGroup { if (host != null && hostEntity != null) { m_hosts.put(hostEntity.getHostId(), host); } - } catch (AmbariException e) { -LOG.warn("Host seems to be deleted but Config group mapping still exists !"); + } catch (Exception e) { +LOG.warn("Host {} seems to be deleted but Config group {} mapping " + + "still exists !", hostMappingEntity.getHostname(), configGroupName); LOG.debug("Host seems to be deleted but Config group mapping still exists !", e); } }
[10/50] [abbrv] ambari git commit: AMBARI-19669. Not able to add the settings for action nodes in firefox browser (Padma Priya via pallavkul)
AMBARI-19669. Not able to add the settings for action nodes in firefox browser (Padma Priya via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cacb1ccc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cacb1ccc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cacb1ccc Branch: refs/heads/branch-dev-patch-upgrade Commit: cacb1cccf9eda0ff13890310dc1e99208287818a Parents: 74aff7c Author: pallavkulAuthored: Mon Jan 23 18:33:31 2017 +0530 Committer: pallavkul Committed: Mon Jan 23 18:33:31 2017 +0530 -- .../ui/app/components/version-settings.js | 3 +-- .../main/resources/ui/app/domain/workflow.js| 3 +-- .../main/resources/ui/app/utils/common-utils.js | 2 +- .../main/resources/ui/app/utils/constants.js| 28 ++-- 4 files changed, 17 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js index 966313f..3c953e0 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js @@ -25,8 +25,7 @@ export default Ember.Component.extend({ this.set('workflowSchemaVersions', this.get('schemaVersions').getSupportedVersions('workflow')); this.set('selectedWorkflowVersion', this.get('workflow').schemaVersions.workflowVersion); var actionVersions = Ember.A([]); -Object.keys(Constants.actions).forEach((key)=>{ - var action = Constants.actions[key]; +Constants.actions.forEach((action)=>{ if(action.supportsSchema){ actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getSupportedVersions(action.name), selectedVersion: this.get('workflow').schemaVersions.actionVersions.get(action.name)}); http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js index 3c89f5c..9040bb8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js @@ -39,8 +39,7 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{ this.schemaVersions = {}; this.schemaVersions.workflowVersion = schemaVersions.getDefaultVersion('workflow'); var actionsMap = new Map(); -Object.keys(Constants.actions).forEach((key)=>{ - var action = Constants.actions[key]; +Constants.actions.forEach((action)=>{ if(action.supportsSchema){ actionsMap.set(action.name, schemaVersions.getDefaultVersion(action.name)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js b/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js index 8cc40d6..e793aac 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/utils/common-utils.js @@ -28,6 +28,6 @@ export default Ember.Object.create({ window.flowDesignerTestContext=context; }, isSupportedAction(actionType){ -return Object.values(Constants.actions).findBy('name', actionType)? true : false; +return Constants.actions.findBy('name', actionType)? true : false; } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cacb1ccc/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js index 9126819..1dd1c31 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js @@ -34,20 +34,20 @@ export default Ember.Object.create({ useCytoscape : true, isProjectManagerEnabled : false, autoRestoreWorkflowEnabled : true, - actions:{ -
ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku)
Repository: ambari Updated Branches: refs/heads/branch-2.5 8a4439e55 -> 4c9ebb590 AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c9ebb59 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c9ebb59 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c9ebb59 Branch: refs/heads/branch-2.5 Commit: 4c9ebb590b2432878019c2fe0a52c0dd9b9f4db3 Parents: 8a4439e Author: Yusaku SakoAuthored: Wed Jan 25 10:53:35 2017 -0800 Committer: Yusaku Sako Committed: Wed Jan 25 10:53:35 2017 -0800 -- .../mixins/common/configs/enhanced_configs.js | 21 +++- 1 file changed, 20 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c9ebb59/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index aece4c2..4bdc25f 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -194,7 +194,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP } else { delete recommendations.config_groups; } - + this.setUserContext(dataToSend); if (stepConfigs.someProperty('serviceName', 'MISC')) { recommendations.blueprint.configurations = blueprintUtils.buildConfigsJSON(stepConfigs); dataToSend.recommendations = recommendations; @@ -241,6 +241,25 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP }); }, + setUserContext: function(dataToSend) { +var controllerName = this.get('content.controllerName'); +var changes = dataToSend.changed_configurations; +if (changes) { + dataToSend['user-context'] = {"operation" : "EditConfig"}; +} else { + if (!controllerName) { +dataToSend['user-context'] = {"operation" : "RecommendAttribute"}; + } else if (controllerName == 'addServiceController') { +dataToSend['user-context'] = { + "operation" : "AddService", + "operation_details" : (this.get('content.services')|| []).filterProperty('isSelected').filterProperty('isInstalled', false).mapProperty('serviceName').join(',') +}; + } else if (controllerName == 'installerController'){ +dataToSend['user-context'] = {"operation" : "ClusterCreate"}; + } +} + }, + /** * Defines if there is any changes made by user. * Check all properties except recommended properties from popup
ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku)
Repository: ambari Updated Branches: refs/heads/trunk 5ddbb58ec -> 6a2aca64e AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a2aca64 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a2aca64 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a2aca64 Branch: refs/heads/trunk Commit: 6a2aca64e0d1eb789777e686829d7ec5babcd388 Parents: 5ddbb58 Author: Yusaku SakoAuthored: Wed Jan 25 10:47:10 2017 -0800 Committer: Yusaku Sako Committed: Wed Jan 25 10:47:46 2017 -0800 -- .../mixins/common/configs/enhanced_configs.js | 22 +++- 1 file changed, 21 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a2aca64/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index d1d8f9b..0e3f59b 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -214,7 +214,8 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP if (App.Service.find().someProperty('serviceName', 'HDFS') && !stepConfigs.someProperty('serviceName', 'HDFS')) { requiredTags.push({site: 'core-site', serviceName: 'HDFS'}); } - + + this.setUserContext(dataToSend); if (requiredTags.length) { this.loadAdditionalSites(requiredTags, stepConfigs, recommendations, dataToSend, onComplete); } else { @@ -308,6 +309,25 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP }); }, + setUserContext: function(dataToSend) { +var controllerName = this.get('content.controllerName'); +var changes = dataToSend.changed_configurations; +if (changes) { + dataToSend['user-context'] = {"operation" : "EditConfig"}; +} else { + if (!controllerName) { +dataToSend['user-context'] = {"operation" : "RecommendAttribute"}; + } else if (controllerName == 'addServiceController') { +dataToSend['user-context'] = { + "operation" : "AddService", + "operation_details" : (this.get('content.services')|| []).filterProperty('isSelected').filterProperty('isInstalled', false).mapProperty('serviceName').join(',') +}; + } else if (controllerName == 'installerController'){ +dataToSend['user-context'] = {"operation" : "ClusterCreate"}; + } +} + }, + /** * Defines if there is any changes made by user. * Check all properties except recommended properties from popup
ambari git commit: AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar)
Repository: ambari Updated Branches: refs/heads/trunk 6a8115572 -> 5ddbb58ec AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ddbb58e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ddbb58e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ddbb58e Branch: refs/heads/trunk Commit: 5ddbb58ec44795314d3a0e539daf11ace87ae6f9 Parents: 6a81155 Author: Sangeeta RavindranAuthored: Wed Jan 25 10:37:21 2017 -0800 Committer: Sangeeta Ravindran Committed: Wed Jan 25 10:37:21 2017 -0800 -- .../controllers/clusters/UserAccessListCtrl.js | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ddbb58e/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js index 9869d0b..3737414 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js @@ -148,10 +148,12 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio var privilegesOfTypeUser = []; var privilegesOfTypeGroup = []; for (var i = 0; i < arrayOfPrivileges.length; i++) { - if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){ -privilegesOfTypeGroup.push(arrayOfPrivileges[i]); - } else { -privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo); + if(arrayOfPrivileges[i].PrivilegeInfo.permission_name != "VIEW.USER") { +if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){ + privilegesOfTypeGroup.push(arrayOfPrivileges[i]); +} else { + privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo); +} } } @@ -204,8 +206,10 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio user.editable = (Cluster.ineditableRoles.indexOf(privilege.permission_name) === -1); arrayOfPrivileges.forEach(function(privilegeOfTypeGroup) { - if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") { -privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo); + if(privilegeOfTypeGroup.PrivilegeInfo.permission_name != "VIEW.USER") { +if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") { + privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo); +} } });
ambari git commit: AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar)
Repository: ambari Updated Branches: refs/heads/branch-2.5 b84a32b37 -> 8a4439e55 AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a4439e5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a4439e5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a4439e5 Branch: refs/heads/branch-2.5 Commit: 8a4439e55453a86ec6f256499ca4bf398100efbd Parents: b84a32b Author: Sangeeta RavindranAuthored: Wed Jan 25 10:22:51 2017 -0800 Committer: Sangeeta Ravindran Committed: Wed Jan 25 10:23:09 2017 -0800 -- .../controllers/clusters/UserAccessListCtrl.js | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a4439e5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js index 9869d0b..3737414 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js @@ -148,10 +148,12 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio var privilegesOfTypeUser = []; var privilegesOfTypeGroup = []; for (var i = 0; i < arrayOfPrivileges.length; i++) { - if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){ -privilegesOfTypeGroup.push(arrayOfPrivileges[i]); - } else { -privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo); + if(arrayOfPrivileges[i].PrivilegeInfo.permission_name != "VIEW.USER") { +if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){ + privilegesOfTypeGroup.push(arrayOfPrivileges[i]); +} else { + privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo); +} } } @@ -204,8 +206,10 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio user.editable = (Cluster.ineditableRoles.indexOf(privilege.permission_name) === -1); arrayOfPrivileges.forEach(function(privilegeOfTypeGroup) { - if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") { -privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo); + if(privilegeOfTypeGroup.PrivilegeInfo.permission_name != "VIEW.USER") { +if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") { + privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo); +} } });
ambari git commit: AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya)
Repository: ambari Updated Branches: refs/heads/branch-2.5 311349281 -> b84a32b37 AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b84a32b3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b84a32b3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b84a32b3 Branch: refs/heads/branch-2.5 Commit: b84a32b374adbbb97ee0141d4fd8deb3ec2fbcee Parents: 3113492 Author: Jayush LuniyaAuthored: Wed Jan 25 10:21:57 2017 -0800 Committer: Jayush Luniya Committed: Wed Jan 25 10:21:57 2017 -0800 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 77 - .../stacks/HDP/2.5/services/stack_advisor.py| 33 +- .../stacks/2.0.6/common/test_stack_advisor.py | 113 ++- .../stacks/2.5/common/test_stack_advisor.py | 4 +- 4 files changed, 190 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b84a32b3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 628f183..c750acf 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -1458,6 +1458,35 @@ class HDP206StackAdvisor(DefaultStackAdvisor): pass return self.toConfigurationValidationProblems(validationItems, "ams-env") + def get_yarn_nm_mem_in_mb(self, services, configurations): +""" +Gets YARN NodeManager memory in MB (yarn.nodemanager.resource.memory-mb). +Reads from: + - configurations (if changed as part of current Stack Advisor invocation (output)), and services["changed-configurations"] +is empty, else + - services['configurations'] (input). + +services["changed-configurations"] would be empty is Stack Advisor call if made from Blueprints (1st invocation). Subsequent +Stack Advisor calls will have it non-empty. We do this because in subsequent invocations, even if Stack Advsior calculates this +value (configurations), it is finally not recommended, making 'input' value to survive. +""" +yarn_nm_mem_in_mb = None + +yarn_site = getServicesSiteProperties(services, "yarn-site") +yarn_site_properties = getSiteProperties(configurations, "yarn-site") + +# Check if services["changed-configurations"] is empty and 'yarn.nodemanager.resource.memory-mb' is modified in current ST invocation. +if not ("changed-configurations" in services and services["changed-configurations"]) and yarn_site_properties and 'yarn.nodemanager.resource.memory-mb' in yarn_site_properties: + yarn_nm_mem_in_mb = float(yarn_site_properties['yarn.nodemanager.resource.memory-mb']) +elif yarn_site and 'yarn.nodemanager.resource.memory-mb' in yarn_site: + # Check if 'yarn.nodemanager.resource.memory-mb' is input in services array. + yarn_nm_mem_in_mb = float(yarn_site['yarn.nodemanager.resource.memory-mb']) + +if yarn_nm_mem_in_mb <= 0.0: + Logger.warning("'yarn.nodemanager.resource.memory-mb' current value : {0}. Expected value : > 0".format(yarn_nm_mem_in_mb)) + +return yarn_nm_mem_in_mb + def getPreferredMountPoints(self, hostInfo): # '/etc/resolv.conf', '/etc/hostname', '/etc/hosts' are docker specific mount points @@ -1536,6 +1565,24 @@ class HDP206StackAdvisor(DefaultStackAdvisor): return self.getWarnItem("Value is less than the recommended default of {0}".format(defaultValue)) return None + def validatorGreaterThenDefaultValue(self, properties, recommendedDefaults, propertyName): +if propertyName not in recommendedDefaults: + # If a property name exists in say hbase-env and hbase-site (which is allowed), then it will exist in the + # "properties" dictionary, but not necessarily in the "recommendedDefaults" dictionary". In this case, ignore it. + return None + +if not propertyName in properties: + return self.getErrorItem("Value should be set") +value = to_number(properties[propertyName]) +if value is None: + return self.getErrorItem("Value should be integer") +defaultValue = to_number(recommendedDefaults[propertyName]) +if defaultValue is None: + return None +if value > defaultValue: + return self.getWarnItem("Value is greater than the recommended default of {0}".format(defaultValue)) +return None + def validatorEqualsPropertyItem(self, properties1, propertyName1,
ambari git commit: AMBARI-18836. Remove group readable from hdfs headless keytab (Shi Wang via rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.5 67a762ea8 -> 311349281 AMBARI-18836. Remove group readable from hdfs headless keytab (Shi Wang via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31134928 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31134928 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31134928 Branch: refs/heads/branch-2.5 Commit: 311349281dd8ed73e06d3deec445740ad08a240f Parents: 67a762e Author: Shi WangAuthored: Wed Jan 25 12:41:26 2017 -0500 Committer: Robert Levas Committed: Wed Jan 25 12:41:26 2017 -0500 -- .../common-services/HDFS/2.1.0.2.0/kerberos.json | 2 +- .../HIVE/0.12.0.2.0/package/scripts/webhcat.py| 10 -- .../resources/stacks/HDP/2.5/services/HDFS/kerberos.json | 2 +- .../test/python/stacks/2.0.6/HIVE/test_webhcat_server.py | 4 4 files changed, 2 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31134928/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json index 3cb83ae..1cf1603 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/kerberos.json @@ -56,7 +56,7 @@ }, "group": { "name": "${cluster-env/user_group}", - "access": "r" + "access": "" }, "configuration": "hadoop-env/hdfs_user_keytab" } http://git-wip-us.apache.org/repos/asf/ambari/blob/31134928/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py index b519b4e..7f5eff6 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py @@ -66,16 +66,6 @@ def webhcat(): group=params.user_group, cd_access="a") - if params.security_enabled: -kinit_if_needed = format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name};") - else: -kinit_if_needed = "" - - if kinit_if_needed: -Execute(kinit_if_needed, -user=params.webhcat_user, -path='/bin' -) # Replace _HOST with hostname in relevant principal-related properties webhcat_site = params.config['configurations']['webhcat-site'].copy() http://git-wip-us.apache.org/repos/asf/ambari/blob/31134928/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/kerberos.json index 826d019..766a014 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/kerberos.json @@ -66,7 +66,7 @@ }, "group": { "name": "${cluster-env/user_group}", - "access": "r" + "access": "" }, "configuration": "hadoop-env/hdfs_user_keytab" } http://git-wip-us.apache.org/repos/asf/ambari/blob/31134928/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py index f93ea09..718ad4d 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py @@ -253,10 +253,6 @@ class TestWebHCatServer(RMFTestCase): create_parents = True, cd_access = 'a' ) -self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs;', - path =
ambari git commit: AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk e55523012 -> 6a8115572 AMBARI-19690: NM Memory can end up being too high on nodes with many components (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a811557 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a811557 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a811557 Branch: refs/heads/trunk Commit: 6a8115572b328785532aed27c1dc44a1bac17a01 Parents: e555230 Author: Jayush LuniyaAuthored: Wed Jan 25 09:40:56 2017 -0800 Committer: Jayush Luniya Committed: Wed Jan 25 09:40:56 2017 -0800 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 60 +- .../stacks/HDP/2.5/services/stack_advisor.py| 33 +- .../src/main/resources/stacks/stack_advisor.py | 18 +++ .../stacks/2.0.6/common/test_stack_advisor.py | 113 ++- .../stacks/2.5/common/test_stack_advisor.py | 4 +- 5 files changed, 191 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a811557/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 7ed1b77..55f3d30 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -1350,6 +1350,35 @@ class HDP206StackAdvisor(DefaultStackAdvisor): totalMemoryRequired += self.formatXmxSizeToBytes(heapsize) return totalMemoryRequired + def get_yarn_nm_mem_in_mb(self, services, configurations): +""" +Gets YARN NodeManager memory in MB (yarn.nodemanager.resource.memory-mb). +Reads from: + - configurations (if changed as part of current Stack Advisor invocation (output)), and services["changed-configurations"] +is empty, else + - services['configurations'] (input). + +services["changed-configurations"] would be empty is Stack Advisor call if made from Blueprints (1st invocation). Subsequent +Stack Advisor calls will have it non-empty. We do this because in subsequent invocations, even if Stack Advsior calculates this +value (configurations), it is finally not recommended, making 'input' value to survive. +""" +yarn_nm_mem_in_mb = None + +yarn_site = getServicesSiteProperties(services, "yarn-site") +yarn_site_properties = getSiteProperties(configurations, "yarn-site") + +# Check if services["changed-configurations"] is empty and 'yarn.nodemanager.resource.memory-mb' is modified in current ST invocation. +if not ("changed-configurations" in services and services["changed-configurations"]) and yarn_site_properties and 'yarn.nodemanager.resource.memory-mb' in yarn_site_properties: + yarn_nm_mem_in_mb = float(yarn_site_properties['yarn.nodemanager.resource.memory-mb']) +elif yarn_site and 'yarn.nodemanager.resource.memory-mb' in yarn_site: + # Check if 'yarn.nodemanager.resource.memory-mb' is input in services array. + yarn_nm_mem_in_mb = float(yarn_site['yarn.nodemanager.resource.memory-mb']) + +if yarn_nm_mem_in_mb <= 0.0: + Logger.warning("'yarn.nodemanager.resource.memory-mb' current value : {0}. Expected value : > 0".format(yarn_nm_mem_in_mb)) + +return yarn_nm_mem_in_mb + def getPreferredMountPoints(self, hostInfo): # '/etc/resolv.conf', '/etc/hostname', '/etc/hosts' are docker specific mount points @@ -1438,10 +1467,37 @@ class HDP206StackAdvisor(DefaultStackAdvisor): def validateYARNConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): clusterEnv = getSiteProperties(configurations, "cluster-env") -validationItems = [ {"config-name": 'yarn.nodemanager.resource.memory-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'yarn.nodemanager.resource.memory-mb')}, + +validationItems = [ {"config-name": 'yarn.nodemanager.resource.memory-mb', "item": self.validatorGreaterThenDefaultValue(properties, recommendedDefaults, 'yarn.nodemanager.resource.memory-mb')}, {"config-name": 'yarn.scheduler.minimum-allocation-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'yarn.scheduler.minimum-allocation-mb')}, {"config-name": 'yarn.nodemanager.linux-container-executor.group', "item": self.validatorEqualsPropertyItem(properties, "yarn.nodemanager.linux-container-executor.group", clusterEnv, "user_group")}, -
ambari git commit: Revert "AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)"
Repository: ambari Updated Branches: refs/heads/branch-2.4 71db67fbe -> c1c3e40b5 Revert "AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)" This reverts commit 71db67fbe8d07b1cfcf04ef3f1cc6eb7d0e071bb. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c1c3e40b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c1c3e40b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c1c3e40b Branch: refs/heads/branch-2.4 Commit: c1c3e40b55b5479d3616812cd685bbaac12fbf12 Parents: 71db67f Author: oleewereAuthored: Wed Jan 25 17:56:13 2017 +0100 Committer: oleewere Committed: Wed Jan 25 17:56:13 2017 +0100 -- .../authorization/AmbariLdapAuthenticationProvider.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c1c3e40b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java index ac16730..6905757 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java @@ -190,18 +190,18 @@ public class AmbariLdapAuthenticationProvider implements AuthenticationProvider } private Integer getUserId(Authentication authentication) { -String userName = AuthorizationHelper.resolveLoginAliasToUserName(authentication.getName()); +String userName = authentication.getName(); UserEntity userEntity = userDAO.findLdapUserByName(userName); // lookup is case insensitive, so no need for string comparison if (userEntity == null) { - LOG.info("user not found ('{}')", userName); + LOG.info("user not found "); throw new InvalidUsernamePasswordCombinationException(); } if (!userEntity.getActive()) { - LOG.debug("User account is disabled ('{}')", userName); + LOG.debug("User account is disabled"); throw new InvalidUsernamePasswordCombinationException(); }
[2/2] ambari git commit: AMBARI-19695. Remove thrown exceptions while validating Kerberos Authentication configuration (echekanskiy via dlysnichenko)
AMBARI-19695. Remove thrown exceptions while validating Kerberos Authentication configuration (echekanskiy via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e5552301 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e5552301 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e5552301 Branch: refs/heads/trunk Commit: e55523012a47727116657ce61ec681260b282b7e Parents: 1c115bc Author: Lisnichenko DmitroAuthored: Wed Jan 25 17:07:40 2017 +0200 Committer: Lisnichenko Dmitro Committed: Wed Jan 25 17:09:19 2017 +0200 -- .../ambari/server/configuration/Configuration.java | 6 ++ .../ambari/server/configuration/ConfigurationTest.java | 12 2 files changed, 2 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e5552301/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 73c70dc..0c51576 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -5892,16 +5892,14 @@ public class Configuration { File keytabFile = new File(kerberosAuthProperties.getSpnegoKeytabFilePath()); if (!keytabFile.exists()) { String message = String.format("The SPNEGO keytab file path (%s) specified in %s does not exist. " + -"This will cause issues authenticating users using Kerberos.", +"This will cause issues authenticating users using Kerberos. . Make sure proper keytab file provided later.", keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey()); LOG.error(message); -throw new IllegalArgumentException(message); } else if (!keytabFile.canRead()) { String message = String.format("The SPNEGO keytab file path (%s) specified in %s cannot be read. " + -"This will cause issues authenticating users using Kerberos.", +"This will cause issues authenticating users using Kerberos. . Make sure proper keytab file provided later.", keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey()); LOG.error(message); -throw new IllegalArgumentException(message); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/e5552301/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index d7cb8a3..51114f8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -988,18 +988,6 @@ public class ConfigurationTest { new Configuration(properties); } - @Test(expected = IllegalArgumentException.class) - public void testKerberosAuthenticationSPNEGOKeytabFileNotFound() { -Properties properties = new Properties(); -properties.put(Configuration.KERBEROS_AUTH_ENABLED.getKey(), "true"); -properties.put(Configuration.KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey(), "/path/to/missing/spnego/keytab/file"); -properties.put(Configuration.KERBEROS_AUTH_SPNEGO_PRINCIPAL.getKey(), "spnego/principal@REALM"); -properties.put(Configuration.KERBEROS_AUTH_USER_TYPES.getKey(), "LDAP, LOCAL"); -properties.put(Configuration.KERBEROS_AUTH_AUTH_TO_LOCAL_RULES.getKey(), "DEFAULT"); - -new Configuration(properties); - } - /** * Tests the default values for the {@link MetricsRetrievalService}. *
[1/2] ambari git commit: AMBARI-19695. Remove thrown exceptions while validating Kerberos Authentication configuration (echekanskiy via dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.5 bb163f19f -> 67a762ea8 refs/heads/trunk 1c115bc18 -> e55523012 AMBARI-19695. Remove thrown exceptions while validating Kerberos Authentication configuration (echekanskiy via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67a762ea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67a762ea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67a762ea Branch: refs/heads/branch-2.5 Commit: 67a762ea8941303d4b8de536a0ed01d986129438 Parents: bb163f1 Author: Lisnichenko DmitroAuthored: Wed Jan 25 17:09:00 2017 +0200 Committer: Lisnichenko Dmitro Committed: Wed Jan 25 17:09:00 2017 +0200 -- .../ambari/server/configuration/Configuration.java | 6 ++ .../ambari/server/configuration/ConfigurationTest.java | 12 2 files changed, 2 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/67a762ea/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 83fe01d..13efd89 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -5690,16 +5690,14 @@ public class Configuration { File keytabFile = new File(kerberosAuthProperties.getSpnegoKeytabFilePath()); if (!keytabFile.exists()) { String message = String.format("The SPNEGO keytab file path (%s) specified in %s does not exist. " + -"This will cause issues authenticating users using Kerberos.", +"This will cause issues authenticating users using Kerberos. Make sure proper keytab file provided later.", keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey()); LOG.error(message); -throw new IllegalArgumentException(message); } else if (!keytabFile.canRead()) { String message = String.format("The SPNEGO keytab file path (%s) specified in %s cannot be read. " + -"This will cause issues authenticating users using Kerberos.", +"This will cause issues authenticating users using Kerberos. Make sure proper keytab file provided later.", keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey()); LOG.error(message); -throw new IllegalArgumentException(message); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/67a762ea/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 4caecd8..5f6dd72 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -1052,16 +1052,4 @@ public class ConfigurationTest { new Configuration(properties); } - - @Test(expected = IllegalArgumentException.class) - public void testKerberosAuthenticationSPNEGOKeytabFileNotFound() { -Properties properties = new Properties(); -properties.put(Configuration.KERBEROS_AUTH_ENABLED.getKey(), "true"); -properties.put(Configuration.KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey(), "/path/to/missing/spnego/keytab/file"); -properties.put(Configuration.KERBEROS_AUTH_SPNEGO_PRINCIPAL.getKey(), "spnego/principal@REALM"); -properties.put(Configuration.KERBEROS_AUTH_USER_TYPES.getKey(), "LDAP, LOCAL"); -properties.put(Configuration.KERBEROS_AUTH_AUTH_TO_LOCAL_RULES.getKey(), "DEFAULT"); - -new Configuration(properties); - } }
[2/2] ambari git commit: AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk)
AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb163f19 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb163f19 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb163f19 Branch: refs/heads/branch-2.5 Commit: bb163f19f31101a933562a97802158316cdbc2c6 Parents: cf8efb3 Author: Andrew OnishukAuthored: Wed Jan 25 16:52:15 2017 +0200 Committer: Andrew Onishuk Committed: Wed Jan 25 16:52:15 2017 +0200 -- .../src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml | 3 +++ .../src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml | 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb163f19/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml index 07a9ef8..8c2ec8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml @@ -55,6 +55,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel + http://git-wip-us.apache.org/repos/asf/ambari/blob/bb163f19/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml index 63e85e3..ccf9a4e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml @@ -87,6 +87,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel +
[1/2] ambari git commit: AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 cf8efb311 -> bb163f19f refs/heads/trunk b60fabade -> 1c115bc18 AMBARI-19710. RU: NFS Gateway restart fails during RU to 2.4.3.0 with portmap error (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c115bc1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c115bc1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c115bc1 Branch: refs/heads/trunk Commit: 1c115bc184d386f588f601d8f7f517c1fd09658d Parents: b60faba Author: Andrew OnishukAuthored: Wed Jan 25 16:52:11 2017 +0200 Committer: Andrew Onishuk Committed: Wed Jan 25 16:52:11 2017 +0200 -- .../src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml | 3 +++ .../src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml | 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1c115bc1/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml index 07a9ef8..8c2ec8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml @@ -55,6 +55,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel + http://git-wip-us.apache.org/repos/asf/ambari/blob/1c115bc1/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml index 63e85e3..ccf9a4e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml @@ -87,6 +87,9 @@ hadoop_${stack_version}-libhdfs + + libtirpc-devel +
ambari git commit: AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 f03fed539 -> cf8efb311 AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf8efb31 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf8efb31 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf8efb31 Branch: refs/heads/branch-2.5 Commit: cf8efb31163af2845121935bad853fd647bc61d5 Parents: f03fed5 Author: Sumit MohantyAuthored: Wed Jan 25 06:47:12 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 06:49:42 2017 -0800 -- .../HIVE/0.12.0.2.0/package/scripts/webhcat_server.py | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cf8efb31/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py index 34687c4..ca3b14d 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py @@ -118,8 +118,6 @@ class WebHCatServerDefault(WebHCatServer): ) security_params = {} - security_params.update(get_params_from_filesystem(status_params.hive_conf_dir, -{'hive-site.xml': FILE_TYPE_XML})) security_params.update(get_params_from_filesystem(status_params.webhcat_conf_dir, {'webhcat-site.xml': FILE_TYPE_XML})) result_issues = validate_security_config_properties(security_params, expectations)
ambari git commit: AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 8642a4634 -> b60fabade AMBARI-19708. Exception in agent logs (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b60fabad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b60fabad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b60fabad Branch: refs/heads/trunk Commit: b60fabade46fc5f38c7a33a6ee0044ce1931756a Parents: 8642a46 Author: Sumit MohantyAuthored: Wed Jan 25 06:47:12 2017 -0800 Committer: Sumit Mohanty Committed: Wed Jan 25 06:47:12 2017 -0800 -- .../HIVE/0.12.0.2.0/package/scripts/webhcat_server.py | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b60fabad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py index 86ecec6..93fa411 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py @@ -119,8 +119,6 @@ class WebHCatServerDefault(WebHCatServer): ) security_params = {} - security_params.update(get_params_from_filesystem(status_params.hive_conf_dir, -{'hive-site.xml': FILE_TYPE_XML})) security_params.update(get_params_from_filesystem(status_params.webhcat_conf_dir, {'webhcat-site.xml': FILE_TYPE_XML})) result_issues = validate_security_config_properties(security_params, expectations)
ambari git commit: AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-2.5 82f8e8107 -> f03fed539 AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f03fed53 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f03fed53 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f03fed53 Branch: refs/heads/branch-2.5 Commit: f03fed5394d9ef36a35a4fc5c8545c0d0e11e27d Parents: 82f8e81 Author: Oleg NechiporenkoAuthored: Wed Jan 25 11:58:52 2017 +0200 Committer: Oleg Nechiporenko Committed: Wed Jan 25 16:02:09 2017 +0200 -- .../app/views/common/configs/service_configs_by_category_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f03fed53/ambari-web/app/views/common/configs/service_configs_by_category_view.js -- diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js index 7a5bcbe..d9b4409 100644 --- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js +++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js @@ -655,8 +655,8 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri var controller = (App.router.get('currentState.name') == 'configs') ? App.router.get('mainServiceInfoConfigsController') : App.router.get('wizardStep7Controller'); - this.get('mainView').onClose(); - controller.set('filter', event.view.get('serviceConfigObj.name')); + controller.set('filter', this.get('serviceConfigObj.name')); + this.get('parentView').onClose(); } }) });
ambari git commit: AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 75bf160ce -> 8642a4634 AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8642a463 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8642a463 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8642a463 Branch: refs/heads/trunk Commit: 8642a4634b230755f5c285ed340a7636abe54b8f Parents: 75bf160 Author: Oleg NechiporenkoAuthored: Wed Jan 25 11:58:52 2017 +0200 Committer: Oleg Nechiporenko Committed: Wed Jan 25 15:53:37 2017 +0200 -- .../app/views/common/configs/service_configs_by_category_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8642a463/ambari-web/app/views/common/configs/service_configs_by_category_view.js -- diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js index 4148197..25f7dfb 100644 --- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js +++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js @@ -664,8 +664,8 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri var controller = (App.router.get('currentState.name') == 'configs') ? App.router.get('mainServiceInfoConfigsController') : App.router.get('wizardStep7Controller'); - this.get('mainView').onClose(); - controller.set('filter', event.view.get('serviceConfigObj.name')); + controller.set('filter', this.get('serviceConfigObj.name')); + this.get('parentView').onClose(); } }) });
ambari git commit: AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.5 dd0d876e1 -> 82f8e8107 AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82f8e810 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82f8e810 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82f8e810 Branch: refs/heads/branch-2.5 Commit: 82f8e8107b35728521fc933149779f37c0750320 Parents: dd0d876 Author: Andrii TkachAuthored: Wed Jan 25 14:31:16 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 15:35:51 2017 +0200 -- .../controllers/stackVersions/StackVersionsCreateCtrl.js | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82f8e810/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 3c16963..b3c27dc 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -284,6 +284,12 @@ angular.module('ambariAdminConsole') $scope.editVersionDisabled = true; delete $scope.updateObj.href; $scope.updateObj.operating_systems = []; +angular.forEach($scope.osList, function (os) { + os.OperatingSystems.ambari_managed_repositories = !$scope.useRedhatSatellite; + if (os.selected) { +$scope.updateObj.operating_systems.push(os); + } +}); var skip = $scope.skipValidation || $scope.useRedhatSatellite; return Stack.validateBaseUrls(skip, $scope.osList, $scope.upgradeStack).then(function (invalidUrls) {
ambari git commit: AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 18e58ffb3 -> 75bf160ce AMBARI-19711 Unable to register HDP version 2.6.0.0 on cluster with HDP 2.5.3.0 (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75bf160c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75bf160c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75bf160c Branch: refs/heads/trunk Commit: 75bf160ce8dfd2fdd148f0dc7f857336c57a8b81 Parents: 18e58ff Author: Andrii TkachAuthored: Wed Jan 25 14:31:16 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 14:37:01 2017 +0200 -- .../controllers/stackVersions/StackVersionsCreateCtrl.js | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/75bf160c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 3c16963..b3c27dc 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -284,6 +284,12 @@ angular.module('ambariAdminConsole') $scope.editVersionDisabled = true; delete $scope.updateObj.href; $scope.updateObj.operating_systems = []; +angular.forEach($scope.osList, function (os) { + os.OperatingSystems.ambari_managed_repositories = !$scope.useRedhatSatellite; + if (os.selected) { +$scope.updateObj.operating_systems.push(os); + } +}); var skip = $scope.skipValidation || $scope.useRedhatSatellite; return Stack.validateBaseUrls(skip, $scope.osList, $scope.upgradeStack).then(function (invalidUrls) {
ambari git commit: AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)
Repository: ambari Updated Branches: refs/heads/trunk dab389d94 -> 18e58ffb3 AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere) Change-Id: I91da4344bc8cbfdb4863c973312c75ac21464066 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/18e58ffb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/18e58ffb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/18e58ffb Branch: refs/heads/trunk Commit: 18e58ffb3759819155261f7e3e68491f330ecd02 Parents: dab389d Author: oleewereAuthored: Tue Jan 24 15:24:59 2017 +0100 Committer: oleewere Committed: Wed Jan 25 12:07:36 2017 +0100 -- .../authorization/AmbariLdapAuthenticationProvider.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/18e58ffb/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java index 552be1e..a35e7eb 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java @@ -194,18 +194,18 @@ public class AmbariLdapAuthenticationProvider implements AuthenticationProvider } private Integer getUserId(Authentication authentication) { -String userName = authentication.getName(); +String userName = AuthorizationHelper.resolveLoginAliasToUserName(authentication.getName()); UserEntity userEntity = userDAO.findLdapUserByName(userName); // lookup is case insensitive, so no need for string comparison if (userEntity == null) { - LOG.info("user not found "); + LOG.info("user not found ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); } if (!userEntity.getActive()) { - LOG.debug("User account is disabled"); + LOG.debug("User account is disabled ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); }
ambari git commit: AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)
Repository: ambari Updated Branches: refs/heads/branch-2.4 3b9056bac -> 71db67fbe AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere) Change-Id: I91da4344bc8cbfdb4863c973312c75ac21464066 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/71db67fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/71db67fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/71db67fb Branch: refs/heads/branch-2.4 Commit: 71db67fbe8d07b1cfcf04ef3f1cc6eb7d0e071bb Parents: 3b9056b Author: oleewereAuthored: Tue Jan 24 15:24:59 2017 +0100 Committer: oleewere Committed: Wed Jan 25 12:05:07 2017 +0100 -- .../authorization/AmbariLdapAuthenticationProvider.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/71db67fb/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java index 6905757..ac16730 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java @@ -190,18 +190,18 @@ public class AmbariLdapAuthenticationProvider implements AuthenticationProvider } private Integer getUserId(Authentication authentication) { -String userName = authentication.getName(); +String userName = AuthorizationHelper.resolveLoginAliasToUserName(authentication.getName()); UserEntity userEntity = userDAO.findLdapUserByName(userName); // lookup is case insensitive, so no need for string comparison if (userEntity == null) { - LOG.info("user not found "); + LOG.info("user not found ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); } if (!userEntity.getActive()) { - LOG.debug("User account is disabled"); + LOG.debug("User account is disabled ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); }
ambari git commit: AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)
Repository: ambari Updated Branches: refs/heads/branch-2.5 9a2d32232 -> dd0d876e1 AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere) Change-Id: I91da4344bc8cbfdb4863c973312c75ac21464066 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dd0d876e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd0d876e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd0d876e Branch: refs/heads/branch-2.5 Commit: dd0d876e1ed7e0e3bde78fa42b004f901fe0d7ab Parents: 9a2d322 Author: oleewereAuthored: Tue Jan 24 15:24:59 2017 +0100 Committer: oleewere Committed: Wed Jan 25 12:01:33 2017 +0100 -- .../authorization/AmbariLdapAuthenticationProvider.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dd0d876e/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java index b5776a3..f5b7aa5 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java @@ -193,18 +193,18 @@ public class AmbariLdapAuthenticationProvider implements AuthenticationProvider } private Integer getUserId(Authentication authentication) { -String userName = authentication.getName(); +String userName = AuthorizationHelper.resolveLoginAliasToUserName(authentication.getName()); UserEntity userEntity = userDAO.findLdapUserByName(userName); // lookup is case insensitive, so no need for string comparison if (userEntity == null) { - LOG.info("user not found "); + LOG.info("user not found ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); } if (!userEntity.getActive()) { - LOG.debug("User account is disabled"); + LOG.debug("User account is disabled ('{}')", userName); throw new InvalidUsernamePasswordCombinationException(); }
ambari git commit: AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk b9200e0e5 -> dab389d94 AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dab389d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dab389d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dab389d9 Branch: refs/heads/trunk Commit: dab389d94634e6c21935a7034a0389a70390176e Parents: b9200e0 Author: Andrii TkachAuthored: Tue Jan 24 21:44:43 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 12:42:27 2017 +0200 -- .../main/service/reassign/step4_controller.js | 29 +++- .../manage_alert_groups_controller_test.js | 6 +- .../service/reassign/step4_controller_test.js | 78 3 files changed, 92 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dab389d9/ambari-web/app/controllers/main/service/reassign/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index b383da7..2e9d431 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -70,6 +70,8 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro hostComponents: [], + dependentHostComponents: [], + dbPropertyMap: { 'HIVE_SERVER': { type: 'hive-site', @@ -89,16 +91,35 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro * load step info */ loadStep: function () { -if (this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) { +var componentName = this.get('content.reassign.component_name'); +if (componentName === 'NAMENODE' && App.get('isHaEnabled')) { this.set('hostComponents', ['NAMENODE', 'ZKFC']); } else { - this.set('hostComponents', [this.get('content.reassign.component_name')]); + this.set('hostComponents', [componentName]); } +this.setDependentHostComponents(componentName); this.set('serviceName', [this.get('content.reassign.service_id')]); this._super(); }, /** + * Set dependent host-components to dependentHostComponents + * @param {string} componentName + */ + setDependentHostComponents: function(componentName) { +var installedComponents = App.Host.find(this.get('content.reassignHosts.target')) + .get('hostComponents') + .mapProperty('componentName'); +var dependenciesToInstall = App.StackServiceComponent.find(componentName) + .get('dependencies') + .mapProperty('componentName') + .filter(function(component) { +return !installedComponents.contains(component); + }); +this.set('dependentHostComponents', dependenciesToInstall); + }, + + /** * concat host-component names into string * @return {String} */ @@ -213,7 +234,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, createHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { @@ -245,7 +266,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, installHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { http://git-wip-us.apache.org/repos/asf/ambari/blob/dab389d9/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js -- diff --git a/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js b/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js index 2c58017..7a2f35b 100644 --- a/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js +++ b/ambari-web/test/controllers/main/alerts/manage_alert_groups_controller_test.js @@ -21,7 +21,11 @@ var App = require('app'); var manageAlertGroupsController; function getController() { -
ambari git commit: AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.5 15ec7c337 -> 9a2d32232 AMBARI-19696 Move HS2 does not install dependent components on the target host. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a2d3223 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a2d3223 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a2d3223 Branch: refs/heads/branch-2.5 Commit: 9a2d32232325a6cb483405fa7e2835b1129a0269 Parents: 15ec7c3 Author: Andrii TkachAuthored: Wed Jan 25 12:37:16 2017 +0200 Committer: Andrii Tkach Committed: Wed Jan 25 12:41:04 2017 +0200 -- .../main/service/reassign/step4_controller.js | 29 +++- .../service/reassign/step4_controller_test.js | 78 2 files changed, 87 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9a2d3223/ambari-web/app/controllers/main/service/reassign/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index c9cc28f..431a67f 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -70,6 +70,8 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro hostComponents: [], + dependentHostComponents: [], + /** * List of components, that do not need reconfiguration for moving to another host * Reconfigure command will be skipped @@ -337,16 +339,35 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro * load step info */ loadStep: function () { -if (this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) { +var componentName = this.get('content.reassign.component_name'); +if (componentName === 'NAMENODE' && App.get('isHaEnabled')) { this.set('hostComponents', ['NAMENODE', 'ZKFC']); } else { - this.set('hostComponents', [this.get('content.reassign.component_name')]); + this.set('hostComponents', [componentName]); } +this.setDependentHostComponents(componentName); this.set('serviceName', [this.get('content.reassign.service_id')]); this._super(); }, /** + * Set dependent host-components to dependentHostComponents + * @param {string} componentName + */ + setDependentHostComponents: function(componentName) { +var installedComponents = App.Host.find(this.get('content.reassignHosts.target')) + .get('hostComponents') + .mapProperty('componentName'); +var dependenciesToInstall = App.StackServiceComponent.find(componentName) + .get('dependencies') + .mapProperty('componentName') + .filter(function(component) { +return !installedComponents.contains(component); + }); +this.set('dependentHostComponents', dependenciesToInstall); + }, + + /** * concat host-component names into string * @return {String} */ @@ -461,7 +482,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, createHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { @@ -493,7 +514,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, installHostComponents: function () { -var hostComponents = this.get('hostComponents'); +var hostComponents = this.get('hostComponents').concat(this.get('dependentHostComponents')); var hostName = this.get('content.reassignHosts.target'); this.set('multiTaskCounter', hostComponents.length); for (var i = 0; i < hostComponents.length; i++) { http://git-wip-us.apache.org/repos/asf/ambari/blob/9a2d3223/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js -- diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js index 9a73524..32bbdbd 100644 --- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js +++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js @@ -425,17 +425,24 @@ describe('App.ReassignMasterWizardStep4Controller', function () { });
ambari git commit: AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere)
Repository: ambari Updated Branches: refs/heads/trunk ff4babbb7 -> b9200e0e5 AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere) Change-Id: I3ae59596f5817dbd60bed37f259ce54a5f16de39 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b9200e0e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9200e0e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9200e0e Branch: refs/heads/trunk Commit: b9200e0e57111b33b7b998fa59a5d25c0b700869 Parents: ff4babb Author: Laszlo PuskasAuthored: Wed Jan 25 11:01:45 2017 +0100 Committer: oleewere Committed: Wed Jan 25 11:03:58 2017 +0100 -- .../users/CsvFilePersisterService.java | 24 +- .../CsvFilePersisterServiceFunctionalTest.java | 91 2 files changed, 113 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b9200e0e/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java index d8ffe98..fe6bf35 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java @@ -18,12 +18,21 @@ package org.apache.ambari.server.serveraction.users; +import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileAttribute; +import java.nio.file.attribute.PosixFilePermission; +import java.nio.file.attribute.PosixFilePermissions; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import javax.inject.Inject; import javax.inject.Singleton; @@ -51,10 +60,21 @@ public class CsvFilePersisterService implements CollectionPersisterService getCsvPermissions() { +Set permissionsSet = new HashSet<>(); +permissionsSet.add(PosixFilePermission.OWNER_READ); +permissionsSet.add(PosixFilePermission.OWNER_WRITE); +permissionsSet.add(PosixFilePermission.GROUP_READ); +permissionsSet.add(PosixFilePermission.OTHERS_READ); +return permissionsSet; + } + @Inject public void init() throws IOException { -// make 3rd party dependencies be managed by the container (probably constructor binding or factory is needed) -fileWriter = new FileWriter(csvFile); + +Path csv = Files.createFile(Paths.get(csvFile), PosixFilePermissions.asFileAttribute(getCsvPermissions())); +fileWriter = new FileWriter(csv.toFile()); + csvPrinter = new CSVPrinter(fileWriter, CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/b9200e0e/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java new file mode 100644 index 000..97529fe --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java @@ -0,0 +1,91 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.serveraction.users; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path;
ambari git commit: AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3fe36a457 -> 15ec7c337 AMBARI-19694. Post user creation hook - input csv generated with READ permissions (Laszlo Puskas via oleewere) Change-Id: I3ae59596f5817dbd60bed37f259ce54a5f16de39 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/15ec7c33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/15ec7c33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/15ec7c33 Branch: refs/heads/branch-2.5 Commit: 15ec7c337335442ce6889aeedc1d6ff1dc86c4c6 Parents: 3fe36a4 Author: Laszlo PuskasAuthored: Wed Jan 25 11:01:45 2017 +0100 Committer: oleewere Committed: Wed Jan 25 11:01:45 2017 +0100 -- .../users/CsvFilePersisterService.java | 24 +- .../CsvFilePersisterServiceFunctionalTest.java | 91 2 files changed, 113 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/15ec7c33/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java index d8ffe98..fe6bf35 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterService.java @@ -18,12 +18,21 @@ package org.apache.ambari.server.serveraction.users; +import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileAttribute; +import java.nio.file.attribute.PosixFilePermission; +import java.nio.file.attribute.PosixFilePermissions; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import javax.inject.Inject; import javax.inject.Singleton; @@ -51,10 +60,21 @@ public class CsvFilePersisterService implements CollectionPersisterService getCsvPermissions() { +Set permissionsSet = new HashSet<>(); +permissionsSet.add(PosixFilePermission.OWNER_READ); +permissionsSet.add(PosixFilePermission.OWNER_WRITE); +permissionsSet.add(PosixFilePermission.GROUP_READ); +permissionsSet.add(PosixFilePermission.OTHERS_READ); +return permissionsSet; + } + @Inject public void init() throws IOException { -// make 3rd party dependencies be managed by the container (probably constructor binding or factory is needed) -fileWriter = new FileWriter(csvFile); + +Path csv = Files.createFile(Paths.get(csvFile), PosixFilePermissions.asFileAttribute(getCsvPermissions())); +fileWriter = new FileWriter(csv.toFile()); + csvPrinter = new CSVPrinter(fileWriter, CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/15ec7c33/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java new file mode 100644 index 000..97529fe --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java @@ -0,0 +1,91 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.serveraction.users; + +import java.io.IOException; +import java.nio.file.Files; +import