ambari git commit: AMBARI-15016 Cover hosts views with unit tests. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk c47fff357 -> 30438e905 AMBARI-15016 Cover hosts views with unit tests. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/30438e90 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/30438e90 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/30438e90 Branch: refs/heads/trunk Commit: 30438e9052d5782d8e2b5fe4b28c6adf9d78c5d7 Parents: c47fff3 Author: Andrii TkachAuthored: Thu Feb 11 21:19:34 2016 +0200 Committer: Andrii Tkach Committed: Fri Feb 12 12:09:23 2016 +0200 -- ambari-web/app/assets/test/tests.js | 4 + .../app/controllers/wizard/step7_controller.js | 4 +- .../utils/configs/rm_ha_config_initializer.js | 2 +- .../admin/highAvailability/progress_view.js | 4 +- ambari-web/app/views/main/host/add_view.js | 3 + .../app/views/main/host/configs_service.js | 3 + ambari-web/app/views/main/host/menu.js | 6 +- ambari-web/app/views/main/host/summary.js | 9 +- .../highAvailability/progress_view_test.js | 4 +- .../test/views/main/host/add_view_test.js | 141 ++ .../views/main/host/combo_search_box_test.js| 42 +++ .../views/main/host/config_service_menu_test.js | 140 ++ .../test/views/main/host/config_service_test.js | 46 +++ .../views/main/host/host_alerts_view_test.js| 140 +- ambari-web/test/views/main/host/menu_test.js| 43 ++- ambari-web/test/views/main/host/summary_test.js | 277 +-- 16 files changed, 772 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/30438e90/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index ecf55f7..44fb4f4 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -253,6 +253,10 @@ var files = [ 'test/views/main/host/menu_test', 'test/views/main/host/stack_versions_view_test', 'test/views/main/host/host_alerts_view_test', + 'test/views/main/host/combo_search_box_test', + 'test/views/main/host/config_service_test', + 'test/views/main/host/add_view_test', + 'test/views/main/host/config_service_menu_test', 'test/views/main/host/details/host_component_view_test', 'test/views/main/host/details/host_component_views/decommissionable_test', 'test/views/main/host/details/host_component_views/datanode_view_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/30438e90/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index c6f4689..7e96845 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -867,8 +867,8 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E * @returns {Object[]} existing configs + additional config parameters in yarn-client.xml */ addHawqConfigsOnRMHa: function(configs) { -rmHost1 = configs.findProperty('id', 'yarn.resourcemanager.hostname.rm1__yarn-site').value ; -rmHost2 = configs.findProperty('id', 'yarn.resourcemanager.hostname.rm2__yarn-site').value ; +var rmHost1 = configs.findProperty('id', 'yarn.resourcemanager.hostname.rm1__yarn-site').value ; +var rmHost2 = configs.findProperty('id', 'yarn.resourcemanager.hostname.rm2__yarn-site').value ; var yarnConfigToBeAdded = [ { name: 'yarn.resourcemanager.ha', http://git-wip-us.apache.org/repos/asf/ambari/blob/30438e90/ambari-web/app/utils/configs/rm_ha_config_initializer.js -- diff --git a/ambari-web/app/utils/configs/rm_ha_config_initializer.js b/ambari-web/app/utils/configs/rm_ha_config_initializer.js index 9c36323..dac68d9 100644 --- a/ambari-web/app/utils/configs/rm_ha_config_initializer.js +++ b/ambari-web/app/utils/configs/rm_ha_config_initializer.js @@ -89,7 +89,7 @@ App.RmHaConfigInitializer = App.HaConfigInitializerClass.create(App.HostsBasedIn */ _initRmHaHostsWithPort: function (configProperty, localDB, dependencies, initializer) { var rmHosts = localDB.masterComponentHosts.filterProperty('component', 'RESOURCEMANAGER').getEach('hostName'); -for (rmHost in rmHosts) { +for (var rmHost in rmHosts) { rmHosts[rmHost] = rmHosts[rmHost] + ":" + initializer.port; } var value = rmHosts.join(',');
ambari git commit: AMBARI-14842. ambari agent upstart support (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 bf8ecffed -> 3c0c22c17 AMBARI-14842. ambari agent upstart support (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c0c22c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c0c22c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c0c22c1 Branch: refs/heads/branch-2.2 Commit: 3c0c22c17bc759b676282b551fe69598b59c08ba Parents: bf8ecff Author: Andrew OnishukAuthored: Fri Feb 12 11:39:06 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 12 11:39:06 2016 +0200 -- ambari-agent/conf/unix/ambari-agent | 13 +++ ambari-agent/etc/init/ambari-agent.conf | 34 ambari-agent/pom.xml| 22 ++ 3 files changed, 69 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3c0c22c1/ambari-agent/conf/unix/ambari-agent -- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index ba0bb65..31e4100 100755 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -153,7 +153,14 @@ case "$1" in change_files_permissions echo "Starting ambari-agent" + +if [ "$AMBARI_AGENT_RUN_IN_FOREGROUND" == true ] ; then + $PYTHON $AMBARI_AGENT_PY_SCRIPT "$@" > $OUTFILE 2>&1 + exit $? +fi + nohup $PYTHON $AMBARI_AGENT_PY_SCRIPT "$@" > $OUTFILE 2>&1 & + sleep 2 PID=$! echo "Verifying $AMBARI_AGENT process status..." @@ -215,6 +222,12 @@ case "$1" in echo "Stopping $AMBARI_AGENT" change_files_permissions $PYTHON $AGENT_SCRIPT stop + +status ambari-agent 2>/dev/null | grep start 1>/dev/null +if [ "$?" -eq 0 ] ; then + echo "Stopping $AMBARI_AGENT upstart job" + stop ambari-agent > /dev/null +fi fi echo "Removing PID file at $PIDFILE" ambari-sudo.sh rm -f $PIDFILE http://git-wip-us.apache.org/repos/asf/ambari/blob/3c0c22c1/ambari-agent/etc/init/ambari-agent.conf -- diff --git a/ambari-agent/etc/init/ambari-agent.conf b/ambari-agent/etc/init/ambari-agent.conf new file mode 100644 index 000..021eb3b --- /dev/null +++ b/ambari-agent/etc/init/ambari-agent.conf @@ -0,0 +1,34 @@ +# 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 + +#ambari-agent +description "ambari agent" + +stop on runlevel [06] + +env PIDFILE=/var/run/ambari-agent/ambari-agent.pid + +kill signal SIGKILL +respawn + +script + . /etc/environment + + export AMBARI_AGENT_RUN_IN_FOREGROUND=true + exec /etc/init.d/ambari-agent start +end script + +post-stop script + rm -f $PIDFILE +end script \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/3c0c22c1/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 876cc78..8edbb7c 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -397,6 +397,17 @@ root + /etc/init + 755 + root + root + + + etc/init/ambari-agent.conf + + + + ${init.d.dir} 755 root @@ -608,6 +619,17 @@ + etc/init/ambari-agent.conf + file + +perm +/etc/init +root +root +755 + + + ${basedir}/target/src/version file
ambari git commit: AMBARI-15007. Make amazon2015 to be part of redhat6 family (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 3c0c22c17 -> 6ed6758e6 AMBARI-15007. Make amazon2015 to be part of redhat6 family (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ed6758e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ed6758e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ed6758e Branch: refs/heads/branch-2.2 Commit: 6ed6758e620da2315107075eb76e26a1272040b1 Parents: 3c0c22c Author: Andrew OnishukAuthored: Fri Feb 12 12:06:37 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 12 12:06:37 2016 +0200 -- .../src/main/python/ambari_commons/os_check.py | 73 +++--- .../ambari_commons/resources/os_family.json | 137 +-- .../server/state/stack/JsonOsFamilyRoot.java| 38 + .../ambari/server/state/stack/OsFamily.java | 8 +- .../resources/stacks/HDP/2.2/repos/repoinfo.xml | 12 -- .../resources/stacks/HDP/2.3/repos/repoinfo.xml | 12 -- .../resources/stacks/HDP/2.4/repos/repoinfo.xml | 12 -- ambari-server/src/test/python/TestOSCheck.py| 37 +++-- ambari-server/src/test/resources/os_family.json | 89 ++-- 9 files changed, 239 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ed6758e/ambari-common/src/main/python/ambari_commons/os_check.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_check.py b/ambari-common/src/main/python/ambari_commons/os_check.py index 238c276..d30b7f9 100644 --- a/ambari-common/src/main/python/ambari_commons/os_check.py +++ b/ambari-common/src/main/python/ambari_commons/os_check.py @@ -56,6 +56,8 @@ RESOURCES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "resou # family JSON data OSFAMILY_JSON_RESOURCE = "os_family.json" +JSON_OS_MAPPING = "mapping" +JSON_OS_ALIASES = "aliases" JSON_OS_TYPE = "distro" JSON_OS_VERSION = "versions" JSON_EXTENDS = "extends" @@ -76,6 +78,8 @@ VER_NT_SERVER = 3 _IS_ORACLE_LINUX = os.path.exists('/etc/oracle-release') _IS_REDHAT_LINUX = os.path.exists('/etc/redhat-release') +SYSTEM_RELEASE_FILE = "/etc/system-release" + def _is_oracle_linux(): return _IS_ORACLE_LINUX @@ -84,16 +88,16 @@ def _is_redhat_linux(): def advanced_check(distribution): distribution = list(distribution) - if os.path.exists("/etc/issue"): -with open("/etc/issue", "rb") as fp: + if os.path.exists(SYSTEM_RELEASE_FILE): +with open(SYSTEM_RELEASE_FILE, "rb") as fp: issue_content = fp.read() if "Amazon" in issue_content: distribution[0] = "amazon" - search_groups = re.search('(\d+)\.(\d+)', issue_content) + search_groups = re.search('(\d+\.\d+)', issue_content) if search_groups: -distribution[1] = search_groups.group(1) # if version is 2015.09 only get 2015. +distribution[1] = search_groups.group(1) return tuple(distribution) @@ -114,16 +118,24 @@ class OS_CONST_TYPE(type): f = open(os.path.join(RESOURCES_DIR, OSFAMILY_JSON_RESOURCE)) json_data = eval(f.read()) f.close() - for family in json_data: + + if JSON_OS_MAPPING not in json_data: +raise Exception("Invalid {0}".format(OSFAMILY_JSON_RESOURCE)) + + json_mapping_data = json_data[JSON_OS_MAPPING] + + for family in json_mapping_data: cls.FAMILY_COLLECTION += [family] -cls.OS_COLLECTION += json_data[family][JSON_OS_TYPE] +cls.OS_COLLECTION += json_mapping_data[family][JSON_OS_TYPE] cls.OS_FAMILY_COLLECTION += [{ 'name': family, - 'os_list': json_data[family][JSON_OS_TYPE] + 'os_list': json_mapping_data[family][JSON_OS_TYPE] }] -if JSON_EXTENDS in json_data[family]: - cls.OS_FAMILY_COLLECTION[-1][JSON_EXTENDS] = json_data[family][JSON_EXTENDS] +if JSON_EXTENDS in json_mapping_data[family]: + cls.OS_FAMILY_COLLECTION[-1][JSON_EXTENDS] = json_mapping_data[family][JSON_EXTENDS] + +cls.OS_TYPE_ALIASES = json_data[JSON_OS_ALIASES] if JSON_OS_ALIASES in json_data else {} except: raise Exception("Couldn't load '%s' file" % OSFAMILY_JSON_RESOURCE) @@ -194,7 +206,24 @@ class OSCheck: distribution = ("Darwin", "TestOnly", "1.1.1", "1.1.1", "1.1") return distribution - + + @staticmethod + def get_alias(os_type, os_version): +version_parts = os_version.split('.') +full_os_and_major_version = os_type + version_parts[0] + +if full_os_and_major_version in OSConst.OS_TYPE_ALIASES: + alias = OSConst.OS_TYPE_ALIASES[full_os_and_major_version] + re_groups =
ambari git commit: AMBARI-15025. Hosts page: Filtering works incorrectly with multiple filters applied (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 6ed6758e6 -> b75cc8d3a AMBARI-15025. Hosts page: Filtering works incorrectly with multiple filters applied (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b75cc8d3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b75cc8d3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b75cc8d3 Branch: refs/heads/branch-2.2 Commit: b75cc8d3a83cb61318bb7f9261cb56ec22fb4a48 Parents: 6ed6758 Author: Oleg NechiporenkoAuthored: Fri Feb 12 12:21:25 2016 +0200 Committer: Oleg Nechiporenko Committed: Fri Feb 12 12:57:10 2016 +0200 -- ambari-web/app/controllers/main/host.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b75cc8d3/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index 3f99d2e..775aec9 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -108,7 +108,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { }, { name: 'criticalWarningAlertsCount', - key: 'alerts_summary/CRITICAL{0}|alerts_summary/WARNING{1}', + key: '(alerts_summary/CRITICAL{0}|alerts_summary/WARNING{1})', type: 'CUSTOM' }, {
ambari git commit: AMBARI-15025. Hosts page: Filtering works incorrectly with multiple filters applied (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 30438e905 -> ddba3c5d4 AMBARI-15025. Hosts page: Filtering works incorrectly with multiple filters applied (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ddba3c5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ddba3c5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ddba3c5d Branch: refs/heads/trunk Commit: ddba3c5d4e2dbd7f0edf07429df4fa24bbaa2d21 Parents: 30438e9 Author: Oleg NechiporenkoAuthored: Fri Feb 12 12:21:25 2016 +0200 Committer: Oleg Nechiporenko Committed: Fri Feb 12 12:23:04 2016 +0200 -- ambari-web/app/controllers/main/host.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ddba3c5d/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index 047e19f..a38b2db 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -106,7 +106,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { }, { name: 'criticalWarningAlertsCount', - key: 'alerts_summary/CRITICAL{0}|alerts_summary/WARNING{1}', + key: '(alerts_summary/CRITICAL{0}|alerts_summary/WARNING{1})', type: 'CUSTOM' }, {
ambari git commit: AMBARI-15008. Use force_toggle_kerberos directive when retrying enable Kerberos on failure (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 b75cc8d3a -> d5412a54f AMBARI-15008. Use force_toggle_kerberos directive when retrying enable Kerberos on failure (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5412a54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5412a54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5412a54 Branch: refs/heads/branch-2.2 Commit: d5412a54f6b2e153ed0a12f88d4428a5ca13bc81 Parents: b75cc8d Author: Alex AntonenkoAuthored: Thu Feb 11 12:01:22 2016 +0200 Committer: Alex Antonenko Committed: Fri Feb 12 15:46:15 2016 +0200 -- .../main/admin/kerberos/step7_controller.js | 12 ++-- ambari-web/app/utils/ajax/ajax.js| 15 +++ 2 files changed, 21 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d5412a54/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js index 71e94ca..2a4fb90 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js @@ -48,13 +48,13 @@ App.KerberosWizardStep7Controller = App.KerberosProgressPageController.extend({ } }; if (isRetry) { - // on retry we have to unkerberize cluster - this.unkerberizeCluster().always(function() { -// clear current request object before start of kerberize process -self.set('request', kerberizeRequest); -self.clearStage(); -self.loadStep(); + // on retry send force update + self.set('request', { +name: 'KERBERIZE_CLUSTER', +ajaxName: 'admin.kerberize.cluster.force' }); + self.clearStage(); + self.loadStep(); } else { this.set('request', kerberizeRequest); } http://git-wip-us.apache.org/repos/asf/ambari/blob/d5412a54/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 04157b5..4456268 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1461,6 +1461,21 @@ var urls = { } }, + 'admin.kerberize.cluster.force': { +'type': 'PUT', +'real': '/clusters/{clusterName}?force_toggle_kerberos=true', +'mock': '/data/wizard/kerberos/kerberize_cluster.json', +'format': function (data) { + return { +data: JSON.stringify({ + Clusters: { +security_type: "KERBEROS" + } +}) + } +} + }, + 'admin.unkerberize.cluster.skip': { 'type': 'PUT', 'real': '/clusters/{clusterName}?manage_kerberos_identities=false',
ambari git commit: AMBARI-14936. Tweaks to reduce build time (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk ddba3c5d4 -> 77daca7a6 AMBARI-14936. Tweaks to reduce build time (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/77daca7a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/77daca7a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/77daca7a Branch: refs/heads/trunk Commit: 77daca7a62abb3f6caa8f4be349aee704a1d7267 Parents: ddba3c5 Author: Andrew OnishukAuthored: Fri Feb 12 16:17:36 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 12 16:17:36 2016 +0200 -- ambari-agent/pom.xml | 6 +++--- ambari-server/pom.xml | 6 +++--- ambari-web/pom.xml| 3 ++- pom.xml | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/77daca7a/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index bb7cc34..c2c993f 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -267,7 +267,7 @@ build-tarball -package +${assemblyPhase} single @@ -347,7 +347,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -391,7 +391,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/77daca7a/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 33b5501..b0794c9 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -134,7 +134,7 @@ build-tarball -package +${assemblyPhase} single @@ -173,7 +173,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -217,7 +217,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/77daca7a/ambari-web/pom.xml -- diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml index 761a3f0..6304b3d 100644 --- a/ambari-web/pom.xml +++ b/ambari-web/pom.xml @@ -32,6 +32,7 @@ ${project.parent.parent.basedir} UTF-8 +node_modules @@ -100,7 +101,7 @@ ${executable.rmdir} ${basedir} - ${args.rm.clean} public node_modules + ${args.rm.clean} public ${nodemodules.dir} 0 1 http://git-wip-us.apache.org/repos/asf/ambari/blob/77daca7a/pom.xml -- diff --git a/pom.xml b/pom.xml index 57c6de7..cf9993b 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,7 @@ apache.staging.https Apache Release Distribution Repository https://repository.apache.org/service/local/staging/deploy/maven2 +package
ambari git commit: AMBARI-15002. HiveServerInteractive. Adding skelton code for Hive Server Interactive component support. (swapan shridhar via jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 77daca7a6 -> b22aa2e4a AMBARI-15002. HiveServerInteractive. Adding skelton code for Hive Server Interactive component support. (swapan shridhar via jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b22aa2e4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b22aa2e4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b22aa2e4 Branch: refs/heads/trunk Commit: b22aa2e4a848ddf39ea7757902f55a1125cb1889 Parents: 77daca7 Author: Jaimin JetlyAuthored: Fri Feb 12 20:54:06 2016 +0530 Committer: Jaimin Jetly Committed: Fri Feb 12 20:54:06 2016 +0530 -- .../HIVE/0.12.0.2.0/metainfo.xml|1 + .../package/scripts/hive_server_interactive.py | 93 + .../configuration/hive-interactive-site.xml | 2053 ++ .../stacks/HDP/2.4/services/HIVE/metainfo.xml | 49 + 4 files changed, 2196 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b22aa2e4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml index dfa20a5..a71e392 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml @@ -320,6 +320,7 @@ hive-log4j hive-exec-log4j hive-env +hive-interactive-site webhcat-site webhcat-env ranger-hive-plugin-properties http://git-wip-us.apache.org/repos/asf/ambari/blob/b22aa2e4/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 new file mode 100644 index 000..6fa3081 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python +""" +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. + +""" + + +from resource_management.libraries.script.script import Script +from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import hdp_select +from resource_management.libraries.functions import format +from resource_management.libraries.functions.copy_tarball import copy_to_hdfs +from resource_management.libraries.functions.get_hdp_version import get_hdp_version +from resource_management.libraries.functions.check_process_status import check_process_status +from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version +from resource_management.libraries.functions.security_commons import build_expectations, \ +cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \ +FILE_TYPE_XML +from ambari_commons import OSCheck, OSConst +if OSCheck.is_windows_family(): +from resource_management.libraries.functions.windows_service_utils import check_windows_service_status +from setup_ranger_hive import setup_ranger_hive +from ambari_commons.os_family_impl import OsFamilyImpl +from ambari_commons.constants import UPGRADE_TYPE_ROLLING +from resource_management.core.logger import Logger + +import hive_server_upgrade +from hive import hive +from hive_service import hive_service + + +class HiveServerInteractive(Script): +def install(self, env): +pass + +def configure(self, env): +pass + +
ambari git commit: AMBARI-15028. Critical alert for Kafka when using custom port(stack 2.3 and higher).(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.2 d5412a54f -> 1826e415d AMBARI-15028. Critical alert for Kafka when using custom port(stack 2.3 and higher).(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1826e415 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1826e415 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1826e415 Branch: refs/heads/branch-2.2 Commit: 1826e415df254f3ad70524ebe25fca4d18cd1d58 Parents: d5412a5 Author: Vitaly BrodetskyiAuthored: Fri Feb 12 03:08:17 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Feb 12 03:08:17 2016 +0200 -- .../python/ambari_agent/alerts/port_alert.py| 2 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1826e415/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index 848da65..92d28ad 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -102,7 +102,7 @@ class PortAlert(BaseAlert): host = BaseAlert.get_host_from_url(uri_value) -if host is None: +if host is None or host == "localhost" or host == "0.0.0.0": host = self.host_name try: http://git-wip-us.apache.org/repos/asf/ambari/blob/1826e415/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json new file mode 100644 index 000..04fb583 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json @@ -0,0 +1,32 @@ +{ + "KAFKA": { +"service": [], +"KAFKA_BROKER": [ + { +"name": "kafka_broker_process", +"label": "Kafka Broker Process", +"description": "This host-level alert is triggered if the Kafka Broker cannot be determined to be up.", +"interval": 1, +"scope": "HOST", +"source": { + "type": "PORT", + "uri": "{{kafka-broker/listeners}}", + "default_port": 6667, + "reporting": { +"ok": { + "text": "TCP OK - {0:.3f}s response on port {1}" +}, +"warning": { + "text": "TCP OK - {0:.3f}s response on port {1}", + "value": 1.5 +}, +"critical": { + "text": "Connection failed: {0} to {1}:{2}", + "value": 5.0 +} + } +} + } +] + } +}
ambari git commit: AMBARI-14772. Added ability to set rack information in the add host template (Laszlo Puskas via rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 0a9a3aa51 -> 9d8675ade AMBARI-14772. Added ability to set rack information in the add host template (Laszlo Puskas via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d8675ad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d8675ad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d8675ad Branch: refs/heads/trunk Commit: 9d8675ade510fa9617a48fa761cd7a829c40ef0b Parents: 0a9a3aa Author: Laszlo PuskasAuthored: Fri Feb 12 11:35:32 2016 -0500 Committer: Robert Levas Committed: Fri Feb 12 11:35:44 2016 -0500 -- .../internal/HostResourceProvider.java | 12 - .../internal/ScaleClusterRequest.java | 28 +-- .../server/topology/ClusterTopologyImpl.java| 51 +--- 3 files changed, 67 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9d8675ad/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java index da73f15..6251f07 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java @@ -145,6 +145,11 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { public static final String HOST_PREDICATE_PROPERTY_ID = PropertyHelper.getPropertyId(null, "host_predicate"); + //todo use the same json structure for cluster host addition (cluster template and upscale) + public static final String HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID = + PropertyHelper.getPropertyId(null, "rack_info"); + + private static Set pkPropertyIds = new HashSet(Arrays.asList(new String[]{ HOST_NAME_PROPERTY_ID})); @@ -354,6 +359,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { //todo: constants baseUnsupported.remove(HOST_COUNT_PROPERTY_ID); baseUnsupported.remove(HOST_PREDICATE_PROPERTY_ID); +baseUnsupported.remove(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID); return checkConfigPropertyIds(baseUnsupported, "Hosts"); } @@ -406,7 +412,11 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { (String) properties.get(HOST_CLUSTER_NAME_PROPERTY_ID), null); hostRequest.setPublicHostName((String) properties.get(HOST_PUBLIC_NAME_PROPERTY_ID)); -hostRequest.setRackInfo((String) properties.get(HOST_RACK_INFO_PROPERTY_ID)); + +String rackInfo = (String) ((null != properties.get(HOST_RACK_INFO_PROPERTY_ID))? properties.get(HOST_RACK_INFO_PROPERTY_ID): +properties.get(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID)); + +hostRequest.setRackInfo(rackInfo); hostRequest.setBlueprintName((String) properties.get(BLUEPRINT_PROPERTY_ID)); hostRequest.setHostGroupName((String) properties.get(HOSTGROUP_PROPERTY_ID)); http://git-wip-us.apache.org/repos/asf/ambari/blob/9d8675ad/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java index d784f1d..b5d2f9d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java @@ -19,6 +19,11 @@ package org.apache.ambari.server.controller.internal; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.ambari.server.api.predicate.InvalidQueryException; import org.apache.ambari.server.stack.NoSuchStackException; import org.apache.ambari.server.topology.Blueprint; @@ -26,17 +31,16 @@ import org.apache.ambari.server.topology.Configuration; import org.apache.ambari.server.topology.HostGroupInfo; import org.apache.ambari.server.topology.InvalidTopologyTemplateException; import org.apache.ambari.server.topology.TopologyValidator; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; +import org.slf4j.Logger; +import
ambari git commit: AMBARI-15028. Critical alert for Kafka when using custom port(stack 2.3 and higher).(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk b22aa2e4a -> 0a9a3aa51 AMBARI-15028. Critical alert for Kafka when using custom port(stack 2.3 and higher).(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a9a3aa5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a9a3aa5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a9a3aa5 Branch: refs/heads/trunk Commit: 0a9a3aa514f4859f2f4560fd3bd6c6036b173de8 Parents: b22aa2e Author: Vitaly BrodetskyiAuthored: Fri Feb 12 03:10:15 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Feb 12 03:10:15 2016 +0200 -- .../python/ambari_agent/alerts/port_alert.py| 2 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a9a3aa5/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index 848da65..92d28ad 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -102,7 +102,7 @@ class PortAlert(BaseAlert): host = BaseAlert.get_host_from_url(uri_value) -if host is None: +if host is None or host == "localhost" or host == "0.0.0.0": host = self.host_name try: http://git-wip-us.apache.org/repos/asf/ambari/blob/0a9a3aa5/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json new file mode 100644 index 000..04fb583 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json @@ -0,0 +1,32 @@ +{ + "KAFKA": { +"service": [], +"KAFKA_BROKER": [ + { +"name": "kafka_broker_process", +"label": "Kafka Broker Process", +"description": "This host-level alert is triggered if the Kafka Broker cannot be determined to be up.", +"interval": 1, +"scope": "HOST", +"source": { + "type": "PORT", + "uri": "{{kafka-broker/listeners}}", + "default_port": 6667, + "reporting": { +"ok": { + "text": "TCP OK - {0:.3f}s response on port {1}" +}, +"warning": { + "text": "TCP OK - {0:.3f}s response on port {1}", + "value": 1.5 +}, +"critical": { + "text": "Connection failed: {0} to {1}:{2}", + "value": 5.0 +} + } +} + } +] + } +}
[07/19] ambari git commit: AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with Blueprint. (Sandor Magyari via rnettleton)
AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with Blueprint. (Sandor Magyari via rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c31108b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c31108b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c31108b Branch: refs/heads/2.2.1-maint Commit: 4c31108b2182450e44831635bfdb8f88492a6d10 Parents: c579388 Author: Bob NettletonAuthored: Thu Feb 4 17:56:46 2016 -0500 Committer: Bob Nettleton Committed: Thu Feb 4 17:56:46 2016 -0500 -- .../topology/ClusterConfigurationRequest.java | 35 ++- .../ClusterConfigurationRequestTest.java| 101 +-- 2 files changed, 125 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c31108b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java index c719009..464aee7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java @@ -148,9 +148,8 @@ public class ClusterConfigurationRequest { Map clusterConfigProperties = existingConfigurations.get(configType); Map stackDefaultConfigProperties = stackDefaultProps.get(configType); for (String property : propertyMap.keySet()) { - if (clusterConfigProperties == null || !clusterConfigProperties.containsKey(property) - || (clusterConfigProperties.get(property) == null && stackDefaultConfigProperties.get(property) == null) - || (clusterConfigProperties.get(property) != null && clusterConfigProperties.get(property).equals(stackDefaultConfigProperties.get(property { + // update value only if property value configured in Blueprint /ClusterTemplate is not a custom one + if (!propertyHasCustomValue(clusterConfigProperties, stackDefaultConfigProperties, property)) { LOG.debug("Update Kerberos related config property: {} {} {}", configType, property, propertyMap.get (property)); clusterConfiguration.setProperty(configType, property, propertyMap.get(property)); @@ -166,6 +165,36 @@ public class ClusterConfigurationRequest { return updatedConfigTypes; } + /** + * Returns true if the property exists in clusterConfigProperties and has a custom user defined value. Property has + * custom value in case we there's no stack default value for it or it's not equal to stack default value. + * @param clusterConfigProperties + * @param stackDefaultConfigProperties + * @param property + * @return + */ + private boolean propertyHasCustomValue(Map clusterConfigProperties, Map +stackDefaultConfigProperties, String property) { + +boolean propertyHasCustomValue = false; +if (clusterConfigProperties != null) { + String propertyValue = clusterConfigProperties.get(property); + if (propertyValue != null) { +if (stackDefaultConfigProperties != null) { + String stackDefaultValue = stackDefaultConfigProperties.get(property); + if (stackDefaultValue != null) { +propertyHasCustomValue = !propertyValue.equals(stackDefaultValue); + } else { +propertyHasCustomValue = true; + } +} else { + propertyHasCustomValue = true; +} + } +} +return propertyHasCustomValue; + } + private Map createComponentHostMap(Blueprint blueprint) { Map componentHostsMap = new HashMap (); for (String service : blueprint.getServices()) { http://git-wip-us.apache.org/repos/asf/ambari/blob/4c31108b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java index 8afff46..5967a64 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java +++
[13/19] ambari git commit: AMBARI-14982 : Change AMS configs to deal with slow writes to WASB (avijayan)
AMBARI-14982 : Change AMS configs to deal with slow writes to WASB (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9120682e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9120682e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9120682e Branch: refs/heads/2.2.1-maint Commit: 9120682ed5de26c6163c6bc07935782fb645ff32 Parents: 984d9e9 Author: Aravindan VijayanAuthored: Thu Feb 11 10:16:48 2016 -0800 Committer: Aravindan Vijayan Committed: Thu Feb 11 10:16:48 2016 -0800 -- .../timeline/HBaseTimelineMetricStore.java | 18 +- .../metrics/timeline/PhoenixHBaseAccessor.java | 21 ++- .../timeline/TimelineMetricConfiguration.java | 10 ++ .../0.1.0/configuration/ams-site.xml| 37 +++- .../stacks/HDP/2.0.6/services/stack_advisor.py | 5 ++- .../stacks/2.2/common/test_stack_advisor.py | 5 ++- 6 files changed, 69 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9120682e/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java index c4e946a..8678071 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java @@ -142,14 +142,16 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin aggregatorDailyThread.start(); } - int initDelay = configuration.getTimelineMetricsServiceWatcherInitDelay(); - int delay = configuration.getTimelineMetricsServiceWatcherDelay(); - // Start the watchdog - executorService.scheduleWithFixedDelay( -new TimelineMetricStoreWatcher(this, configuration), initDelay, delay, -TimeUnit.SECONDS); - LOG.info("Started watchdog for timeline metrics store with initial " + -"delay = " + initDelay + ", delay = " + delay); + if (!configuration.isTimelineMetricsServiceWatcherDisabled()) { +int initDelay = configuration.getTimelineMetricsServiceWatcherInitDelay(); +int delay = configuration.getTimelineMetricsServiceWatcherDelay(); +// Start the watchdog +executorService.scheduleWithFixedDelay( + new TimelineMetricStoreWatcher(this, configuration), initDelay, delay, + TimeUnit.SECONDS); +LOG.info("Started watchdog for timeline metrics store with initial " + + "delay = " + initDelay + ", delay = " + delay); + } isInitialized = true; } http://git-wip-us.apache.org/repos/asf/ambari/blob/9120682e/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 4dc1a95..60ac06f 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -244,14 +244,14 @@ public class PhoenixHBaseAccessor { String encoding = metricsConf.get(HBASE_ENCODING_SCHEME, DEFAULT_ENCODING); String compression = metricsConf.get(HBASE_COMPRESSION_SCHEME, DEFAULT_TABLE_COMPRESSION); -String precisionTtl = metricsConf.get(PRECISION_TABLE_TTL, "86400"); //1 day -String hostMinTtl = metricsConf.get(HOST_MINUTE_TABLE_TTL, "604800"); //7 days -String hostHourTtl = metricsConf.get(HOST_HOUR_TABLE_TTL, "2592000"); //30 days -String hostDailyTtl =
[19/19] ambari git commit: AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko)
AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7bd0a877 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7bd0a877 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7bd0a877 Branch: refs/heads/2.2.1-maint Commit: 7bd0a87775bfd32e32257c2ceab4c78110c7c0df Parents: 6893b5a Author: Aleksandr KovalenkoAuthored: Fri Feb 12 16:55:58 2016 +0200 Committer: Yusaku Sako Committed: Fri Feb 12 10:30:31 2016 -0800 -- .../controllers/main/service/info/configs.js| 2 +- ambari-web/app/controllers/wizard.js| 4 +++- .../app/controllers/wizard/step7_controller.js | 21 ++-- ambari-web/app/routes/add_service_routes.js | 1 + ambari-web/app/utils/config.js | 18 + ambari-web/test/controllers/wizard_test.js | 5 ++--- 6 files changed, 32 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd0a877/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 0447392..f265c66 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -485,7 +485,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A } } else { var isEditable = self.get('canEdit') && configGroup.get('name') == self.get('selectedConfigGroup.name'); - allConfigs.push(App.config.createCustomGroupConfig(prop, config, configGroup, isEditable)); + allConfigs.push(App.config.createCustomGroupConfig(prop, config.type, config.properties[prop], configGroup, isEditable)); } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd0a877/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index ad78d8c..aa82234 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -870,11 +870,13 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM installedServiceNamesMap[name] = true; }); stepController.get('stepConfigs').forEach(function (_content) { - if (_content.serviceName === 'YARN') { _content.set('configs', App.config.textareaIntoFileConfigs(_content.get('configs'), 'capacity-scheduler.xml')); } _content.get('configs').forEach(function (_configProperties) { +if (!Em.isNone(_configProperties.get('group'))) { + return false; +} var configProperty = App.config.createDefaultConfig( _configProperties.get('name'), _configProperties.get('serviceName'), http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd0a877/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index 4b27c76..2515219 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -531,6 +531,9 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (Em.isNone(serviceConfigProperty.get('isOverridable'))) { serviceConfigProperty.set('isOverridable', true); } + if (!Em.isNone(serviceConfigProperty.get('group'))) { + serviceConfigProperty.get('group.properties').pushObject(serviceConfigProperty); + } this._updateOverridesForConfig(serviceConfigProperty, component); this._updateIsEditableFlagForConfig(serviceConfigProperty, defaultGroupSelected); @@ -1268,23 +1271,28 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E var readyGroup = App.ConfigGroup.create(configGroup); var wrappedProperties = []; readyGroup.get('properties').forEach(function (propertyData) { -var parentSCP = service.configs.filterProperty('filename', propertyData.filename).findProperty('name', propertyData.name); -var overriddenSCP = App.ServiceConfigProperty.create(parentSCP); +var overriddenSCP, parentSCP = service.configs.filterProperty('filename',
[01/19] ambari git commit: Revert "AMBARI-14839 - DEA is not enabled due to configuration conflict and history log directory can not be changed (Jeff Zhang via jonathanhurley)"
Repository: ambari Updated Branches: refs/heads/2.2.1-maint [created] 7bd0a8777 Revert "AMBARI-14839 - DEA is not enabled due to configuration conflict and history log directory can not be changed (Jeff Zhang via jonathanhurley)" This reverts commit 981ede5455c02ae1bd4aac7495c2c667bc889dbc. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c2d27f33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c2d27f33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c2d27f33 Branch: refs/heads/2.2.1-maint Commit: c2d27f335110f6f2d880b8959444e81666d0fe77 Parents: 5179e5a Author: Jonathan HurleyAuthored: Fri Jan 29 11:26:44 2016 -0500 Committer: Mahadev Konar Committed: Sun Jan 31 18:13:56 2016 -0800 -- .../SPARK/1.2.0.2.2/package/scripts/params.py | 4 +-- .../SPARK/configuration/spark-defaults.xml | 4 +-- .../configuration/spark-thrift-sparkconf.xml| 31 3 files changed, 8 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c2d27f33/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py index a25db6f..a681a5c 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py @@ -79,9 +79,7 @@ hive_user = status_params.hive_user spark_group = status_params.spark_group user_group = status_params.user_group spark_hdfs_user_dir = format("/user/{spark_user}") -spark_history_dir = "hdfs:///spark-history" -if 'spark-defaults' in config['configurations'] and 'spark.history.fs.logDirectory' in config['configurations']['spark-defaults']: - spark_history_dir = config['configurations']['spark-defaults']['spark.history.fs.logDirectory'] +spark_history_dir = 'hdfs:///spark-history' spark_history_server_pid_file = status_params.spark_history_server_pid_file spark_thrift_server_pid_file = status_params.spark_thrift_server_pid_file http://git-wip-us.apache.org/repos/asf/ambari/blob/c2d27f33/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml index 1a6552f..d8af790 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml @@ -31,7 +31,7 @@ spark.history.fs.logDirectory -hdfs:///spark-history +{{spark_history_dir}} Base directory for history spark application log. @@ -45,7 +45,7 @@ spark.eventLog.dir -hdfs:///spark-history +{{spark_history_dir}} Base directory in which Spark events are logged, if spark.eventLog.enabled is true. http://git-wip-us.apache.org/repos/asf/ambari/blob/c2d27f33/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml index 2dbfe51..3b13496 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml @@ -75,17 +75,14 @@ spark.history.fs.logDirectory {{spark_history_dir}} -true - Base directory for history spark application log. It is the same value - as in spark-defaults.xml. + Base directory for history spark application log. spark.eventLog.enabled true -true Whether to log Spark events, useful for reconstructing the Web UI after the application has finished. @@ -94,10 +91,8 @@ spark.eventLog.dir {{spark_history_dir}} -true - Base directory in which Spark events are logged, if
[02/19] ambari git commit: AMBARI-14839 - DEA is not enabled due to configuration conflict and history log directory can not be changed (Jeff Zhang via jonathanhurley)
AMBARI-14839 - DEA is not enabled due to configuration conflict and history log directory can not be changed (Jeff Zhang via jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a0e1a07 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a0e1a07 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a0e1a07 Branch: refs/heads/2.2.1-maint Commit: 7a0e1a07078d5d5d01b73f323c0b1789e78b0b1f Parents: c2d27f3 Author: Jonathan HurleyAuthored: Fri Jan 29 11:27:35 2016 -0500 Committer: Mahadev Konar Committed: Sun Jan 31 18:14:14 2016 -0800 -- .../SPARK/1.2.0.2.2/package/scripts/params.py | 2 +- .../SPARK/configuration/spark-defaults.xml | 4 +-- .../configuration/spark-thrift-sparkconf.xml| 31 .../stacks/HDP/2.4/upgrades/config-upgrade.xml | 15 -- 4 files changed, 29 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7a0e1a07/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py index a681a5c..4fd1d6b 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py @@ -79,7 +79,7 @@ hive_user = status_params.hive_user spark_group = status_params.spark_group user_group = status_params.user_group spark_hdfs_user_dir = format("/user/{spark_user}") -spark_history_dir = 'hdfs:///spark-history' +spark_history_dir = default('/configurations/spark-defaults/spark.history.fs.logDirectory', "hdfs:///spark-history") spark_history_server_pid_file = status_params.spark_history_server_pid_file spark_thrift_server_pid_file = status_params.spark_thrift_server_pid_file http://git-wip-us.apache.org/repos/asf/ambari/blob/7a0e1a07/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml index d8af790..1a6552f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-defaults.xml @@ -31,7 +31,7 @@ spark.history.fs.logDirectory -{{spark_history_dir}} +hdfs:///spark-history Base directory for history spark application log. @@ -45,7 +45,7 @@ spark.eventLog.dir -{{spark_history_dir}} +hdfs:///spark-history Base directory in which Spark events are logged, if spark.eventLog.enabled is true. http://git-wip-us.apache.org/repos/asf/ambari/blob/7a0e1a07/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml index 3b13496..2dbfe51 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/configuration/spark-thrift-sparkconf.xml @@ -75,14 +75,17 @@ spark.history.fs.logDirectory {{spark_history_dir}} +true - Base directory for history spark application log. + Base directory for history spark application log. It is the same value + as in spark-defaults.xml. spark.eventLog.enabled true +true Whether to log Spark events, useful for reconstructing the Web UI after the application has finished. @@ -91,8 +94,10 @@ spark.eventLog.dir {{spark_history_dir}} +true - Base directory in which Spark events are logged, if spark.eventLog.enabled is true. + Base directory in which Spark events are logged, if spark.eventLog.enabled is true. It is the same value + as in spark-defaults.xml. @@ -138,10 +143,26 @@ -spark.executor.instances -2 +
ambari git commit: AMBARI-14772. Added ability to set rack information in the add host template (Laszlo Puskas via rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.2 1826e415d -> 99231e656 AMBARI-14772. Added ability to set rack information in the add host template (Laszlo Puskas via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99231e65 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99231e65 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99231e65 Branch: refs/heads/branch-2.2 Commit: 99231e656df2102b1ca1ae946c48159bbd633352 Parents: 1826e41 Author: Laszlo PuskasAuthored: Fri Feb 12 12:48:18 2016 -0500 Committer: Robert Levas Committed: Fri Feb 12 12:48:18 2016 -0500 -- .../internal/HostResourceProvider.java | 12 - .../internal/ScaleClusterRequest.java | 28 +-- .../server/topology/ClusterTopologyImpl.java| 51 +--- 3 files changed, 67 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/99231e65/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java index 7ce956f..6101ee8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java @@ -142,6 +142,11 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { public static final String HOST_PREDICATE_PROPERTY_ID = PropertyHelper.getPropertyId(null, "host_predicate"); + //todo use the same json structure for cluster host addition (cluster template and upscale) + public static final String HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID = + PropertyHelper.getPropertyId(null, "rack_info"); + + private static Set pkPropertyIds = new HashSet(Arrays.asList(new String[]{ HOST_NAME_PROPERTY_ID})); @@ -344,6 +349,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { //todo: constants baseUnsupported.remove(HOST_COUNT_PROPERTY_ID); baseUnsupported.remove(HOST_PREDICATE_PROPERTY_ID); +baseUnsupported.remove(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID); return checkConfigPropertyIds(baseUnsupported, "Hosts"); } @@ -396,7 +402,11 @@ public class HostResourceProvider extends AbstractControllerResourceProvider { (String) properties.get(HOST_CLUSTER_NAME_PROPERTY_ID), null); hostRequest.setPublicHostName((String) properties.get(HOST_PUBLIC_NAME_PROPERTY_ID)); -hostRequest.setRackInfo((String) properties.get(HOST_RACK_INFO_PROPERTY_ID)); + +String rackInfo = (String) ((null != properties.get(HOST_RACK_INFO_PROPERTY_ID))? properties.get(HOST_RACK_INFO_PROPERTY_ID): +properties.get(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID)); + +hostRequest.setRackInfo(rackInfo); hostRequest.setBlueprintName((String) properties.get(BLUEPRINT_PROPERTY_ID)); hostRequest.setHostGroupName((String) properties.get(HOSTGROUP_PROPERTY_ID)); http://git-wip-us.apache.org/repos/asf/ambari/blob/99231e65/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java index d784f1d..b5d2f9d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java @@ -19,6 +19,11 @@ package org.apache.ambari.server.controller.internal; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.ambari.server.api.predicate.InvalidQueryException; import org.apache.ambari.server.stack.NoSuchStackException; import org.apache.ambari.server.topology.Blueprint; @@ -26,17 +31,16 @@ import org.apache.ambari.server.topology.Configuration; import org.apache.ambari.server.topology.HostGroupInfo; import org.apache.ambari.server.topology.InvalidTopologyTemplateException; import org.apache.ambari.server.topology.TopologyValidator; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; +import org.slf4j.Logger; +import
ambari git commit: AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 99231e656 -> 63ece7fe0 AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/63ece7fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63ece7fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63ece7fe Branch: refs/heads/branch-2.2 Commit: 63ece7fe0643016748731a7527171c94eb4db655 Parents: 99231e6 Author: Aleksandr KovalenkoAuthored: Fri Feb 12 16:55:58 2016 +0200 Committer: Aleksandr Kovalenko Committed: Fri Feb 12 20:03:04 2016 +0200 -- .../controllers/main/service/info/configs.js| 2 +- ambari-web/app/controllers/wizard.js| 4 +++- .../app/controllers/wizard/step7_controller.js | 21 ++-- ambari-web/app/routes/add_service_routes.js | 1 + ambari-web/app/utils/config.js | 18 + ambari-web/test/controllers/wizard_test.js | 5 ++--- 6 files changed, 32 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/63ece7fe/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 0447392..f265c66 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -485,7 +485,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A } } else { var isEditable = self.get('canEdit') && configGroup.get('name') == self.get('selectedConfigGroup.name'); - allConfigs.push(App.config.createCustomGroupConfig(prop, config, configGroup, isEditable)); + allConfigs.push(App.config.createCustomGroupConfig(prop, config.type, config.properties[prop], configGroup, isEditable)); } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/63ece7fe/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index ad78d8c..aa82234 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -870,11 +870,13 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM installedServiceNamesMap[name] = true; }); stepController.get('stepConfigs').forEach(function (_content) { - if (_content.serviceName === 'YARN') { _content.set('configs', App.config.textareaIntoFileConfigs(_content.get('configs'), 'capacity-scheduler.xml')); } _content.get('configs').forEach(function (_configProperties) { +if (!Em.isNone(_configProperties.get('group'))) { + return false; +} var configProperty = App.config.createDefaultConfig( _configProperties.get('name'), _configProperties.get('serviceName'), http://git-wip-us.apache.org/repos/asf/ambari/blob/63ece7fe/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index b00669a..aff70ca 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -531,6 +531,9 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (Em.isNone(serviceConfigProperty.get('isOverridable'))) { serviceConfigProperty.set('isOverridable', true); } + if (!Em.isNone(serviceConfigProperty.get('group'))) { + serviceConfigProperty.get('group.properties').pushObject(serviceConfigProperty); + } this._updateOverridesForConfig(serviceConfigProperty, component); this._updateIsEditableFlagForConfig(serviceConfigProperty, defaultGroupSelected); @@ -1266,23 +1269,28 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E var readyGroup = App.ConfigGroup.create(configGroup); var wrappedProperties = []; readyGroup.get('properties').forEach(function (propertyData) { -var parentSCP = service.configs.filterProperty('filename', propertyData.filename).findProperty('name', propertyData.name); -var overriddenSCP = App.ServiceConfigProperty.create(parentSCP); +var
ambari git commit: AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 9d8675ade -> f7055ae76 AMBARI-15029. Adding a Service results in deleting Config Group mappings (more than 1 CG present) (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7055ae7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7055ae7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7055ae7 Branch: refs/heads/trunk Commit: f7055ae76a64f445d2845ce66f6ec925dc94f99d Parents: 9d8675a Author: Aleksandr KovalenkoAuthored: Fri Feb 12 16:55:05 2016 +0200 Committer: Aleksandr Kovalenko Committed: Fri Feb 12 20:01:58 2016 +0200 -- .../controllers/main/service/info/configs.js| 4 +-- ambari-web/app/controllers/wizard.js| 4 ++- .../app/controllers/wizard/step7_controller.js | 31 +--- ambari-web/app/routes/add_service_routes.js | 1 + ambari-web/test/controllers/wizard_test.js | 5 ++-- 5 files changed, 29 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f7055ae7/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index ae2939e..b6a434c 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -429,8 +429,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A for (var prop in config.properties) { var fileName = App.config.getOriginalFileName(config.type); var serviceConfig = allConfigs.filterProperty('name', prop).findProperty('filename', fileName); -var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); if (serviceConfig) { + var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); var isFinal = !!(config.properties_attributes && config.properties_attributes.final && config.properties_attributes.final[prop]); if (self.get('selectedConfigGroup.isDefault') || configGroup.get('name') == self.get('selectedConfigGroup.name')) { var overridePlainObject = { @@ -444,7 +444,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A } } else { var isEditable = self.get('canEdit') && configGroup.get('name') == self.get('selectedConfigGroup.name'); - allConfigs.push(App.config.createCustomGroupConfig(prop, fileName, value, configGroup, isEditable)); + allConfigs.push(App.config.createCustomGroupConfig(prop, fileName, config.properties[prop], configGroup, isEditable)); } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/f7055ae7/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 762149f..05ef68e 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -889,11 +889,13 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM var installedServiceNames = stepController.get('installedServiceNames') || []; var installedServiceNamesMap = installedServiceNames.toWickMap(); stepController.get('stepConfigs').forEach(function (_content) { - if (_content.serviceName === 'YARN') { _content.set('configs', App.config.textareaIntoFileConfigs(_content.get('configs'), 'capacity-scheduler.xml')); } _content.get('configs').forEach(function (_configProperties) { +if (!Em.isNone(_configProperties.get('group'))) { + return false; +} var configProperty = App.config.createDefaultConfig( _configProperties.get('name'), _configProperties.get('serviceName'), http://git-wip-us.apache.org/repos/asf/ambari/blob/f7055ae7/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index 7e96845..ee37427 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -479,14 +479,15 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E loadServiceConfigGroupOverridesSuccess: function (data, opt,
[18/19] ambari git commit: AMBARI-15007. Make amazon2015 to be part of redhat6 family (aonishuk)
AMBARI-15007. Make amazon2015 to be part of redhat6 family (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/abd26b23 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/abd26b23 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/abd26b23 Branch: refs/heads/2.2.1-maint Commit: abd26b2353751c9ead51672d65b7a781ec987139 Parents: fac9f36 Author: Andrew OnishukAuthored: Fri Feb 12 13:16:43 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 12 13:16:43 2016 +0200 -- ambari-agent/conf/unix/ambari-agent | 8 +- ambari-agent/conf/unix/install-helper.sh| 26 +++- ambari-agent/pom.xml| 23 .../src/main/python/ambari_commons/os_check.py | 92 ++--- .../ambari_commons/resources/os_family.json | 129 ++- .../core/providers/__init__.py | 3 + .../libraries/providers/__init__.py | 3 + ambari-common/src/main/unix/ambari-python-wrap | 8 +- ambari-server/conf/unix/ambari-env.sh | 1 + ambari-server/conf/unix/install-helper.sh | 24 +++- ambari-server/pom.xml | 12 -- ambari-server/sbin/ambari-server| 7 +- .../server/state/stack/JsonOsFamilyRoot.java| 38 ++ .../ambari/server/state/stack/OsFamily.java | 8 +- .../main/python/ambari_server/serverSetup.py| 17 --- .../src/main/python/ambari_server/utils.py | 3 +- ambari-server/src/main/python/bootstrap.py | 4 +- .../AMBARI_METRICS/0.1.0/metainfo.xml | 2 +- .../KERBEROS/1.10.3-10/metainfo.xml | 2 +- .../HDP/2.3/services/ACCUMULO/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/ATLAS/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/FALCON/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/FLUME/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/HBASE/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/HDFS/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/HIVE/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/KAFKA/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/KNOX/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/OOZIE/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/PIG/metainfo.xml| 2 +- .../stacks/HDP/2.3/services/RANGER/metainfo.xml | 2 +- .../HDP/2.3/services/RANGER_KMS/metainfo.xml| 2 +- .../stacks/HDP/2.3/services/SLIDER/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/SPARK/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/SQOOP/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/STORM/metainfo.xml | 2 +- .../stacks/HDP/2.3/services/TEZ/metainfo.xml| 2 +- .../stacks/HDP/2.3/services/YARN/metainfo.xml | 4 +- .../HDP/2.3/services/ZOOKEEPER/metainfo.xml | 2 +- .../HDP/2.4/services/ACCUMULO/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/ATLAS/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/FALCON/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/FLUME/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/HBASE/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/HDFS/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/HIVE/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/KAFKA/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/KNOX/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/OOZIE/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/PIG/metainfo.xml| 2 +- .../stacks/HDP/2.4/services/RANGER/metainfo.xml | 2 +- .../HDP/2.4/services/RANGER_KMS/metainfo.xml| 2 +- .../stacks/HDP/2.4/services/SLIDER/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/SPARK/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/SQOOP/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/STORM/metainfo.xml | 2 +- .../stacks/HDP/2.4/services/TEZ/metainfo.xml| 2 +- .../stacks/HDP/2.4/services/YARN/metainfo.xml | 4 +- .../HDP/2.4/services/ZOOKEEPER/metainfo.xml | 2 +- ambari-server/src/test/python/TestOSCheck.py| 37 -- ambari-server/src/test/resources/os_family.json | 89 +++-- 61 files changed, 368 insertions(+), 252 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-agent/conf/unix/ambari-agent -- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index 27ade60..31e4100 100755 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -40,7 +40,7 @@ export AMBARI_CONF_DIR=/etc/ambari-server/conf:$PATH export PYTHONPATH=/usr/lib/python2.6/site-packages:$PYTHONPATH AMBARI_AGENT=ambari-agent -PYTHON_WRAP=/var/lib/ambari-agent/ambari-python-wrap
[17/19] ambari git commit: AMBARI-14842. ambari agent upstart support (aonishuk)
AMBARI-14842. ambari agent upstart support (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fac9f36f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fac9f36f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fac9f36f Branch: refs/heads/2.2.1-maint Commit: fac9f36fc1e7822ee840bd35cc0820bd570a2af5 Parents: 116f016 Author: Andrew OnishukAuthored: Fri Feb 12 11:44:32 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 12 11:45:09 2016 +0200 -- ambari-agent/conf/unix/ambari-agent | 13 +++ ambari-agent/etc/init/ambari-agent.conf | 34 ambari-agent/pom.xml| 22 ++ 3 files changed, 69 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fac9f36f/ambari-agent/conf/unix/ambari-agent -- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index 50d13b1..27ade60 100755 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -153,7 +153,14 @@ case "$1" in change_files_permissions echo "Starting ambari-agent" + +if [ "$AMBARI_AGENT_RUN_IN_FOREGROUND" == true ] ; then + $PYTHON $AMBARI_AGENT_PY_SCRIPT "$@" > $OUTFILE 2>&1 + exit $? +fi + nohup $PYTHON $AMBARI_AGENT_PY_SCRIPT "$@" > $OUTFILE 2>&1 & + sleep 2 PID=$! echo "Verifying $AMBARI_AGENT process status..." @@ -215,6 +222,12 @@ case "$1" in echo "Stopping $AMBARI_AGENT" change_files_permissions $PYTHON $AGENT_SCRIPT stop + +status ambari-agent 2>/dev/null | grep start 1>/dev/null +if [ "$?" -eq 0 ] ; then + echo "Stopping $AMBARI_AGENT upstart job" + stop ambari-agent > /dev/null +fi fi echo "Removing PID file at $PIDFILE" ambari-sudo.sh rm -f $PIDFILE http://git-wip-us.apache.org/repos/asf/ambari/blob/fac9f36f/ambari-agent/etc/init/ambari-agent.conf -- diff --git a/ambari-agent/etc/init/ambari-agent.conf b/ambari-agent/etc/init/ambari-agent.conf new file mode 100644 index 000..021eb3b --- /dev/null +++ b/ambari-agent/etc/init/ambari-agent.conf @@ -0,0 +1,34 @@ +# 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 + +#ambari-agent +description "ambari agent" + +stop on runlevel [06] + +env PIDFILE=/var/run/ambari-agent/ambari-agent.pid + +kill signal SIGKILL +respawn + +script + . /etc/environment + + export AMBARI_AGENT_RUN_IN_FOREGROUND=true + exec /etc/init.d/ambari-agent start +end script + +post-stop script + rm -f $PIDFILE +end script \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/fac9f36f/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index b8f0407..63d6044 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -409,6 +409,17 @@ root + /etc/init + 755 + root + root + + + etc/init/ambari-agent.conf + + + + ${init.d.dir} 755 root @@ -620,6 +631,17 @@ + etc/init/ambari-agent.conf + file + +perm +/etc/init +root +root +755 + + + ${basedir}/target/src/version file
[12/19] ambari git commit: AMBARI-14989. Inconsistent HIVE CBO setting presentation. (Jaimin)
AMBARI-14989. Inconsistent HIVE CBO setting presentation. (Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/984d9e90 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/984d9e90 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/984d9e90 Branch: refs/heads/2.2.1-maint Commit: 984d9e90b28da343d4fb80abfdceca3ce6b4dc65 Parents: 9df0339 Author: Jaimin JetlyAuthored: Thu Feb 11 15:02:09 2016 +0530 Committer: Yusaku Sako Committed: Thu Feb 11 07:57:10 2016 -0800 -- .../services/HIVE/configuration/hive-env.xml| 20 - .../services/HIVE/configuration/hive-site.xml | 14 -- .../stacks/HDP/2.2/services/stack_advisor.py| 13 +++--- .../services/HIVE/configuration/hive-env.xml| 20 - .../services/HIVE/configuration/hive-site.xml | 8 .../stacks/HDPWIN/2.2/services/stack_advisor.py | 13 +++--- .../2.1/configs/hive-metastore-upgrade.json | 3 +- .../stacks/2.2/common/test_stack_advisor.py | 12 +++-- .../2.3/common/services-sparkts-hive.json | 47 .../stacks/2.3/common/test_stack_advisor.py | 7 ++- 10 files changed, 19 insertions(+), 138 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/984d9e90/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml index f84bc01..77eace4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml @@ -127,26 +127,6 @@ export METASTORE_PORT={{hive_metastore_port}} -cost_based_optimizer -Cost Based Optimizer -Off - - value-list - - - On - On - - - Off - Off - - - 1 - - - - hive_security_authorization Choose Authorization None http://git-wip-us.apache.org/repos/asf/ambari/blob/984d9e90/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml index cc3e75f..7d6c490 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml @@ -450,12 +450,6 @@ limitations under the License. hive.cbo.enable true Flag to control enabling Cost Based Optimizations using Calcite framework. - - -hive-env -cost_based_optimizer - - @@ -799,10 +793,6 @@ limitations under the License. -hive-env -cost_based_optimizer - - hive-site hive.cbo.enable @@ -834,10 +824,6 @@ limitations under the License. -hive-env -cost_based_optimizer - - hive-site hive.cbo.enable http://git-wip-us.apache.org/repos/asf/ambari/blob/984d9e90/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index 9be6410..3ebb25f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -347,14 +347,11 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putHiveSiteProperty("hive.exec.reducers.bytes.per.reducer", "67108864") # CBO -putHiveEnvProperty("cost_based_optimizer", "On") -if str(configurations["hive-env"]["properties"]["cost_based_optimizer"]).lower() == "on": - putHiveSiteProperty("hive.cbo.enable", "true") -else: - putHiveSiteProperty("hive.cbo.enable", "false") -hive_cbo_enable = configurations["hive-site"]["properties"]["hive.cbo.enable"] -putHiveSiteProperty("hive.stats.fetch.partition.stats", hive_cbo_enable) -putHiveSiteProperty("hive.stats.fetch.column.stats", hive_cbo_enable) +if "hive-site" in services["configurations"] and
[11/19] ambari git commit: AMBARI-14973. ambari-agent upstart script restart triggers the restart of hbase specific JVM processes (aonishuk)
AMBARI-14973. ambari-agent upstart script restart triggers the restart of hbase specific JVM processes (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9df03397 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9df03397 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9df03397 Branch: refs/heads/2.2.1-maint Commit: 9df033974579d1aad7cf80b788689c2c91579869 Parents: 1f4e333 Author: Andrew OnishukAuthored: Tue Feb 9 17:43:54 2016 +0200 Committer: Andrew Onishuk Committed: Tue Feb 9 17:43:54 2016 +0200 -- ambari-agent/src/main/python/ambari_agent/PythonExecutor.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9df03397/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py index 350c568..cc08127 100644 --- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py @@ -150,6 +150,9 @@ class PythonExecutor(object): else: structured_out = {} return out, error, structured_out + + def preexec_fn(self): +os.setpgid(0, 0) def launch_python_subprocess(self, command, tmpout, tmperr): """ @@ -165,7 +168,7 @@ class PythonExecutor(object): return subprocess.Popen(command, stdout=tmpout, - stderr=tmperr, close_fds=close_fds, env=command_env) + stderr=tmperr, close_fds=close_fds, env=command_env, preexec_fn=self.preexec_fn) def isSuccessfull(self, returncode): return not self.python_process_has_been_killed and returncode == 0
[09/19] ambari git commit: AMBARI-14941 Convert Storm and Kafka to use enhanced dashboard widgets. (atkach)
AMBARI-14941 Convert Storm and Kafka to use enhanced dashboard widgets. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/66c35e01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/66c35e01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/66c35e01 Branch: refs/heads/2.2.1-maint Commit: 66c35e0180f043d3be50bc81121628722f13e967 Parents: 88dab3b Author: Andrii TkachAuthored: Fri Feb 5 17:15:14 2016 +0200 Committer: Yusaku Sako Committed: Mon Feb 8 12:24:26 2016 -0800 -- .../stacks/HDP/2.3/services/KAFKA/widgets.json | 182 +++ .../stacks/HDP/2.3/services/STORM/widgets.json | 127 + ambari-web/app/assets/test/tests.js | 1 - ambari-web/app/data/service_graph_config.js | 15 -- ambari-web/app/messages.js | 28 --- .../mixins/common/chart/storm_linear_time.js| 74 .../app/mixins/common/widgets/widget_mixin.js | 2 +- ambari-web/app/views.js | 9 - .../app/views/common/chart/linear_time.js | 20 -- .../service/info/metrics/kafka/broker_topic.js | 50 - .../info/metrics/kafka/controller_status.js | 49 - .../info/metrics/kafka/kafka_controller.js | 41 - .../info/metrics/kafka/replica_fetcher.js | 41 - .../info/metrics/kafka/replica_manager.js | 46 - .../info/metrics/storm/executors_metric.js | 34 .../info/metrics/storm/slots_number_metric.js | 42 - .../service/info/metrics/storm/tasks_metric.js | 34 .../info/metrics/storm/topologies_metric.js | 34 .../common/chart/storm_linear_time_test.js | 80 19 files changed, 310 insertions(+), 599 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/66c35e01/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/widgets.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/widgets.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/widgets.json new file mode 100644 index 000..7237236 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/widgets.json @@ -0,0 +1,182 @@ +{ + "layouts": [ +{ + "layout_name": "default_kafka_dashboard", + "display_name": "Standard Kafka Dashboard", + "section_name": "KAFKA_SUMMARY", + "widgetLayoutInfo": [ +{ + "widget_name": "Broker Topics", + "description": "Broker Topics", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Bytes In", + "value": "${kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate}" +}, +{ + "name": "Bytes Out", + "value": "${kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate}" +}, +{ + "name": "Messages In", + "value": "${kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Active Controller Count", + "description": "Active Controller Count", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.controller.KafkaController.ActiveControllerCount", + "metric_path": "metrics/kafka/controller/KafkaController/ActiveControllerCount", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} +
[05/19] ambari git commit: AMBARI-14786. Localhost configuration value for multiple host properties does not work properly. (Daniel Gergely via rnettleton)
AMBARI-14786. Localhost configuration value for multiple host properties does not work properly. (Daniel Gergely via rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81c58bbb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81c58bbb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81c58bbb Branch: refs/heads/2.2.1-maint Commit: 81c58bbb6d036e2ca98c6312157f36f6cf7c3afd Parents: 90c0293 Author: Bob NettletonAuthored: Thu Feb 4 14:35:11 2016 -0500 Committer: Bob Nettleton Committed: Thu Feb 4 14:35:11 2016 -0500 -- .../BlueprintConfigurationProcessor.java| 206 ++-- .../BlueprintConfigurationProcessorTest.java| 243 ++- 2 files changed, 370 insertions(+), 79 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81c58bbb/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 93afe0d..82cff93 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -125,6 +125,11 @@ public class BlueprintConfigurationProcessor { private static Pattern HOSTGROUP_PORT_REGEX = Pattern.compile("%HOSTGROUP::(\\S+?)%:?(\\d+)?"); /** + * Compiled regex for hostgroup token with port information. + */ + private static Pattern LOCALHOST_PORT_REGEX = Pattern.compile("localhost:?(\\d+)?"); + + /** * Statically-defined set of properties that can support HA using a nameservice name * in the configuration, rather than just a host name. * This set also contains other HA properties that will be exported if the @@ -1578,7 +1583,9 @@ public class BlueprintConfigurationProcessor { */ private final boolean usePrefixForEachHost; -private final Set setOfKnownURLSchemes = Collections.singleton("thrift://"); +private final boolean useSuffixForEachHost; + +private final boolean usePortForEachHost; /** * Constructor. @@ -1586,7 +1593,7 @@ public class BlueprintConfigurationProcessor { * @param component component name associated with the property */ public MultipleHostTopologyUpdater(String component) { - this(component, DEFAULT_SEPARATOR, false); + this(component, DEFAULT_SEPARATOR, false, false, true); } /** @@ -1596,10 +1603,12 @@ public class BlueprintConfigurationProcessor { * @param separator the separator character to use when multiple hosts * are specified in a property or URL */ -public MultipleHostTopologyUpdater(String component, Character separator, boolean userPrefixForEachHost) { +public MultipleHostTopologyUpdater(String component, Character separator, boolean usePrefixForEachHost, boolean useSuffixForEachHost, boolean usePortForEachHost) { this.component = component; this.separator = separator; - this.usePrefixForEachHost = userPrefixForEachHost; + this.usePrefixForEachHost = usePrefixForEachHost; + this.useSuffixForEachHost = useSuffixForEachHost; + this.usePortForEachHost = usePortForEachHost; } /** @@ -1620,36 +1629,101 @@ public class BlueprintConfigurationProcessor { StringBuilder sb = new StringBuilder(); - if (!origValue.contains("%HOSTGROUP") && - (!origValue.contains("localhost"))) { + if (!origValue.contains("%HOSTGROUP") && (!origValue.contains("localhost"))) { // this property must contain FQDNs specified directly by the user // of the Blueprint, so the processor should not attempt to update them return origValue; } - if (origValue.contains("localhost") && topology.getHostGroupsForComponent(component).size() == 1) { -return origValue.replace("localhost", topology.getHostAssignmentsForComponent(component).iterator().next()); + Collection hostStrings = getHostStrings(origValue, topology); + hostStrings.addAll(getHostStringsFromLocalhost(origValue, topology)); + + return resolveHostGroupPlaceholder(origValue, hostStrings); +} + +/** + * Gets the prefix for hosts + * @param value property value + * @return prefix + */ +private String getPrefix(String value) { + Matcher localhostMatcher =
[15/19] ambari git commit: AMBARI-15004. RU/EU: Upgrading Oozie database fails since new configs are not yet written to /usr/hdp/current/oozie-server/conf (alejandro)
AMBARI-15004. RU/EU: Upgrading Oozie database fails since new configs are not yet written to /usr/hdp/current/oozie-server/conf (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ceacede Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ceacede Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ceacede Branch: refs/heads/2.2.1-maint Commit: 2ceacedeb1ebdfa5da138f6b1c2918dcb342696f Parents: 9120682 Author: Alejandro FernandezAuthored: Thu Feb 11 17:31:32 2016 -0800 Committer: Alejandro Fernandez Committed: Thu Feb 11 17:31:32 2016 -0800 -- .../state/stack/upgrade/ClusterGrouping.java| 7 .../state/stack/upgrade/ExecuteHostType.java| 7 .../state/stack/upgrade/TaskWrapperBuilder.java | 15 +++- .../4.0.0.2.0/package/scripts/oozie_server.py | 36 ++-- .../package/scripts/oozie_server_upgrade.py | 4 ++- .../4.0.0.2.0/package/scripts/params_linux.py | 3 ++ .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 3 +- .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 5 ++- .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 5 ++- .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 5 ++- .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 5 ++- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 5 ++- .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 5 ++- .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 5 ++- .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 5 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 5 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 5 ++- .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 5 ++- .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml | 5 ++- 19 files changed, 109 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2ceacede/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java index 5e21da5..8fb6ef5 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java @@ -232,6 +232,13 @@ public class ClusterGrouping extends Grouping { realHosts = Collections.singleton(hosts.hosts.iterator().next()); } +// Pick the first host sorted alphabetically (case insensitive) +if (ExecuteHostType.FIRST == et.hosts && !hosts.hosts.isEmpty()) { + List sortedHosts = new ArrayList<>(hosts.hosts); + Collections.sort(sortedHosts, String.CASE_INSENSITIVE_ORDER); + realHosts = Collections.singleton(sortedHosts.get(0)); +} + // !!! cannot execute against empty hosts (safety net) if (realHosts.isEmpty()) { return null; http://git-wip-us.apache.org/repos/asf/ambari/blob/2ceacede/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteHostType.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteHostType.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteHostType.java index b36dca4..80deb60 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteHostType.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteHostType.java @@ -42,6 +42,13 @@ public enum ExecuteHostType { ANY, /** + * Run on a single host that is picked by alphabetically sorting all hosts that satisfy the condition of the {@link ExecuteTask} + * . + */ + @XmlEnumValue("first") + FIRST, + + /** * Run on all of the hosts. */ @XmlEnumValue("all") http://git-wip-us.apache.org/repos/asf/ambari/blob/2ceacede/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java index 81a3a4d..f2ef8f0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
[04/19] ambari git commit: AMBARI-378. Missing values in “Advanced hive-site” section.(vbrodetskyi)
AMBARI-378. Missing values in âAdvanced hive-siteâ section.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/90c0293b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/90c0293b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/90c0293b Branch: refs/heads/2.2.1-maint Commit: 90c0293bac7c4633e90ebd8a1b7962e0a31d53e4 Parents: a17c7a6 Author: Vitaly BrodetskyiAuthored: Mon Feb 1 12:46:12 2016 +0200 Committer: Vitaly Brodetskyi Committed: Mon Feb 1 12:46:12 2016 +0200 -- .../stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/90c0293b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml index fb10b45..cc3e75f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml @@ -1781,7 +1781,6 @@ limitations under the License. hive.server2.authentication.pam.services - DONT_ADD_ON_UPGRADE @@ -1792,7 +1791,6 @@ limitations under the License. hive.server2.custom.authentication.class - DONT_ADD_ON_UPGRADE
[10/19] ambari git commit: AMBARI-14949: Ambaripreupload should skip uploading oozie shared lib for upgrade (jluniya)
AMBARI-14949: Ambaripreupload should skip uploading oozie shared lib for upgrade (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1f4e3338 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1f4e3338 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1f4e3338 Branch: refs/heads/2.2.1-maint Commit: 1f4e3338815cb6fe91ac1ef0f4effb53b192348c Parents: 66c35e0 Author: Jayush LuniyaAuthored: Mon Feb 8 14:36:00 2016 -0800 Committer: Jayush Luniya Committed: Mon Feb 8 16:10:28 2016 -0800 -- .../main/resources/scripts/Ambaripreupload.py | 31 1 file changed, 18 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1f4e3338/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index 591b7d2..5a20698 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -85,8 +85,10 @@ with Environment() as env: parser = OptionParser() parser.add_option("-v", "--hdp-version", dest="hdp_version", default="", help="hdp-version used in path of tarballs") - + parser.add_option("-u", "--upgrade", dest="upgrade", action="store_true", +help="flag to indicate script is being run for upgrade", default=False) (options, args) = parser.parse_args() + # See if hdfs path prefix is provided on the command line. If yes, use that value, if no # use empty string as default. @@ -273,19 +275,22 @@ with Environment() as env: oozie_hdfs_user_dir = format("{hdfs_path_prefix}/user/{oozie_user}") kinit_if_needed = '' - params.HdfsResource(format("{oozie_hdfs_user_dir}/share/"), -action="delete_on_execute", -type = 'directory' - ) + if options.upgrade: +Logger.info("Skipping uploading oozie shared lib during upgrade") + else: +params.HdfsResource(format("{oozie_hdfs_user_dir}/share/"), + action="delete_on_execute", + type = 'directory' +) - params.HdfsResource(format("{oozie_hdfs_user_dir}/share"), -action="create_on_execute", -type = 'directory', -mode=0755, -recursive_chmod = True, -owner=oozie_user, -source = oozie_shared_lib, - ) +params.HdfsResource(format("{oozie_hdfs_user_dir}/share"), + action="create_on_execute", + type = 'directory', + mode=0755, + recursive_chmod = True, + owner=oozie_user, + source = oozie_shared_lib, +) print "Copying tarballs..." copy_tarballs_to_hdfs(format("/usr/hdp/{hdp_version}/hadoop/mapreduce.tar.gz"), hdfs_path_prefix+"/hdp/apps/{{ hdp_stack_version }}/mapreduce/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group)
[03/19] ambari git commit: AMBARI-14848 : AMS service has critical alert after upgrade to 2.2.1.0. (avijayan)
AMBARI-14848 : AMS service has critical alert after upgrade to 2.2.1.0. (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a17c7a6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a17c7a6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a17c7a6a Branch: refs/heads/2.2.1-maint Commit: a17c7a6a6b8258885d074fabcecc38d3fdf9e894 Parents: 7a0e1a0 Author: Aravindan VijayanAuthored: Fri Jan 29 14:05:51 2016 -0800 Committer: Mahadev Konar Committed: Sun Jan 31 18:14:28 2016 -0800 -- .../server/upgrade/UpgradeCatalog221.java | 7 .../server/upgrade/UpgradeCatalog221Test.java | 43 2 files changed, 50 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a17c7a6a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog221.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog221.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog221.java index 2adc8b9..82c56ae 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog221.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog221.java @@ -198,6 +198,13 @@ public class UpgradeCatalog221 extends AbstractUpgradeCatalog { alertDefinitionDAO.merge(alertDefinition); } + final AlertDefinitionEntity amsZookeeperProcessAlertDefinitionEntity = alertDefinitionDAO.findByName( +clusterID, "ams_metrics_collector_zookeeper_server_process"); + + if (amsZookeeperProcessAlertDefinitionEntity != null) { +LOG.info("Removing alert : ams_metrics_collector_zookeeper_server_process"); +alertDefinitionDAO.remove(amsZookeeperProcessAlertDefinitionEntity); + } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/a17c7a6a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog221Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog221Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog221Test.java index 906167e..3dab200 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog221Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog221Test.java @@ -41,7 +41,9 @@ import org.apache.ambari.server.controller.MaintenanceStateHelper; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.InMemoryDefaultTestModule; +import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.StackDAO; +import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; @@ -572,4 +574,45 @@ public class UpgradeCatalog221Test { String result = (String) updateAmsEnvContent.invoke(upgradeCatalog221, oldContent); Assert.assertEquals(expectedContent, result); } + + @Test + public void testUpdateAlertDefinitions() { +EasyMockSupport easyMockSupport = new EasyMockSupport(); +long clusterId = 1; + +final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); +final AlertDefinitionDAO mockAlertDefinitionDAO = easyMockSupport.createNiceMock(AlertDefinitionDAO.class); +final Clusters mockClusters = easyMockSupport.createStrictMock(Clusters.class); +final Cluster mockClusterExpected = easyMockSupport.createNiceMock(Cluster.class); +final AlertDefinitionEntity mockAmsZookeeperProcessAlertDefinitionEntity = easyMockSupport.createNiceMock(AlertDefinitionEntity.class); + +final Injector mockInjector = Guice.createInjector(new AbstractModule() { + @Override + protected void configure() { + bind(AmbariManagementController.class).toInstance(mockAmbariManagementController); +bind(Clusters.class).toInstance(mockClusters); +bind(EntityManager.class).toInstance(entityManager); +bind(AlertDefinitionDAO.class).toInstance(mockAlertDefinitionDAO); +bind(DBAccessor.class).toInstance(createNiceMock(DBAccessor.class)); +bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class)); + } +}); + + expect(mockAmbariManagementController.getClusters()).andReturn(mockClusters).once(); +
[16/19] ambari git commit: AMBARI-14715. TimelineServer configuration is missing in yarn-env.xml. (Akira Ajisaka via yusaku)
AMBARI-14715. TimelineServer configuration is missing in yarn-env.xml. (Akira Ajisaka via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/116f016f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/116f016f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/116f016f Branch: refs/heads/2.2.1-maint Commit: 116f016f6b7d59fd59eb6cee245f141966846199 Parents: 2ceaced Author: Yusaku SakoAuthored: Thu Feb 11 19:10:13 2016 -0800 Committer: Yusaku Sako Committed: Thu Feb 11 19:11:18 2016 -0800 -- .../stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/116f016f/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml index 699463b..74fd4f6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml @@ -102,14 +102,14 @@ # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}} - # Specify the max Heapsize for the HistoryManager using a numerical value + # Specify the max Heapsize for the timeline server using a numerical value # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set # the value to 1024. # This value will be overridden by an Xmx setting specified in either YARN_OPTS - # and/or YARN_HISTORYSERVER_OPTS. + # and/or YARN_TIMELINESERVER_OPTS. # If not specified, the default value will be picked from either YARN_HEAPMAX # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. - export YARN_HISTORYSERVER_HEAPSIZE={{apptimelineserver_heapsize}} + export YARN_TIMELINESERVER_HEAPSIZE={{apptimelineserver_heapsize}} # Specify the JVM options to be used when starting the NodeManager. # These options will be appended to the options specified as YARN_OPTS
[06/19] ambari git commit: AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach)
AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c579388e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c579388e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c579388e Branch: refs/heads/2.2.1-maint Commit: c579388e64aa32ea4b3df1126ebd7beb1759c1cb Parents: 81c58bb Author: Andrii TkachAuthored: Wed Jan 27 17:40:21 2016 +0200 Committer: Yusaku Sako Committed: Thu Feb 4 11:36:39 2016 -0800 -- .../app/views/common/quick_view_link_view.js | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c579388e/ambari-web/app/views/common/quick_view_link_view.js -- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index 7825c09..ece034c 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -228,6 +228,9 @@ App.QuickViewLinks = Em.View.extend({ } if (item.get('service_id')==='OOZIE') { newItem.url = item.get('template').fmt(protocol, host.publicHostName, port, App.router.get('loginName')); +} else if (item.get('service_id')==='MAPREDUCE2') { + var hostPortConfigValue = "%@:%@".fmt(host.publicHostName, port); + newItem.url = item.get('template').fmt(protocol, hostPortConfigValue); } else { newItem.url = item.get('template').fmt(protocol, host.publicHostName, port); } @@ -259,10 +262,11 @@ App.QuickViewLinks = Em.View.extend({ return [App.get('singleNodeAlias')]; } var hosts = []; +var components; switch (serviceName) { case 'OOZIE': // active OOZIE components -var components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus', 'STARTED'); +components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus', 'STARTED'); if (components && components.length > 1) { components.forEach(function (component) { hosts.push({ @@ -361,6 +365,18 @@ App.QuickViewLinks = Em.View.extend({ case "ATLAS": hosts[0] = this.findComponentHost(response.items, "ATLAS_SERVER"); break; + case "MAPREDUCE2": +components = this.get('content.hostComponents').filterProperty('componentName', 'HISTORYSERVER'); +if (components && components.length > 1) { + components.forEach(function (component) { +hosts.push({ + 'publicHostName': response.items.findProperty('Hosts.host_name', component.get('hostName')).Hosts.public_host_name +}); + }); +} else if (components && components.length === 1) { + hosts[0] = this.findComponentHost(response.items, 'HISTORYSERVER'); +} +break; default: var service = App.StackService.find().findProperty('serviceName', serviceName); if (service && service.get('hasMaster')) {
[14/19] ambari git commit: AMBARI-382. Ambari Kafka alerts not respecting broker port configured in Ambari.(vbrodetskyi)
AMBARI-382. Ambari Kafka alerts not respecting broker port configured in Ambari.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6893b5a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6893b5a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6893b5a8 Branch: refs/heads/2.2.1-maint Commit: 6893b5a8b12a1f71815c66d3b6f462e9e2e119c3 Parents: abd26b2 Author: Vitaly BrodetskyiAuthored: Fri Feb 12 03:15:24 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Feb 12 03:15:24 2016 +0200 -- .../python/ambari_agent/alerts/port_alert.py| 2 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6893b5a8/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index 848da65..92d28ad 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -102,7 +102,7 @@ class PortAlert(BaseAlert): host = BaseAlert.get_host_from_url(uri_value) -if host is None: +if host is None or host == "localhost" or host == "0.0.0.0": host = self.host_name try: http://git-wip-us.apache.org/repos/asf/ambari/blob/6893b5a8/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json new file mode 100644 index 000..04fb583 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json @@ -0,0 +1,32 @@ +{ + "KAFKA": { +"service": [], +"KAFKA_BROKER": [ + { +"name": "kafka_broker_process", +"label": "Kafka Broker Process", +"description": "This host-level alert is triggered if the Kafka Broker cannot be determined to be up.", +"interval": 1, +"scope": "HOST", +"source": { + "type": "PORT", + "uri": "{{kafka-broker/listeners}}", + "default_port": 6667, + "reporting": { +"ok": { + "text": "TCP OK - {0:.3f}s response on port {1}" +}, +"warning": { + "text": "TCP OK - {0:.3f}s response on port {1}", + "value": 1.5 +}, +"critical": { + "text": "Connection failed: {0} to {1}:{2}", + "value": 5.0 +} + } +} + } +] + } +}
[08/19] ambari git commit: AMBARI-14745. Ambari server throws error when unused configs are present in blueprint. (Oliver Szabo via rnettleton)
AMBARI-14745. Ambari server throws error when unused configs are present in blueprint. (Oliver Szabo via rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/88dab3b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/88dab3b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/88dab3b4 Branch: refs/heads/2.2.1-maint Commit: 88dab3b48e8067613e12a1972742d820eb7b48ed Parents: 4c31108 Author: Bob NettletonAuthored: Fri Feb 5 11:44:23 2016 -0500 Committer: Bob Nettleton Committed: Fri Feb 5 11:44:23 2016 -0500 -- .../topology/ClusterConfigurationRequest.java | 28 .../ambari/server/topology/Configuration.java | 15 .../ClusterConfigurationRequestTest.java| 75 +--- .../ClusterInstallWithoutStartTest.java | 2 + .../server/topology/ConfigurationTest.java | 14 .../server/topology/TopologyManagerTest.java| 2 + 6 files changed, 128 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/88dab3b4/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java index 464aee7..a995a3b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java @@ -30,6 +30,7 @@ import org.apache.ambari.server.serveraction.kerberos.KerberosInvalidConfigurati import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.SecurityType; import org.apache.ambari.server.utils.StageUtils; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -74,11 +75,38 @@ public class ClusterConfigurationRequest { // set initial configuration (not topology resolved) this.configurationProcessor = new BlueprintConfigurationProcessor(clusterTopology); this.stackAdvisorBlueprintProcessor = stackAdvisorBlueprintProcessor; +removeOrphanConfigTypes(clusterTopology); if (setInitial) { setConfigurationsOnCluster(clusterTopology, TopologyManager.INITIAL_CONFIG_TAG, Collections.emptySet()); } } + /** + * Remove config-types, if there is no any services related to them (except cluster-env and global). + */ + private void removeOrphanConfigTypes(ClusterTopology clusterTopology) { +Configuration configuration = clusterTopology.getConfiguration(); +Collection configTypes = configuration.getAllConfigTypes(); +for (String configType : configTypes) { + if (!configType.equals("cluster-env") && !configType.equals("global")) { +String service = clusterTopology.getBlueprint().getStack().getServiceForConfigType(configType); +if (!clusterTopology.getBlueprint().getServices().contains(service)) { + configuration.removeConfigType(configType); + LOG.info("Not found any service for config type '{}'. It will be removed from configuration.", configType); + Map hostGroupInfoMap = clusterTopology.getHostGroupInfo(); + if (MapUtils.isNotEmpty(hostGroupInfoMap)) { +for (Map.Entry hostGroupInfo : hostGroupInfoMap.entrySet()) { + if (hostGroupInfo.getValue().getConfiguration() != null) { + hostGroupInfo.getValue().getConfiguration().removeConfigType(configType); +LOG.info("Not found any service for config type '{}'. It will be removed from host group scoped configuration.", configType); + } +} + } +} + } +} + } + public ClusterConfigurationRequest(AmbariContext ambariContext, ClusterTopology topology, boolean setInitial, StackAdvisorBlueprintProcessor stackAdvisorBlueprintProcessor, boolean configureSecurity) { this(ambariContext, topology, setInitial, stackAdvisorBlueprintProcessor); this.configureSecurity = configureSecurity; http://git-wip-us.apache.org/repos/asf/ambari/blob/88dab3b4/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java index 108ff74..79281b4
ambari git commit: AMBARI-15030 : Fix unreasonable default heap settings for AMS HBase heapsize and xmn size (avijayan)
Repository: ambari Updated Branches: refs/heads/branch-2.2 63ece7fe0 -> 28214b2da AMBARI-15030 : Fix unreasonable default heap settings for AMS HBase heapsize and xmn size (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28214b2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28214b2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28214b2d Branch: refs/heads/branch-2.2 Commit: 28214b2da28b83c97d8d675073f319e547c8c358 Parents: 63ece7f Author: Aravindan VijayanAuthored: Fri Feb 12 10:26:21 2016 -0800 Committer: Aravindan Vijayan Committed: Fri Feb 12 10:48:21 2016 -0800 -- .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml | 6 +++--- .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py | 2 ++ .../src/test/python/stacks/2.2/common/test_stack_advisor.py| 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/28214b2d/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml index 5a9bcdd..6d78c14 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml @@ -41,7 +41,7 @@ hbase_regionserver_heapsize -512 +756 HBase RegionServer Heap Size. In embedded mode, total heap size is sum of master and regionserver heap sizes. @@ -63,7 +63,7 @@ regionserver_xmn_size -256 +128 HBase RegionServer maximum value for young generation heap size. int @@ -78,7 +78,7 @@ hbase_master_xmn_size -256 +102 HBase Master maximum value for young generation heap size. http://git-wip-us.apache.org/repos/asf/ambari/blob/28214b2d/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 2c1e394..d19e9a1 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 @@ -572,6 +572,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): # Distributed mode heap size if operatingMode == "distributed": + hbase_heapsize = max(hbase_heapsize, 756) putHbaseEnvProperty("hbase_master_heapsize", "512") putHbaseEnvProperty("hbase_master_xmn_size", "102") #20% of 512 heap size putHbaseEnvProperty("hbase_regionserver_heapsize", hbase_heapsize) @@ -579,6 +580,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): else: # Embedded mode heap size : master + regionserver hbase_rs_heapsize = 512 + putHbaseEnvProperty("hbase_regionserver_heapsize", hbase_rs_heapsize) putHbaseEnvProperty("hbase_master_heapsize", hbase_heapsize) putHbaseEnvProperty("hbase_master_xmn_size", round_to_n(0.15*(hbase_heapsize+hbase_rs_heapsize),64)) http://git-wip-us.apache.org/repos/asf/ambari/blob/28214b2d/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index 6984e0e..982ba4f 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -1986,7 +1986,8 @@ class TestHDP22StackAdvisor(TestCase): "ams-hbase-env": { "properties": { "hbase_master_xmn_size": "128", - "hbase_master_heapsize": "512" + "hbase_master_heapsize": "512", + "hbase_regionserver_heapsize": "512" } }, "ams-env": {
ambari git commit: AMBARI-15030 : Fix unreasonable default heap settings for AMS HBase heapsize and xmn size (avijayan)
Repository: ambari Updated Branches: refs/heads/trunk f7055ae76 -> aac5389fe AMBARI-15030 : Fix unreasonable default heap settings for AMS HBase heapsize and xmn size (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aac5389f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aac5389f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aac5389f Branch: refs/heads/trunk Commit: aac5389fea7867141a3f4f421b2bc0d1e61117f3 Parents: f7055ae Author: Aravindan VijayanAuthored: Fri Feb 12 10:24:44 2016 -0800 Committer: Aravindan Vijayan Committed: Fri Feb 12 10:49:22 2016 -0800 -- .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml | 6 +++--- .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py | 2 ++ .../src/test/python/stacks/2.2/common/test_stack_advisor.py| 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aac5389f/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml index 191e8b2..90e1307 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml @@ -47,7 +47,7 @@ hbase_regionserver_heapsize -512 +756 HBase RegionServer Heap Size. In embedded mode, total heap size is sum of master and regionserver heap sizes. @@ -69,7 +69,7 @@ regionserver_xmn_size -256 +128 HBase RegionServer maximum value for young generation heap size. int @@ -84,7 +84,7 @@ hbase_master_xmn_size -256 +102 HBase Master maximum value for young generation heap size. http://git-wip-us.apache.org/repos/asf/ambari/blob/aac5389f/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 af21008..7c69ac9 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 @@ -595,6 +595,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): # Distributed mode heap size if operatingMode == "distributed": + hbase_heapsize = max(hbase_heapsize, 756) putHbaseEnvProperty("hbase_master_heapsize", "512") putHbaseEnvProperty("hbase_master_xmn_size", "102") #20% of 512 heap size putHbaseEnvProperty("hbase_regionserver_heapsize", hbase_heapsize) @@ -602,6 +603,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): else: # Embedded mode heap size : master + regionserver hbase_rs_heapsize = 512 + putHbaseEnvProperty("hbase_regionserver_heapsize", hbase_rs_heapsize) putHbaseEnvProperty("hbase_master_heapsize", hbase_heapsize) putHbaseEnvProperty("hbase_master_xmn_size", round_to_n(0.15*(hbase_heapsize+hbase_rs_heapsize),64)) http://git-wip-us.apache.org/repos/asf/ambari/blob/aac5389f/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index d2497fd..14a28d3 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -2025,7 +2025,8 @@ class TestHDP22StackAdvisor(TestCase): "ams-hbase-env": { "properties": { "hbase_master_xmn_size": "128", - "hbase_master_heapsize": "512" + "hbase_master_heapsize": "512", + "hbase_regionserver_heapsize": "512" } }, "ams-env": {
[1/2] ambari git commit: Revert "AMBARI-15014 Incorrect #of required properties at Ranger Customize Services page (Next button not enabled). (ababiichuk)"
Repository: ambari Updated Branches: refs/heads/branch-2.2 9adcea949 -> d564f86d7 Revert "AMBARI-15014 Incorrect #of required properties at Ranger Customize Services page (Next button not enabled). (ababiichuk)" This reverts commit d3d66f2549a16cd1aab17af3e4a7fe033626ca79. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1d7b80c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1d7b80c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1d7b80c Branch: refs/heads/branch-2.2 Commit: a1d7b80ca58bbc924616ce891d7c25d9c62f1312 Parents: 9adcea9 Author: Jaimin JetlyAuthored: Sat Feb 13 12:20:31 2016 +0530 Committer: Jaimin Jetly Committed: Sat Feb 13 12:20:31 2016 +0530 -- .../app/controllers/wizard/step7_controller.js | 5 ++- ambari-web/app/mixins/common/serverValidator.js | 2 +- .../models/configs/objects/service_config.js| 4 +- .../configs/objects/service_config_property.js | 6 +++ .../app/models/configs/theme/sub_section.js | 4 +- .../app/models/configs/theme/sub_section_tab.js | 4 +- .../config_recommendation_popup.hbs | 46 ++-- .../configs/widgets/config_widget_view.js | 5 ++- ambari-web/test/models/configs/section_test.js | 7 +++ 9 files changed, 54 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1d7b80c/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index aff70ca..148a9a2 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -688,7 +688,10 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E themeResource.get('configProperties').forEach(function (_config) { configs.forEach(function (item) { if (item.name === _config.get('name') && item.filename === _config.get('fileName')) { -item.isVisible = valueAttributes['visible']; +// if config has already been hidden by condition with "subsection" or "subsectionTab" type +// then ignore condition of "config" type +if (configCondition.get('type') === 'config' && item.hiddenBySection) return false; +item.hiddenBySection = !valueAttributes['visible']; } }); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/a1d7b80c/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 1ea9c59..ebb68ad 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -399,7 +399,7 @@ App.ServerValidatorMixin = Em.Mixin.create({ : self.get('stepConfigs'); var configsWithErrors = stepConfigs.some(function (step) { return step.get('configs').some(function(c) { - return c.get('isVisible') && (c.get('warn') || c.get('error')); + return c.get('isVisible') && !c.get('hiddenBySection') && (c.get('warn') || c.get('error')); }) }); if (configsWithErrors) { http://git-wip-us.apache.org/repos/asf/ambari/blob/a1d7b80c/ambari-web/app/models/configs/objects/service_config.js -- diff --git a/ambari-web/app/models/configs/objects/service_config.js b/ambari-web/app/models/configs/objects/service_config.js index d8677d1..71b05e6 100644 --- a/ambari-web/app/models/configs/objects/service_config.js +++ b/ambari-web/app/models/configs/objects/service_config.js @@ -61,7 +61,7 @@ App.ServiceConfig = Ember.Object.extend({ category.incrementProperty('nonSlaveErrorCount'); masterErrors++; } - if (!item.get('isValid') && item.get('widgetType') && item.get('isVisible')) { + if (!item.get('isValid') && item.get('widgetType') && item.get('isVisible') && !item.get('hiddenBySection')) { enhancedConfigsErrors++; } if (item.get('overrides')) { @@ -76,7 +76,7 @@ App.ServiceConfig = Ember.Object.extend({ } }); return masterErrors + slaveErrors + overrideErrors + enhancedConfigsErrors; - }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configCategories.@each.slaveErrorCount', 'configs.@each.overrideErrorTrigger'), + }.property('configs.@each.isValid',
[2/2] ambari git commit: Revert "AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)"
Revert "AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)" This reverts commit 7eed58d39cbb6f2800c9e96a27e90edc433c726d. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d564f86d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d564f86d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d564f86d Branch: refs/heads/branch-2.2 Commit: d564f86d794fa2ffee14b8f980d20b32f79d7aed Parents: a1d7b80 Author: Jaimin JetlyAuthored: Sat Feb 13 12:41:46 2016 +0530 Committer: Jaimin Jetly Committed: Sat Feb 13 12:41:46 2016 +0530 -- .../services/RANGER/themes/theme_version_2.json | 20 +--- .../configs/widgets/config_widget_view.js | 3 --- 2 files changed, 1 insertion(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d564f86d/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json index cbd27e4..59e58a4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json @@ -940,25 +940,7 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2", - "depends-on": [ -{ - "configs":[ -"ranger-env/xasecure.audit.destination.db" - ], - "if": "${ranger-env/xasecure.audit.destination.db}", - "then": { -"property_value_attributes": { - "visible": true -} - }, - "else": { -"property_value_attributes": { - "visible": false -} - } -} - ] + "subsection-name": "subsection-ranger-audit-db-row2-col2" }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/d564f86d/ambari-web/app/views/common/configs/widgets/config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js index a0515e6..f0499db 100644 --- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js @@ -442,9 +442,6 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo var conditionalConfig = serviceConfigs.filterProperty('filename',conditionalConfigFileName).findProperty('name', conditionalConfigName); if (conditionalConfig) { conditionalConfig.set(valueAttribute, valueAttributes[key]); - if (valueAttribute === 'isVisible') { -conditionalConfig.set('hiddenBySection', !valueAttributes[key]); - } } } }
[1/2] ambari git commit: Revert "AMBARI-15014 Incorrect #of required properties at Ranger Customize Services page (Next button not enabled). (ababiichuk)"
Repository: ambari Updated Branches: refs/heads/trunk 9e5dd9f89 -> 244474588 Revert "AMBARI-15014 Incorrect #of required properties at Ranger Customize Services page (Next button not enabled). (ababiichuk)" This reverts commit 2ca172d4ce7fa6e025ce512212b07eab25f38bcc. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1319763e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1319763e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1319763e Branch: refs/heads/trunk Commit: 1319763ec7aa4e436ce2ff30d138180d2a2194b1 Parents: 9e5dd9f Author: Jaimin JetlyAuthored: Sat Feb 13 13:04:29 2016 +0530 Committer: Jaimin Jetly Committed: Sat Feb 13 13:04:29 2016 +0530 -- .../app/controllers/wizard/step7_controller.js | 5 ++- ambari-web/app/mixins/common/serverValidator.js | 2 +- .../models/configs/objects/service_config.js| 6 ++- .../configs/objects/service_config_property.js | 6 +++ .../app/models/configs/theme/sub_section.js | 12 +++-- .../app/models/configs/theme/sub_section_tab.js | 6 ++- .../config_recommendation_popup.hbs | 46 ++-- .../configs/widgets/config_widget_view.js | 5 ++- .../configs/objects/service_config_test.js | 7 ++- 9 files changed, 64 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1319763e/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index ee37427..634c86b 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -680,7 +680,10 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E themeResource.get('configProperties').forEach(function (_configId) { configs.forEach(function (item) { if (App.config.configId(item.name, item.filename) === _configId) { -item.isVisible = valueAttributes['visible']; +// if config has already been hidden by condition with "subsection" or "subsectionTab" type +// then ignore condition of "config" type +if (configCondition.get('type') === 'config' && item.hiddenBySection) return false; +item.hiddenBySection = !valueAttributes['visible']; } }); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/1319763e/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 231c376..99a5921 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -301,7 +301,7 @@ App.ServerValidatorMixin = Em.Mixin.create({ : self.get('stepConfigs'); var configsWithErrors = stepConfigs.some(function (step) { return step.get('configs').some(function(c) { - return c.get('isVisible') && (c.get('warn') || c.get('error')); + return c.get('isVisible') && !c.get('hiddenBySection') && (c.get('warn') || c.get('error')); }) }); if (configsWithErrors) { http://git-wip-us.apache.org/repos/asf/ambari/blob/1319763e/ambari-web/app/models/configs/objects/service_config.js -- diff --git a/ambari-web/app/models/configs/objects/service_config.js b/ambari-web/app/models/configs/objects/service_config.js index c75486c..56b8aa4 100644 --- a/ambari-web/app/models/configs/objects/service_config.js +++ b/ambari-web/app/models/configs/objects/service_config.js @@ -38,7 +38,11 @@ App.ServiceConfig = Ember.Object.extend({ errorCount: Em.computed.alias('configsWithErrors.length'), - visibleProperties: Em.computed.filterBy('configs', 'isVisible', true), + visibleProperties: function() { +return this.get('configs').filter(function(c) { + return c.get('isVisible') && !c.get('hiddenBySection'); +}); + }.property('configs.@each.isVisible', 'configs.@each.hiddenBySection'), configsWithErrors: function() { return this.get('visibleProperties').filter(function(c) { http://git-wip-us.apache.org/repos/asf/ambari/blob/1319763e/ambari-web/app/models/configs/objects/service_config_property.js -- diff --git a/ambari-web/app/models/configs/objects/service_config_property.js
[2/2] ambari git commit: Revert "AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)"
Revert "AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)" This reverts commit 94932c99bb8ff5ad309c15c6a0ecf382f428c73b. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24447458 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24447458 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24447458 Branch: refs/heads/trunk Commit: 2444745889faed0ccf38c3696c8e91f7e32e4c5b Parents: 1319763 Author: Jaimin JetlyAuthored: Sat Feb 13 13:04:57 2016 +0530 Committer: Jaimin Jetly Committed: Sat Feb 13 13:04:57 2016 +0530 -- .../services/RANGER/themes/theme_version_2.json | 20 +--- .../configs/widgets/config_widget_view.js | 3 --- 2 files changed, 1 insertion(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/24447458/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json index cbd27e4..59e58a4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json @@ -940,25 +940,7 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2", - "depends-on": [ -{ - "configs":[ -"ranger-env/xasecure.audit.destination.db" - ], - "if": "${ranger-env/xasecure.audit.destination.db}", - "then": { -"property_value_attributes": { - "visible": true -} - }, - "else": { -"property_value_attributes": { - "visible": false -} - } -} - ] + "subsection-name": "subsection-ranger-audit-db-row2-col2" }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/24447458/ambari-web/app/views/common/configs/widgets/config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js index e9eaed2..9858b75 100644 --- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js @@ -434,9 +434,6 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo var conditionalConfig = serviceConfigs.filterProperty('filename',conditionalConfigFileName).findProperty('name', conditionalConfigName); if (conditionalConfig) { conditionalConfig.set(valueAttribute, valueAttributes[key]); - if (valueAttribute === 'isVisible') { -conditionalConfig.set('hiddenBySection', !valueAttributes[key]); - } } } }
[ambari] Git Push Summary
Repository: ambari Updated Branches: refs/heads/AMBARI-13364 [created] aac5389fe
ambari git commit: AMBARI-15031. Duplicate key violation during ldap sync (Oliver Szabo via rlevas)
Repository: ambari Updated Branches: refs/heads/trunk ed55354ab -> e18755393 AMBARI-15031. Duplicate key violation during ldap sync (Oliver Szabo via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1875539 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1875539 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1875539 Branch: refs/heads/trunk Commit: e18755393326d10564f7d68c2d025572fed25d63 Parents: ed55354 Author: Oliver SzaboAuthored: Fri Feb 12 16:26:31 2016 -0500 Committer: Robert Levas Committed: Fri Feb 12 16:26:35 2016 -0500 -- .../ambari/server/security/ldap/AmbariLdapDataPopulator.java| 5 - .../org/apache/ambari/server/security/ldap/LdapBatchDto.java| 5 + .../server/security/ldap/AmbariLdapDataPopulatorTest.java | 4 3 files changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1875539/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java index 21492cf..801e43e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java @@ -485,8 +485,11 @@ public class AmbariLdapDataPopulator { batchInfo.getGroupsToBecomeLdap().add(groupName); } internalGroupsMap.remove(groupName); + batchInfo.getGroupsProcessedInternal().add(groupName); } else { - batchInfo.getGroupsToBeCreated().add(groupName); + if (!batchInfo.getGroupsProcessedInternal().contains(groupName)) { +batchInfo.getGroupsToBeCreated().add(groupName); + } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/e1875539/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java index 9247f38..bb9c5ee 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java @@ -27,6 +27,7 @@ public class LdapBatchDto { private final Set groupsToBecomeLdap = new HashSet(); private final Set groupsToBeCreated = new HashSet(); private final Set groupsToBeRemoved = new HashSet(); + private final Set groupsProcessedInternal = new HashSet<>(); private final Set usersToBecomeLdap = new HashSet(); private final Set usersToBeCreated = new HashSet(); private final Set usersToBeRemoved = new HashSet(); @@ -64,4 +65,8 @@ public class LdapBatchDto { public Set getUsersToBeRemoved() { return usersToBeRemoved; } + + public Set getGroupsProcessedInternal() { +return groupsProcessedInternal; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/e1875539/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java index be92871..8ce6c5b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java @@ -348,6 +348,10 @@ public class AmbariLdapDataPopulatorTest { assertTrue(result.getMembershipToRemove().isEmpty()); assertTrue(result.getUsersToBecomeLdap().isEmpty()); assertTrue(result.getUsersToBeRemoved().isEmpty()); +assertTrue(result.getGroupsProcessedInternal().contains("group1")); +assertTrue(result.getGroupsProcessedInternal().contains("group2")); +assertTrue(!result.getGroupsProcessedInternal().contains("xgroup1")); +assertTrue(!result.getGroupsProcessedInternal().contains("xgroup2")); verify(populator.loadLdapTemplate(), populator); }
ambari git commit: AMBARI-15027 Sometimes Yarn graphs, Heatmaps take longer to load. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk aac5389fe -> ed55354ab AMBARI-15027 Sometimes Yarn graphs,Heatmaps take longer to load. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ed55354a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed55354a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed55354a Branch: refs/heads/trunk Commit: ed55354abaa8bf53ad0c1fda0d935976baf4c53d Parents: aac5389 Author: Andrii TkachAuthored: Fri Feb 12 16:11:18 2016 +0200 Committer: Andrii Tkach Committed: Fri Feb 12 22:38:32 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 29 .../views/common/widget/graph_widget_view.js| 18 +++- .../test/mixins/common/widget_mixin_test.js | 2 +- 3 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ed55354a/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index b6fe353..6d65c33 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -204,7 +204,9 @@ App.WidgetMixin = Ember.Mixin.create({ }, /** - * aggregate all metric names in the query. Add time range and step to temporal queries + * aggregate all metric names in the query. Add time range and step to temporal queries + * @param {Array} metricPaths + * @returns {string} */ prepareMetricPaths: function(metricPaths) { var temporalMetrics = metricPaths.filterProperty('metric_type', 'TEMPORAL'); @@ -225,15 +227,20 @@ App.WidgetMixin = Ember.Mixin.create({ * @returns {$.ajax} */ getHostComponentMetrics: function (request) { -return App.ajax.send({ - name: 'widgets.hostComponent.metrics.get', - sender: this, - data: { -componentName: request.component_name, -metricPaths: this.prepareMetricPaths(request.metric_paths), -hostComponentCriteria: this.computeHostComponentCriteria(request) - } -}); +var metricPaths = this.prepareMetricPaths(request.metric_paths); + +if (metricPaths.length) { + return App.ajax.send({ +name: 'widgets.hostComponent.metrics.get', +sender: this, +data: { + componentName: request.component_name, + metricPaths: this.prepareMetricPaths(request.metric_paths), + hostComponentCriteria: this.computeHostComponentCriteria(request) +} + }); +} +return jQuery.Deferred().reject().promise(); }, getHostComponentMetricsSuccessCallback: function (data) { @@ -771,7 +778,7 @@ App.WidgetLoadAggregator = Em.Object.create({ subRequest.errorCallback.call(subRequest.context, xhr, textStatus, errorThrown); } }, this); - }).complete(function () { + }).always(function () { _request.subRequests.forEach(function (subRequest) { subRequest.completeCallback.call(subRequest.context); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/ed55354a/ambari-web/app/views/common/widget/graph_widget_view.js -- diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index 6feaa28..30eb658 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -211,13 +211,17 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { step = this.get('timeStep'), timeRange = this.get('timeRange'), result = [], - targetView = this.get('exportTargetView.isPopup') ? this.get('exportTargetView') : this.get('parentView'), - customStartTime = targetView.get('customStartTime'), - customEndTime = targetView.get('customEndTime'); -if (timeRange === 0 && !Em.isNone(customStartTime) && !Em.isNone(customEndTime)) { - // Custom start and end time is specified by user - toSeconds = customEndTime / 1000; - fromSeconds = customStartTime / 1000; + targetView = this.get('exportTargetView.isPopup') ? this.get('exportTargetView') : this.get('parentView'); + +//if view destroyed then no metrics should be asked +if (Em.isNone(targetView)) return result; + +if (timeRange === 0 && + !Em.isNone(targetView.get('customStartTime')) && + !Em.isNone(targetView.get('customEndTime'))) { + // Custom start/end time is
[ambari] Git Push Summary
Repository: ambari Updated Branches: refs/heads/AMBARI-13364 [deleted] 08227a64e
ambari git commit: AMBARI-15031. Duplicate key violation during ldap sync (Oliver Szabo via rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.2 9790191a7 -> 289fc18bf AMBARI-15031. Duplicate key violation during ldap sync (Oliver Szabo via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/289fc18b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/289fc18b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/289fc18b Branch: refs/heads/branch-2.2 Commit: 289fc18bf436c8a1396d75ed078259474b02c3cb Parents: 9790191 Author: Oliver SzaboAuthored: Fri Feb 12 17:21:41 2016 -0500 Committer: Robert Levas Committed: Fri Feb 12 17:21:41 2016 -0500 -- .../ambari/server/security/ldap/AmbariLdapDataPopulator.java| 5 - .../org/apache/ambari/server/security/ldap/LdapBatchDto.java| 5 + .../server/security/ldap/AmbariLdapDataPopulatorTest.java | 4 3 files changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/289fc18b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java index 21492cf..801e43e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java @@ -485,8 +485,11 @@ public class AmbariLdapDataPopulator { batchInfo.getGroupsToBecomeLdap().add(groupName); } internalGroupsMap.remove(groupName); + batchInfo.getGroupsProcessedInternal().add(groupName); } else { - batchInfo.getGroupsToBeCreated().add(groupName); + if (!batchInfo.getGroupsProcessedInternal().contains(groupName)) { +batchInfo.getGroupsToBeCreated().add(groupName); + } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/289fc18b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java index 9247f38..bb9c5ee 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/LdapBatchDto.java @@ -27,6 +27,7 @@ public class LdapBatchDto { private final Set groupsToBecomeLdap = new HashSet(); private final Set groupsToBeCreated = new HashSet(); private final Set groupsToBeRemoved = new HashSet(); + private final Set groupsProcessedInternal = new HashSet<>(); private final Set usersToBecomeLdap = new HashSet(); private final Set usersToBeCreated = new HashSet(); private final Set usersToBeRemoved = new HashSet(); @@ -64,4 +65,8 @@ public class LdapBatchDto { public Set getUsersToBeRemoved() { return usersToBeRemoved; } + + public Set getGroupsProcessedInternal() { +return groupsProcessedInternal; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/289fc18b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java index be92871..8ce6c5b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java @@ -348,6 +348,10 @@ public class AmbariLdapDataPopulatorTest { assertTrue(result.getMembershipToRemove().isEmpty()); assertTrue(result.getUsersToBecomeLdap().isEmpty()); assertTrue(result.getUsersToBeRemoved().isEmpty()); +assertTrue(result.getGroupsProcessedInternal().contains("group1")); +assertTrue(result.getGroupsProcessedInternal().contains("group2")); +assertTrue(!result.getGroupsProcessedInternal().contains("xgroup1")); +assertTrue(!result.getGroupsProcessedInternal().contains("xgroup2")); verify(populator.loadLdapTemplate(), populator); }
ambari git commit: AMBARI-15027 Sometimes Yarn graphs, Heatmaps take longer to load. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.2 28214b2da -> 9790191a7 AMBARI-15027 Sometimes Yarn graphs,Heatmaps take longer to load. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9790191a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9790191a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9790191a Branch: refs/heads/branch-2.2 Commit: 9790191a7624d315187c2606453556181223cc0e Parents: 28214b2 Author: Andrii TkachAuthored: Fri Feb 12 14:52:24 2016 +0200 Committer: Andrii Tkach Committed: Fri Feb 12 22:41:43 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 29 .../views/common/widget/graph_widget_view.js| 18 +++- .../test/mixins/common/widget_mixin_test.js | 2 +- 3 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9790191a/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index 6a2d287..eb2cf19 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -206,7 +206,9 @@ App.WidgetMixin = Ember.Mixin.create({ }, /** - * aggregate all metric names in the query. Add time range and step to temporal queries + * aggregate all metric names in the query. Add time range and step to temporal queries + * @param {Array} metricPaths + * @returns {string} */ prepareMetricPaths: function(metricPaths) { var temporalMetrics = metricPaths.filterProperty('metric_type', 'TEMPORAL'); @@ -227,15 +229,20 @@ App.WidgetMixin = Ember.Mixin.create({ * @returns {$.ajax} */ getHostComponentMetrics: function (request) { -return App.ajax.send({ - name: 'widgets.hostComponent.metrics.get', - sender: this, - data: { -componentName: request.component_name, -metricPaths: this.prepareMetricPaths(request.metric_paths), -hostComponentCriteria: this.computeHostComponentCriteria(request) - } -}); +var metricPaths = this.prepareMetricPaths(request.metric_paths); + +if (metricPaths.length) { + return App.ajax.send({ +name: 'widgets.hostComponent.metrics.get', +sender: this, +data: { + componentName: request.component_name, + metricPaths: this.prepareMetricPaths(request.metric_paths), + hostComponentCriteria: this.computeHostComponentCriteria(request) +} + }); +} +return jQuery.Deferred().reject().promise(); }, getHostComponentMetricsSuccessCallback: function (data) { @@ -775,7 +782,7 @@ App.WidgetLoadAggregator = Em.Object.create({ subRequest.errorCallback.call(subRequest.context, xhr, textStatus, errorThrown); } }, this); - }).complete(function () { + }).always(function () { _request.subRequests.forEach(function (subRequest) { subRequest.completeCallback.call(subRequest.context); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/9790191a/ambari-web/app/views/common/widget/graph_widget_view.js -- diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index 5887e58..2ab2706 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -213,13 +213,17 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { step = this.get('timeStep'), timeRange = this.get('timeRange'), result = [], - targetView = this.get('exportTargetView.isPopup') ? this.get('exportTargetView') : this.get('parentView'), - customStartTime = targetView.get('customStartTime'), - customEndTime = targetView.get('customEndTime'); -if (timeRange === 0 && !Em.isNone(customStartTime) && !Em.isNone(customEndTime)) { - // Custom start and end time is specified by user - toSeconds = customEndTime / 1000; - fromSeconds = customStartTime / 1000; + targetView = this.get('exportTargetView.isPopup') ? this.get('exportTargetView') : this.get('parentView'); + +//if view destroyed then no metrics should be asked +if (Em.isNone(targetView)) return result; + +if (timeRange === 0 && + !Em.isNone(targetView.get('customStartTime')) && + !Em.isNone(targetView.get('customEndTime'))) { + // Custom
ambari git commit: AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk e18755393 -> 9e5dd9f89 AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e5dd9f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e5dd9f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e5dd9f8 Branch: refs/heads/trunk Commit: 9e5dd9f8990956e1c9de650822d52d4fdddaba0a Parents: e187553 Author: Jun AokiAuthored: Fri Feb 12 18:15:15 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 12 18:15:15 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 37 +--- 1 file changed, 25 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9e5dd9f8/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 0693507..a2440a4 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1084,7 +1084,6 @@ App.AssignMasterComponents = Em.Mixin.create({ }else{ App.router.set('nextBtnClickInProgress', false); } -self.set('submitButtonClicked', false); }; if (this.get('useServerValidation')) { @@ -1094,6 +1093,7 @@ App.AssignMasterComponents = Em.Mixin.create({ } else { self.updateIsSubmitDisabled(); goNextStepIfValid(); +self.set('submitButtonClicked', false); } } }, @@ -1104,18 +1104,31 @@ App.AssignMasterComponents = Em.Mixin.create({ */ showValidationIssuesAcceptBox: function(callback) { var self = this; -if (self.get('anyWarning') || self.get('anyError')) { - App.ModalPopup.show({ -primary: Em.I18n.t('common.continueAnyway'), -header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), -body: Em.I18n.t('installer.step5.validationIssuesAttention'), -onPrimary: function () { - this.hide(); - callback(); -} - }); -} else { + +// If there are no warnings and no errors, return +if (!self.get('anyWarning') && !self.get('anyError')) { callback(); + self.set('submitButtonClicked', false); + return; } + +App.ModalPopup.show({ + primary: Em.I18n.t('common.continueAnyway'), + header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), + body: Em.I18n.t('installer.step5.validationIssuesAttention'), + onPrimary: function () { +this._super(); +callback(); +self.set('submitButtonClicked', false); + }, + onSecondary: function () { +this._super(); +self.set('submitButtonClicked', false); + }, + onClose: function () { +this._super(); +self.set('submitButtonClicked', false); + } +}); } });
ambari git commit: AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 289fc18bf -> 9adcea949 AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9adcea94 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9adcea94 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9adcea94 Branch: refs/heads/branch-2.2 Commit: 9adcea9495ea5eaee2665c64a61e815a095bb5bf Parents: 289fc18 Author: Jun AokiAuthored: Fri Feb 12 18:16:21 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 12 18:16:21 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 37 +--- 1 file changed, 25 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9adcea94/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 7dc267e..f6d1b1a 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1078,7 +1078,6 @@ App.AssignMasterComponents = Em.Mixin.create({ if (!self.get('submitDisabled')) { App.router.send('next'); } -self.set('submitButtonClicked', false); }; if (this.get('useServerValidation')) { @@ -1088,6 +1087,7 @@ App.AssignMasterComponents = Em.Mixin.create({ } else { self.updateIsSubmitDisabled(); goNextStepIfValid(); +self.set('submitButtonClicked', false); } } }, @@ -1098,18 +1098,31 @@ App.AssignMasterComponents = Em.Mixin.create({ */ showValidationIssuesAcceptBox: function(callback) { var self = this; -if (self.get('anyWarning') || self.get('anyError')) { - App.ModalPopup.show({ -primary: Em.I18n.t('common.continueAnyway'), -header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), -body: Em.I18n.t('installer.step5.validationIssuesAttention'), -onPrimary: function () { - this.hide(); - callback(); -} - }); -} else { + +// If there are no warnings and no errors, return +if (!self.get('anyWarning') && !self.get('anyError')) { callback(); + self.set('submitButtonClicked', false); + return; } + +App.ModalPopup.show({ + primary: Em.I18n.t('common.continueAnyway'), + header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), + body: Em.I18n.t('installer.step5.validationIssuesAttention'), + onPrimary: function () { +this._super(); +callback(); +self.set('submitButtonClicked', false); + }, + onSecondary: function () { +this._super(); +self.set('submitButtonClicked', false); + }, + onClose: function () { +this._super(); +self.set('submitButtonClicked', false); + } +}); } });