[21/40] ambari git commit: AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki)
AMBARI-14913: Show HAWQ default_segment_num parameter in General section (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/3d7643b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d7643b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d7643b4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 3d7643b41c214dfc2bca4af2ab5dc37f27b8e652 Parents: 080991d Author: Jun AokiAuthored: Thu Feb 4 14:52:27 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 4 14:52:27 2016 -0800 -- ambari-web/app/data/HDP2.3/site_properties.js | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d7643b4/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js index fb79cd3..61cbe88 100644 --- a/ambari-web/app/data/HDP2.3/site_properties.js +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -333,6 +333,13 @@ hdp23properties.push({ "index": 8 }, { +"name": "default_segment_num", +"filename": "hawq-site.xml", +"category": "General", +"serviceName": "HAWQ", +"index": 9 + }, + { "name": "content", "serviceName": "HAWQ", "filename": "gpcheck-env.xml",
ambari git commit: AMBARI-14745. Ambari server throws error when unused configs are present in blueprint. (Oliver Szabo via rnettleton)
Repository: ambari Updated Branches: refs/heads/branch-2.2 d8920559e -> 7ea0744a5 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/7ea0744a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7ea0744a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7ea0744a Branch: refs/heads/branch-2.2 Commit: 7ea0744a5a701b5e593895af66bd39586bc255f3 Parents: d892055 Author: Bob NettletonAuthored: Fri Feb 5 11:32:13 2016 -0500 Committer: Bob Nettleton Committed: Fri Feb 5 11:32:13 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/7ea0744a/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/7ea0744a/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
[1/2] ambari git commit: AMBARI-14923. Log Search: Create Log File Search modal popup (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk cd35e806c -> b567ca441 AMBARI-14923. Log Search: Create Log File Search modal popup (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a2add5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a2add5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a2add5d Branch: refs/heads/trunk Commit: 3a2add5dcde4f1cb730253627b87683f3057c5c1 Parents: cd35e80 Author: Alex AntonenkoAuthored: Fri Feb 5 18:21:10 2016 +0200 Committer: Alex Antonenko Committed: Fri Feb 5 18:21:10 2016 +0200 -- ambari-web/app/assets/licenses/NOTICE.txt | 5 +- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/config.js| 3 +- ambari-web/app/messages.js | 9 +- ambari-web/app/mixins.js| 1 + .../app/mixins/common/infinite_scroll_mixin.js | 173 ambari-web/app/styles/log_file_search.less | 155 +++ .../app/templates/common/log_file_search.hbs| 109 ambari-web/app/views.js | 3 + .../app/views/common/form/datepicker_view.js| 37 +++ .../app/views/common/log_file_search_view.js| 272 +++ .../modal_popups/log_file_search_popup.js | 26 ++ .../views/common/log_file_search_view_test.js | 103 +++ .../vendor/scripts/bootstrap-contextmenu.js | 205 ++ 14 files changed, 1099 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/assets/licenses/NOTICE.txt -- diff --git a/ambari-web/app/assets/licenses/NOTICE.txt b/ambari-web/app/assets/licenses/NOTICE.txt index bc29209..c750a37 100644 --- a/ambari-web/app/assets/licenses/NOTICE.txt +++ b/ambari-web/app/assets/licenses/NOTICE.txt @@ -56,4 +56,7 @@ This product includes bootstrap-checkbox v.1.0.1 (https://github.com/montrezorro Copyright (C) 2014 Roberto Montresor (info [at] robertomontresor [*dot*] it) This product includes sticky-kit v.1.1.2 (https://github.com/leafo/sticky-kit - MIT License) -Copyright (C) 2015 Leaf Corcoran (leafot [at] gmail [*dot*] com) \ No newline at end of file +Copyright (C) 2015 Leaf Corcoran (leafot [at] gmail [*dot*] com) + +This product includes bootstrap-contextmenu v.0.3.3 (https://github.com/sydcanem/bootstrap-contextmenu - MIT License) +Copyright (C) 2015 James Santos http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/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 85c814d..e82a27e 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -288,6 +288,7 @@ var files = [ 'test/views/common/configs/widgets/time_interval_spinner_view_test', 'test/views/common/form/spinner_input_view_test', 'test/views/common/form/manage_kdc_credentials_form_test', + 'test/views/common/log_file_search_view_test', 'test/views/wizard/step3/hostLogPopupBody_view_test', 'test/views/wizard/step3/hostWarningPopupBody_view_test', 'test/views/wizard/step3/hostWarningPopupFooter_view_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/config.js -- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index 0beafb3..7d727d7 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -80,7 +80,8 @@ App.supports = { storeKDCCredentials: true, preInstallChecks: false, hostComboSearchBox: false, - serviceAutoStart: false + serviceAutoStart: false, + logSearch: false }; if (App.enableExperimental) { http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index f24876b..8d1f6f1 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -305,6 +305,13 @@ Em.I18n.translations = { 'common.openNewWindow': 'Open in New Window', 'common.fullLogPopup.clickToCopy': 'Click to Copy', 'common.nothingToDelete': 'Nothing to delete', + 'common.exclude': 'Exclude', + 'common.include': 'Include', + 'common.exclude.short': 'Excl', + 'common.include.short': 'Incl', + 'common.filters': 'Filters', + 'common.keywords': 'Keywods', + 'common.levels': 'Levels', 'models.alert_instance.tiggered.verbose': "Occurred on {0} Checked on {1}", 'models.alert_definition.triggered.verbose':
[2/2] ambari git commit: AMBARI-14927. Log Search: Add Host Components Logs tab to Host Details page (alexantonenko)
AMBARI-14927. Log Search: Add Host Components Logs tab to Host Details page (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b567ca44 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b567ca44 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b567ca44 Branch: refs/heads/trunk Commit: b567ca441c213c816019dc5a45884f69a286f54c Parents: 3a2add5 Author: Alex AntonenkoAuthored: Fri Feb 5 18:30:24 2016 +0200 Committer: Alex Antonenko Committed: Fri Feb 5 18:30:24 2016 +0200 -- .../app/controllers/global/update_controller.js | 4 +- ambari-web/app/messages.js | 3 + ambari-web/app/routes/main.js | 11 ++ ambari-web/app/styles/application.less | 3 +- ambari-web/app/templates/main/host/logs.hbs | 62 ambari-web/app/views.js | 1 + ambari-web/app/views/main/host/logs_view.js | 147 +++ ambari-web/app/views/main/host/menu.js | 11 +- ambari-web/test/views/main/host/menu_test.js| 20 ++- 9 files changed, 257 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/controllers/global/update_controller.js -- diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js index 0a5d913..0168398 100644 --- a/ambari-web/app/controllers/global/update_controller.js +++ b/ambari-web/app/controllers/global/update_controller.js @@ -223,7 +223,7 @@ App.UpdateController = Em.Controller.extend({ } else { if (App.router.get('currentState.parentState.name') == 'hostDetails') { -hostDetailsFilter = App.router.get('location.lastSetURL').match(/\/hosts\/(.*)\/(summary|configs|alerts|stackVersions)/)[1]; +hostDetailsFilter = App.router.get('location.lastSetURL').match(/\/hosts\/(.*)\/(summary|configs|alerts|stackVersions|logs)/)[1]; App.updater.updateInterval('updateHost', App.get('componentsUpdateInterval')); //if host details page opened then request info only of one displayed host this.get('queryParams').set('Hosts', [ @@ -579,7 +579,7 @@ App.UpdateController = Em.Controller.extend({ complete: callback }); }, - + updateUpgradeState: function (callback) { var currentStateName = App.get('router.currentState.name'), parentStateName = App.get('router.currentState.parentState.name'), http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8d1f6f1..a8b5db6 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -312,6 +312,7 @@ Em.I18n.translations = { 'common.filters': 'Filters', 'common.keywords': 'Keywods', 'common.levels': 'Levels', + 'common.extension': 'Extension', 'models.alert_instance.tiggered.verbose': "Occurred on {0} Checked on {1}", 'models.alert_definition.triggered.verbose': "Occurred on {0}", @@ -2280,6 +2281,8 @@ Em.I18n.translations = { 'hosts.host.serviceNotAvailable': 'Service not available on this host', + 'hosts.host.menu.logs': 'Logs', + 'hosts.host.menu.stackVersions': 'Versions', 'hosts.host.stackVersions.table.allVersions': 'All Versions', 'hosts.host.stackVersions.table.allNames': 'All Names', http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/routes/main.js -- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index bd66945..cbaf34d 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -264,6 +264,17 @@ module.exports = Em.Route.extend(App.RouterRedirections, { } }), + logs: Em.Route.extend({ +route: '/logs', +connectOutlets: function (router, context) { + if (App.get('supports.logSearch')) { + router.get('mainHostDetailsController').connectOutlet('mainHostLogs') + } else { +router.transitionTo('summary'); + } +} + }), + hostNavigate: function (router, event) { var parent = event.view._parentView; parent.deactivateChildViews(); http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index ce10a98..a1969db 100644 ---
ambari git commit: AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 83bef413c -> b02150a8e AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b02150a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b02150a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b02150a8 Branch: refs/heads/trunk Commit: b02150a8e1ad66128857370db005e00602a09eac Parents: 83bef41 Author: ababiichukAuthored: Fri Feb 5 17:00:51 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 17:01:30 2016 +0200 -- ambari-web/app/controllers/main/host/details.js | 39 +++- 1 file changed, 22 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b02150a8/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 251d7ab..a161342 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -1411,23 +1411,28 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow templateName: require('templates/main/host/details/installComponentPopup') }), onPrimary: function () { -this.hide(); - -App.ajax.send({ - name: 'common.host.host_component.update', - sender: self, - data: { -hostName: self.get('content.hostName'), -serviceName: component.get('service.serviceName'), -componentName: componentName, -component: component, -context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, -HostRoles: { - state: 'INSTALLED' -} - }, - success: 'installComponentSuccessCallback', - error: 'ajaxErrorCallback' +var _this = this; +App.get('router.mainAdminKerberosController').getSecurityType(function () { + App.get('router.mainAdminKerberosController').getKDCSessionState(function () { +_this.hide(); + +App.ajax.send({ + name: 'common.host.host_component.update', + sender: self, + data: { +hostName: self.get('content.hostName'), +serviceName: component.get('service.serviceName'), +componentName: componentName, +component: component, +context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, +HostRoles: { + state: 'INSTALLED' +} + }, + success: 'installComponentSuccessCallback', + error: 'ajaxErrorCallback' +}); + }) }); } });
ambari git commit: AMBARI-14745. Ambari server throws error when unused configs are present in blueprint. (Oliver Szabo via rnettleton)
Repository: ambari Updated Branches: refs/heads/trunk 1eb846c15 -> cd35e806c 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/cd35e806 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd35e806 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd35e806 Branch: refs/heads/trunk Commit: cd35e806c0cfd63056afea61d2168e74cf1c1ae8 Parents: 1eb846c Author: Bob NettletonAuthored: Fri Feb 5 11:07:51 2016 -0500 Committer: Bob Nettleton Committed: Fri Feb 5 11:08: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/cd35e806/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 70fa880..c9120de 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/cd35e806/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
ambari git commit: AMBARI-14892 Add Grafana as a component to AMS (avijayan)
Repository: ambari Updated Branches: refs/heads/branch-2.2 5b5ca9353 -> d8920559e AMBARI-14892 Add Grafana as a component to AMS (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d8920559 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d8920559 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d8920559 Branch: refs/heads/branch-2.2 Commit: d8920559e459c4457584540ab1308879df35d3a9 Parents: 5b5ca93 Author: Aravindan VijayanAuthored: Thu Feb 4 12:00:29 2016 -0800 Committer: Aravindan Vijayan Committed: Fri Feb 5 08:04:14 2016 -0800 -- .../conf/unix/ambari-metrics-grafana| 79 +++--- .../conf/unix/ams-grafana-env.sh| 9 - .../conf/unix/ams-grafana.ini | 10 +- .../timeline/AbstractMiniHBaseClusterTest.java | 1 + .../0.1.0/configuration/ams-grafana-env.xml | 59 .../0.1.0/configuration/ams-grafana-ini.xml | 282 +++ .../AMBARI_METRICS/0.1.0/metainfo.xml | 18 ++ .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 30 ++ .../0.1.0/package/scripts/metrics_collector.py | 2 +- .../0.1.0/package/scripts/metrics_grafana.py| 65 + .../0.1.0/package/scripts/metrics_monitor.py| 2 +- .../0.1.0/package/scripts/params.py | 9 + .../0.1.0/package/scripts/status.py | 4 + .../0.1.0/package/scripts/status_params.py | 1 + .../stacks/HDP/2.0.6/role_command_order.json| 4 +- .../AMBARI_METRICS/test_metrics_grafana.py | 75 + .../python/stacks/2.0.6/configs/default.json| 9 + 17 files changed, 607 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d8920559/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana -- diff --git a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana index 1de5401..29851d2 100644 --- a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana +++ b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana @@ -18,7 +18,7 @@ # description: Grafana web server & backend # processname: grafana # config: /etc/grafana/ams-grafana.ini -# pidfile: /var/run/grafana.pid +# pidfile: /var/run/ambari-metrics-grafana.pid ### BEGIN INIT INFO # Provides: grafana @@ -35,16 +35,18 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin NAME=grafana-server -DESC="Grafana Server" - -if [ -f "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" ]; then - . "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" +DESC="Ambari Metrics Grafana" +CONF_DIR=/etc/ambari-metrics-grafana/conf + +# execute ams-grafana-env.sh +if [[ -f "${CONF_DIR}/ams-grafana-env.sh" ]]; then +. "${CONF_DIR}/ams-grafana-env.sh" +else +echo "ERROR: Cannot execute ${CONF_DIR}/ams-grafana-env.sh." 2>&1 +exit 1 fi -GRAFANA_USER=${AMS_USER} -GRAFANA_GROUP=${AMS_USER_GROUP} GRAFANA_HOME=${AMS_GRAFANA_HOME_DIR} -CONF_DIR=${AMS_GRAFANA_CONF_DIR} WORK_DIR=$GRAFANA_HOME DATA_DIR=${AMS_GRAFANA_DATA_DIR} LOG_DIR=${AMS_GRAFANA_LOG_DIR} @@ -52,11 +54,13 @@ CONF_FILE=$CONF_DIR/ams-grafana.ini MAX_OPEN_FILES=1 PID_FILE=${AMS_GRAFANA_PID_DIR}/$NAME.pid DAEMON=$GRAFANA_HOME/bin/$NAME +OUT_FILE=${AMS_GRAFANA_LOG_DIR}/grafana.out +STOP_TIMEOUT=5 -if [ `id -u` -ne 0 ]; then - echo "You need root privileges to run this script" - exit 4 -fi +#if [ `id -u` -ne 0 ]; then +# echo "You need root privileges to run this script" +# exit 4 +#fi if [ ! -x $DAEMON ]; then echo "Program not installed or not executable" @@ -66,20 +70,20 @@ fi # # init.d / servicectl compatibility (openSUSE) # -if [ -f /etc/rc.status ]; then -. /etc/rc.status -rc_reset -fi +# if [ -f /etc/rc.status ]; then +#. /etc/rc.status +#rc_reset +# fi # # Source function library. # -if [ -f /etc/rc.d/init.d/functions ]; then -. /etc/rc.d/init.d/functions -fi +# if [ -f /etc/rc.d/init.d/functions ]; then +#. /etc/rc.d/init.d/functions +# fi # overwrite settings from default file -[ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME +# [ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME DAEMON_OPTS="--pidfile=${PID_FILE} --config=${CONF_FILE} cfg:default.paths.data=${DATA_DIR} cfg:default.paths.logs=${LOG_DIR}" @@ -98,16 +102,16 @@ case "$1" in fi # Prepare environment -mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR" "$DATA_DIR" -touch "$PID_FILE" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$PID_FILE" +# mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR"
ambari git commit: AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 47717d2aa -> 5b5ca9353 AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b5ca935 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b5ca935 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b5ca935 Branch: refs/heads/branch-2.2 Commit: 5b5ca93538cdf09006ff66007cd91c472d4e2890 Parents: 47717d2 Author: ababiichukAuthored: Fri Feb 5 17:00:51 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 17:05:31 2016 +0200 -- ambari-web/app/controllers/main/host/details.js | 39 +++- 1 file changed, 22 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5b5ca935/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 9b38db9..0be8868 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -1419,23 +1419,28 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow templateName: require('templates/main/host/details/installComponentPopup') }), onPrimary: function () { -this.hide(); - -App.ajax.send({ - name: 'common.host.host_component.update', - sender: self, - data: { -hostName: self.get('content.hostName'), -serviceName: component.get('service.serviceName'), -componentName: componentName, -component: component, -context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, -HostRoles: { - state: 'INSTALLED' -} - }, - success: 'installComponentSuccessCallback', - error: 'ajaxErrorCallback' +var _this = this; +App.get('router.mainAdminKerberosController').getSecurityType(function () { + App.get('router.mainAdminKerberosController').getKDCSessionState(function () { +_this.hide(); + +App.ajax.send({ + name: 'common.host.host_component.update', + sender: self, + data: { +hostName: self.get('content.hostName'), +serviceName: component.get('service.serviceName'), +componentName: componentName, +component: component, +context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, +HostRoles: { + state: 'INSTALLED' +} + }, + success: 'installComponentSuccessCallback', + error: 'ajaxErrorCallback' +}); + }) }); } });
ambari git commit: AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk 14d53f791 -> bb864df5d AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko) Conflicts: ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb864df5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb864df5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb864df5 Branch: refs/heads/trunk Commit: bb864df5da25093ff386433dd591898d713fd092 Parents: 14d53f7 Author: Lisnichenko DmitroAuthored: Fri Feb 5 19:52:57 2016 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 5 19:58:32 2016 +0200 -- .../ambari/server/agent/HeartbeatMonitor.java | 45 +++ .../ambari/server/checks/CheckDescription.java | 8 ++ .../HardcodedStackVersionPropertiesCheck.java | 132 +++ .../serveraction/upgrades/FixLzoCodecPath.java | 103 +++ .../upgrades/OozieConfigCalculation.java| 94 + .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 3 + .../OOZIE/4.2.0.2.3/configuration/oozie-env.xml | 3 + .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 12 ++ .../services/OOZIE/configuration/oozie-env.xml | 3 + .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 12 ++ .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 13 +- .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 12 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 8 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 7 + .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 15 +++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 18 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 8 ++ .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 15 +++ .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml | 8 ++ ...ardcodedStackVersionPropertiesCheckTest.java | 60 + .../upgrades/FixLzoCodecPathTest.java | 76 +++ .../upgrades/OozieConfigCalculationTest.java| 87 24 files changed, 730 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb864df5/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java index d245a25..efc717d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java @@ -258,40 +258,37 @@ public class HeartbeatMonitor implements Runnable { continue; } - if (clusterConfig != null) { -// cluster config for 'global' -Map props = new HashMap (clusterConfig.getProperties()); + // cluster config for 'global' + Map props = new HashMap<>(clusterConfig.getProperties()); -Map > configTags = new HashMap >(); + Map > configTags = new HashMap<>(); -for (Map.Entry > entry : allConfigTags.entrySet()) { - if (entry.getKey().equals(clusterConfig.getType())) { -configTags.put(clusterConfig.getType(), entry.getValue()); - } + for (Map.Entry > entry : allConfigTags.entrySet()) { +if (entry.getKey().equals(clusterConfig.getType())) { + configTags.put(clusterConfig.getType(), entry.getValue()); } + } -Map > properties = configHelper -.getEffectiveConfigProperties(cluster, configTags); + Map > properties = configHelper + .getEffectiveConfigProperties(cluster, configTags); -if (!properties.isEmpty()) { - for (Map propertyMap : properties.values()) { -props.putAll(propertyMap); - } + if (!properties.isEmpty()) { +for (Map propertyMap : properties.values()) { + props.putAll(propertyMap); } + } -configurations.put(clusterConfig.getType(), props); + configurations.put(clusterConfig.getType(), props); -Map > attrs = new TreeMap >(); -
ambari git commit: AMBARI-14871: Better messages when Ambari web UI can't resolve hosts to build quicklinks (dili)
Repository: ambari Updated Branches: refs/heads/trunk 13325ab07 -> 14d53f791 AMBARI-14871: Better messages when Ambari web UI can't resolve hosts to build quicklinks (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14d53f79 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14d53f79 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14d53f79 Branch: refs/heads/trunk Commit: 14d53f79156b0b0badb118714948be883881f213 Parents: 13325ab Author: Di LiAuthored: Fri Feb 5 12:56:39 2016 -0500 Committer: Di Li Committed: Fri Feb 5 12:56:39 2016 -0500 -- ambari-web/app/messages.js | 5 +++-- ambari-web/app/templates/main/service/item.hbs | 2 +- ambari-web/app/views/common/quick_view_link_view.js | 14 +++--- ambari-web/test/views/common/quick_link_view_test.js | 13 +++-- 4 files changed, 26 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index a8b5db6..9be6d86 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2850,8 +2850,9 @@ Em.I18n.translations = { 'common.combobox.dropdown.issues': 'Show property issues', 'common.combobox.dropdown.warnings': 'Show property warnings', - 'quick.links.error.label': 'Hostname is undefined', - 'quick.links.error.label2': 'Quick Links are not available', + 'quick.links.error.quicklinks.unavailable.label': 'Quick Links are not available', + 'quick.links.error.nohosts.label': 'Failed to obtain host information for {0}', + 'quick.links.error.oozie.label': 'Quick Links are not available. Make sure Oozie server is running.', 'quick.links.publicHostName': '{0} ({1})', 'quick.links.label.active': 'Active', 'quick.links.label.standby': 'Standby', http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/ambari-web/app/templates/main/service/item.hbs -- diff --git a/ambari-web/app/templates/main/service/item.hbs b/ambari-web/app/templates/main/service/item.hbs index f61695e..bc7f05f 100644 --- a/ambari-web/app/templates/main/service/item.hbs +++ b/ambari-web/app/templates/main/service/item.hbs @@ -43,7 +43,7 @@ {{label}} {{/each}} {{else}} -{{t quick.links.error.label2}} +{{t quick.links.error.quicklinks.unavailable.label}} {{/if}} {{/if}} {{else}} http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/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 c2f7dcc..567f65c 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -25,6 +25,8 @@ App.QuickViewLinks = Em.View.extend({ hasQuickLinksConfiged: false, + quickLinksErrorMessage: '', + /** * service which has blank target of link * @type {Array} @@ -317,9 +319,9 @@ App.QuickViewLinks = Em.View.extend({ * set empty links */ setEmptyLinks: function () { +//display an error message var quickLinks = [{ - label: this.t('quick.links.error.label'), - url: 'javascript:alert("' + this.t('contact.administrator') + '");return false;' + label: this.get('quickLinksErrorMessage') }]; this.set('quickLinks', quickLinks); this.set('isLoaded', true); @@ -432,10 +434,14 @@ App.QuickViewLinks = Em.View.extend({ .filterProperty('workStatus', 'STARTED') .mapProperty('hostName'); -return hosts.filter(function (host) { +var oozieHostsArray = hosts.filter(function (host) { host.status = Em.I18n.t('quick.links.label.active'); return activeOozieServers.contains(host.hostName); }, this); + +if (oozieHostsArray.length == 0) + this.set('quickLinksErrorMessage', Em.I18n.t('quick.links.error.oozie.label')); +return oozieHostsArray; }, /** @@ -506,6 +512,8 @@ App.QuickViewLinks = Em.View.extend({ * @method getHosts */ getHosts: function (response, serviceName) { +//The default error message when we cannot obtain the host information for the given service +this.set('quickLinksErrorMessage', Em.I18n.t('quick.links.error.nohosts.label').format(serviceName)); if (App.get('singleNodeInstall')) { return [{ hostName:
ambari git commit: AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 7ea0744a5 -> d2b3a8054 AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d2b3a805 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d2b3a805 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d2b3a805 Branch: refs/heads/branch-2.2 Commit: d2b3a805414346646ec1dd1665a1e2a4d1d653e6 Parents: 7ea0744 Author: Lisnichenko DmitroAuthored: Fri Feb 5 19:52:57 2016 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 5 19:52:57 2016 +0200 -- .../ambari/server/agent/HeartbeatMonitor.java | 45 +++ .../ambari/server/checks/CheckDescription.java | 8 ++ .../HardcodedStackVersionPropertiesCheck.java | 132 +++ .../serveraction/upgrades/FixLzoCodecPath.java | 103 +++ .../upgrades/OozieConfigCalculation.java| 94 + .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 3 + .../OOZIE/4.2.0.2.3/configuration/oozie-env.xml | 3 + .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 12 ++ .../services/OOZIE/configuration/oozie-env.xml | 3 + .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 12 ++ .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 11 ++ .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 12 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 8 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 7 + .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 15 +++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 18 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 8 ++ .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 15 +++ .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml | 8 ++ ...ardcodedStackVersionPropertiesCheckTest.java | 60 + .../upgrades/FixLzoCodecPathTest.java | 76 +++ .../upgrades/OozieConfigCalculationTest.java| 87 24 files changed, 730 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d2b3a805/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java index 14f819e..9576997 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java @@ -258,40 +258,37 @@ public class HeartbeatMonitor implements Runnable { continue; } - if (clusterConfig != null) { -// cluster config for 'global' -Map props = new HashMap (clusterConfig.getProperties()); + // cluster config for 'global' + Map props = new HashMap<>(clusterConfig.getProperties()); -Map > configTags = new HashMap >(); + Map > configTags = new HashMap<>(); -for (Map.Entry > entry : allConfigTags.entrySet()) { - if (entry.getKey().equals(clusterConfig.getType())) { -configTags.put(clusterConfig.getType(), entry.getValue()); - } + for (Map.Entry > entry : allConfigTags.entrySet()) { +if (entry.getKey().equals(clusterConfig.getType())) { + configTags.put(clusterConfig.getType(), entry.getValue()); } + } -Map > properties = configHelper -.getEffectiveConfigProperties(cluster, configTags); + Map > properties = configHelper + .getEffectiveConfigProperties(cluster, configTags); -if (!properties.isEmpty()) { - for (Map propertyMap : properties.values()) { -props.putAll(propertyMap); - } + if (!properties.isEmpty()) { +for (Map propertyMap : properties.values()) { + props.putAll(propertyMap); } + } -configurations.put(clusterConfig.getType(), props); + configurations.put(clusterConfig.getType(), props); -Map > attrs = new TreeMap >(); - configHelper.cloneAttributesMap(clusterConfig.getPropertiesAttributes(), attrs); +
ambari git commit: AMBARI-14943 AMS check failed on deploy (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 d2b3a8054 -> e417b5262 AMBARI-14943 AMS check failed on deploy (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e417b526 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e417b526 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e417b526 Branch: refs/heads/branch-2.2 Commit: e417b52623eb789d2c095bb02e3518b53131f545 Parents: d2b3a80 Author: Dmytro SenAuthored: Fri Feb 5 19:52:19 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 19:54:38 2016 +0200 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 51 .../webapp/TimelineWebServices.java | 7 +-- .../timeline/PhoenixHBaseAccessorTest.java | 2 +- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e417b526/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 5067454..71e65f7 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 @@ -553,34 +553,43 @@ public class PhoenixHBaseAccessor { throw new IllegalArgumentException("Multiple aggregate functions not supported."); } for (Function f : functions) { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); - -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); +if (f.getReadFunction() == Function.ReadFunction.VALUE) { + getTimelineMetricsFromResultSet(metrics, condition, rs); } else { - metrics.getMetrics().add(metric.getTimelineMetric()); + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); + + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); + } } } } else { // No aggregation requested - if (condition.getPrecision().equals(Precision.SECONDS)) { -TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric); -} + // Execution never goes here, function always contain at least 1 element + getTimelineMetricsFromResultSet(metrics, condition, rs); +} + } + private void getTimelineMetricsFromResultSet(TimelineMetrics metrics, Condition condition, ResultSet rs) throws SQLException, IOException { +if (condition.getPrecision().equals(Precision.SECONDS)) { + TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); } else { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, -Function.DEFAULT_VALUE_FUNCTION); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric.getTimelineMetric()); -} +metrics.getMetrics().add(metric); + } + +} else { + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, + Function.DEFAULT_VALUE_FUNCTION); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/e417b526/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
ambari git commit: AMBARI-14943 AMS check failed on deploy (dsen)
Repository: ambari Updated Branches: refs/heads/trunk b567ca441 -> 13325ab07 AMBARI-14943 AMS check failed on deploy (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/13325ab0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/13325ab0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/13325ab0 Branch: refs/heads/trunk Commit: 13325ab07821cdfc3813457c0ca05c6b065f5879 Parents: b567ca4 Author: Dmytro SenAuthored: Fri Feb 5 19:52:19 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 19:52:19 2016 +0200 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 51 .../webapp/TimelineWebServices.java | 7 +-- .../timeline/PhoenixHBaseAccessorTest.java | 2 +- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/13325ab0/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 29662f3..7fa1d2d 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 @@ -555,34 +555,43 @@ public class PhoenixHBaseAccessor { throw new IllegalArgumentException("Multiple aggregate functions not supported."); } for (Function f : functions) { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); - -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); +if (f.getReadFunction() == Function.ReadFunction.VALUE) { + getTimelineMetricsFromResultSet(metrics, condition, rs); } else { - metrics.getMetrics().add(metric.getTimelineMetric()); + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); + + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); + } } } } else { // No aggregation requested - if (condition.getPrecision().equals(Precision.SECONDS)) { -TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric); -} + // Execution never goes here, function always contain at least 1 element + getTimelineMetricsFromResultSet(metrics, condition, rs); +} + } + private void getTimelineMetricsFromResultSet(TimelineMetrics metrics, Condition condition, ResultSet rs) throws SQLException, IOException { +if (condition.getPrecision().equals(Precision.SECONDS)) { + TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); } else { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, -Function.DEFAULT_VALUE_FUNCTION); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric.getTimelineMetric()); -} +metrics.getMetrics().add(metric); + } + +} else { + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, + Function.DEFAULT_VALUE_FUNCTION); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/13325ab0/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
ambari git commit: AMBARI-14917. Edit WEB Alert issues (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 3d7643b41 -> 74d5a0167 AMBARI-14917. Edit WEB Alert issues (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74d5a016 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74d5a016 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74d5a016 Branch: refs/heads/trunk Commit: 74d5a016711c8c9d8641953e8732e65534db1a88 Parents: 3d7643b Author: Oleg NechiporenkoAuthored: Thu Feb 4 14:13:28 2016 +0200 Committer: Oleg Nechiporenko Committed: Fri Feb 5 10:02:36 2016 +0200 -- .../alerts/definition_configs_controller.js | 13 +- ambari-web/app/models/alerts/alert_config.js| 1 + ambari-web/app/styles/alerts.less | 2 +- .../activateStandby/step2_controller_test.js| 1 - .../definitions_configs_controller_test.js | 26 5 files changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/controllers/main/alerts/definition_configs_controller.js -- diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js index 3fd5510..ec5680c 100644 --- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js @@ -499,12 +499,8 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ return c.get('name') !== 'parameter'; }); configs.forEach(function (property) { - var apiProperties = property.get('apiProperty'); - var apiFormattedValues = property.get('apiFormattedValue'); - if (!Em.isArray(property.get('apiProperty'))) { -apiProperties = [property.get('apiProperty')]; -apiFormattedValues = [property.get('apiFormattedValue')]; - } + var apiProperties = Em.makeArray(property.get('apiProperty')); + var apiFormattedValues = Em.makeArray(property.get('apiFormattedValue')); apiProperties.forEach(function (apiProperty, i) { if (apiProperty.contains('source.')) { if (!propertiesToUpdate['AlertDefinition/source']) { @@ -531,7 +527,6 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ } Ember.setFullPath(propertiesToUpdate['AlertDefinition/source'], apiProperty.replace('source.', ''), apiFormattedValues[i]); } - } else { if (apiProperty) { @@ -541,6 +536,10 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ }, this); }, this); +if (Em.get(propertiesToUpdate, 'AlertDefinition/source.uri.id')) { + delete propertiesToUpdate['AlertDefinition/source'].uri.id; +} + // `source.parameters` is an array and should be updated separately from other configs if (this.get('content.parameters.length')) { propertiesToUpdate['AlertDefinition/source/parameters'] = this.get('content.rawSourceData.parameters'); http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/models/alerts/alert_config.js -- diff --git a/ambari-web/app/models/alerts/alert_config.js b/ambari-web/app/models/alerts/alert_config.js index a9a8154..c86b19a 100644 --- a/ambari-web/app/models/alerts/alert_config.js +++ b/ambari-web/app/models/alerts/alert_config.js @@ -437,6 +437,7 @@ App.AlertConfigProperties = { displayType: 'textField', classNames: 'alert-connection-timeout', apiProperty: 'source.uri.connection_timeout', +unit: 'Seconds', isValid: function () { var value = this.get('value'); return numericUtils.isPositiveNumber(value); http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/styles/alerts.less -- diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less index 1063ecf..c4f163d 100644 --- a/ambari-web/app/styles/alerts.less +++ b/ambari-web/app/styles/alerts.less @@ -324,7 +324,7 @@ padding-right: 13px; } - .alert-interval-input { + .alert-interval-input, .alert-connection-timeout { input { width: 20%; } http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js -- diff --git
ambari git commit: AMBARI-14917. Edit WEB Alert issues (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 305a85fb5 -> 8397565cb AMBARI-14917. Edit WEB Alert issues (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8397565c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8397565c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8397565c Branch: refs/heads/branch-2.2 Commit: 8397565cb6779f99da86f20c175eb07d9979e330 Parents: 305a85f Author: Oleg NechiporenkoAuthored: Thu Feb 4 14:23:14 2016 +0200 Committer: Oleg Nechiporenko Committed: Fri Feb 5 10:02:03 2016 +0200 -- .../alerts/definition_configs_controller.js | 13 +- ambari-web/app/models/alerts/alert_config.js| 1 + ambari-web/app/styles/alerts.less | 2 +- .../definitions_configs_controller_test.js | 27 4 files changed, 35 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8397565c/ambari-web/app/controllers/main/alerts/definition_configs_controller.js -- diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js index 38f3fa0..77a47fa 100644 --- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js @@ -480,12 +480,8 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ var propertiesToUpdate = {}; var configs = onlyChanged ? this.get('configs').filterProperty('wasChanged') : this.get('configs'); configs.forEach(function (property) { - var apiProperties = property.get('apiProperty'); - var apiFormattedValues = property.get('apiFormattedValue'); - if (!Em.isArray(property.get('apiProperty'))) { -apiProperties = [property.get('apiProperty')]; -apiFormattedValues = [property.get('apiFormattedValue')]; - } + var apiProperties = Em.makeArray(property.get('apiProperty')); + var apiFormattedValues = Em.makeArray(property.get('apiFormattedValue')); apiProperties.forEach(function (apiProperty, i) { if (apiProperty.contains('source.')) { if (!propertiesToUpdate['AlertDefinition/source']) { @@ -512,7 +508,6 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ } Ember.setFullPath(propertiesToUpdate['AlertDefinition/source'], apiProperty.replace('source.', ''), apiFormattedValues[i]); } - } else { if (apiProperty) { @@ -522,6 +517,10 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ }, this); }, this); +if (Em.get(propertiesToUpdate, 'AlertDefinition/source.uri.id')) { + delete propertiesToUpdate['AlertDefinition/source'].uri.id; +} + return propertiesToUpdate; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/8397565c/ambari-web/app/models/alerts/alert_config.js -- diff --git a/ambari-web/app/models/alerts/alert_config.js b/ambari-web/app/models/alerts/alert_config.js index b910339..839c80d 100644 --- a/ambari-web/app/models/alerts/alert_config.js +++ b/ambari-web/app/models/alerts/alert_config.js @@ -443,6 +443,7 @@ App.AlertConfigProperties = { displayType: 'textField', classNames: 'alert-connection-timeout', apiProperty: 'source.uri.connection_timeout', +unit: 'Seconds', isValid: function () { var value = this.get('value'); return numericUtils.isPositiveNumber(value); http://git-wip-us.apache.org/repos/asf/ambari/blob/8397565c/ambari-web/app/styles/alerts.less -- diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less index 2eabbe2..01d9df0 100644 --- a/ambari-web/app/styles/alerts.less +++ b/ambari-web/app/styles/alerts.less @@ -320,7 +320,7 @@ padding-right: 13px; } - .alert-interval-input { + .alert-interval-input, .alert-connection-timeout { input { width: 20%; } http://git-wip-us.apache.org/repos/asf/ambari/blob/8397565c/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js -- diff --git a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js b/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js index dce3935..04d2b54 100644 --- a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js +++
ambari git commit: AMBARI-14892 : Add Grafana as a component to AMS (avijayan)
Repository: ambari Updated Branches: refs/heads/trunk b02150a8e -> 1eb846c15 AMBARI-14892 : Add Grafana as a component to AMS (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1eb846c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1eb846c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1eb846c1 Branch: refs/heads/trunk Commit: 1eb846c153b156f87a7e55b65decb1f2118f90dc Parents: b02150a Author: Aravindan VijayanAuthored: Thu Feb 4 22:44:17 2016 -0800 Committer: Aravindan Vijayan Committed: Fri Feb 5 07:58:48 2016 -0800 -- .../conf/unix/ambari-metrics-grafana| 79 +++--- .../conf/unix/ams-grafana-env.sh| 9 - .../conf/unix/ams-grafana.ini | 10 +- .../metrics/timeline/PhoenixHBaseAccessor.java | 2 +- .../timeline/AbstractMiniHBaseClusterTest.java | 1 + .../0.1.0/configuration/ams-grafana-env.xml | 59 .../0.1.0/configuration/ams-grafana-ini.xml | 282 +++ .../AMBARI_METRICS/0.1.0/metainfo.xml | 18 ++ .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 30 ++ .../0.1.0/package/scripts/metrics_collector.py | 2 +- .../0.1.0/package/scripts/metrics_grafana.py| 65 + .../0.1.0/package/scripts/metrics_monitor.py| 2 +- .../0.1.0/package/scripts/params.py | 9 + .../0.1.0/package/scripts/status.py | 4 + .../0.1.0/package/scripts/status_params.py | 1 + .../stacks/HDP/2.0.6/role_command_order.json| 4 +- .../AMBARI_METRICS/test_metrics_grafana.py | 75 + .../python/stacks/2.0.6/configs/default.json| 9 + 18 files changed, 608 insertions(+), 53 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1eb846c1/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana -- diff --git a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana index 1de5401..29851d2 100644 --- a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana +++ b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana @@ -18,7 +18,7 @@ # description: Grafana web server & backend # processname: grafana # config: /etc/grafana/ams-grafana.ini -# pidfile: /var/run/grafana.pid +# pidfile: /var/run/ambari-metrics-grafana.pid ### BEGIN INIT INFO # Provides: grafana @@ -35,16 +35,18 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin NAME=grafana-server -DESC="Grafana Server" - -if [ -f "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" ]; then - . "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" +DESC="Ambari Metrics Grafana" +CONF_DIR=/etc/ambari-metrics-grafana/conf + +# execute ams-grafana-env.sh +if [[ -f "${CONF_DIR}/ams-grafana-env.sh" ]]; then +. "${CONF_DIR}/ams-grafana-env.sh" +else +echo "ERROR: Cannot execute ${CONF_DIR}/ams-grafana-env.sh." 2>&1 +exit 1 fi -GRAFANA_USER=${AMS_USER} -GRAFANA_GROUP=${AMS_USER_GROUP} GRAFANA_HOME=${AMS_GRAFANA_HOME_DIR} -CONF_DIR=${AMS_GRAFANA_CONF_DIR} WORK_DIR=$GRAFANA_HOME DATA_DIR=${AMS_GRAFANA_DATA_DIR} LOG_DIR=${AMS_GRAFANA_LOG_DIR} @@ -52,11 +54,13 @@ CONF_FILE=$CONF_DIR/ams-grafana.ini MAX_OPEN_FILES=1 PID_FILE=${AMS_GRAFANA_PID_DIR}/$NAME.pid DAEMON=$GRAFANA_HOME/bin/$NAME +OUT_FILE=${AMS_GRAFANA_LOG_DIR}/grafana.out +STOP_TIMEOUT=5 -if [ `id -u` -ne 0 ]; then - echo "You need root privileges to run this script" - exit 4 -fi +#if [ `id -u` -ne 0 ]; then +# echo "You need root privileges to run this script" +# exit 4 +#fi if [ ! -x $DAEMON ]; then echo "Program not installed or not executable" @@ -66,20 +70,20 @@ fi # # init.d / servicectl compatibility (openSUSE) # -if [ -f /etc/rc.status ]; then -. /etc/rc.status -rc_reset -fi +# if [ -f /etc/rc.status ]; then +#. /etc/rc.status +#rc_reset +# fi # # Source function library. # -if [ -f /etc/rc.d/init.d/functions ]; then -. /etc/rc.d/init.d/functions -fi +# if [ -f /etc/rc.d/init.d/functions ]; then +#. /etc/rc.d/init.d/functions +# fi # overwrite settings from default file -[ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME +# [ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME DAEMON_OPTS="--pidfile=${PID_FILE} --config=${CONF_FILE} cfg:default.paths.data=${DATA_DIR} cfg:default.paths.logs=${LOG_DIR}" @@ -98,16 +102,16 @@ case "$1" in fi # Prepare environment -mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR" "$DATA_DIR" -touch "$PID_FILE" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$PID_FILE" +# mkdir -p "$LOG_DIR" "$DATA_DIR" &&
[29/40] ambari git commit: AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen)
AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83bef413 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83bef413 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83bef413 Branch: refs/heads/branch-dev-patch-upgrade Commit: 83bef413c47c76cbf54bc64847620769168389ac Parents: ed49229 Author: Dmytro SenAuthored: Fri Feb 5 16:30:18 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 16:30:18 2016 +0200 -- .../apache/ambari/server/controller/AmbariServer.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/83bef413/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index c7e7880..b416129 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -794,10 +794,14 @@ public class AmbariServer { } public void stop() throws Exception { -try { - server.stop(); -} catch (Exception e) { - LOG.error("Error stopping the server", e); +if (server == null) { + throw new AmbariException("Error stopping the server"); +} else { + try { +server.stop(); + } catch (Exception e) { +LOG.error("Error stopping the server", e); + } } }
[03/40] ambari git commit: AMBARI-14902 Make AMS Grafana component available as a repo package (dsen)
AMBARI-14902 Make AMS Grafana component available as a repo package (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad67efd2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad67efd2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad67efd2 Branch: refs/heads/branch-dev-patch-upgrade Commit: ad67efd2d67dfefb2fb20249bfc42e4d569b7a07 Parents: d89f8a5 Author: Dmytro SenAuthored: Thu Feb 4 01:09:56 2016 +0200 Committer: Dmytro Sen Committed: Thu Feb 4 01:09:56 2016 +0200 -- ambari-metrics/ambari-metrics-assembly/pom.xml | 289 ++- .../src/main/assembly/grafana.xml | 59 .../conf/unix/ambari-metrics-grafana| 172 +++ .../conf/unix/ams-grafana-env.sh| 38 +++ .../conf/unix/ams-grafana.ini | 255 ambari-metrics/ambari-metrics-grafana/pom.xml | 124 .../src/main/assemblies/empty.xml | 21 ++ ambari-metrics/pom.xml | 4 + pom.xml | 4 +- 9 files changed, 769 insertions(+), 197 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad67efd2/ambari-metrics/ambari-metrics-assembly/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml index e963b00..dfc9351 100644 --- a/ambari-metrics/ambari-metrics-assembly/pom.xml +++ b/ambari-metrics/ambari-metrics-assembly/pom.xml @@ -30,11 +30,12 @@ Ambari Metrics Assembly pom 2.0.0.0-SNAPSHOT - Ambari Metrics + Ambari Metrics Assembly ${project.basedir}/../ambari-metrics-timelineservice ${project.basedir}/../ambari-metrics-host-monitoring +${project.basedir}/../ambari-metrics-grafana ${project.basedir}/../ambari-metrics-hadoop-sink ${project.basedir}/../ambari-metrics-storm-sink ${project.basedir}/../ambari-metrics-flume-sink @@ -119,6 +120,22 @@ +grafana +package + + single + + + false + ambari-metrics-grafana-${project.version} + false + +src/main/assembly/grafana.xml + + gnu + + + hadoop-sink package @@ -191,85 +208,39 @@ root - + -ambari-metrics-monitor +ambari-metrics-grafana package rpm - ambari-metrics-monitor + ambari-metrics-grafana Development x86_64 false - -${python.ver} -gcc -${python.devel} - - -src/main/package/rpm/preremove.sh -utf-8 - - ${resmonitor.install.dir} - root - root + + /usr/lib/ambari-metrics-grafana/ - -${monitor.dir}/src/main/python/__init__.py - - - - -${monitor.dir}/src/main/python/main.py - + ${grafana.dir}/target/grafana/${grafana.folder} - ${resmonitor.install.dir}/core - - - -${monitor.dir}/src/main/python/core - - - - - - ${resmonitor.install.dir}/psutil - - - -${monitor.dir}/src/main/python/psutil - - -build/** -build/* - - - - - -
[15/40] 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/7616e0f5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7616e0f5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7616e0f5 Branch: refs/heads/branch-dev-patch-upgrade Commit: 7616e0f5d6939509d1914857dc03150eacc9e3b9 Parents: 8ff0b5e Author: Bob NettletonAuthored: Thu Feb 4 14:06:34 2016 -0500 Committer: Bob Nettleton Committed: Thu Feb 4 14:07:02 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/7616e0f5/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 9f42901..de31a0d 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 @@ -126,6 +126,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 @@ -1583,7 +1588,9 @@ public class BlueprintConfigurationProcessor { */ private final boolean usePrefixForEachHost; -private final Set setOfKnownURLSchemes = Collections.singleton("thrift://"); +private final boolean useSuffixForEachHost; + +private final boolean usePortForEachHost; /** * Constructor. @@ -1591,7 +1598,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); } /** @@ -1601,10 +1608,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; } /** @@ -1625,36 +1634,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 =
[24/40] ambari git commit: AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)
AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94932c99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94932c99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94932c99 Branch: refs/heads/branch-dev-patch-upgrade Commit: 94932c99bb8ff5ad309c15c6a0ecf382f428c73b Parents: dc8e5c3 Author: ababiichukAuthored: Fri Feb 5 09:35:47 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 11:15:13 2016 +0200 -- .../services/RANGER/themes/theme_version_1.json | 20 +++- .../services/RANGER/themes/theme_version_2.json | 20 +++- .../configs/widgets/config_widget_view.js | 3 +++ 3 files changed, 41 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json index e6724cd..cb5aa78 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json @@ -525,7 +525,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] } ] }, http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/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 fff50fb..2c469a9 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 @@ -904,7 +904,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/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 9858b75..e9eaed2 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,6 +434,9 @@ 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') { +
[34/40] ambari git commit: AMBARI-14927. Log Search: Add Host Components Logs tab to Host Details page (alexantonenko)
AMBARI-14927. Log Search: Add Host Components Logs tab to Host Details page (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b567ca44 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b567ca44 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b567ca44 Branch: refs/heads/branch-dev-patch-upgrade Commit: b567ca441c213c816019dc5a45884f69a286f54c Parents: 3a2add5 Author: Alex AntonenkoAuthored: Fri Feb 5 18:30:24 2016 +0200 Committer: Alex Antonenko Committed: Fri Feb 5 18:30:24 2016 +0200 -- .../app/controllers/global/update_controller.js | 4 +- ambari-web/app/messages.js | 3 + ambari-web/app/routes/main.js | 11 ++ ambari-web/app/styles/application.less | 3 +- ambari-web/app/templates/main/host/logs.hbs | 62 ambari-web/app/views.js | 1 + ambari-web/app/views/main/host/logs_view.js | 147 +++ ambari-web/app/views/main/host/menu.js | 11 +- ambari-web/test/views/main/host/menu_test.js| 20 ++- 9 files changed, 257 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/controllers/global/update_controller.js -- diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js index 0a5d913..0168398 100644 --- a/ambari-web/app/controllers/global/update_controller.js +++ b/ambari-web/app/controllers/global/update_controller.js @@ -223,7 +223,7 @@ App.UpdateController = Em.Controller.extend({ } else { if (App.router.get('currentState.parentState.name') == 'hostDetails') { -hostDetailsFilter = App.router.get('location.lastSetURL').match(/\/hosts\/(.*)\/(summary|configs|alerts|stackVersions)/)[1]; +hostDetailsFilter = App.router.get('location.lastSetURL').match(/\/hosts\/(.*)\/(summary|configs|alerts|stackVersions|logs)/)[1]; App.updater.updateInterval('updateHost', App.get('componentsUpdateInterval')); //if host details page opened then request info only of one displayed host this.get('queryParams').set('Hosts', [ @@ -579,7 +579,7 @@ App.UpdateController = Em.Controller.extend({ complete: callback }); }, - + updateUpgradeState: function (callback) { var currentStateName = App.get('router.currentState.name'), parentStateName = App.get('router.currentState.parentState.name'), http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8d1f6f1..a8b5db6 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -312,6 +312,7 @@ Em.I18n.translations = { 'common.filters': 'Filters', 'common.keywords': 'Keywods', 'common.levels': 'Levels', + 'common.extension': 'Extension', 'models.alert_instance.tiggered.verbose': "Occurred on {0} Checked on {1}", 'models.alert_definition.triggered.verbose': "Occurred on {0}", @@ -2280,6 +2281,8 @@ Em.I18n.translations = { 'hosts.host.serviceNotAvailable': 'Service not available on this host', + 'hosts.host.menu.logs': 'Logs', + 'hosts.host.menu.stackVersions': 'Versions', 'hosts.host.stackVersions.table.allVersions': 'All Versions', 'hosts.host.stackVersions.table.allNames': 'All Names', http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/routes/main.js -- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index bd66945..cbaf34d 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -264,6 +264,17 @@ module.exports = Em.Route.extend(App.RouterRedirections, { } }), + logs: Em.Route.extend({ +route: '/logs', +connectOutlets: function (router, context) { + if (App.get('supports.logSearch')) { + router.get('mainHostDetailsController').connectOutlet('mainHostLogs') + } else { +router.transitionTo('summary'); + } +} + }), + hostNavigate: function (router, event) { var parent = event.view._parentView; parent.deactivateChildViews(); http://git-wip-us.apache.org/repos/asf/ambari/blob/b567ca44/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index ce10a98..a1969db
[06/40] ambari git commit: AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy)
AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ed3ca611 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed3ca611 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed3ca611 Branch: refs/heads/branch-dev-patch-upgrade Commit: ed3ca611b98a6a68c12a735ca934a83755913b39 Parents: 4fbf172 Author: Myroslav PapirkovskyyAuthored: Thu Feb 4 13:14:06 2016 +0200 Committer: Myroslav Papirkovskyy Committed: Thu Feb 4 13:14:06 2016 +0200 -- .../apache/ambari/server/configuration/Configuration.java | 8 .../org/apache/ambari/server/controller/AmbariServer.java | 10 ++ .../apache/ambari/server/controller/AmbariServerTest.java | 9 + 3 files changed, 27 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 4a4ae43..35e9b6f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2419,6 +2419,14 @@ public class Configuration { } /** + * Ambari server temp dir + * @return server temp dir + */ + public String getServerTempDir() { +return properties.getProperty(SERVER_TMP_DIR_KEY, SERVER_TMP_DIR_DEFAULT); + } + + /** * Gets whether to use experiemental concurrent processing to convert * {@link StageEntity} instances into {@link Stage} instances. The default is * {@code false}. http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 9c05bf8..c7e7880 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -253,6 +253,14 @@ public class AmbariServer { private static AmbariManagementController clusterController = null; + /** + * Alters system variables on base of Ambari configuration + */ + static void setSystemProperties(Configuration configs) { +// modify location of temporary dir to avoid using default /tmp dir +System.setProperty("java.io.tmpdir", configs.getServerTempDir()); + } + public static AmbariManagementController getController() { return clusterController; } @@ -265,6 +273,8 @@ public class AmbariServer { server.setSessionIdManager(sessionIdManager); Server serverForAgent = new Server(); +setSystemProperties(configs); + if (System.getProperty("skipDatabaseConsistencyValidation") == null) { DatabaseChecker.checkDBVersion(); DatabaseChecker.checkDBConsistency(); http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java index 02941b5..54f6147 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java @@ -105,6 +105,15 @@ public class AmbariServerTest { } @Test + public void testSystemProperties() throws Exception { +Configuration configuration = EasyMock.createNiceMock(Configuration.class); + expect(configuration.getServerTempDir()).andReturn("/ambari/server/temp/dir").anyTimes(); +replay(configuration); +AmbariServer.setSystemProperties(configuration); +Assert.assertEquals(System.getProperty("java.io.tmpdir"), "/ambari/server/temp/dir"); + } + + @Test public void testProxyUser() throws Exception { PasswordAuthentication pa = Authenticator.requestPasswordAuthentication(
[01/40] ambari git commit: AMBARI-14904. Disable base URL inputs for all OS except one that the cluster is running (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade 0f2c3375d -> c11a41138 AMBARI-14904. Disable base URL inputs for all OS except one that the cluster is running (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5833aabd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5833aabd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5833aabd Branch: refs/heads/branch-dev-patch-upgrade Commit: 5833aabd811f726d328d5b2ddd565e45cbd48a15 Parents: 424cca6 Author: Aleksandr KovalenkoAuthored: Wed Feb 3 20:13:51 2016 +0200 Committer: Aleksandr Kovalenko Committed: Wed Feb 3 22:13:43 2016 +0200 -- .../stackVersions/StackVersionsCreateCtrl.js | 18 +++--- .../stackVersions/StackVersionsEditCtrl.js| 16 ++-- .../ui/admin-web/app/scripts/services/Cluster.js | 15 ++- .../ui/admin-web/app/scripts/services/Stack.js| 2 +- .../app/views/stackVersions/stackVersionPage.html | 4 ++-- 5 files changed, 46 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5833aabd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index a817d88..fc4bee9 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -18,7 +18,7 @@ 'use strict'; angular.module('ambariAdminConsole') -.controller('StackVersionsCreateCtrl', ['$scope', 'Stack', '$routeParams', '$location', 'Alert', '$translate', function($scope, Stack, $routeParams, $location, Alert, $translate) { +.controller('StackVersionsCreateCtrl', ['$scope', 'Stack', '$routeParams', '$location', 'Alert', '$translate', 'Cluster', function($scope, Stack, $routeParams, $location, Alert, $translate, Cluster) { var $t = $translate.instant; $scope.createController = true; $scope.osList = []; @@ -43,7 +43,9 @@ angular.module('ambariAdminConsole') }); $scope.upgradeStack.options = versions; $scope.upgradeStack.selected = versions[versions.length - 1]; - $scope.afterStackVersionChange(); + $scope.afterStackVersionChange().then(function(){ +$scope.disableUnusedOS(); + }); }) .catch(function (data) { Alert.error($t('versions.alerts.filterListError'), data.message); @@ -71,7 +73,7 @@ angular.module('ambariAdminConsole') }; $scope.afterStackVersionChange = function () { -Stack.getSupportedOSList($scope.upgradeStack.selected.stack_name, $scope.upgradeStack.selected.stack_version) +return Stack.getSupportedOSList($scope.upgradeStack.selected.stack_name, $scope.upgradeStack.selected.stack_version) .then(function (data) { var operatingSystems = data.operating_systems; $scope.osList = operatingSystems.map(function (os) { @@ -87,6 +89,16 @@ angular.module('ambariAdminConsole') }); }; + $scope.disableUnusedOS = function() { +Cluster.getClusterOS().then(function(usedOS){ + angular.forEach($scope.osList, function (os) { +if (os.OperatingSystems.os_type !== usedOS) { + os.disabled = true; +} + }); +}); + }; + $scope.updateCurrentVersionInput = function () { $scope.currentVersionInput = $scope.upgradeStack.selected.displayName + '.' + angular.element('[name="version"]')[0].value; }; http://git-wip-us.apache.org/repos/asf/ambari/blob/5833aabd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js index 0763726..39a6700 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js @@ -63,7 +63,9 @@ angular.module('ambariAdminConsole') } else { $scope.deleteEnabled = $scope.isDeletable(); } - $scope.addMissingOSList(); +
[38/40] ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)
AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (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/26ad97b6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26ad97b6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26ad97b6 Branch: refs/heads/branch-dev-patch-upgrade Commit: 26ad97b6406008981ce8bec6158f6a47bb1459a4 Parents: bb864df Author: Jun AokiAuthored: Fri Feb 5 13:23:36 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 13:23:36 2016 -0800 -- .../nameNode/rollback_controller.js | 24 +++ .../nameNode/step3_controller.js| 3 + .../nameNode/step9_controller.js| 23 --- ambari-web/app/data/HDP2/ha_properties.js | 68 +++- .../nameNode/step3_controller_test.js | 49 -- 5 files changed, 139 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index 465a1d2..6895c6c 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -251,17 +251,19 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl }); }, restoreHawqConfigs: function(){ -this.loadConfigTag("hawqSiteTag"); -var hawqSiteTag = this.get("content.hawqSiteTag"); -App.ajax.send({ - name: 'admin.high_availability.load_hawq_configs', - sender: this, - data: { -hawqSiteTag: hawqSiteTag - }, - success: 'onLoadHawqConfigs', - error: 'onTaskError' -}); +var tags = ['hawqSiteTag', 'hdfsClientTag']; +tags.forEach(function (tagName) { + var tag = this.get("content." + tagName); + App.ajax.send({ +name: 'admin.high_availability.load_hawq_configs', +sender: this, +data: { + tagName: tag +}, +success: 'onLoadHawqConfigs', +error: 'onTaskError' + }); +}, this); }, deletePXF: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js index b420687..4e4df60 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js @@ -100,6 +100,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag; urlParams.push('(type=hawq-site=' + hawqSiteTag + ')'); this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag}); + var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag; + urlParams.push('(type=hdfs-client=' + hdfsClientTag + ')'); + this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag}); } App.ajax.send({ name: 'admin.get.all_configurations', http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js index 7745c6b..934d133 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js @@ -118,16 +118,19 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont reconfigureHawq: function () { var data = this.get('content.serviceConfigProperties'); -var configData = this.reconfigureSites(['hawq-site'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('NAMENODE'))); -App.ajax.send({ - name: 'common.service.configurations', - sender: this, - data: { -
[05/40] ambari git commit: AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki)
AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fbf172c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fbf172c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fbf172c Branch: refs/heads/branch-dev-patch-upgrade Commit: 4fbf172c31e65bab503ab8e0acbfefd2b7a3adbe Parents: 65558a5 Author: Jun AokiAuthored: Wed Feb 3 15:38:40 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:38:40 2016 -0800 -- .../app/controllers/wizard/step7_controller.js | 2 +- .../test/controllers/wizard/step7_test.js | 20 ++-- 2 files changed, 7 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbf172c/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 f6b6cb3..011833b 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -699,7 +699,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (App.get('isHaEnabled')) this.addHawqConfigsOnNnHa(configs); if (App.get('isRMHaEnabled')) this.addHawqConfigsOnRMHa(configs); } -if (App.get('isSingleNode')) this.removeHawqStandbyHostAddressConfig(configs); +if (Object.keys(this.get('content.hosts')).length === 1) this.removeHawqStandbyHostAddressConfig(configs); return configs }, http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbf172c/ambari-web/test/controllers/wizard/step7_test.js -- diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js index d4dcb24..8a4a96f 100644 --- a/ambari-web/test/controllers/wizard/step7_test.js +++ b/ambari-web/test/controllers/wizard/step7_test.js @@ -1180,8 +1180,10 @@ describe('App.InstallerStep7Controller', function () { }); - describe('#updateHawqConfigs', function() { -var isSingleNode = false; + describe('#removeHawqStandbyHostAddressConfig', function() { +installerStep7Controller = App.WizardStep7Controller.create({ + content: Em.Object.create({}), +}); var testHawqSiteConfigs = [ { name: 'hawq_standby_address_host', @@ -1194,19 +1196,9 @@ describe('App.InstallerStep7Controller', function () { ]; var oldHawqSiteLength = testHawqSiteConfigs.length; -beforeEach(function () { - sinon.stub(App, 'get', function () { -return isSingleNode; - }); -}); - -afterEach(function () { - App.get.restore() -}); - it('hawq_standby_address_host should be removed on single node cluster', function() { - isSingleNode = true; var hawqSiteConfigs = testHawqSiteConfigs.slice(); + installerStep7Controller.set('content.hosts', {'hostname': 'h1'}); var updatedHawqSiteConfigs = installerStep7Controller.updateHawqConfigs(hawqSiteConfigs); expect(updatedHawqSiteConfigs.length).to.be.equal(oldHawqSiteLength-1); expect(updatedHawqSiteConfigs.findProperty('name', 'hawq_standby_address_host')).to.not.exist; @@ -1214,8 +1206,8 @@ describe('App.InstallerStep7Controller', function () { }); it('hawq_standby_address_host should not be removed on multi node clusters', function() { - isSingleNode = false; var hawqSiteConfigs = testHawqSiteConfigs.slice(); + installerStep7Controller.set('content.hosts', Em.A([{'hostname': 'h1'}, {'hostname': 'h2'}])); var updatedHawqSiteConfigs = installerStep7Controller.updateHawqConfigs(hawqSiteConfigs); expect(updatedHawqSiteConfigs.length).to.be.equal(oldHawqSiteLength); expect(updatedHawqSiteConfigs.findProperty('name', 'hawq_standby_address_host').value).to.be.equal('h2');
[30/40] ambari git commit: AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk)
AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b02150a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b02150a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b02150a8 Branch: refs/heads/branch-dev-patch-upgrade Commit: b02150a8e1ad66128857370db005e00602a09eac Parents: 83bef41 Author: ababiichukAuthored: Fri Feb 5 17:00:51 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 17:01:30 2016 +0200 -- ambari-web/app/controllers/main/host/details.js | 39 +++- 1 file changed, 22 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b02150a8/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 251d7ab..a161342 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -1411,23 +1411,28 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow templateName: require('templates/main/host/details/installComponentPopup') }), onPrimary: function () { -this.hide(); - -App.ajax.send({ - name: 'common.host.host_component.update', - sender: self, - data: { -hostName: self.get('content.hostName'), -serviceName: component.get('service.serviceName'), -componentName: componentName, -component: component, -context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, -HostRoles: { - state: 'INSTALLED' -} - }, - success: 'installComponentSuccessCallback', - error: 'ajaxErrorCallback' +var _this = this; +App.get('router.mainAdminKerberosController').getSecurityType(function () { + App.get('router.mainAdminKerberosController').getKDCSessionState(function () { +_this.hide(); + +App.ajax.send({ + name: 'common.host.host_component.update', + sender: self, + data: { +hostName: self.get('content.hostName'), +serviceName: component.get('service.serviceName'), +componentName: componentName, +component: component, +context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName, +HostRoles: { + state: 'INSTALLED' +} + }, + success: 'installComponentSuccessCallback', + error: 'ajaxErrorCallback' +}); + }) }); } });
[40/40] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Merge branch 'trunk' into branch-dev-patch-upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c11a4113 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c11a4113 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c11a4113 Branch: refs/heads/branch-dev-patch-upgrade Commit: c11a41138b02994e54070177efc99241bebfade0 Parents: 0f2c337 f57f9b2 Author: Nate ColeAuthored: Fri Feb 5 16:55:44 2016 -0500 Committer: Nate Cole Committed: Fri Feb 5 16:55:44 2016 -0500 -- .../loginActivities/LoginActivitiesMainCtrl.js | 4 +- .../loginActivities/LoginMessageMainCtrl.js | 5 +- .../stackVersions/StackVersionsCreateCtrl.js| 2 +- .../stackVersions/StackVersionsEditCtrl.js | 10 + .../ui/admin-web/app/scripts/i18n.config.js | 6 +- .../ui/admin-web/app/scripts/routes.js | 9 +- .../admin-web/app/scripts/services/Cluster.js | 15 +- .../ui/admin-web/app/scripts/services/Stack.js | 2 +- .../ui/admin-web/app/views/leftNavbar.html | 2 +- .../app/views/loginActivities/loginMessage.html | 25 +- .../app/views/loginActivities/main.html | 4 +- .../src/main/resources/ui/admin-web/gulpfile.js | 1 - ambari-agent/pom.xml| 118 +-- .../src/main/package/dependencies.properties| 32 ++ .../libraries/functions/conf_select.py | 2 +- .../src/main/repo/install_ambari_tarball.py | 250 + ambari-metrics/ambari-metrics-assembly/pom.xml | 348 +-- .../src/main/assembly/grafana.xml | 59 ambari-metrics/ambari-metrics-grafana/README.md | 243 + .../ambari-metrics/datasource.js| 304 .../ambari-metrics/directives.js| 36 ++ .../ambari-metrics/partials/config.html | 19 + .../ambari-metrics/partials/query.editor.html | 133 +++ .../ambari-metrics/partials/query.options.html | 42 +++ .../ambari-metrics/plugin.json | 14 + .../ambari-metrics/queryCtrl.js | 131 +++ .../conf/unix/ambari-metrics-grafana| 181 ++ .../conf/unix/ams-grafana-env.sh| 29 ++ .../conf/unix/ams-grafana.ini | 255 ++ ambari-metrics/ambari-metrics-grafana/pom.xml | 125 +++ .../screenshots/1-add-datasource.png| Bin 0 -> 108602 bytes .../screenshots/10-choose-hostname.png | Bin 0 -> 298654 bytes .../11-choose-agg-rate-precision.png| Bin 0 -> 276486 bytes .../screenshots/12-change-panel-title.png | Bin 0 -> 258642 bytes .../screenshots/13-save-dashboard.png | Bin 0 -> 262005 bytes .../screenshots/14-change-timerange.png | Bin 0 -> 310766 bytes .../screenshots/15-change-units.png | Bin 0 -> 322069 bytes .../screenshots/16-display-style-graph-1.png| Bin 0 -> 285467 bytes .../screenshots/17-series-specific-override.png | Bin 0 -> 302825 bytes .../screenshots/18-override-time.png| Bin 0 -> 255655 bytes .../screenshots/19-edit-graph.png | Bin 0 -> 191904 bytes .../screenshots/2-datasource-details.png| Bin 0 -> 125313 bytes .../screenshots/3-test-datasource.png | Bin 0 -> 136121 bytes .../screenshots/4-dashboard-dropdown.png| Bin 0 -> 126964 bytes .../screenshots/5-dashboard-graph-menu.png | Bin 0 -> 146851 bytes .../screenshots/6-graph-panels.png | Bin 0 -> 105383 bytes .../screenshots/7-choose-datasource.png | Bin 0 -> 246860 bytes .../screenshots/8-choose-component.png | Bin 0 -> 199123 bytes .../screenshots/9-choose-metric.png | Bin 0 -> 216473 bytes .../screenshots/add-dashboard.png | Bin 0 -> 107965 bytes .../screenshots/full-dashboard.png | Bin 0 -> 161956 bytes .../src/main/assemblies/empty.xml | 21 ++ .../metrics/timeline/PhoenixHBaseAccessor.java | 53 +-- .../webapp/TimelineWebServices.java | 7 +- .../timeline/AbstractMiniHBaseClusterTest.java | 1 + .../timeline/PhoenixHBaseAccessorTest.java | 2 +- ambari-metrics/pom.xml | 5 + ambari-server/conf/unix/install-helper.sh | 52 +-- ambari-server/pom.xml | 148 +--- ambari-server/src/main/assemblies/server.xml| 2 +- .../ambari/server/agent/HeartbeatMonitor.java | 45 ++- .../resources/ClusterResourceDefinition.java| 3 +- .../ambari/server/checks/CheckDescription.java | 8 + .../HardcodedStackVersionPropertiesCheck.java | 132 +++ .../server/configuration/Configuration.java | 8 + .../AmbariManagementControllerImpl.java | 44 ++- .../ambari/server/controller/AmbariServer.java | 22 +-
[32/40] 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/cd35e806 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd35e806 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd35e806 Branch: refs/heads/branch-dev-patch-upgrade Commit: cd35e806c0cfd63056afea61d2168e74cf1c1ae8 Parents: 1eb846c Author: Bob NettletonAuthored: Fri Feb 5 11:07:51 2016 -0500 Committer: Bob Nettleton Committed: Fri Feb 5 11:08: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/cd35e806/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 70fa880..c9120de 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/cd35e806/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
[36/40] ambari git commit: AMBARI-14871: Better messages when Ambari web UI can't resolve hosts to build quicklinks (dili)
AMBARI-14871: Better messages when Ambari web UI can't resolve hosts to build quicklinks (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14d53f79 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14d53f79 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14d53f79 Branch: refs/heads/branch-dev-patch-upgrade Commit: 14d53f79156b0b0badb118714948be883881f213 Parents: 13325ab Author: Di LiAuthored: Fri Feb 5 12:56:39 2016 -0500 Committer: Di Li Committed: Fri Feb 5 12:56:39 2016 -0500 -- ambari-web/app/messages.js | 5 +++-- ambari-web/app/templates/main/service/item.hbs | 2 +- ambari-web/app/views/common/quick_view_link_view.js | 14 +++--- ambari-web/test/views/common/quick_link_view_test.js | 13 +++-- 4 files changed, 26 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index a8b5db6..9be6d86 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2850,8 +2850,9 @@ Em.I18n.translations = { 'common.combobox.dropdown.issues': 'Show property issues', 'common.combobox.dropdown.warnings': 'Show property warnings', - 'quick.links.error.label': 'Hostname is undefined', - 'quick.links.error.label2': 'Quick Links are not available', + 'quick.links.error.quicklinks.unavailable.label': 'Quick Links are not available', + 'quick.links.error.nohosts.label': 'Failed to obtain host information for {0}', + 'quick.links.error.oozie.label': 'Quick Links are not available. Make sure Oozie server is running.', 'quick.links.publicHostName': '{0} ({1})', 'quick.links.label.active': 'Active', 'quick.links.label.standby': 'Standby', http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/ambari-web/app/templates/main/service/item.hbs -- diff --git a/ambari-web/app/templates/main/service/item.hbs b/ambari-web/app/templates/main/service/item.hbs index f61695e..bc7f05f 100644 --- a/ambari-web/app/templates/main/service/item.hbs +++ b/ambari-web/app/templates/main/service/item.hbs @@ -43,7 +43,7 @@ {{label}} {{/each}} {{else}} -{{t quick.links.error.label2}} +{{t quick.links.error.quicklinks.unavailable.label}} {{/if}} {{/if}} {{else}} http://git-wip-us.apache.org/repos/asf/ambari/blob/14d53f79/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 c2f7dcc..567f65c 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -25,6 +25,8 @@ App.QuickViewLinks = Em.View.extend({ hasQuickLinksConfiged: false, + quickLinksErrorMessage: '', + /** * service which has blank target of link * @type {Array} @@ -317,9 +319,9 @@ App.QuickViewLinks = Em.View.extend({ * set empty links */ setEmptyLinks: function () { +//display an error message var quickLinks = [{ - label: this.t('quick.links.error.label'), - url: 'javascript:alert("' + this.t('contact.administrator') + '");return false;' + label: this.get('quickLinksErrorMessage') }]; this.set('quickLinks', quickLinks); this.set('isLoaded', true); @@ -432,10 +434,14 @@ App.QuickViewLinks = Em.View.extend({ .filterProperty('workStatus', 'STARTED') .mapProperty('hostName'); -return hosts.filter(function (host) { +var oozieHostsArray = hosts.filter(function (host) { host.status = Em.I18n.t('quick.links.label.active'); return activeOozieServers.contains(host.hostName); }, this); + +if (oozieHostsArray.length == 0) + this.set('quickLinksErrorMessage', Em.I18n.t('quick.links.error.oozie.label')); +return oozieHostsArray; }, /** @@ -506,6 +512,8 @@ App.QuickViewLinks = Em.View.extend({ * @method getHosts */ getHosts: function (response, serviceName) { +//The default error message when we cannot obtain the host information for the given service +this.set('quickLinksErrorMessage', Em.I18n.t('quick.links.error.nohosts.label').format(serviceName)); if (App.get('singleNodeInstall')) { return [{ hostName: App.get('singleNodeAlias'),
[04/40] ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki)
AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/65558a5a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65558a5a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65558a5a Branch: refs/heads/branch-dev-patch-upgrade Commit: 65558a5a660062ebb1c9380e4a7101ce45ad4fe2 Parents: ad67efd Author: Jun AokiAuthored: Wed Feb 3 15:27:26 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:27:26 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/controllers.js | 4 + .../hawq/activateStandby/step1_controller.js| 23 +++ .../hawq/activateStandby/step2_controller.js| 105 +++ .../hawq/activateStandby/step3_controller.js| 126 + .../hawq/activateStandby/wizard_controller.js | 128 + .../main/admin/highAvailability_controller.js | 9 + ambari-web/app/controllers/main/service/item.js | 5 + .../HDP2.3/hawq_activate_standby_properties.js | 43 + ambari-web/app/data/controller_route.js | 4 + ambari-web/app/messages.js | 37 +++- .../wizard/wizardProgressPageController.js | 30 ambari-web/app/models/host_component.js | 9 +- .../app/routes/activate_hawq_standby_routes.js | 179 +++ ambari-web/app/routes/main.js | 2 + .../hawq/activateStandby/step1.hbs | 28 +++ .../hawq/activateStandby/step2.hbs | 53 ++ .../hawq/activateStandby/step3.hbs | 18 ++ .../hawq/activateStandby/wizard.hbs | 44 + .../hawq_activate_standby_config_initializer.js | 53 ++ .../utils/configs/hawq_ha_config_initializer.js | 2 +- ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 4 + .../hawq/activateStandby/step1_view.js | 26 +++ .../hawq/activateStandby/step2_view.js | 29 +++ .../hawq/activateStandby/step3_view.js | 36 .../hawq/activateStandby/wizard_view.js | 74 ambari-web/app/views/main/service/item.js | 2 + .../activateStandby/step2_controller_test.js| 88 + 29 files changed, 1160 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/65558a5a/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 215a754..85c814d 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -71,6 +71,7 @@ var files = [ 'test/controllers/main/admin/highAvailability/nameNode/step4_controller_test', 'test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test', 'test/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test', 'test/controllers/main/dashboard/config_history_controller_test', 'test/controllers/main/charts/heatmap_test', 'test/controllers/main/charts/heatmap_metrics/heatmap_metric_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/65558a5a/ambari-web/app/controllers.js -- diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index eed54dc..8fa9e6b 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -60,6 +60,10 @@ require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controlle require('controllers/main/admin/highAvailability/hawq/addStandby/step2_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step3_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step4_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/wizard_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step1_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step3_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/wizard_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/step1_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/step2_controller');
[08/40] ambari git commit: AMBARI-14916. Issues with Login Message dialog (alexantonenko)
AMBARI-14916. Issues with Login Message dialog (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81b46da3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81b46da3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81b46da3 Branch: refs/heads/branch-dev-patch-upgrade Commit: 81b46da33da91d672f16e88c9165e69954d2b292 Parents: 04b0227 Author: Alex AntonenkoAuthored: Thu Feb 4 13:11:57 2016 +0200 Committer: Alex Antonenko Committed: Thu Feb 4 17:08:46 2016 +0200 -- .../loginActivities/LoginActivitiesMainCtrl.js | 4 ++-- .../loginActivities/LoginMessageMainCtrl.js | 5 ++-- .../ui/admin-web/app/scripts/i18n.config.js | 6 +++-- .../ui/admin-web/app/scripts/routes.js | 9 ++- .../ui/admin-web/app/views/leftNavbar.html | 2 +- .../app/views/loginActivities/loginMessage.html | 25 .../app/views/loginActivities/main.html | 4 ++-- .../src/main/resources/ui/admin-web/gulpfile.js | 1 - ambari-web/app/router.js| 2 +- 9 files changed, 30 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js index 84af924..3fcf8b2 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js @@ -18,6 +18,6 @@ 'use strict'; angular.module('ambariAdminConsole') - .controller('LoginActivitiesMainCtrl',['$scope', function($scope) { -$scope.tab = 'loginMessage'; + .controller('LoginActivitiesMainCtrl',['$scope', '$location', function($scope, $location) { +$scope.tab = $location.path().substr(1) == "loginActivities" ? "loginMessage" : $location.path().substr(1); }]); http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js index af78dde..763bd59 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js @@ -29,18 +29,17 @@ angular.module('ambariAdminConsole') $scope.submitDisabled = true; $http.get('/api/v1/settings/motd').then(function (res) { - var response = JSON.parse(res.data.Settings.content); + $scope.motdExists = true; + var response = JSON.parse(res.data.Settings.content.replace(/\n/g, "\\n")); $scope.text = response.text ? response.text : ""; $scope.buttonText = response.button ? response.button : ""; $scope.status = response.status && response.status == "true" ? true : false; - $scope.motdExists = true; }); $scope.inputChangeEvent = function(){ $scope.submitDisabled = false; }; $scope.changeStatus = function(){ - $scope.status = !$scope.status; $scope.submitDisabled = false; }; http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js index 086bc13..91a1645 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js @@ -90,8 +90,10 @@ angular.module('ambariAdminConsole') 'onlySimpleChars': 'Must contain only simple characters.', 'saveError': 'Save error', 'message': 'Message', -'buttonText': 'Button text', -'switch': 'On/Off' +'buttonText': 'Button', +'status': 'Status', +'status.enabled': 'Enabled', +'status.disabled': 'Disabled' },
[13/40] ambari git commit: AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan)
AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0bec5cb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0bec5cb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0bec5cb Branch: refs/heads/branch-dev-patch-upgrade Commit: d0bec5cb3c0298d83413342d55baf36133632ab8 Parents: 8c6c13d Author: Aravindan VijayanAuthored: Thu Feb 4 10:48:38 2016 -0800 Committer: Aravindan Vijayan Committed: Thu Feb 4 10:48:38 2016 -0800 -- .../server/upgrade/UpgradeCatalog222.java | 46 .../0.1.0/configuration/ams-site.xml| 4 +- .../server/upgrade/UpgradeCatalog222Test.java | 79 3 files changed, 127 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d0bec5cb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java index 22f6a39..7e2683d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java @@ -27,6 +27,7 @@ import org.apache.ambari.server.orm.dao.DaoUtils; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; +import org.apache.ambari.server.state.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +47,11 @@ public class UpgradeCatalog222 extends AbstractUpgradeCatalog { * Logger. */ private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog222.class); + private static final String AMS_SITE = "ams-site"; + private static final String HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER = +"timeline.metrics.host.aggregator.daily.checkpointCutOffMultiplier"; + private static final String CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER = +"timeline.metrics.cluster.aggregator.daily.checkpointCutOffMultiplier"; @@ -99,6 +105,7 @@ public class UpgradeCatalog222 extends AbstractUpgradeCatalog { addNewConfigurationsFromXml(); updateAlerts(); updateStormConfigs(); +updateAMSConfigs(); } protected void updateStormConfigs() throws AmbariException { @@ -137,4 +144,43 @@ public class UpgradeCatalog222 extends AbstractUpgradeCatalog { } + protected void updateAMSConfigs() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); +Clusters clusters = ambariManagementController.getClusters(); + +if (clusters != null) { + Map clusterMap = clusters.getClusters(); + + if (clusterMap != null && !clusterMap.isEmpty()) { +for (final Cluster cluster : clusterMap.values()) { + + Config amsSite = cluster.getDesiredConfigByType(AMS_SITE); + if (amsSite != null) { +Map amsSiteProperties = amsSite.getProperties(); +Map newProperties = new HashMap<>(); + +if (amsSiteProperties.containsKey(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER) && + amsSiteProperties.get(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1")) { + + LOG.info("Setting value of " + HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2"); + newProperties.put(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, String.valueOf(2)); + +} + +if (amsSiteProperties.containsKey(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER) && + amsSiteProperties.get(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1")) { + + LOG.info("Setting value of " + CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2"); + newProperties.put(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, String.valueOf(2)); + +} + +updateConfigurationPropertiesForCluster(cluster, AMS_SITE, newProperties, true, true); + } + +} + } +} + } + } http://git-wip-us.apache.org/repos/asf/ambari/blob/d0bec5cb/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml -- diff --git
[02/40] ambari git commit: AMBARI-14906: Text update for conf_select.py (dili)
AMBARI-14906: Text update for conf_select.py (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d89f8a5f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d89f8a5f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d89f8a5f Branch: refs/heads/branch-dev-patch-upgrade Commit: d89f8a5f91bba77b68ff32a221baac589b017896 Parents: 5833aab Author: Di LiAuthored: Wed Feb 3 17:24:03 2016 -0500 Committer: Di Li Committed: Wed Feb 3 17:24:03 2016 -0500 -- .../python/resource_management/libraries/functions/conf_select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d89f8a5f/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py index 2bc01ee..dc7fa6e 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py @@ -412,7 +412,7 @@ def convert_conf_directories_to_symlinks(package, version, dirs, skip_existing_l # check if conf is a link already old_conf = dir_def['conf_dir'] if os.path.islink(old_conf): -Logger.info("{0} is already link to {1}".format(old_conf, os.path.realpath(old_conf))) +Logger.info("{0} is already linked to {1}".format(old_conf, os.path.realpath(old_conf))) bad_dirs.append(old_conf) if len(bad_dirs) > 0:
[11/40] ambari git commit: AMBARI-14833 : Add role command order Start/Stop dependency between Metrics Collector and Zookeeper Server (avijayan)
AMBARI-14833 : Add role command order Start/Stop dependency between Metrics Collector and Zookeeper Server (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d2191c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d2191c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d2191c9 Branch: refs/heads/branch-dev-patch-upgrade Commit: 7d2191c9d89570de6394e71d02ccfd7564c36e40 Parents: 4078225 Author: Aravindan VijayanAuthored: Thu Feb 4 10:07:18 2016 -0800 Committer: Aravindan Vijayan Committed: Thu Feb 4 10:07:18 2016 -0800 -- .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d2191c9/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json index 6ed1537..a480e2a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json @@ -22,7 +22,7 @@ "SQOOP_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"], "ZOOKEEPER_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"], "ZOOKEEPER_QUORUM_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"], -"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP"], +"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP", "METRICS_COLLECTOR-STOP"], "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"] }, "_comment" : "GLUSTERFS-specific dependencies", @@ -32,7 +32,7 @@ }, "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster", "optional_no_glusterfs": { -"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", "SECONDARY_NAMENODE-START"], +"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", "SECONDARY_NAMENODE-START", "ZOOKEEPER_SERVER-START"], "AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK"], "SECONDARY_NAMENODE-START": ["NAMENODE-START"], "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],
[16/40] ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)
AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7af40ca1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7af40ca1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7af40ca1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 7af40ca158e83c6d8c0de3d8381a6ad0c8a6b903 Parents: 7616e0f Author: Yusaku SakoAuthored: Thu Feb 4 11:13:19 2016 -0800 Committer: Yusaku Sako Committed: Thu Feb 4 11:13:24 2016 -0800 -- .../screenshots/1-add-datasource.png | Bin 0 -> 108602 bytes .../screenshots/10-choose-hostname.png| Bin 0 -> 298654 bytes .../screenshots/11-choose-agg-rate-precision.png | Bin 0 -> 276486 bytes .../screenshots/12-change-panel-title.png | Bin 0 -> 258642 bytes .../screenshots/13-save-dashboard.png | Bin 0 -> 262005 bytes .../screenshots/14-change-timerange.png | Bin 0 -> 310766 bytes .../screenshots/15-change-units.png | Bin 0 -> 322069 bytes .../screenshots/16-display-style-graph-1.png | Bin 0 -> 285467 bytes .../screenshots/17-series-specific-override.png | Bin 0 -> 302825 bytes .../screenshots/18-override-time.png | Bin 0 -> 255655 bytes .../screenshots/19-edit-graph.png | Bin 0 -> 191904 bytes .../screenshots/2-datasource-details.png | Bin 0 -> 125313 bytes .../screenshots/3-test-datasource.png | Bin 0 -> 136121 bytes .../screenshots/4-dashboard-dropdown.png | Bin 0 -> 126964 bytes .../screenshots/5-dashboard-graph-menu.png| Bin 0 -> 146851 bytes .../screenshots/6-graph-panels.png| Bin 0 -> 105383 bytes .../screenshots/7-choose-datasource.png | Bin 0 -> 246860 bytes .../screenshots/8-choose-component.png| Bin 0 -> 199123 bytes .../screenshots/9-choose-metric.png | Bin 0 -> 216473 bytes .../screenshots/add-dashboard.png | Bin 0 -> 107965 bytes .../screenshots/full-dashboard.png| Bin 0 -> 161956 bytes 21 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png -- diff --git a/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png b/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png new file mode 100644 index 000..1c1eaa4 Binary files /dev/null and b/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png -- diff --git a/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png b/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png new file mode 100644 index 000..d6a7d1a Binary files /dev/null and b/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png -- diff --git a/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png b/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png new file mode 100644 index 000..363fdf1 Binary files /dev/null and b/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png -- diff --git a/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png b/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png new file mode 100644 index 000..fe34f82 Binary files /dev/null and b/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png differ http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png -- diff --git a/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png b/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png new file mode 100644 index 000..65d7a9d Binary files /dev/null and
[07/40] ambari git commit: AMBARI-14919. [Ambari tarballs] Create script to install ambari tar.gz into custom root (aonishuk)
AMBARI-14919. [Ambari tarballs] Create script to install ambari tar.gz into custom root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/04b02273 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/04b02273 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/04b02273 Branch: refs/heads/branch-dev-patch-upgrade Commit: 04b02273a611377602f023f4b6700856dc8eb115 Parents: ed3ca61 Author: Andrew OnishukAuthored: Thu Feb 4 14:06:02 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 4 14:06:02 2016 +0200 -- ambari-agent/pom.xml| 44 +- .../src/main/repo/install_ambari_tarball.py | 145 +++ ambari-server/conf/unix/install-helper.sh | 52 --- ambari-server/pom.xml | 106 ++ .../src/main/package/deb/control/postinst | 6 +- .../src/main/package/deb/control/preinst| 23 +-- .../src/main/package/deb/control/prerm | 6 +- 7 files changed, 313 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/04b02273/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 918065f..7531650 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -334,6 +334,48 @@ + +copy-repo-resources +package + + copy-resources + + + ${basedir}/target/repo + + + ${project.basedir}/../ambari-common/src/main/repo + + + ${project.build.directory} + + ${project.artifactId}-${project.version}.tar.gz + + + + ${basedir}/src/main/package/deb/control + + + + + + + +com.coderplus.maven.plugins +copy-rename-maven-plugin +1.0.1 + + +rename-file +package + + rename + + + ${basedir}/target/repo/${project.artifactId}-${project.version}.tar.gz + ${basedir}/target/repo/${project.artifactId}.tar.gz + + @@ -449,7 +491,7 @@ build-windows-zip -prepare-package +package single http://git-wip-us.apache.org/repos/asf/ambari/blob/04b02273/ambari-common/src/main/repo/install_ambari_tarball.py -- diff --git a/ambari-common/src/main/repo/install_ambari_tarball.py b/ambari-common/src/main/repo/install_ambari_tarball.py new file mode 100644 index 000..aa33ede --- /dev/null +++ b/ambari-common/src/main/repo/install_ambari_tarball.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python2 +''' +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. +''' + +import os +import sys +import logging +import subprocess +from optparse import OptionParser + +USAGE = "Usage: %prog [OPTION]... URL" +DESCRIPTION = "URL should point to full tar.gz location e.g.: https://public-repo-1.hortonworks.com/something/ambari-server.tar.gz; + +logger = logging.getLogger("install_ambari_tarball") + +PREINST_SCRIPT = "preinst" +PRERM_SCRIPT = "prerm" +POSTINST_SCRIPT = "postinst" +POSTRM_SCRIPT = "postrm" + +ROOT_FOLDER_ENV_VARIABLE = "AMBARI_ROOT_FOLDER" + +class Utils: + verbose = False + @staticmethod + def os_call(command, logoutput=None, env={}): +shell = not isinstance(command, list) +print_output = logoutput==True or (logoutput==None and Utils.verbose) + +if not print_output: + stdout = subprocess.PIPE + stderr = subprocess.STDOUT
[22/40] ambari git commit: AMBARI-14917. Edit WEB Alert issues (onechiporenko)
AMBARI-14917. Edit WEB Alert issues (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74d5a016 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74d5a016 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74d5a016 Branch: refs/heads/branch-dev-patch-upgrade Commit: 74d5a016711c8c9d8641953e8732e65534db1a88 Parents: 3d7643b Author: Oleg NechiporenkoAuthored: Thu Feb 4 14:13:28 2016 +0200 Committer: Oleg Nechiporenko Committed: Fri Feb 5 10:02:36 2016 +0200 -- .../alerts/definition_configs_controller.js | 13 +- ambari-web/app/models/alerts/alert_config.js| 1 + ambari-web/app/styles/alerts.less | 2 +- .../activateStandby/step2_controller_test.js| 1 - .../definitions_configs_controller_test.js | 26 5 files changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/controllers/main/alerts/definition_configs_controller.js -- diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js index 3fd5510..ec5680c 100644 --- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js @@ -499,12 +499,8 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ return c.get('name') !== 'parameter'; }); configs.forEach(function (property) { - var apiProperties = property.get('apiProperty'); - var apiFormattedValues = property.get('apiFormattedValue'); - if (!Em.isArray(property.get('apiProperty'))) { -apiProperties = [property.get('apiProperty')]; -apiFormattedValues = [property.get('apiFormattedValue')]; - } + var apiProperties = Em.makeArray(property.get('apiProperty')); + var apiFormattedValues = Em.makeArray(property.get('apiFormattedValue')); apiProperties.forEach(function (apiProperty, i) { if (apiProperty.contains('source.')) { if (!propertiesToUpdate['AlertDefinition/source']) { @@ -531,7 +527,6 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ } Ember.setFullPath(propertiesToUpdate['AlertDefinition/source'], apiProperty.replace('source.', ''), apiFormattedValues[i]); } - } else { if (apiProperty) { @@ -541,6 +536,10 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ }, this); }, this); +if (Em.get(propertiesToUpdate, 'AlertDefinition/source.uri.id')) { + delete propertiesToUpdate['AlertDefinition/source'].uri.id; +} + // `source.parameters` is an array and should be updated separately from other configs if (this.get('content.parameters.length')) { propertiesToUpdate['AlertDefinition/source/parameters'] = this.get('content.rawSourceData.parameters'); http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/models/alerts/alert_config.js -- diff --git a/ambari-web/app/models/alerts/alert_config.js b/ambari-web/app/models/alerts/alert_config.js index a9a8154..c86b19a 100644 --- a/ambari-web/app/models/alerts/alert_config.js +++ b/ambari-web/app/models/alerts/alert_config.js @@ -437,6 +437,7 @@ App.AlertConfigProperties = { displayType: 'textField', classNames: 'alert-connection-timeout', apiProperty: 'source.uri.connection_timeout', +unit: 'Seconds', isValid: function () { var value = this.get('value'); return numericUtils.isPositiveNumber(value); http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/app/styles/alerts.less -- diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less index 1063ecf..c4f163d 100644 --- a/ambari-web/app/styles/alerts.less +++ b/ambari-web/app/styles/alerts.less @@ -324,7 +324,7 @@ padding-right: 13px; } - .alert-interval-input { + .alert-interval-input, .alert-connection-timeout { input { width: 20%; } http://git-wip-us.apache.org/repos/asf/ambari/blob/74d5a016/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js -- diff --git a/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js
[19/40] ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)
AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f026accf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f026accf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f026accf Branch: refs/heads/branch-dev-patch-upgrade Commit: f026accf2df9f2be6e6f4dac049593c90f37bbc9 Parents: eb3f995 Author: Yusaku SakoAuthored: Thu Feb 4 13:15:49 2016 -0800 Committer: Yusaku Sako Committed: Thu Feb 4 13:15:49 2016 -0800 -- ambari-metrics/ambari-metrics-grafana/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f026accf/ambari-metrics/ambari-metrics-grafana/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-grafana/pom.xml b/ambari-metrics/ambari-metrics-grafana/pom.xml index 45ca1a0..8304416 100644 --- a/ambari-metrics/ambari-metrics-grafana/pom.xml +++ b/ambari-metrics/ambari-metrics-grafana/pom.xml @@ -67,6 +67,7 @@ conf/unix/ams-grafana.ini +**/*.json
[23/40] ambari git commit: AMBARI-14936. Tweaks to reduce build time (aonishuk)
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/dc8e5c3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc8e5c3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc8e5c3c Branch: refs/heads/branch-dev-patch-upgrade Commit: dc8e5c3c68d25e74ab875a87f66959fc86a9631c Parents: 74d5a01 Author: Andrew OnishukAuthored: Fri Feb 5 11:02:39 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 5 11:02:39 2016 +0200 -- ambari-agent/pom.xml | 40 +++ ambari-server/pom.xml| 6 ++-- ambari-server/src/main/assemblies/server.xml | 2 +- ambari-web/pom.xml | 3 +- pom.xml | 18 +- 5 files changed, 27 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 7531650..d049a6c 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -89,24 +89,6 @@ 3.0 -maven-assembly-plugin - - gnu - -src/packages/tarball/all.xml - - - - -build-tarball -prepare-package - - single - - - - - org.apache.maven.plugins maven-surefire-plugin @@ -264,6 +246,24 @@ +maven-assembly-plugin + + gnu + +src/packages/tarball/all.xml + + + + +build-tarball +${assemblyPhase} + + single + + + + + maven-resources-plugin 2.6 @@ -336,7 +336,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -367,7 +367,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 6fb090a..623ddca 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -137,7 +137,7 @@ build-tarball -package +${assemblyPhase} single @@ -176,7 +176,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -207,7 +207,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 17d6bdb..8bfad0c 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -306,7 +306,7 @@ 755 - target/classes/stacks/stack_advisor.py + src/main/resources/stacks/stack_advisor.py /var/lib/ambari-server/resources/stacks http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/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/dc8e5c3c/pom.xml -- diff --git a/pom.xml b/pom.xml index 57c6de7..8f321fd 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,7 @@ apache.staging.https Apache Release Distribution Repository
[14/40] ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)
AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ff0b5ed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ff0b5ed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ff0b5ed Branch: refs/heads/branch-dev-patch-upgrade Commit: 8ff0b5ed82784a202978017345348d0d130b64af Parents: d0bec5c Author: Yusaku SakoAuthored: Thu Feb 4 11:05:37 2016 -0800 Committer: Yusaku Sako Committed: Thu Feb 4 11:05:37 2016 -0800 -- ambari-metrics/ambari-metrics-grafana/README.md | 243 +++ .../ambari-metrics/datasource.js| 304 +++ .../ambari-metrics/directives.js| 36 +++ .../ambari-metrics/partials/config.html | 19 ++ .../ambari-metrics/partials/query.editor.html | 133 .../ambari-metrics/partials/query.options.html | 42 +++ .../ambari-metrics/plugin.json | 14 + .../ambari-metrics/queryCtrl.js | 131 ambari-metrics/pom.xml | 1 + 9 files changed, 923 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ff0b5ed/ambari-metrics/ambari-metrics-grafana/README.md -- diff --git a/ambari-metrics/ambari-metrics-grafana/README.md b/ambari-metrics/ambari-metrics-grafana/README.md new file mode 100644 index 000..0a138e8 --- /dev/null +++ b/ambari-metrics/ambari-metrics-grafana/README.md @@ -0,0 +1,243 @@ + +# AMS (Ambari Metrics Service) Datasource Plugin for Grafana + +Use **ambari-metrics** to visualize metrics exposed via AMS in Grafana. + +### If you already have Ambari Metrics UI as a part of your AMS Install, [go here](#createdash) to get started + + +**ToC** + - [Install Grafana](#installg) + - [Install Datasource Plugin](#installam) + - [Access Grafana](#accessgraf) + - [Add Datasource to Grafana](#addds) + - [Test Datasource](#testds) + - [Create Dashboard](#createdash) + - [Add a Graph](#addgraph) + - [Save Dashboard](#savedash) + - [Time Ranges](#timerange) + - [Edit Panel/Graph](#editpanel) + + +-- +![enter image description here](screenshots/full-dashboard.png) + +-- + +### Install Grafana + + +You can install Grafana on any host. It does not need to be co-located with Ambari Metrics Collector. The only requirement is that it has network access to Ambari Metrics Collector. + +**Install on CentOS/Red Hat:** +``` +sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm +``` + +**Install on Ubuntu/Debian:** +``` +wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb +sudo apt-get install -y adduser libfontconfig +sudo dpkg -i grafana_2.6.0_amd64.deb +``` + +**Install on SUSE/SLES:** +``` +sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm +``` + +### Deploy ambari-metrics + +**On your Grafana Server** + +``` +cp -R ambari/ambari-metrics/ambari-metrics-grafana/ambari-metrics /usr/share/grafana/public/app/plugins/datasource +``` + +### Start Grafana + +``` +sudo service grafana-server start +``` + + +### Access Grafana + +``` +http://GRAFANA_HOST:3000 +``` + +--- + + +## Add Ambari Metrics Datasource in Grafana UI + +**Add a Datasource** +> - Click on "Datasources" +> - Click on "Add New" at the top + +![add-datasource](screenshots/1-add-datasource.png) + +**Add a Datasource (continued)** + +> 1. Name of your Datasource +> 2. Type = AmbariMetrics +> 3. Host+Port of your AMS installation. (usually host:6188) +> - No trailing slashes +> - Nothing else needs to be changed +> - Click on Save. + +![datasource-details](screenshots/2-datasource-details.png) + + + +**Test your Datasource** + +> To make sure it's all working, click on **Test Connection** and you should see a message that says "Data source is working". + + +![test-datasource](screenshots/3-test-datasource.png) + +--- + + +## Creating a Dashboard + +**To create a dashboard** + +> - Click on Dashboards on the left +> - Click on "Home" +> - Click on New at the bottom of the dropdown + +![Dashboard Dropdown](screenshots/4-dashboard-dropdown.png) + + + +**To add a panel to your newly created dashboard** + +> - Click on the green button on the left(see image below) +> - This will expand a flyout menu that will allow you to add a panel +> - Choose Graph / Table / Single Stat + +![Add Panel](screenshots/5-dashboard-graph-menu.png) + +![Types of Panels](screenshots/6-graph-panels.png) + + +--- + + +**To add a Graph** + + +> - Choose the Datasource you created earlier +> - Once you've
[35/40] ambari git commit: AMBARI-14943 AMS check failed on deploy (dsen)
AMBARI-14943 AMS check failed on deploy (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/13325ab0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/13325ab0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/13325ab0 Branch: refs/heads/branch-dev-patch-upgrade Commit: 13325ab07821cdfc3813457c0ca05c6b065f5879 Parents: b567ca4 Author: Dmytro SenAuthored: Fri Feb 5 19:52:19 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 19:52:19 2016 +0200 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 51 .../webapp/TimelineWebServices.java | 7 +-- .../timeline/PhoenixHBaseAccessorTest.java | 2 +- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/13325ab0/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 29662f3..7fa1d2d 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 @@ -555,34 +555,43 @@ public class PhoenixHBaseAccessor { throw new IllegalArgumentException("Multiple aggregate functions not supported."); } for (Function f : functions) { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); - -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); +if (f.getReadFunction() == Function.ReadFunction.VALUE) { + getTimelineMetricsFromResultSet(metrics, condition, rs); } else { - metrics.getMetrics().add(metric.getTimelineMetric()); + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, f); + + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); + } } } } else { // No aggregation requested - if (condition.getPrecision().equals(Precision.SECONDS)) { -TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric); -} + // Execution never goes here, function always contain at least 1 element + getTimelineMetricsFromResultSet(metrics, condition, rs); +} + } + private void getTimelineMetricsFromResultSet(TimelineMetrics metrics, Condition condition, ResultSet rs) throws SQLException, IOException { +if (condition.getPrecision().equals(Precision.SECONDS)) { + TimelineMetric metric = TIMELINE_METRIC_READ_HELPER.getTimelineMetricFromResultSet(rs); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); } else { -SingleValuedTimelineMetric metric = - TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, -Function.DEFAULT_VALUE_FUNCTION); -if (condition.isGrouped()) { - metrics.addOrMergeTimelineMetric(metric); -} else { - metrics.getMetrics().add(metric.getTimelineMetric()); -} +metrics.getMetrics().add(metric); + } + +} else { + SingleValuedTimelineMetric metric = + TIMELINE_METRIC_READ_HELPER.getAggregatedTimelineMetricFromResultSet(rs, + Function.DEFAULT_VALUE_FUNCTION); + if (condition.isGrouped()) { +metrics.addOrMergeTimelineMetric(metric); + } else { +metrics.getMetrics().add(metric.getTimelineMetric()); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/13325ab0/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java -- diff --git
[37/40] ambari git commit: AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko)
AMBARI-14764. MapReduce, Oozie service check failures after upgrade finished (dlysnichenko) Conflicts: ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb864df5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb864df5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb864df5 Branch: refs/heads/branch-dev-patch-upgrade Commit: bb864df5da25093ff386433dd591898d713fd092 Parents: 14d53f7 Author: Lisnichenko DmitroAuthored: Fri Feb 5 19:52:57 2016 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 5 19:58:32 2016 +0200 -- .../ambari/server/agent/HeartbeatMonitor.java | 45 +++ .../ambari/server/checks/CheckDescription.java | 8 ++ .../HardcodedStackVersionPropertiesCheck.java | 132 +++ .../serveraction/upgrades/FixLzoCodecPath.java | 103 +++ .../upgrades/OozieConfigCalculation.java| 94 + .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 3 + .../OOZIE/4.2.0.2.3/configuration/oozie-env.xml | 3 + .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 12 ++ .../services/OOZIE/configuration/oozie-env.xml | 3 + .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 12 ++ .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 13 +- .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 12 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 8 ++ .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 7 + .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 15 +++ .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 18 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 8 ++ .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 8 ++ .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 15 +++ .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml | 8 ++ ...ardcodedStackVersionPropertiesCheckTest.java | 60 + .../upgrades/FixLzoCodecPathTest.java | 76 +++ .../upgrades/OozieConfigCalculationTest.java| 87 24 files changed, 730 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb864df5/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java index d245a25..efc717d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java @@ -258,40 +258,37 @@ public class HeartbeatMonitor implements Runnable { continue; } - if (clusterConfig != null) { -// cluster config for 'global' -Map props = new HashMap (clusterConfig.getProperties()); + // cluster config for 'global' + Map props = new HashMap<>(clusterConfig.getProperties()); -Map > configTags = new HashMap >(); + Map > configTags = new HashMap<>(); -for (Map.Entry > entry : allConfigTags.entrySet()) { - if (entry.getKey().equals(clusterConfig.getType())) { -configTags.put(clusterConfig.getType(), entry.getValue()); - } + for (Map.Entry > entry : allConfigTags.entrySet()) { +if (entry.getKey().equals(clusterConfig.getType())) { + configTags.put(clusterConfig.getType(), entry.getValue()); } + } -Map > properties = configHelper -.getEffectiveConfigProperties(cluster, configTags); + Map > properties = configHelper + .getEffectiveConfigProperties(cluster, configTags); -if (!properties.isEmpty()) { - for (Map propertyMap : properties.values()) { -props.putAll(propertyMap); - } + if (!properties.isEmpty()) { +for (Map propertyMap : properties.values()) { + props.putAll(propertyMap); } + } -configurations.put(clusterConfig.getType(), props); + configurations.put(clusterConfig.getType(), props); -Map > attrs = new TreeMap >(); -
[18/40] ambari git commit: AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's security type has not changed (rlevas)
AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's security type has not changed (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb3f9959 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb3f9959 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb3f9959 Branch: refs/heads/branch-dev-patch-upgrade Commit: eb3f995965b2749910ceae9e5cc8f8bc043e6862 Parents: ab06c68 Author: Robert LevasAuthored: Thu Feb 4 15:46:18 2016 -0500 Committer: Robert Levas Committed: Thu Feb 4 15:46:23 2016 -0500 -- .../resources/ClusterResourceDefinition.java| 3 +- .../AmbariManagementControllerImpl.java | 44 +++-- .../server/controller/KerberosHelper.java | 26 +++- .../server/controller/KerberosHelperImpl.java | 5 ++ .../AmbariManagementControllerImplTest.java | 12 .../server/controller/KerberosHelperTest.java | 66 +++- 6 files changed, 133 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb3f9959/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java index b2be291..e57364f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java @@ -81,8 +81,9 @@ public class ClusterResourceDefinition extends BaseResourceDefinition { @Override public Collection getUpdateDirectives() { Collection directives = super.getUpdateDirectives(); -directives.add("regenerate_keytabs"); +directives.add(KerberosHelper.DIRECTIVE_REGENERATE_KEYTABS); directives.add(KerberosHelper.DIRECTIVE_MANAGE_KERBEROS_IDENTITIES); +directives.add(KerberosHelper.DIRECTIVE_FORCE_TOGGLE_KERBEROS); return directives; } http://git-wip-us.apache.org/repos/asf/ambari/blob/eb3f9959/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 5010311..69b3348 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -1708,29 +1708,35 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle } catch (KerberosOperationException e) { throw new IllegalArgumentException(e.getMessage(), e); } - } else if (cluster.getSecurityType() != securityType) { -LOG.info("Received cluster security type change request from {} to {}", -cluster.getSecurityType().name(), securityType.name()); + } else { +// If force_toggle_kerberos is not specified, null will be returned. Therefore, perform an +// equals check to yield true if the result is Boolean.TRUE, otherwise false. +boolean forceToggleKerberos = kerberosHelper.getForceToggleKerberosDirective(requestProperties); -if ((securityType == SecurityType.KERBEROS) || (securityType == SecurityType.NONE)) { - if(!AuthorizationHelper.isAuthorized(ResourceType.CLUSTER, cluster.getResourceId(), EnumSet.of(RoleAuthorization.CLUSTER_TOGGLE_KERBEROS))) { -throw new AuthorizationException("The authenticated user does not have authorization to enable or disable Kerberos"); - } +if (forceToggleKerberos || (cluster.getSecurityType() != securityType)) { + LOG.info("Received cluster security type change request from {} to {} (forced: {})", + cluster.getSecurityType().name(), securityType.name(), forceToggleKerberos); - // Since the security state of the cluster has changed, invoke toggleKerberos to handle - // adding or removing Kerberos from the cluster. This may generate multiple stages - // or not depending the current state of the cluster. - try { -requestStageContainer = kerberosHelper.toggleKerberos(cluster, securityType, requestStageContainer, -
[09/40] ambari git commit: AMBARI-14918 enabling ranger caused proxy settings for user hive in hdfs to get updated (dsen)
AMBARI-14918 enabling ranger caused proxy settings for user hive in hdfs to get updated (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/549ee24c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/549ee24c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/549ee24c Branch: refs/heads/branch-dev-patch-upgrade Commit: 549ee24c38746f2073969e4838a78f87d4c49860 Parents: 81b46da Author: Dmytro SenAuthored: Thu Feb 4 19:08:07 2016 +0200 Committer: Dmytro Sen Committed: Thu Feb 4 19:08:07 2016 +0200 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 32 .../stacks/2.0.6/common/test_stack_advisor.py | 54 2 files changed, 67 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/549ee24c/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 9a21b71..a53dd8b 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 @@ -173,11 +173,14 @@ class HDP206StackAdvisor(DefaultStackAdvisor): oozie_user = None if "oozie-env" in services["configurations"] and "oozie_user" in services["configurations"]["oozie-env"]["properties"]: oozie_user = services["configurations"]["oozie-env"]["properties"]["oozie_user"] -oozieServerrHost = self.getHostWithComponent("OOZIE", "OOZIE_SERVER", services, hosts) -if oozieServerrHost is not None: - oozieServerHostName = oozieServerrHost["Hosts"]["public_host_name"] +oozieServerrHosts = self.getHostsWithComponent("OOZIE", "OOZIE_SERVER", services, hosts) +if oozieServerrHosts is not None: + oozieServerHostsNameList = [] + for oozieServerHost in oozieServerrHosts: + oozieServerHostsNameList.append(oozieServerHost["Hosts"]["public_host_name"]) + oozieServerHostsNames = ",".join(oozieServerHostsNameList) if not oozie_user in users and oozie_user is not None: -users[oozie_user] = {"propertyHosts" : oozieServerHostName,"propertyGroups" : "*", "config" : "oozie-env", "propertyName" : "oozie_user"} +users[oozie_user] = {"propertyHosts" : oozieServerHostsNames,"propertyGroups" : "*", "config" : "oozie-env", "propertyName" : "oozie_user"} if "HIVE" in servicesList: hive_user = None @@ -186,13 +189,24 @@ class HDP206StackAdvisor(DefaultStackAdvisor): and "webhcat_user" in services["configurations"]["hive-env"]["properties"]: hive_user = services["configurations"]["hive-env"]["properties"]["hive_user"] webhcat_user = services["configurations"]["hive-env"]["properties"]["webhcat_user"] -hiveServerrHost = self.getHostWithComponent("HIVE", "HIVE_SERVER", services, hosts) -if hiveServerrHost is not None: - hiveServerHostName = hiveServerrHost["Hosts"]["public_host_name"] +hiveServerHosts = self.getHostsWithComponent("HIVE", "HIVE_SERVER", services, hosts) +webHcatServerHosts = self.getHostsWithComponent("HIVE", "WEBHCAT_SERVER", services, hosts) + +if hiveServerHosts is not None: + hiveServerHostsNameList = [] + for hiveServerHost in hiveServerHosts: + hiveServerHostsNameList.append(hiveServerHost["Hosts"]["public_host_name"]) + hiveServerHostsNames = ",".join(hiveServerHostsNameList) if not hive_user in users and hive_user is not None: -users[hive_user] = {"propertyHosts" : hiveServerHostName,"propertyGroups" : "*", "config" : "hive-env", "propertyName" : "hive_user"} +users[hive_user] = {"propertyHosts" : hiveServerHostsNames,"propertyGroups" : "*", "config" : "hive-env", "propertyName" : "hive_user"} + +if webHcatServerHosts is not None: + webHcatServerHostsNameList = [] + for webHcatServerHost in webHcatServerHosts: + webHcatServerHostsNameList.append(webHcatServerHost["Hosts"]["public_host_name"]) + webHcatServerHostsNames = ",".join(webHcatServerHostsNameList) if not webhcat_user in users and webhcat_user is not None: -users[webhcat_user] = {"propertyHosts" : hiveServerHostName,"propertyGroups" : "*", "config" : "hive-env", "propertyName" : "webhcat_user"} +users[webhcat_user] = {"propertyHosts" : webHcatServerHostsNames,"propertyGroups" : "*", "config" : "hive-env", "propertyName" :
[20/40] 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/080991d1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/080991d1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/080991d1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 080991d131768ece5e0d7065df2bb8443e14053f Parents: f026acc Author: Bob NettletonAuthored: Thu Feb 4 17:41:16 2016 -0500 Committer: Bob Nettleton Committed: Thu Feb 4 17:41:16 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/080991d1/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 0aae007..70fa880 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 @@ -161,9 +161,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)); @@ -179,6 +178,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/080991d1/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 7309d5b..2e7bd3b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java +++
[33/40] ambari git commit: AMBARI-14923. Log Search: Create Log File Search modal popup (alexantonenko)
AMBARI-14923. Log Search: Create Log File Search modal popup (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a2add5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a2add5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a2add5d Branch: refs/heads/branch-dev-patch-upgrade Commit: 3a2add5dcde4f1cb730253627b87683f3057c5c1 Parents: cd35e80 Author: Alex AntonenkoAuthored: Fri Feb 5 18:21:10 2016 +0200 Committer: Alex Antonenko Committed: Fri Feb 5 18:21:10 2016 +0200 -- ambari-web/app/assets/licenses/NOTICE.txt | 5 +- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/config.js| 3 +- ambari-web/app/messages.js | 9 +- ambari-web/app/mixins.js| 1 + .../app/mixins/common/infinite_scroll_mixin.js | 173 ambari-web/app/styles/log_file_search.less | 155 +++ .../app/templates/common/log_file_search.hbs| 109 ambari-web/app/views.js | 3 + .../app/views/common/form/datepicker_view.js| 37 +++ .../app/views/common/log_file_search_view.js| 272 +++ .../modal_popups/log_file_search_popup.js | 26 ++ .../views/common/log_file_search_view_test.js | 103 +++ .../vendor/scripts/bootstrap-contextmenu.js | 205 ++ 14 files changed, 1099 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/assets/licenses/NOTICE.txt -- diff --git a/ambari-web/app/assets/licenses/NOTICE.txt b/ambari-web/app/assets/licenses/NOTICE.txt index bc29209..c750a37 100644 --- a/ambari-web/app/assets/licenses/NOTICE.txt +++ b/ambari-web/app/assets/licenses/NOTICE.txt @@ -56,4 +56,7 @@ This product includes bootstrap-checkbox v.1.0.1 (https://github.com/montrezorro Copyright (C) 2014 Roberto Montresor (info [at] robertomontresor [*dot*] it) This product includes sticky-kit v.1.1.2 (https://github.com/leafo/sticky-kit - MIT License) -Copyright (C) 2015 Leaf Corcoran (leafot [at] gmail [*dot*] com) \ No newline at end of file +Copyright (C) 2015 Leaf Corcoran (leafot [at] gmail [*dot*] com) + +This product includes bootstrap-contextmenu v.0.3.3 (https://github.com/sydcanem/bootstrap-contextmenu - MIT License) +Copyright (C) 2015 James Santos http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/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 85c814d..e82a27e 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -288,6 +288,7 @@ var files = [ 'test/views/common/configs/widgets/time_interval_spinner_view_test', 'test/views/common/form/spinner_input_view_test', 'test/views/common/form/manage_kdc_credentials_form_test', + 'test/views/common/log_file_search_view_test', 'test/views/wizard/step3/hostLogPopupBody_view_test', 'test/views/wizard/step3/hostWarningPopupBody_view_test', 'test/views/wizard/step3/hostWarningPopupFooter_view_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/config.js -- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index 0beafb3..7d727d7 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -80,7 +80,8 @@ App.supports = { storeKDCCredentials: true, preInstallChecks: false, hostComboSearchBox: false, - serviceAutoStart: false + serviceAutoStart: false, + logSearch: false }; if (App.enableExperimental) { http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2add5d/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index f24876b..8d1f6f1 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -305,6 +305,13 @@ Em.I18n.translations = { 'common.openNewWindow': 'Open in New Window', 'common.fullLogPopup.clickToCopy': 'Click to Copy', 'common.nothingToDelete': 'Nothing to delete', + 'common.exclude': 'Exclude', + 'common.include': 'Include', + 'common.exclude.short': 'Excl', + 'common.include.short': 'Incl', + 'common.filters': 'Filters', + 'common.keywords': 'Keywods', + 'common.levels': 'Levels', 'models.alert_instance.tiggered.verbose': "Occurred on {0} Checked on {1}", 'models.alert_definition.triggered.verbose': "Occurred on {0}", @@ -1555,7 +1562,7 @@ Em.I18n.translations = {
[27/40] ambari git commit: AMBARI-14902 Make AMS Grafana component available as a repo package (additional patch) (dsen)
AMBARI-14902 Make AMS Grafana component available as a repo package (additional patch) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69195866 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69195866 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69195866 Branch: refs/heads/branch-dev-patch-upgrade Commit: 691958665eb13e58c302a5cf392f4e587853e551 Parents: c622332 Author: Dmytro SenAuthored: Fri Feb 5 14:27:25 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 14:27:25 2016 +0200 -- ambari-metrics/ambari-metrics-assembly/pom.xml | 204 +++- 1 file changed, 203 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69195866/ambari-metrics/ambari-metrics-assembly/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml index 511dc1f..130097d 100644 --- a/ambari-metrics/ambari-metrics-assembly/pom.xml +++ b/ambari-metrics/ambari-metrics-assembly/pom.xml @@ -130,7 +130,7 @@ ambari-metrics-grafana-${project.version} false -src/main/assembly/grafana.xml +${assemblydescriptor.grafana} gnu @@ -208,6 +208,208 @@ root + + + +ambari-metrics-collector +package + + rpm + + + ambari-metrics-collector + 2012, Apache Software Foundation + Development + Maven Recipe: RPM Package. + false + +${python.ver} + + + 644 + 755 + root + root + + + + + /usr/lib/ambari-metrics-collector/ + + + ${collector.dir}/target/lib + + + + ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar + + + + + + + /usr/lib/ams-hbase/ + + + ${collector.dir}/target/embedded/${hbase.folder} + +bin/** +bin/* + + + + + + /usr/lib/ams-hbase/bin + 755 + + + ${collector.dir}/target/embedded/${hbase.folder}/bin + + + + + /usr/lib/ams-hbase/lib/ + + + ${collector.dir}/target/lib + +phoenix*.jar +antlr*.jar + + + + + + /usr/lib/ams-hbase/lib/hadoop-native/ + + + ${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native + + + + + /usr/sbin + 755 + root + root + false + + + ${collector.dir}/conf/unix/ambari-metrics-collector + false + + + + + /etc/ambari-metrics-collector/conf + true + + + ${collector.dir}/conf/unix/ams-env.sh + + + ${collector.dir}/conf/unix/ams-site.xml + + +
[39/40] ambari git commit: AMBARI-14766 - Selecting ALL groups does not work under Manage Alert Notifications (Keta Patel via jonathanhurley)
AMBARI-14766 - Selecting ALL groups does not work under Manage Alert Notifications (Keta Patel via jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f57f9b29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f57f9b29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f57f9b29 Branch: refs/heads/branch-dev-patch-upgrade Commit: f57f9b2910ad1d888b2bd608e3d8b450154a0a23 Parents: 26ad97b Author: Jonathan HurleyAuthored: Fri Feb 5 16:24:12 2016 -0500 Committer: Jonathan Hurley Committed: Fri Feb 5 16:24:28 2016 -0500 -- .../internal/AlertTargetResourceProvider.java | 12 +- .../AlertTargetResourceProviderTest.java| 150 ++- .../manage_alert_notifications_controller.js| 7 + 3 files changed, 162 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f57f9b29/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index d28987d..992d33f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -380,7 +380,10 @@ public class AlertTargetResourceProvider extends String notificationType = (String) requestMap.get(ALERT_TARGET_NOTIFICATION_TYPE); Collection alertStates = (Collection) requestMap.get(ALERT_TARGET_STATES); Collection groupIds = (Collection) requestMap.get(ALERT_TARGET_GROUPS); - +String isGlobal = (String) requestMap.get(ALERT_TARGET_GLOBAL); +if(null != isGlobal){ + entity.setGlobal(Boolean.parseBoolean(isGlobal)); +} if (!StringUtils.isBlank(name)) { entity.setTargetName(name); } @@ -425,6 +428,13 @@ public class AlertTargetResourceProvider extends } entity.setAlertGroups(groups); +} else if (entity.isGlobal()){ + Set groups = new HashSet(s_dao.findAllGroups()); + for (AlertGroupEntity group : groups) { +group.addAlertTarget(entity); +s_dao.merge(group); + } + entity.setAlertGroups(groups); } s_dao.merge(entity); http://git-wip-us.apache.org/repos/asf/ambari/blob/f57f9b29/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java index f80b6f7..7277b67 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java @@ -894,6 +894,126 @@ public class AlertTargetResourceProviderTest { verify(m_amc, m_dao); } + @Test + public void testUpdateAlertTargetsWithCustomGroups() throws Exception{ +Capture entityCapture = new Capture(); +m_dao.create(capture(entityCapture)); +expectLastCall().times(1); + +AlertTargetEntity target = new AlertTargetEntity(); +expect(m_dao.findTargetById(ALERT_TARGET_ID)).andReturn(target).once(); + +Capture groupEntityCapture = new Capture(); + +//All Groups in the Database with CLuster ID = 1L +List groups = getMockGroupEntities(); + +//List of group ids to be selected in Custom option +List groupIds = Arrays.asList(1L, 2L, 3L); + + expect(m_dao.findGroupsById(EasyMock.eq(groupIds))).andReturn(groups).anyTimes(); +expect(m_dao.findAllGroups()).andReturn(groups).anyTimes(); +for(AlertGroupEntity group: groups){ + expect(m_dao.merge(capture(groupEntityCapture))).andReturn(group).anyTimes(); +} +expect(m_dao.merge(capture(entityCapture))).andReturn(target).anyTimes(); + +//start execution with the above Expectation setters +replay(m_amc, m_dao); + + SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createAdministrator()); + +AlertTargetResourceProvider provider = createProvider(m_amc); +Map requestProps = getCreationProperties(); +Request request = PropertyHelper.getCreateRequest( +
[26/40] ambari git commit: AMBARI-14935 UpgradeCatalog222Test fails (dsen)
AMBARI-14935 UpgradeCatalog222Test fails (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6223323 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6223323 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6223323 Branch: refs/heads/branch-dev-patch-upgrade Commit: c62233236dffe0eb4b4664fc685fc663db1feb70 Parents: 315f502 Author: Dmytro SenAuthored: Fri Feb 5 13:38:38 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 13:38:38 2016 +0200 -- .../org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java| 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c6223323/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java index b701d78..67b9da5 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java @@ -100,12 +100,14 @@ public class UpgradeCatalog222Test { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateAlerts = UpgradeCatalog222.class.getDeclaredMethod("updateAlerts"); Method updateStormConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateStormConfigs"); +Method updateAMSConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateAMSConfigs"); UpgradeCatalog222 upgradeCatalog222 = createMockBuilder(UpgradeCatalog222.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateAlerts) .addMockedMethod(updateStormConfigs) +.addMockedMethod(updateAMSConfigs) .createMock(); upgradeCatalog222.addNewConfigurationsFromXml();
[10/40] ambari git commit: AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen)
AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40782258 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40782258 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40782258 Branch: refs/heads/branch-dev-patch-upgrade Commit: 407822583d2d4f1a21e9d610e80fb32de548d9ac Parents: 549ee24 Author: Dmytro SenAuthored: Thu Feb 4 19:49:57 2016 +0200 Committer: Dmytro Sen Committed: Thu Feb 4 19:49:57 2016 +0200 -- ambari-metrics/ambari-metrics-assembly/pom.xml | 53 - 1 file changed, 52 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/40782258/ambari-metrics/ambari-metrics-assembly/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml index dfc9351..511dc1f 100644 --- a/ambari-metrics/ambari-metrics-assembly/pom.xml +++ b/ambari-metrics/ambari-metrics-assembly/pom.xml @@ -501,11 +501,14 @@ template /etc/ambari-metrics-monitor/conf -/usr/lib/ambari-metrics-collector /etc/ambari-metrics-collector/conf +/etc/ambari-metrics-grafana/conf /etc/ams-hbase/conf /var/run/ams-hbase +/var/run/ambari-metrics-grafana +/var/log/ambari-metrics-grafana /var/lib/ambari-metrics-collector +/var/lib/ambari-metrics-grafana /usr/lib/ambari-metrics-hadoop-sink /usr/lib/ambari-metrics-kafka-sink /usr/lib/ambari-metrics-kafka-sink/lib @@ -655,6 +658,54 @@ + + + + ${grafana.dir}/target/grafana/${grafana.folder} + directory + +perm +644 +/usr/lib/ambari-metrics-grafana + + + + ${grafana.dir}/target/grafana/${grafana.folder}/bin + directory + +perm +755 +/usr/lib/ambari-metrics-grafana/bin + + + + ${grafana.dir}/conf/unix/ambari-metrics-grafana + file + +perm +755 +/usr/sbin + + + + ${grafana.dir}/conf/unix/ams-grafana-env.sh + file + +perm +755 +/etc/ambari-metrics-grafana/conf + + + + ${grafana.dir}/conf/unix/ams-grafana.ini + file + +perm +644 +/etc/ambari-metrics-grafana/conf + + +
[17/40] ambari git commit: AMBARI-14929. Enable security wizard hangs (srimanth)
AMBARI-14929. Enable security wizard hangs (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab06c68a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab06c68a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab06c68a Branch: refs/heads/branch-dev-patch-upgrade Commit: ab06c68acafd9e31a24e6b136f5772fdbf25655c Parents: 7af40ca Author: Srimanth GunturiAuthored: Thu Feb 4 11:19:12 2016 -0800 Committer: Srimanth Gunturi Committed: Thu Feb 4 11:19:12 2016 -0800 -- ambari-web/app/controllers/wizard/step7_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ab06c68a/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 011833b..c92e83d 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -699,7 +699,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (App.get('isHaEnabled')) this.addHawqConfigsOnNnHa(configs); if (App.get('isRMHaEnabled')) this.addHawqConfigsOnRMHa(configs); } -if (Object.keys(this.get('content.hosts')).length === 1) this.removeHawqStandbyHostAddressConfig(configs); +if (this.get('content.hosts') && Object.keys(this.get('content.hosts')).length === 1) this.removeHawqStandbyHostAddressConfig(configs); return configs },
[31/40] ambari git commit: AMBARI-14892 : Add Grafana as a component to AMS (avijayan)
AMBARI-14892 : Add Grafana as a component to AMS (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1eb846c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1eb846c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1eb846c1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 1eb846c153b156f87a7e55b65decb1f2118f90dc Parents: b02150a Author: Aravindan VijayanAuthored: Thu Feb 4 22:44:17 2016 -0800 Committer: Aravindan Vijayan Committed: Fri Feb 5 07:58:48 2016 -0800 -- .../conf/unix/ambari-metrics-grafana| 79 +++--- .../conf/unix/ams-grafana-env.sh| 9 - .../conf/unix/ams-grafana.ini | 10 +- .../metrics/timeline/PhoenixHBaseAccessor.java | 2 +- .../timeline/AbstractMiniHBaseClusterTest.java | 1 + .../0.1.0/configuration/ams-grafana-env.xml | 59 .../0.1.0/configuration/ams-grafana-ini.xml | 282 +++ .../AMBARI_METRICS/0.1.0/metainfo.xml | 18 ++ .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 30 ++ .../0.1.0/package/scripts/metrics_collector.py | 2 +- .../0.1.0/package/scripts/metrics_grafana.py| 65 + .../0.1.0/package/scripts/metrics_monitor.py| 2 +- .../0.1.0/package/scripts/params.py | 9 + .../0.1.0/package/scripts/status.py | 4 + .../0.1.0/package/scripts/status_params.py | 1 + .../stacks/HDP/2.0.6/role_command_order.json| 4 +- .../AMBARI_METRICS/test_metrics_grafana.py | 75 + .../python/stacks/2.0.6/configs/default.json| 9 + 18 files changed, 608 insertions(+), 53 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1eb846c1/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana -- diff --git a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana index 1de5401..29851d2 100644 --- a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana +++ b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana @@ -18,7 +18,7 @@ # description: Grafana web server & backend # processname: grafana # config: /etc/grafana/ams-grafana.ini -# pidfile: /var/run/grafana.pid +# pidfile: /var/run/ambari-metrics-grafana.pid ### BEGIN INIT INFO # Provides: grafana @@ -35,16 +35,18 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin NAME=grafana-server -DESC="Grafana Server" - -if [ -f "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" ]; then - . "/etc/ambari-metrics-grafana/conf/ams-grafana-env.sh" +DESC="Ambari Metrics Grafana" +CONF_DIR=/etc/ambari-metrics-grafana/conf + +# execute ams-grafana-env.sh +if [[ -f "${CONF_DIR}/ams-grafana-env.sh" ]]; then +. "${CONF_DIR}/ams-grafana-env.sh" +else +echo "ERROR: Cannot execute ${CONF_DIR}/ams-grafana-env.sh." 2>&1 +exit 1 fi -GRAFANA_USER=${AMS_USER} -GRAFANA_GROUP=${AMS_USER_GROUP} GRAFANA_HOME=${AMS_GRAFANA_HOME_DIR} -CONF_DIR=${AMS_GRAFANA_CONF_DIR} WORK_DIR=$GRAFANA_HOME DATA_DIR=${AMS_GRAFANA_DATA_DIR} LOG_DIR=${AMS_GRAFANA_LOG_DIR} @@ -52,11 +54,13 @@ CONF_FILE=$CONF_DIR/ams-grafana.ini MAX_OPEN_FILES=1 PID_FILE=${AMS_GRAFANA_PID_DIR}/$NAME.pid DAEMON=$GRAFANA_HOME/bin/$NAME +OUT_FILE=${AMS_GRAFANA_LOG_DIR}/grafana.out +STOP_TIMEOUT=5 -if [ `id -u` -ne 0 ]; then - echo "You need root privileges to run this script" - exit 4 -fi +#if [ `id -u` -ne 0 ]; then +# echo "You need root privileges to run this script" +# exit 4 +#fi if [ ! -x $DAEMON ]; then echo "Program not installed or not executable" @@ -66,20 +70,20 @@ fi # # init.d / servicectl compatibility (openSUSE) # -if [ -f /etc/rc.status ]; then -. /etc/rc.status -rc_reset -fi +# if [ -f /etc/rc.status ]; then +#. /etc/rc.status +#rc_reset +# fi # # Source function library. # -if [ -f /etc/rc.d/init.d/functions ]; then -. /etc/rc.d/init.d/functions -fi +# if [ -f /etc/rc.d/init.d/functions ]; then +#. /etc/rc.d/init.d/functions +# fi # overwrite settings from default file -[ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME +# [ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME DAEMON_OPTS="--pidfile=${PID_FILE} --config=${CONF_FILE} cfg:default.paths.data=${DATA_DIR} cfg:default.paths.logs=${LOG_DIR}" @@ -98,16 +102,16 @@ case "$1" in fi # Prepare environment -mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR" "$DATA_DIR" -touch "$PID_FILE" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$PID_FILE" +# mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR" "$DATA_DIR"
[12/40] ambari git commit: AMBARI-14889. Auto-start services: Create cluster level toggle switch (Zhe (Joe) Wang via srimanth)
AMBARI-14889. Auto-start services: Create cluster level toggle switch (Zhe (Joe) Wang via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c6c13da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c6c13da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c6c13da Branch: refs/heads/branch-dev-patch-upgrade Commit: 8c6c13da3ffbf9349232dfcaa7b7504c48156fcf Parents: 7d2191c Author: Srimanth GunturiAuthored: Thu Feb 4 10:15:19 2016 -0800 Committer: Srimanth Gunturi Committed: Thu Feb 4 10:15:25 2016 -0800 -- ambari-web/app/config.js| 3 +- .../nameNode/rollback_controller.js | 10 +-- .../main/admin/service_auto_start.js| 21 +- ambari-web/app/messages.js | 2 +- ambari-web/app/styles/application.less | 4 ++ ambari-web/app/styles/widgets.less | 71 +++- .../templates/main/admin/service_auto_start.hbs | 11 ++- ambari-web/app/utils/ajax/ajax.js | 6 +- ambari-web/app/views/main/admin.js | 12 ++-- .../app/views/main/admin/service_auto_start.js | 64 +- ambari-web/app/views/main/menu.js | 12 ++-- ambari-web/config.coffee| 2 + ambari-web/karma.conf.js| 1 + 13 files changed, 160 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/config.js -- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index f2b7938..0beafb3 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -79,7 +79,8 @@ App.supports = { skipComponentStartAfterInstall: false, storeKDCCredentials: true, preInstallChecks: false, - hostComboSearchBox: false + hostComboSearchBox: false, + serviceAutoStart: false }; if (App.enableExperimental) { http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index aa3d3b0..465a1d2 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -351,7 +351,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl onLoadHbaseConfigs: function (data) { var hbaseSiteProperties = data.items.findProperty('type', 'hbase-site').properties; App.ajax.send({ - name: 'admin.high_availability.save_configs', + name: 'admin.save_configs', sender: this, data: { siteName: 'hbase-site', @@ -364,7 +364,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl onLoadAccumuloConfigs: function (data) { var accumuloSiteProperties = data.items.findProperty('type', 'accumulo-site').properties; App.ajax.send({ - name: 'admin.high_availability.save_configs', + name: 'admin.save_configs', sender: this, data: { siteName: 'accumulo-site', @@ -378,7 +378,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl onLoadHawqConfigs: function (data) { var hawqSiteProperties = data.items.findProperty('type', 'hawq-site').properties; App.ajax.send({ - name: 'admin.high_availability.save_configs', + name: 'admin.save_configs', sender: this, data: { siteName: 'hawq-site', @@ -415,7 +415,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl onLoadConfigs: function (data) { this.set('configsSaved', false); App.ajax.send({ - name: 'admin.high_availability.save_configs', + name: 'admin.save_configs', sender: this, data: { siteName: 'hdfs-site', @@ -425,7 +425,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl error: 'onTaskError' }); App.ajax.send({ - name: 'admin.high_availability.save_configs', + name: 'admin.save_configs', sender: this, data: { siteName: 'core-site', http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/controllers/main/admin/service_auto_start.js -- diff --git
ambari git commit: AMBARI-14946. Create python script for generating version definition file (ncole)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade a25613025 -> 0f2c3375d AMBARI-14946. Create python script for generating version definition file (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f2c3375 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f2c3375 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f2c3375 Branch: refs/heads/branch-dev-patch-upgrade Commit: 0f2c3375da8b3a5ab5739a5ae79db44bf5f91815 Parents: a256130 Author: Nate ColeAuthored: Fri Feb 5 14:22:28 2016 -0500 Committer: Nate Cole Committed: Fri Feb 5 14:22:28 2016 -0500 -- .../src/main/resources/version_definition.xsd | 7 +- contrib/version-builder/example.sh | 44 +++ contrib/version-builder/version_builder.py | 354 +++ 3 files changed, 402 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2c3375/ambari-server/src/main/resources/version_definition.xsd -- diff --git a/ambari-server/src/main/resources/version_definition.xsd b/ambari-server/src/main/resources/version_definition.xsd index 2efdd77..77b4203 100644 --- a/ambari-server/src/main/resources/version_definition.xsd +++ b/ambari-server/src/main/resources/version_definition.xsd @@ -19,7 +19,7 @@ http://www.w3.org/2001/XMLSchema;> -This XSD is used to validate a repo definition file. You can verify the XML is valid +This XSD is used to validate a version definition file. You can verify the XML is valid by running (on Linux): xmllint --noout --load-trace --schema [path-to-this-file] [path-to-xml] @@ -31,9 +31,10 @@ - + + @@ -183,4 +184,4 @@ - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2c3375/contrib/version-builder/example.sh -- diff --git a/contrib/version-builder/example.sh b/contrib/version-builder/example.sh new file mode 100755 index 000..a93ddb6 --- /dev/null +++ b/contrib/version-builder/example.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# 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. + + +filename="version_241-12345.xml" + +python version_builder.py --file $filename --release-type PATCH +python version_builder.py --file $filename --release-stack HDP-2.3 +python version_builder.py --file $filename --release-version 2.4.1.1 +python version_builder.py --file $filename --release-build 12345 +python version_builder.py --file $filename --release-notes http://example.com +python version_builder.py --file $filename --release-display HDP-2.4.1.1-1234-patch +python version_builder.py --file $filename --release-compatible 2.4.[0-1].0 + +# call any number of times for each service in the repo +python version_builder.py --file $filename --manifest --manifest-id HDFS-271 --manifest-service HDFS --manifest-version 2.7.1.2.4 +python version_builder.py --file $filename --manifest --manifest-id HBASE-132 --manifest-service HBASE --manifest-version 1.3.2.4.3 + +#call any number of times for the target services to upgrade +python version_builder.py --file $filename --available --manifest-id HDFS-271 + +#call any number of times for repo per os +python version_builder.py --file $filename --repo --repo-os redhat6 --repo-id HDP-2.3 --repo-name HDP --repo-url http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.4.0 +python version_builder.py --file $filename --repo --repo-os redhat6 --repo-id HDP-UTILS-1.1.0.20 --repo-name HDP-UTILS --repo-url http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6 + +python version_builder.py --file $filename --finalize --xsd ../../ambari-server/src/main/resources/version_definition.xsd + +# to upload this to running Ambari instance on localhost: +# curl -u admin:admin -H 'Content-Type: text/xml' -X POST -d @$filename
ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk bb864df5d -> 26ad97b64 AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (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/26ad97b6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26ad97b6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26ad97b6 Branch: refs/heads/trunk Commit: 26ad97b6406008981ce8bec6158f6a47bb1459a4 Parents: bb864df Author: Jun AokiAuthored: Fri Feb 5 13:23:36 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 13:23:36 2016 -0800 -- .../nameNode/rollback_controller.js | 24 +++ .../nameNode/step3_controller.js| 3 + .../nameNode/step9_controller.js| 23 --- ambari-web/app/data/HDP2/ha_properties.js | 68 +++- .../nameNode/step3_controller_test.js | 49 -- 5 files changed, 139 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index 465a1d2..6895c6c 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -251,17 +251,19 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl }); }, restoreHawqConfigs: function(){ -this.loadConfigTag("hawqSiteTag"); -var hawqSiteTag = this.get("content.hawqSiteTag"); -App.ajax.send({ - name: 'admin.high_availability.load_hawq_configs', - sender: this, - data: { -hawqSiteTag: hawqSiteTag - }, - success: 'onLoadHawqConfigs', - error: 'onTaskError' -}); +var tags = ['hawqSiteTag', 'hdfsClientTag']; +tags.forEach(function (tagName) { + var tag = this.get("content." + tagName); + App.ajax.send({ +name: 'admin.high_availability.load_hawq_configs', +sender: this, +data: { + tagName: tag +}, +success: 'onLoadHawqConfigs', +error: 'onTaskError' + }); +}, this); }, deletePXF: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js index b420687..4e4df60 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js @@ -100,6 +100,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag; urlParams.push('(type=hawq-site=' + hawqSiteTag + ')'); this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag}); + var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag; + urlParams.push('(type=hdfs-client=' + hdfsClientTag + ')'); + this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag}); } App.ajax.send({ name: 'admin.get.all_configurations', http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js index 7745c6b..934d133 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js @@ -118,16 +118,19 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont reconfigureHawq: function () { var data = this.get('content.serviceConfigProperties'); -var configData = this.reconfigureSites(['hawq-site'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('NAMENODE'))); -App.ajax.send({ - name:
ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 e417b5262 -> 360d5d2d4 AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (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/360d5d2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/360d5d2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/360d5d2d Branch: refs/heads/branch-2.2 Commit: 360d5d2d4c5add7073dfdeeeaf5cbed05d55d4b9 Parents: e417b52 Author: Jun AokiAuthored: Fri Feb 5 13:24:49 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 13:24:49 2016 -0800 -- .../nameNode/rollback_controller.js | 25 +++ .../nameNode/step3_controller.js| 36 +++ .../nameNode/step9_controller.js| 23 --- ambari-web/app/data/HDP2/ha_properties.js | 68 +++- 4 files changed, 119 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/360d5d2d/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index 4aa2d73..b305845 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -268,17 +268,20 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl }); }, restoreHawqConfigs: function(){ -this.loadConfigTag("hawqSiteTag"); -var hawqSiteTag = this.get("content.hawqSiteTag"); -App.ajax.send({ - name: 'admin.high_availability.load_hawq_configs', - sender: this, - data: { -hawqSiteTag: hawqSiteTag - }, - success: 'onLoadHawqConfigs', - error: 'onTaskError' -}); +var tags = ['hawqSiteTag', 'hdfsClientTag']; +tags.forEach(function (tagName) { + this.loadConfigTag(tagName); + var tag = this.get("content." + tagName); + App.ajax.send({ +name: 'admin.high_availability.load_hawq_configs', +sender: this, +data: { + tagName: tag +}, +success: 'onLoadHawqConfigs', +error: 'onTaskError' + }); +}, this); }, deletePXF: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/360d5d2d/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js index bf5b96a..5baf90f 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js @@ -88,6 +88,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag; urlParams.push('(type=hawq-site=' + hawqSiteTag + ')'); this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag}); + var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag; + urlParams.push('(type=hdfs-client=' + hdfsClientTag + ')'); + this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag}); } App.ajax.send({ name: 'admin.get.all_configurations', @@ -111,8 +114,13 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ tweakServiceConfigs: function(configs) { var nameServiceId = this.get('content.nameServiceId'); -var nameServiceConfig = configs.findProperty('name','dfs.nameservices'); -this.setConfigInitialValue(nameServiceConfig,nameServiceId); +var filesToChange = ['hdfs-site']; +// If HAWQ is on the cluster, update dfs.nameservices in hdfs-client.xml for HAWQ to work with NN HA +if (App.Service.find().someProperty('serviceName', 'HAWQ')) filesToChange.push('hdfs-client'); +filesToChange.forEach(function (filename) { + var nameServiceConfig = configs.filterProperty('filename', filename).findProperty('name','dfs.nameservices'); + this.setConfigInitialValue(nameServiceConfig,nameServiceId); +}, this); var defaultFsConfig = configs.findProperty('name','fs.defaultFS'); this.setConfigInitialValue(defaultFsConfig, "hdfs://" + nameServiceId); this.tweakServiceConfigNames(configs,nameServiceId); @@
ambari git commit: AMBARI-14766 - Selecting ALL groups does not work under Manage Alert Notifications (Keta Patel via jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 26ad97b64 -> f57f9b291 AMBARI-14766 - Selecting ALL groups does not work under Manage Alert Notifications (Keta Patel via jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f57f9b29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f57f9b29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f57f9b29 Branch: refs/heads/trunk Commit: f57f9b2910ad1d888b2bd608e3d8b450154a0a23 Parents: 26ad97b Author: Jonathan HurleyAuthored: Fri Feb 5 16:24:12 2016 -0500 Committer: Jonathan Hurley Committed: Fri Feb 5 16:24:28 2016 -0500 -- .../internal/AlertTargetResourceProvider.java | 12 +- .../AlertTargetResourceProviderTest.java| 150 ++- .../manage_alert_notifications_controller.js| 7 + 3 files changed, 162 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f57f9b29/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index d28987d..992d33f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -380,7 +380,10 @@ public class AlertTargetResourceProvider extends String notificationType = (String) requestMap.get(ALERT_TARGET_NOTIFICATION_TYPE); Collection alertStates = (Collection) requestMap.get(ALERT_TARGET_STATES); Collection groupIds = (Collection) requestMap.get(ALERT_TARGET_GROUPS); - +String isGlobal = (String) requestMap.get(ALERT_TARGET_GLOBAL); +if(null != isGlobal){ + entity.setGlobal(Boolean.parseBoolean(isGlobal)); +} if (!StringUtils.isBlank(name)) { entity.setTargetName(name); } @@ -425,6 +428,13 @@ public class AlertTargetResourceProvider extends } entity.setAlertGroups(groups); +} else if (entity.isGlobal()){ + Set groups = new HashSet(s_dao.findAllGroups()); + for (AlertGroupEntity group : groups) { +group.addAlertTarget(entity); +s_dao.merge(group); + } + entity.setAlertGroups(groups); } s_dao.merge(entity); http://git-wip-us.apache.org/repos/asf/ambari/blob/f57f9b29/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java index f80b6f7..7277b67 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java @@ -894,6 +894,126 @@ public class AlertTargetResourceProviderTest { verify(m_amc, m_dao); } + @Test + public void testUpdateAlertTargetsWithCustomGroups() throws Exception{ +Capture entityCapture = new Capture(); +m_dao.create(capture(entityCapture)); +expectLastCall().times(1); + +AlertTargetEntity target = new AlertTargetEntity(); +expect(m_dao.findTargetById(ALERT_TARGET_ID)).andReturn(target).once(); + +Capture groupEntityCapture = new Capture(); + +//All Groups in the Database with CLuster ID = 1L +List groups = getMockGroupEntities(); + +//List of group ids to be selected in Custom option +List groupIds = Arrays.asList(1L, 2L, 3L); + + expect(m_dao.findGroupsById(EasyMock.eq(groupIds))).andReturn(groups).anyTimes(); +expect(m_dao.findAllGroups()).andReturn(groups).anyTimes(); +for(AlertGroupEntity group: groups){ + expect(m_dao.merge(capture(groupEntityCapture))).andReturn(group).anyTimes(); +} +expect(m_dao.merge(capture(entityCapture))).andReturn(target).anyTimes(); + +//start execution with the above Expectation setters +replay(m_amc, m_dao); + + SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createAdministrator()); + +AlertTargetResourceProvider provider = createProvider(m_amc); +Map requestProps = getCreationProperties(); +Request request =
ambari git commit: AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8397565cb -> 7eed58d39 AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7eed58d3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7eed58d3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7eed58d3 Branch: refs/heads/branch-2.2 Commit: 7eed58d39cbb6f2800c9e96a27e90edc433c726d Parents: 8397565 Author: ababiichukAuthored: Fri Feb 5 09:35:47 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 11:15:29 2016 +0200 -- .../services/RANGER/themes/theme_version_1.json | 20 +++- .../services/RANGER/themes/theme_version_2.json | 20 +++- .../configs/widgets/config_widget_view.js | 3 +++ 3 files changed, 41 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json index e6724cd..cb5aa78 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json @@ -525,7 +525,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] } ] }, http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/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 fff50fb..2c469a9 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 @@ -904,7 +904,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/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 f0499db..a0515e6 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,6 +442,9 @@ 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
[2/2] ambari git commit: AMBARI-14934 Can't remove YARN or MapReduce2.(ababiichuk)
AMBARI-14934 Can't remove YARN or MapReduce2.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/315f502b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/315f502b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/315f502b Branch: refs/heads/trunk Commit: 315f502b0e7fed166f7d91387fa41f85e8dc891a Parents: 94932c9 Author: ababiichukAuthored: Fri Feb 5 12:37:25 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 12:37:25 2016 +0200 -- ambari-web/app/controllers/main/service/item.js | 107 ambari-web/app/messages.js | 4 + ambari-web/app/models/stack_service.js | 2 +- ambari-web/app/utils/ajax/ajax.js | 5 - .../test/controllers/main/service/item_test.js | 122 +++ 5 files changed, 189 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/315f502b/ambari-web/app/controllers/main/service/item.js -- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index a26c820..1aae7cd 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -966,31 +966,76 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow }, /** + * Returns interdependent services + * + * @param serviceName + * @returns {string[]} + */ + interDependentServices: function(serviceName) { +var interDependentServices = []; + App.StackService.find(serviceName).get('requiredServices').forEach(function(requiredService) { + if (App.StackService.find(requiredService).get('requiredServices').contains(serviceName)) { +interDependentServices.push(requiredService); + } +}); +return interDependentServices; + }, + + /** * find dependent services - * @param {string} serviceName + * @param {string[]} serviceNamesToDelete * @returns {Array} */ - findDependentServices: function(serviceName) { + findDependentServices: function (serviceNamesToDelete) { var dependentServices = []; -App.StackService.find().forEach(function(stackService) { - if (App.Service.find(stackService.get('serviceName')).get('isLoaded') - && stackService.get('requiredServices').contains(serviceName)) { -dependentServices.push(stackService.get('serviceName')); +App.Service.find().forEach(function (service) { + if (!serviceNamesToDelete.contains(service.get('serviceName'))) { +var requiredServices = App.StackService.find(service.get('serviceName')).get('requiredServices'); +serviceNamesToDelete.forEach(function (dependsOnService) { + if (requiredServices.contains(dependsOnService)) { +dependentServices.push(service.get('serviceName')); + } +}); } }, this); return dependentServices; }, /** + * @param serviceNames + * @returns {string} + */ + servicesDisplayNames: function(serviceNames) { +return serviceNames.map(function(serviceName) { + return App.format.role(serviceName); +}).join(','); + }, + + /** + * Is services can be removed based on work status + * @param serviceNames + */ + allowUninstallServices: function(serviceNames) { +return !App.Service.find().filter(function (service) { + return serviceNames.contains(service.get('serviceName')); +}).mapProperty('workStatus').some(function (workStatus) { + return !App.Service.allowUninstallStates.contains(workStatus); +}); + }, + + /** * delete service action * @param {string} serviceName */ deleteService: function(serviceName) { -var dependentServices = this.findDependentServices(serviceName), -self = this, -displayName = App.format.role(serviceName), -popupHeader = Em.I18n.t('services.service.delete.popup.header'); +var self = this, + interDependentServices = this.interDependentServices(serviceName), + serviceNamesToDelete = interDependentServices.concat(serviceName), + dependentServices = this.findDependentServices(serviceNamesToDelete), + displayName = App.format.role(serviceName), + popupHeader = Em.I18n.t('services.service.delete.popup.header'), + dependentServicesToDeleteFmt = this.servicesDisplayNames(interDependentServices); if (App.Service.find().get('length') === 1) { //at least one service should be installed @@ -1002,21 +1047,26 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow }); } else if (dependentServices.length > 0) {
ambari git commit: AMBARI-14936. Tweaks to reduce build time (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 74d5a0167 -> dc8e5c3c6 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/dc8e5c3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc8e5c3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc8e5c3c Branch: refs/heads/trunk Commit: dc8e5c3c68d25e74ab875a87f66959fc86a9631c Parents: 74d5a01 Author: Andrew OnishukAuthored: Fri Feb 5 11:02:39 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 5 11:02:39 2016 +0200 -- ambari-agent/pom.xml | 40 +++ ambari-server/pom.xml| 6 ++-- ambari-server/src/main/assemblies/server.xml | 2 +- ambari-web/pom.xml | 3 +- pom.xml | 18 +- 5 files changed, 27 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 7531650..d049a6c 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -89,24 +89,6 @@ 3.0 -maven-assembly-plugin - - gnu - -src/packages/tarball/all.xml - - - - -build-tarball -prepare-package - - single - - - - - org.apache.maven.plugins maven-surefire-plugin @@ -264,6 +246,24 @@ +maven-assembly-plugin + + gnu + +src/packages/tarball/all.xml + + + + +build-tarball +${assemblyPhase} + + single + + + + + maven-resources-plugin 2.6 @@ -336,7 +336,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -367,7 +367,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 6fb090a..623ddca 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -137,7 +137,7 @@ build-tarball -package +${assemblyPhase} single @@ -176,7 +176,7 @@ copy-repo-resources -package +${assemblyPhase} copy-resources @@ -207,7 +207,7 @@ rename-file -package +${assemblyPhase} rename http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 17d6bdb..8bfad0c 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -306,7 +306,7 @@ 755 - target/classes/stacks/stack_advisor.py + src/main/resources/stacks/stack_advisor.py /var/lib/ambari-server/resources/stacks http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/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/dc8e5c3c/pom.xml -- diff --git a/pom.xml b/pom.xml index 57c6de7..8f321fd 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,7 @@
[1/2] ambari git commit: AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk dc8e5c3c6 -> 315f502b0 AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94932c99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94932c99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94932c99 Branch: refs/heads/trunk Commit: 94932c99bb8ff5ad309c15c6a0ecf382f428c73b Parents: dc8e5c3 Author: ababiichukAuthored: Fri Feb 5 09:35:47 2016 +0200 Committer: ababiichuk Committed: Fri Feb 5 11:15:13 2016 +0200 -- .../services/RANGER/themes/theme_version_1.json | 20 +++- .../services/RANGER/themes/theme_version_2.json | 20 +++- .../configs/widgets/config_widget_view.js | 3 +++ 3 files changed, 41 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json index e6724cd..cb5aa78 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json @@ -525,7 +525,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] } ] }, http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/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 fff50fb..2c469a9 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 @@ -904,7 +904,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "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 +} + } +} + ] }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/94932c99/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 9858b75..e9eaed2 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,6 +434,9 @@ 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 ===
ambari git commit: AMBARI-14935 UpgradeCatalog222Test fails (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 315f502b0 -> c62233236 AMBARI-14935 UpgradeCatalog222Test fails (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6223323 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6223323 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6223323 Branch: refs/heads/trunk Commit: c62233236dffe0eb4b4664fc685fc663db1feb70 Parents: 315f502 Author: Dmytro SenAuthored: Fri Feb 5 13:38:38 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 13:38:38 2016 +0200 -- .../org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java| 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c6223323/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java index b701d78..67b9da5 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java @@ -100,12 +100,14 @@ public class UpgradeCatalog222Test { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateAlerts = UpgradeCatalog222.class.getDeclaredMethod("updateAlerts"); Method updateStormConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateStormConfigs"); +Method updateAMSConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateAMSConfigs"); UpgradeCatalog222 upgradeCatalog222 = createMockBuilder(UpgradeCatalog222.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateAlerts) .addMockedMethod(updateStormConfigs) +.addMockedMethod(updateAMSConfigs) .createMock(); upgradeCatalog222.addNewConfigurationsFromXml();
ambari git commit: AMBARI-14902 Make AMS Grafana component available as a repo package (additional patch) (dsen)
Repository: ambari Updated Branches: refs/heads/trunk c62233236 -> 691958665 AMBARI-14902 Make AMS Grafana component available as a repo package (additional patch) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69195866 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69195866 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69195866 Branch: refs/heads/trunk Commit: 691958665eb13e58c302a5cf392f4e587853e551 Parents: c622332 Author: Dmytro SenAuthored: Fri Feb 5 14:27:25 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 14:27:25 2016 +0200 -- ambari-metrics/ambari-metrics-assembly/pom.xml | 204 +++- 1 file changed, 203 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69195866/ambari-metrics/ambari-metrics-assembly/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml index 511dc1f..130097d 100644 --- a/ambari-metrics/ambari-metrics-assembly/pom.xml +++ b/ambari-metrics/ambari-metrics-assembly/pom.xml @@ -130,7 +130,7 @@ ambari-metrics-grafana-${project.version} false -src/main/assembly/grafana.xml +${assemblydescriptor.grafana} gnu @@ -208,6 +208,208 @@ root + + + +ambari-metrics-collector +package + + rpm + + + ambari-metrics-collector + 2012, Apache Software Foundation + Development + Maven Recipe: RPM Package. + false + +${python.ver} + + + 644 + 755 + root + root + + + + + /usr/lib/ambari-metrics-collector/ + + + ${collector.dir}/target/lib + + + + ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar + + + + + + + /usr/lib/ams-hbase/ + + + ${collector.dir}/target/embedded/${hbase.folder} + +bin/** +bin/* + + + + + + /usr/lib/ams-hbase/bin + 755 + + + ${collector.dir}/target/embedded/${hbase.folder}/bin + + + + + /usr/lib/ams-hbase/lib/ + + + ${collector.dir}/target/lib + +phoenix*.jar +antlr*.jar + + + + + + /usr/lib/ams-hbase/lib/hadoop-native/ + + + ${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native + + + + + /usr/sbin + 755 + root + root + false + + + ${collector.dir}/conf/unix/ambari-metrics-collector + false + + + + + /etc/ambari-metrics-collector/conf + true + + + ${collector.dir}/conf/unix/ams-env.sh + + + ${collector.dir}/conf/unix/ams-site.xml +
ambari git commit: AMBARI-14935 UpgradeCatalog222Test fails (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 7eed58d39 -> 8c4556759 AMBARI-14935 UpgradeCatalog222Test fails (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c455675 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c455675 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c455675 Branch: refs/heads/branch-2.2 Commit: 8c4556759052feae6403ee70c949bf4e0ee6e58e Parents: 7eed58d Author: Dmytro SenAuthored: Fri Feb 5 13:38:38 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 13:41:30 2016 +0200 -- .../org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java| 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c455675/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java index fb05b70..913b08d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java @@ -98,12 +98,14 @@ public class UpgradeCatalog222Test { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateAlerts = UpgradeCatalog222.class.getDeclaredMethod("updateAlerts"); Method updateStormConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateStormConfigs"); +Method updateAMSConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateAMSConfigs"); UpgradeCatalog222 upgradeCatalog222 = createMockBuilder(UpgradeCatalog222.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateAlerts) .addMockedMethod(updateStormConfigs) +.addMockedMethod(updateAMSConfigs) .createMock(); upgradeCatalog222.addNewConfigurationsFromXml();
ambari git commit: AMBARI-14924. Create patch upgrade orchestration based on available services (ncole)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade 0f9da4282 -> a25613025 AMBARI-14924. Create patch upgrade orchestration based on available services (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2561302 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2561302 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2561302 Branch: refs/heads/branch-dev-patch-upgrade Commit: a2561302530c859f27c678920014db4e4c4a5f7d Parents: 0f9da42 Author: Nate ColeAuthored: Thu Feb 4 13:57:18 2016 -0500 Committer: Nate Cole Committed: Fri Feb 5 08:50:13 2016 -0500 -- .../checks/HostsRepositoryVersionCheck.java | 3 +- .../internal/UpgradeResourceProvider.java | 35 +++- .../VersionDefinitionResourceProvider.java | 6 +-- .../orm/entities/RepositoryVersionEntity.java | 2 +- .../ambari/server/state/UpgradeContext.java | 28 ++ .../ambari/server/state/UpgradeHelper.java | 4 ++ .../checks/HostsRepositoryVersionCheckTest.java | 57 .../ambari/server/state/UpgradeHelperTest.java | 57 +++- 8 files changed, 184 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a2561302/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java index 30250ef..620c651 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java @@ -53,6 +53,7 @@ public class HostsRepositoryVersionCheck extends AbstractCheckDescriptor { super(CheckDescription.HOSTS_REPOSITORY_VERSION); } + @Override public boolean isApplicable(PrereqCheckRequest request) throws AmbariException { return super.isApplicable(request) && request.getRepositoryVersion() != null; } @@ -77,7 +78,7 @@ public class HostsRepositoryVersionCheck extends AbstractCheckDescriptor { for (HostVersionEntity hve : hostVersionDaoProvider.get().findByHost(host.getHostName())) { if (hve.getRepositoryVersion().getVersion().equals(request.getRepositoryVersion()) - && hve.getState() == RepositoryVersionState.INSTALLED) { + && (hve.getState() == RepositoryVersionState.INSTALLED || hve.getState() == RepositoryVersionState.NOT_REQUIRED)) { found = true; break; } http://git-wip-us.apache.org/repos/asf/ambari/blob/a2561302/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java index 70440fc..db8c079 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java @@ -24,6 +24,7 @@ import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; @@ -36,8 +37,6 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.persist.Transactional; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.Role; import org.apache.ambari.server.RoleCommand; @@ -86,12 +85,15 @@ import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.DesiredConfig; +import org.apache.ambari.server.state.RepositoryType; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.UpgradeContext; import org.apache.ambari.server.state.UpgradeHelper; import org.apache.ambari.server.state.UpgradeHelper.UpgradeGroupHolder; +import
ambari git commit: AMBARI-14939. [Ambari tarballs] optionally install required packages (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 691958665 -> ed492292c AMBARI-14939. [Ambari tarballs] optionally install required packages (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ed492292 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed492292 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed492292 Branch: refs/heads/trunk Commit: ed492292cd4fedd41ebe95ba97a73e57cceb0bae Parents: 6919586 Author: Andrew OnishukAuthored: Fri Feb 5 15:44:04 2016 +0200 Committer: Andrew Onishuk Committed: Fri Feb 5 15:44:04 2016 +0200 -- ambari-agent/pom.xml| 38 -- .../src/main/package/dependencies.properties| 32 + .../src/main/repo/install_ambari_tarball.py | 117 ++- ambari-server/pom.xml | 40 +-- .../src/main/package/dependencies.properties| 33 ++ 5 files changed, 239 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ed492292/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index d049a6c..c2c993f 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -43,10 +43,7 @@ /usr/lib/ambari-agent/lib/ambari_jinja2 /usr/lib/ambari-agent/lib/ambari_simplejson /usr/lib/ambari-agent/lib -python = 2.6 -python (= 2.6) amd64 -openssl, zlibc, ${deb.python.ver} ../ambari-server ${project.build.directory}/cache/ ${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py @@ -140,6 +137,23 @@ org.codehaus.mojo +properties-maven-plugin + + +package + + read-project-properties + + + + ${basedir}/src/main/package/dependencies.properties + + + + + + +org.codehaus.mojo rpm-maven-plugin 2.1.4 @@ -156,10 +170,7 @@ Development Maven Recipe: RPM Package. -openssl -rpm-python -zlib -${python.ver} +${rpm.dependency.list} src/main/package/rpm/postinstall.sh @@ -355,6 +366,19 @@ ${basedir}/src/main/package/deb/control + + ${basedir}/src/main/package + +dependencies.properties + + + + ${project.basedir}/../ambari-common/src/main/python/ambari_commons + +os_check.py +resources/os_family.json + + http://git-wip-us.apache.org/repos/asf/ambari/blob/ed492292/ambari-agent/src/main/package/dependencies.properties -- diff --git a/ambari-agent/src/main/package/dependencies.properties b/ambari-agent/src/main/package/dependencies.properties new file mode 100644 index 000..07b0b68 --- /dev/null +++ b/ambari-agent/src/main/package/dependencies.properties @@ -0,0 +1,32 @@ +# 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 rega4rding 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. + +# Please make sure the format of the file is one of the following +# rpm.dependency.list=... +# rpm.dependency.list.[os_family_name]=... +# rpm.dependency.list.[os_family_name][starting_from_version]=... +# deb.dependency.list=... +# deb.dependency.list.[os_family_name]=... +# deb.dependency.list.[os_family_name][starting_from_version]=... +# +# Examples: +# rpm.dependency.list.suse=openssl,\nRequires: rpm-python # for all suse family os +# rpm.dependency.list.suse11=curl # for all suse family os higher or equal to 11. +# +# Such a
ambari git commit: AMBARI-14937. Show error message when installing registered version which does not have repo defined for the OS (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 324d92a15 -> 89be2a462 AMBARI-14937. Show error message when installing registered version which does not have repo defined for the OS (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/89be2a46 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/89be2a46 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/89be2a46 Branch: refs/heads/branch-2.2 Commit: 89be2a4629b4db0abff028cf902a2c4a74b75161 Parents: 324d92a Author: Aleksandr KovalenkoAuthored: Fri Feb 5 14:21:04 2016 +0200 Committer: Aleksandr Kovalenko Committed: Fri Feb 5 16:25:47 2016 +0200 -- .../main/admin/stack_and_upgrade_controller.js | 19 +++ 1 file changed, 19 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/89be2a46/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js index 61645d4..6c342dc 100644 --- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js @@ -1252,6 +1252,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, sender: this, data: data, success: 'installRepoVersionSuccess', + error: 'installRepoVersionError', callback: function() { this.sender.set('requestInProgress', false); this.sender.set('requestInProgressRepoId', null); @@ -1410,6 +1411,24 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }, /** + * error callback for installRepoVersion() + * show the error message + * @param data + * @method installStackVersionSuccess + */ + installRepoVersionError: function (data) { +var header = Em.I18n.t('admin.stackVersions.upgrade.installPackage.fail.title'); +var body = ""; +if(data && data.responseText){ + try { +var json = $.parseJSON(data.responseText); +body = json.message; + } catch (err) {} +} +App.showAlertPopup(header, body); + }, + + /** * opens a popup with installations state per host * @param {Em.Object} version * @method showProgressPopup
ambari git commit: AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen)
Repository: ambari Updated Branches: refs/heads/trunk ed492292c -> 83bef413c AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83bef413 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83bef413 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83bef413 Branch: refs/heads/trunk Commit: 83bef413c47c76cbf54bc64847620769168389ac Parents: ed49229 Author: Dmytro SenAuthored: Fri Feb 5 16:30:18 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 16:30:18 2016 +0200 -- .../apache/ambari/server/controller/AmbariServer.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/83bef413/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index c7e7880..b416129 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -794,10 +794,14 @@ public class AmbariServer { } public void stop() throws Exception { -try { - server.stop(); -} catch (Exception e) { - LOG.error("Error stopping the server", e); +if (server == null) { + throw new AmbariException("Error stopping the server"); +} else { + try { +server.stop(); + } catch (Exception e) { +LOG.error("Error stopping the server", e); + } } }
ambari git commit: AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 89be2a462 -> 47717d2aa AMBARI-14928 Ambari throws NPE in kerberos mode U14/S11 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/47717d2a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/47717d2a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/47717d2a Branch: refs/heads/branch-2.2 Commit: 47717d2aa0da4ed94b4ef2acf95e1c0088f36d1c Parents: 89be2a4 Author: Dmytro SenAuthored: Fri Feb 5 16:30:18 2016 +0200 Committer: Dmytro Sen Committed: Fri Feb 5 16:33:25 2016 +0200 -- .../apache/ambari/server/controller/AmbariServer.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/47717d2a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 373b7fc..d5bcad9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -725,10 +725,14 @@ public class AmbariServer { } public void stop() throws Exception { -try { - server.stop(); -} catch (Exception e) { - LOG.error("Error stopping the server", e); +if (server == null) { + throw new AmbariException("Error stopping the server"); +} else { + try { +server.stop(); + } catch (Exception e) { +LOG.error("Error stopping the server", e); + } } }
ambari git commit: AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 31309e28b -> 60adfbcf8 AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60adfbcf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60adfbcf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60adfbcf Branch: refs/heads/trunk Commit: 60adfbcf8f88ec4429a5fd91af39ff9173fe Parents: 31309e2 Author: Jun AokiAuthored: Fri Feb 5 15:52:18 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:52:18 2016 -0800 -- .../hawq/addStandby/step3_controller.js | 23 ambari-web/app/messages.js | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 0cb256d..513a519 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -33,6 +33,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ selectedService: null, + hawqProps: null, + hideDependenciesInfoBar: true, versionLoaded: true, @@ -107,7 +109,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ this.setDynamicConfigValues(params, data); this.setProperties({ selectedService: params, - isLoaded: true + isLoaded: true, + hawqProps: data }); }, @@ -134,11 +137,23 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ }, this); }, + submit: function () { if (!this.get('isSubmitDisabled')) { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { -App.router.send("next"); - }); + dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; + hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + App.showConfirmationPopup( +function() { + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +}, + Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.body').format(dataDir, hawqStandby), +null, +Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.title'), +"Confirm", +false + ); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 9be6d86..b14f9f7 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2910,6 +2910,8 @@ Em.I18n.translations = { '', 'admin.addHawqStandby.wizard.step3.hawqMaster': 'Current HAWQ Master', 'admin.addHawqStandby.wizard.step3.newHawqStandby': 'New HAWQ Standby Master', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.title': 'HAWQ Standby Master Directory Confirmation', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.body': 'Please confirm that the HAWQ data directory {0} on the Standby Master {1} does not exist or is empty.If there is pre-existing data then HAWQ Standby will get initialized with stale data.', 'admin.addHawqStandby.step4.save.configuration.note': 'This configuration is created by Add HAWQ Standby wizard', 'admin.addHawqStandby.wizard.step4.header': 'Configure Components', 'admin.addHawqStandby.wizard.step4.task0.title': 'Stop HAWQ Service',
ambari git commit: AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 360d5d2d4 -> 3d9f618f9 AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d9f618f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d9f618f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d9f618f Branch: refs/heads/branch-2.2 Commit: 3d9f618f93dfa4d0044835c9472a24e24a5bd4ca Parents: 360d5d2 Author: Jun AokiAuthored: Fri Feb 5 15:48:55 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:48:55 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 12 + .../stacks/HDP/2.3/services/stack_advisor.py| 37 +++--- .../stacks/2.3/common/test_stack_advisor.py | 52 +++- 3 files changed, 93 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d9f618f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f034749..f195215 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -153,6 +153,12 @@ The address of YARN resource manager server. + + +yarn-site +yarn.resourcemanager.address + + @@ -161,6 +167,12 @@ The address of YARN scheduler server. + + +yarn-site +yarn.resourcemanager.scheduler.address + + http://git-wip-us.apache.org/repos/asf/ambari/blob/3d9f618f/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index b9bb8af..71b0e2a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -668,19 +668,32 @@ class HDP23StackAdvisor(HDP22StackAdvisor): def recommendHAWQConfigurations(self, configurations, clusterData, services, hosts): +if "hawq-site" not in services["configurations"]: + return +hawq_site = services["configurations"]["hawq-site"]["properties"] putHawqSiteProperty = self.putProperty(configurations, "hawq-site", services) -if self.isHawqMasterComponentOnAmbariServer(services): - if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: -putHawqSiteProperty('hawq_master_address_port', '') -# calculate optimal number of virtual segments componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] + +# remove master port when master is colocated with Ambari server +if self.isHawqMasterComponentOnAmbariServer(services) and "hawq_master_address_port" in hawq_site: +putHawqSiteProperty('hawq_master_address_port', '') + +# calculate optimal number of virtual segments numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) # update default if segments are deployed -if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: +if numSegments and "default_segment_num" in hawq_site: factor = 6 if numSegments < 50 else 4 putHawqSiteProperty('default_segment_num', numSegments * factor) - + +# update YARN RM urls with the values from yarn-site if YARN is installed +if "YARN" in servicesList and "yarn-site" in services["configurations"]: + yarn_site = services["configurations"]["yarn-site"]["properties"] + for hs_prop, ys_prop in self.getHAWQYARNPropertyMapping().items(): +if hs_prop in hawq_site and ys_prop in yarn_site: + putHawqSiteProperty(hs_prop, yarn_site[ys_prop]) + def getServiceConfigurationValidators(self): parentValidators = super(HDP23StackAdvisor, self).getServiceConfigurationValidators() childValidators =
ambari git commit: AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 60adfbcf8 -> b95d52e98 AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b95d52e9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b95d52e9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b95d52e9 Branch: refs/heads/trunk Commit: b95d52e986d90b4f2e98d3da566a1a3d4731107b Parents: 60adfbc Author: Jun AokiAuthored: Fri Feb 5 16:14:46 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:14:46 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b95d52e9/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index e607a28..51a38d1 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -82,7 +82,7 @@ def exec_ssh_cmd(hostname, cmd): import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter if params.hostname != hostname: -cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) +cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) else: cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) Logger.info("Command executed: {0}".format(cmd)) @@ -97,9 +97,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 3d9f618f9 -> 6903ade21 AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6903ade2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6903ade2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6903ade2 Branch: refs/heads/branch-2.2 Commit: 6903ade21fd6154e9b27f97f1c85434506761839 Parents: 3d9f618 Author: Jun AokiAuthored: Fri Feb 5 16:12:13 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:12:13 2016 -0800 -- .../hawq/addStandby/step3_controller.js | 23 ambari-web/app/messages.js | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6903ade2/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 5bfaa99..070acc0 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -32,6 +32,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ selectedService: null, + hawqProps: null, + hideDependenciesInfoBar: true, versionLoaded: true, @@ -106,7 +108,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ this.setDynamicConfigValues(params, data); this.setProperties({ selectedService: params, - isLoaded: true + isLoaded: true, + hawqProps: data }); }, @@ -131,11 +134,23 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ }, this); }, + submit: function () { if (!this.get('isSubmitDisabled')) { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { -App.router.send("next"); - }); + dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; + hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + App.showConfirmationPopup( +function() { + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +}, + Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.body').format(dataDir, hawqStandby), +null, +Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.title'), +"Confirm", +false + ); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/6903ade2/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 4a132e2..8240e1e 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2879,6 +2879,8 @@ Em.I18n.translations = { '', 'admin.addHawqStandby.wizard.step3.hawqMaster': 'Current HAWQ Master', 'admin.addHawqStandby.wizard.step3.newHawqStandby': 'New HAWQ Standby Master', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.title': 'HAWQ Standby Master Directory Confirmation', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.body': 'Please confirm that the HAWQ data directory {0} on the Standby Master {1} does not exist or is empty.If there is pre-existing data then HAWQ Standby will get initialized with stale data.', 'admin.addHawqStandby.step4.save.configuration.note': 'This configuration is created by Add HAWQ Standby wizard', 'admin.addHawqStandby.wizard.step4.header': 'Configure Components', 'admin.addHawqStandby.wizard.step4.task0.title': 'Stop HAWQ Service',
ambari git commit: AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 6903ade21 -> e462af568 AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e462af56 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e462af56 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e462af56 Branch: refs/heads/branch-2.2 Commit: e462af5688948b9abc891d4ee76ee5bd7fb5b13d Parents: 6903ade Author: Jun AokiAuthored: Fri Feb 5 16:13:51 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:13:51 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e462af56/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index 051ee61..a8036d8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -82,7 +82,7 @@ def exec_ssh_cmd(hostname, cmd): import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter if params.hostname != hostname: -cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) +cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) else: cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) Logger.info("Command executed: {0}".format(cmd)) @@ -97,9 +97,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk f57f9b291 -> 31309e28b AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31309e28 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31309e28 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31309e28 Branch: refs/heads/trunk Commit: 31309e28b470f45f4a9c44ad7e0393dd31eb2dd6 Parents: f57f9b2 Author: Jun AokiAuthored: Fri Feb 5 15:47:56 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:47:56 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 12 + .../stacks/HDP/2.3/services/stack_advisor.py| 37 +++--- .../stacks/2.3/common/test_stack_advisor.py | 51 +++- 3 files changed, 93 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31309e28/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f034749..f195215 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -153,6 +153,12 @@ The address of YARN resource manager server. + + +yarn-site +yarn.resourcemanager.address + + @@ -161,6 +167,12 @@ The address of YARN scheduler server. + + +yarn-site +yarn.resourcemanager.scheduler.address + + http://git-wip-us.apache.org/repos/asf/ambari/blob/31309e28/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index dae3e8a..b354378 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -678,19 +678,32 @@ class HDP23StackAdvisor(HDP22StackAdvisor): def recommendHAWQConfigurations(self, configurations, clusterData, services, hosts): +if "hawq-site" not in services["configurations"]: + return +hawq_site = services["configurations"]["hawq-site"]["properties"] putHawqSiteProperty = self.putProperty(configurations, "hawq-site", services) -if self.isHawqMasterComponentOnAmbariServer(services): - if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: -putHawqSiteProperty('hawq_master_address_port', '') -# calculate optimal number of virtual segments componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] + +# remove master port when master is colocated with Ambari server +if self.isHawqMasterComponentOnAmbariServer(services) and "hawq_master_address_port" in hawq_site: +putHawqSiteProperty('hawq_master_address_port', '') + +# calculate optimal number of virtual segments numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) # update default if segments are deployed -if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: +if numSegments and "default_segment_num" in hawq_site: factor = 6 if numSegments < 50 else 4 putHawqSiteProperty('default_segment_num', numSegments * factor) - + +# update YARN RM urls with the values from yarn-site if YARN is installed +if "YARN" in servicesList and "yarn-site" in services["configurations"]: + yarn_site = services["configurations"]["yarn-site"]["properties"] + for hs_prop, ys_prop in self.getHAWQYARNPropertyMapping().items(): +if hs_prop in hawq_site and ys_prop in yarn_site: + putHawqSiteProperty(hs_prop, yarn_site[ys_prop]) + def getServiceConfigurationValidators(self): parentValidators = super(HDP23StackAdvisor, self).getServiceConfigurationValidators() childValidators = { @@