git commit: AMBARI-7019. sqoop-env and other configs exists for unavailable services(after upgrade from ambari 1.6.1 - 1.7.0).(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 2dc55f08f - 926acf4fc AMBARI-7019. sqoop-env and other configs exists for unavailable services(after upgrade from ambari 1.6.1 - 1.7.0).(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/926acf4f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/926acf4f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/926acf4f Branch: refs/heads/trunk Commit: 926acf4fc681e01f1568f6c3bdbf4ab254040b07 Parents: 2dc55f0 Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Wed Aug 27 13:29:39 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Wed Aug 27 13:29:39 2014 +0300 -- .../controller/AmbariManagementControllerImpl.java | 2 +- .../controller/internal/ClusterResourceProvider.java| 6 +++--- .../org/apache/ambari/server/state/ConfigHelper.java| 12 ++-- .../apache/ambari/server/upgrade/UpgradeCatalog170.java | 6 -- .../controller/AmbariManagementControllerTest.java | 4 +++- .../ambari/server/upgrade/UpgradeCatalog170Test.java| 9 + 6 files changed, 22 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/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 f7f2f2d..c6b2f9f 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 @@ -657,7 +657,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if(request.getType().equals(Configuration.GLOBAL_CONFIG_TAG)) { MapString, MapString, String configTypes = new HashMapString, MapString, String(); configTypes.put(Configuration.GLOBAL_CONFIG_TAG, request.getProperties()); - configHelper.moveDeprecatedGlobals(cluster.getCurrentStackVersion(), configTypes); + configHelper.moveDeprecatedGlobals(cluster.getCurrentStackVersion(), configTypes, cluster.getClusterName()); for(Map.EntryString, MapString, String configType : configTypes.entrySet()) { String configTypeName = configType.getKey(); http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java index 113e7b8..694 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java @@ -870,9 +870,9 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { * @param blueprintConfigurations map of blueprint configurations keyed by type */ private void handleGlobalsBackwardsCompability(Stack stack, - MapString, MapString, String blueprintConfigurations) { + MapString, MapString, String blueprintConfigurations, String clusterName) { StackId stackId = new StackId(stack.getName(), stack.getVersion()); -configHelper.moveDeprecatedGlobals(stackId, blueprintConfigurations); +configHelper.moveDeprecatedGlobals(stackId, blueprintConfigurations, clusterName); } /** @@ -1051,7 +1051,7 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { HostGroupEntity entity = group.getEntity(); MapString, MapString, Config groupConfigs = new HashMapString, MapString, Config(); - handleGlobalsBackwardsCompability(stack, group.getConfigurationProperties()); + handleGlobalsBackwardsCompability(stack, group.getConfigurationProperties(), clusterName); for (Map.EntryString, MapString, String entry: group.getConfigurationProperties().entrySet()) { String type = entry.getKey(); String service = stack.getServiceForConfigType(type); http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java -- diff --git
[2/2] git commit: AMBARI-7032 Jobs View: utilize full width
AMBARI-7032 Jobs View: utilize full width Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d8583bd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d8583bd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d8583bd Branch: refs/heads/trunk Commit: 8d8583bd5b7191af8e500cad3ba507817ecee011 Parents: 4430ebf Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 14:34:10 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 14:34:23 2014 +0300 -- contrib/views/jobs/src/main/resources/ui/app/styles/main.less | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8583bd/contrib/views/jobs/src/main/resources/ui/app/styles/main.less -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/styles/main.less b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less index e648fe0..4c1987f 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/styles/main.less +++ b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less @@ -21,13 +21,18 @@ @import '../../app/bower_components/font-awesome/less/font-awesome'; html { - overflow-y: scroll; + overflow-y: auto; } a { cursor: pointer; } +.container, +.jobs-container { + width: 100%; +} + .jobs-container { margin-top: 20px; }
[1/2] git commit: AMBARI-7031 FE: Next button not enabled when only /validation ERRORs are there
Repository: ambari Updated Branches: refs/heads/trunk 926acf4fc - 8d8583bd5 AMBARI-7031 FE: Next button not enabled when only /validation ERRORs are there Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4430ebf0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4430ebf0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4430ebf0 Branch: refs/heads/trunk Commit: 4430ebf070ddef99bcb5ba610e13d5f39f5cd910 Parents: 926acf4 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 14:32:45 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 14:34:22 2014 +0300 -- .../app/controllers/main/service/info/configs.js | 4 +++- ambari-web/app/mixins/common/serverValidator.js| 17 + 2 files changed, 8 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4430ebf0/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index dce4c35..8eee9cb 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -1095,11 +1095,13 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM App.showConfirmationPopup(function () { self.saveConfigs(); }, Em.I18n.t('services.service.config.confirmDirectoryChange').format(displayName), function () { -self.set('isApplyingChanges', false) +self.set('isApplyingChanges', false); }); } else { self.saveConfigs(); } + }).fail(function() { +self.set('isApplyingChanges', false); }); } else { status = 'started'; http://git-wip-us.apache.org/repos/asf/ambari/blob/4430ebf0/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 462ff62..3a1dbed 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -236,8 +236,8 @@ App.ServerValidatorMixin = Em.Mixin.create({ if ((property.get('filename') == item['config-type'] + '.xml') (property.get('name') == item['config-name'])) { if (item.level == ERROR) { self.set('configValidationError', true); - property.set('errorMessage', item.message); - property.set('error', true); + property.set('warnMessage', item.message); + property.set('warn', true); } else if (item.level == WARN) { self.set('configValidationWarning', true); property.set('warnMessage', item.message); @@ -264,21 +264,14 @@ App.ServerValidatorMixin = Em.Mixin.create({ * @returns {*} */ warnUser: function(deferred) { -var self = this; if (this.get('configValidationFailed')) { - this.set('isSubmitDisabled', false); - this.set(isApplyingChanges, false); deferred.reject(); return App.showAlertPopup(Em.I18n.t('installer.step7.popup.validation.failed.header'), Em.I18n.t('installer.step7.popup.validation.request.failed.body')); } else if (this.get('configValidationWarning') || this.get('configValidationError')) { // Motivation: for server-side validation warnings and EVEN errors allow user to continue wizard - this.set('isSubmitDisabled', true); - this.set(isApplyingChanges, false); - return App.showConfirmationPopup(function () { -self.set('isSubmitDisabled', false); -self.set(isApplyingChanges, true); -deferred.resolve(); - }, Em.I18n.t('installer.step7.popup.validation.warning.body')); + return App.showConfirmationPopup(function () { deferred.resolve(); }, + Em.I18n.t('installer.step7.popup.validation.warning.body'), + function () { deferred.reject(); }); } else { deferred.resolve(); }
git commit: AMBARI-7034 Update UI unit tests for models. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 1f48b24fe - a82633457 AMBARI-7034 Update UI unit tests for models. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8263345 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8263345 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8263345 Branch: refs/heads/trunk Commit: a82633457b56667238d1824b6d901b1a85b530ca Parents: 1f48b24 Author: atkach atk...@hortonworks.com Authored: Wed Aug 27 15:01:58 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Wed Aug 27 15:01:58 2014 +0300 -- ambari-web/app/assets/test/tests.js | 2 + ambari-web/app/models/host_component.js | 28 +- ambari-web/app/models/stack_service.js | 3 +- ambari-web/test/models/host_component_test.js | 212 ++- ambari-web/test/models/host_test.js | 357 ++- ambari-web/test/models/service_test.js | 59 +-- ambari-web/test/models/stack_service_test.js| 343 ++ .../common/configs/config_history_flow_test.js | 22 +- 8 files changed, 969 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a8263345/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 985da16..8634d34 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -193,6 +193,8 @@ var files = ['test/init_model_test', 'test/models/run_test', 'test/models/service_config_test', 'test/models/stack_service_component_test', + 'test/models/service_test', + 'test/models/stack_service_test', 'test/models/user_test' ]; App.initialize(); http://git-wip-us.apache.org/repos/asf/ambari/blob/a8263345/ambari-web/app/models/host_component.js -- diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index b437d26..73fc852 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -32,7 +32,7 @@ App.HostComponent = DS.Model.extend({ * Determine if component is client * @returns {bool} */ - isClient:function () { + isClient: function () { return App.get('components.clients').contains(this.get('componentName')); }.property('componentName'), /** @@ -40,7 +40,7 @@ App.HostComponent = DS.Model.extend({ * Based on codeworkStatus/code * @returns {bool} */ - isRunning: function(){ + isRunning: function () { return (this.get('workStatus') == 'STARTED' || this.get('workStatus') == 'STARTING'); }.property('workStatus'), @@ -64,17 +64,17 @@ App.HostComponent = DS.Model.extend({ * Determine if component is slave * @returns {bool} */ - isSlave: function(){ + isSlave: function () { return App.get('components.slaves').contains(this.get('componentName')); }.property('componentName'), /** * Only certain components can be deleted. - * They include some from master components, - * some from slave components, and rest from + * They include some from master components, + * some from slave components, and rest from * client components. * @returns {bool} */ - isDeletable: function() { + isDeletable: function () { return App.get('components.deletable').contains(this.get('componentName')); }.property('componentName'), /** @@ -98,19 +98,19 @@ App.HostComponent = DS.Model.extend({ * User friendly host component status * @returns {String} */ - isActive: function() { + isActive: function () { return (this.get('passiveState') == 'OFF'); }.property('passiveState'), - passiveTooltip: function() { + passiveTooltip: function () { if (!this.get('isActive')) { return Em.I18n.t('hosts.component.passive.mode'); } }.property('isActive'), - statusClass: function() { + statusClass: function () { return this.get('isActive') ? this.get('workStatus') : 'icon-medkit'; - }.property('workStatus','isActive'), + }.property('workStatus', 'isActive'), statusIconClass: function () { switch (this.get('statusClass')) { @@ -133,7 +133,7 @@ App.HostComponent = DS.Model.extend({ componentTextStatus: function () { return App.HostComponentStatus.getTextStatus(this.get(workStatus)); - }.property('workStatus','isDecommissioning') + }.property('workStatus', 'isDecommissioning') }); App.HostComponent.FIXTURES = []; @@ -155,8 +155,8 @@ App.HostComponentStatus = { * @param {String} value * @returns {String} */ - getKeyName:function(value){ -switch(value){ + getKeyName: function
[2/2] git commit: AMBARI-7021 - Alerts: Create Group and Target REST Endpoints (jonathanhurley)
AMBARI-7021 - Alerts: Create Group and Target REST Endpoints (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4a4644b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4a4644b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4a4644b8 Branch: refs/heads/branch-alerts-dev Commit: 4a4644b882c9a0d39b249db5a106f7075cb0c93d Parents: 6ba11a2 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Aug 26 14:21:31 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Aug 27 08:51:49 2014 -0400 -- .../python/ambari_agent/alerts/base_alert.py| 4 +- .../python/ambari_agent/alerts/port_alert.py| 11 +- .../ambari/server/agent/HeartBeatHandler.java | 16 +- .../resources/AlertGroupResourceDefinition.java | 50 +++ .../AlertTargetResourceDefinition.java | 50 +++ .../resources/ResourceInstanceFactoryImpl.java | 8 + .../server/api/services/AlertGroupService.java | 111 ++ .../server/api/services/AlertTargetService.java | 96 ++ .../server/api/services/ClusterService.java | 66 +++- .../ambari/server/controller/AmbariServer.java | 4 + .../AbstractControllerResourceProvider.java | 10 +- .../internal/AlertGroupResourceProvider.java| 268 +++ .../internal/AlertTargetResourceProvider.java | 258 ++ .../ambari/server/controller/spi/Resource.java | 13 +- .../ambari/server/orm/dao/AlertDispatchDAO.java | 78 +++-- .../ambari/server/state/alert/AlertGroup.java | 124 +++ .../ambari/server/state/alert/AlertTarget.java | 123 +++ .../ambari/server/state/alert/TargetType.java | 37 ++ .../svccomphost/ServiceComponentHostImpl.java | 2 + .../src/main/resources/key_properties.json | 7 + .../src/main/resources/properties.json | 18 +- .../AlertGroupResourceProviderTest.java | 335 +++ .../AlertTargetResourceProviderTest.java| 290 .../svccomphost/ServiceComponentHostTest.java | 242 +++--- 24 files changed, 2045 insertions(+), 176 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4a4644b8/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index 07987d9..88c7f92 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -34,7 +34,7 @@ class BaseAlert(object): self.alert_meta = alert_meta self.alert_source_meta = alert_source_meta self.cluster = '' -self.hostname = '' +self.hostName = '' self._lookup_keys = [] @@ -54,7 +54,7 @@ class BaseAlert(object): def set_cluster(self, cluster, host): ''' sets cluster information for the alert ''' self.cluster = cluster -self.hostname = host +self.hostName = host def collect(self): ''' method used for collection. defers to _collect() ''' http://git-wip-us.apache.org/repos/asf/ambari/blob/4a4644b8/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index d06d1f4..eaf744a 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -22,7 +22,6 @@ import logging import re import socket import time -import traceback from alerts.base_alert import BaseAlert from resource_management.libraries.functions.get_port_from_url import get_port_from_url @@ -40,7 +39,7 @@ class PortAlert(BaseAlert): def _collect(self): urivalue = self._lookup_property_value(self.uri) -host = get_host_from_url(urivalue) +host = get_host_from_url(self, urivalue) port = self.port try: @@ -76,9 +75,9 @@ Tested on the following cases: hdfs://192.168.54.3/foo/bar ftp://192.168.54.4:7842/foo/bar; ''' -def get_host_from_url(uri): +def get_host_from_url(self, uri): # RFC3986, Appendix B - parts = re.findall('^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?' , uri) + parts = re.findall('^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?', uri) # index of parts # scheme= 1 @@ -96,6 +95,10 @@ def get_host_from_url(uri): host_and_port = parts[0][3] if -1 == host_and_port.find(':'): +# if no : then it might only be a port; if it's a port, return this host +if host_and_port.isdigit(): +
[1/2] AMBARI-7021 - Alerts: Create Group and Target REST Endpoints (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 6ba11a2a9 - 4a4644b88 http://git-wip-us.apache.org/repos/asf/ambari/blob/4a4644b8/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 new file mode 100644 index 000..982dd4b --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java @@ -0,0 +1,290 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.controller.internal; + +import static org.easymock.EasyMock.capture; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.createStrictMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.resetToStrict; +import static org.easymock.EasyMock.verify; +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.controller.spi.Predicate; +import org.apache.ambari.server.controller.spi.Request; +import org.apache.ambari.server.controller.spi.Resource; +import org.apache.ambari.server.controller.utilities.PredicateBuilder; +import org.apache.ambari.server.controller.utilities.PropertyHelper; +import org.apache.ambari.server.metadata.ActionMetadata; +import org.apache.ambari.server.orm.InMemoryDefaultTestModule; +import org.apache.ambari.server.orm.dao.AlertDispatchDAO; +import org.apache.ambari.server.orm.entities.AlertTargetEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.apache.ambari.server.state.alert.TargetType; +import org.easymock.Capture; +import org.easymock.EasyMock; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.google.inject.Binder; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Module; +import com.google.inject.util.Modules; + +/** + * {@link AlertTargetResourceProvider} tests. + */ +public class AlertTargetResourceProviderTest { + + private static final Long ALERT_TARGET_ID = Long.valueOf(28); + private static final String ALERT_TARGET_NAME = The Administrators; + private static final String ALERT_TARGET_DESC = Admins and Others; + private static final String ALERT_TARGET_TYPE = TargetType.EMAIL.name(); + + private AlertDispatchDAO m_dao; + private Injector m_injector; + + @Before + public void before() { +m_dao = createStrictMock(AlertDispatchDAO.class); + +m_injector = Guice.createInjector(Modules.override( +new InMemoryDefaultTestModule()).with(new MockModule())); + +AlertTargetResourceProvider.init(m_injector); + } + + /** + * @throws Exception + */ + @Test + public void testGetResourcesNoPredicate() throws Exception { +Request request = PropertyHelper.getReadRequest( +AlertTargetResourceProvider.ALERT_TARGET_DESCRIPTION, +AlertTargetResourceProvider.ALERT_TARGET_ID, +AlertTargetResourceProvider.ALERT_TARGET_NAME, +AlertTargetResourceProvider.ALERT_TARGET_NOTIFICATION_TYPE); + +expect(m_dao.findAllTargets()).andReturn(getMockEntities()); +replay(m_dao); + +AmbariManagementController amc = createMock(AmbariManagementController.class); +AlertTargetResourceProvider provider = createProvider(amc); +SetResource results = provider.getResources(request, null); + +assertEquals(1, results.size()); + +Resource r = results.iterator().next(); +Assert.assertEquals(ALERT_TARGET_NAME, +
git commit: AMBARI-7035. Views: Jobs view support for existing ATS. (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk a82633457 - 61695fa43 AMBARI-7035. Views: Jobs view support for existing ATS. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61695fa4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61695fa4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61695fa4 Branch: refs/heads/trunk Commit: 61695fa43735b12a08b15af9504210ac6c9a0bf2 Parents: a826334 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Wed Aug 27 15:55:38 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Wed Aug 27 15:55:38 2014 +0300 -- .../src/main/resources/ui/app/scripts/app.js| 2 +- .../app/scripts/controllers/job_controller.js | 2 +- .../app/scripts/controllers/jobs_controller.js | 14 ++-- .../resources/ui/app/scripts/helpers/ajax.js| 17 +++-- .../resources/ui/app/scripts/helpers/jobs.js| 78 +--- .../mappers/application_status_mapper.js| 47 contrib/views/jobs/src/main/resources/view.xml | 10 +++ 7 files changed, 111 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/61695fa4/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js index 3ab2c30..2ae6d20 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/app.js @@ -55,7 +55,7 @@ App.initializer({ }); -application.ApplicationStatusMapper.getClusterName(); +application.ApplicationStatusMapper.getInstanceParameters(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/61695fa4/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js index f1125d9..dbf3a4f 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js @@ -71,7 +71,7 @@ App.JobController = Ember.ObjectController.extend(App.RunPeriodically, { timeout = this.get('loadTimeout'), yarnService = App.HiveJob.store.getById('service', 'YARN'), content = this.get('content'); -if (!Em.isNone(yarnService)) { +if (!Em.isNone(yarnService) || App.get('atsURL')) { if (!Em.isNone(content)) { App.Helpers.jobs.refreshJobDetails( content, http://git-wip-us.apache.org/repos/asf/ambari/blob/61695fa4/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/jobs_controller.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/jobs_controller.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/jobs_controller.js index d96f598..16acb56 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/jobs_controller.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/jobs_controller.js @@ -557,11 +557,11 @@ App.JobsController = Ember.ArrayController.extend(App.RunPeriodically, { */ checkDataLoadingError: function (jqXHR) { var atsComponent = App.HiveJob.store.getById('component', 'APP_TIMELINE_SERVER'); -if (atsComponent atsComponent.get('workStatus') != STARTED) { +if (!App.get('atsURL') atsComponent atsComponent.get('workStatus') != STARTED) { this.set('jobsMessage', Em.I18n.t('jobs.error.ats.down')); } else { - if (jqXHR jqXHR.status == 400) { + if (jqXHR (jqXHR.status == 400 || jqXHR.status == 404)) { this.set('jobsMessage', Em.I18n.t('jobs.error.400')); } else { @@ -584,15 +584,14 @@ App.JobsController = Ember.ArrayController.extend(App.RunPeriodically, { atsComponent = App.HiveJob.store.getById('component', 'APP_TIMELINE_SERVER'), atsInValidState = !!atsComponent atsComponent.get('workStatus') === STARTED; this.checkDataLoadingError(); -if (!Em.isNone(yarnService) atsInValidState) { +if (App.get('atsURL') || (!Em.isNone(yarnService) atsInValidState)) { this.set('loading', true); - var historyServerHostName = atsComponent.get('hostName'); + var atsURL = App.get('atsURL') || 'http://' + atsComponent.get('hostName') + ':' + yarnService.get('ahsWebPort');
git commit: AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 61695fa43 - c79fad250 AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c79fad25 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c79fad25 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c79fad25 Branch: refs/heads/trunk Commit: c79fad2501a024379d409cb911e6ea72c8574ee5 Parents: 61695fa Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 16:03:39 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 16:03:39 2014 +0300 -- ambari-web/app/router.js | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c79fad25/ambari-web/app/router.js -- diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index 04c6385..9e16359 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -441,12 +441,16 @@ App.Router = Em.Router.extend({ experimental: Em.Route.extend({ route: '/experimental', enter: function (router, context) { - +if (!App.get('isAdmin')) { + router.transitionTo(main); +} }, connectOutlets: function (router, context) { -$('title').text(Ambari Experimental); -console.log('/experimental:connectOutlet'); -router.get('applicationController').connectOutlet('experimental'); +if (App.get('isAdmin')) { + $('title').text(Ambari Experimental); + console.log('/experimental:connectOutlet'); + router.get('applicationController').connectOutlet('experimental'); +} } }),
[14/35] git commit: AMBARI-7014 FE: Add service wizard not sending configs of added service for validations
AMBARI-7014 FE: Add service wizard not sending configs of added service for validations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/db83ea24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/db83ea24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/db83ea24 Branch: refs/heads/branch-alerts-dev Commit: db83ea24ce47d84895c699137c6c2a9ade2f3577 Parents: 40f1c4e Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Tue Aug 26 16:49:06 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Tue Aug 26 16:49:06 2014 +0300 -- ambari-web/app/mixins/common/serverValidator.js | 2 +- ambari-web/app/models/stack_service.js | 3 --- ambari-web/app/utils/config.js | 2 +- ambari-web/test/utils/blueprint_test.js | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 5140224..462ff62 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -78,7 +78,7 @@ App.ServerValidatorMixin = Em.Mixin.create({ return this.get('content.serviceName') ? [App.StackService.find(this.get('content.serviceName'))] : App.StackService.find().filter(function(s){ - return s.get('allowServerValidator') (s.get('isSelected') || s.get('isInsalled')) + return (s.get('isSelected') || s.get('isInstalled')) }).concat(require(data/service_configs)); }.property('content.serviceName'), http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 744083b..e19e27f 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -171,9 +171,6 @@ App.StackService = DS.Model.extend(App.ServiceModelMixin, { return defaultConfigsHandler defaultConfigsHandler.configsValidator; }.property('serviceName'), - allowServerValidator: function() { -return [YARN, STORM, MAPREDUCE2, HIVE, TEZ].contains(this.get('serviceName')); - }.property('serviceName'), /** * configCategories are fetched from App.StackService.configCategories. * Also configCategories that does not match any serviceComponent of a service and not included in the permissible default pattern are omitted http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/app/utils/config.js -- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 62db148..03bd079 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -691,7 +691,7 @@ App.config = Em.Object.create({ // Use calculated default values for some configs var recommendedDefaults = {}; if (App.get('supports.serverRecommendValidate')) { -if (!storedConfigs service.get('configTypes') service.get('allowServerValidator')) { +if (!storedConfigs service.get('configTypes')) { Object.keys(service.get('configTypes')).forEach(function (type) { if (!recommended || !recommended[type]) { return; http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/test/utils/blueprint_test.js -- diff --git a/ambari-web/test/utils/blueprint_test.js b/ambari-web/test/utils/blueprint_test.js index 1f8d803..d615896 100644 --- a/ambari-web/test/utils/blueprint_test.js +++ b/ambari-web/test/utils/blueprint_test.js @@ -287,7 +287,6 @@ describe('utils/blueprint', function() { yarn-site: {}, yarn-env: {} }, -allowServerValidator: true, isInstalled: true }) ],
[08/35] git commit: AMBARI-7010. Recommendation and validation hrefs contain null resource number
AMBARI-7010. Recommendation and validation hrefs contain null resource number Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a80066ae Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a80066ae Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a80066ae Branch: refs/heads/branch-alerts-dev Commit: a80066ae09dc3ccda574b014028a87136573a4c2 Parents: 336a63d Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Aug 25 17:25:15 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Aug 25 17:41:30 2014 -0700 -- .../stackadvisor/StackAdvisorResponse.java | 73 .../commands/StackAdvisorCommand.java | 10 ++- .../recommendations/RecommendationResponse.java | 38 +- .../validations/ValidationResponse.java | 15 +--- .../RecommendationResourceProvider.java | 4 +- .../internal/ValidationResourceProvider.java| 4 +- .../commands/StackAdvisorCommandTest.java | 6 +- .../RecommendationResourceProviderTest.java | 31 + .../ValidationResourceProviderTest.java | 70 +++ 9 files changed, 194 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a80066ae/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorResponse.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorResponse.java new file mode 100644 index 000..b6d7de7 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorResponse.java @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services.stackadvisor; + +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Abstract stack advisor response POJO. + */ +public abstract class StackAdvisorResponse { + + private int id; + + @JsonProperty(Versions) + private Version version; + + public int getId() { +return id; + } + + public void setId(int id) { +this.id = id; + } + + public Version getVersion() { +return version; + } + + public void setVersion(Version version) { +this.version = version; + } + + public static class Version { +@JsonProperty(stack_name) +private String stackName; + +@JsonProperty(stack_version) +private String stackVersion; + +public String getStackName() { + return stackName; +} + +public void setStackName(String stackName) { + this.stackName = stackName; +} + +public String getStackVersion() { + return stackVersion; +} + +public void setStackVersion(String stackVersion) { + this.stackVersion = stackVersion; +} + } + +} http://git-wip-us.apache.org/repos/asf/ambari/blob/a80066ae/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java index 81d4605..bc98c4c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java @@ -42,6 +42,7 @@ import org.apache.ambari.server.api.services.Request; import org.apache.ambari.server.api.services.StacksService.StackUriInfo; import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorException; import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
[17/35] git commit: AMBARI-7016 Tooltip for Final, Override and Remove buttons on Configs tab not present somethimes. (Max Shepel via atkach)
AMBARI-7016 Tooltip for Final, Override and Remove buttons on Configs tab not present somethimes. (Max Shepel via atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d098ca8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d098ca8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d098ca8 Branch: refs/heads/branch-alerts-dev Commit: 6d098ca8af8ba2244469a832b2ff4b1d64160760 Parents: 9faeaf5 Author: atkach atk...@hortonworks.com Authored: Tue Aug 26 18:54:34 2014 +0300 Committer: atkach atk...@hortonworks.com Committed: Tue Aug 26 18:54:34 2014 +0300 -- ambari-web/app/views/common/configs/overriddenProperty_view.js | 1 + ambari-web/app/views/common/configs/services_config.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6d098ca8/ambari-web/app/views/common/configs/overriddenProperty_view.js -- diff --git a/ambari-web/app/views/common/configs/overriddenProperty_view.js b/ambari-web/app/views/common/configs/overriddenProperty_view.js index fc73474..079084e 100644 --- a/ambari-web/app/views/common/configs/overriddenProperty_view.js +++ b/ambari-web/app/views/common/configs/overriddenProperty_view.js @@ -25,6 +25,7 @@ App.ServiceConfigView.SCPOverriddenRowsView = Ember.View.extend({ categoryConfigs: null, // just declared as viewClass need it didInsertElement: function (){ +Em.$('body.tooltip').remove(); if (this.get('isDefaultGroupSelected')) { var overrides = this.get('serviceConfigProperty.overrides'); overrides.forEach(function(overriddenSCP) { http://git-wip-us.apache.org/repos/asf/ambari/blob/6d098ca8/ambari-web/app/views/common/configs/services_config.js -- diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js index abdaacf..2fc787f 100644 --- a/ambari-web/app/views/common/configs/services_config.js +++ b/ambari-web/app/views/common/configs/services_config.js @@ -448,7 +448,8 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, { } else { this.$('.accordion-body').show(); } -App.tooltip(this.$('[data-toggle=tooltip]'),{ +$('body').tooltip({ + selector: '[data-toggle=tooltip]', placement: 'top' }); this.updateReadOnlyFlags();
[03/35] git commit: AMBARI-6993. links to mailing list archives from subscribe page. (yusaku)
AMBARI-6993. links to mailing list archives from subscribe page. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c1bce05 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c1bce05 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c1bce05 Branch: refs/heads/branch-alerts-dev Commit: 0c1bce053e99bc0de9bbda8ccabaa6c3d20e6c98 Parents: 2fd2500 Author: Yusaku Sako yus...@hortonworks.com Authored: Mon Aug 25 11:59:41 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Mon Aug 25 12:02:50 2014 -0700 -- docs/pom.xml | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0c1bce05/docs/pom.xml -- diff --git a/docs/pom.xml b/docs/pom.xml index 3ffc6da..e00a46d 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -74,7 +74,7 @@ unsubscribemailto:user-unsubscr...@ambari.apache.org /unsubscribe postmailto:u...@ambari.apache.org/post -archive/archive + archivehttp://mail-archives.apache.org/mod_mbox/ambari-user//archive /mailingList mailingList nameDevelopment list/name @@ -83,7 +83,7 @@ unsubscribemailto:dev-unsubscr...@ambari.apache.org /unsubscribe postmailto:d...@ambari.apache.org/post -archive/archive + archivehttp://mail-archives.apache.org/mod_mbox/ambari-dev//archive /mailingList mailingList nameCommit list/name @@ -92,7 +92,7 @@ unsubscribemailto:commits-unsubscr...@ambari.apache.org /unsubscribe postmailto:commits@ambari.apache.org/post -archive/archive + archivehttp://mail-archives.apache.org/mod_mbox/ambari-commits//archive /mailingList /mailingLists @@ -311,6 +311,18 @@ /organization /developer developer +idjonathanhurley/id +nameJonathan Hurley/name +emailjonathanhur...@apache.org/email +timezone-8/timezone +roles +roleCommitter/role +/roles +organization +Hortonworks +/organization +/developer +developer idjspeidel/id nameJohn Speidel/name emailjspei...@apache.org/email
[23/35] AMBARI-7018. Stack API should provide display name for services and components. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/02ee3d44/ambari-web/test/service_components.js -- diff --git a/ambari-web/test/service_components.js b/ambari-web/test/service_components.js index fe7feca..8b89ab3 100644 --- a/ambari-web/test/service_components.js +++ b/ambari-web/test/service_components.js @@ -22,6 +22,7 @@ module.exports = { StackServices : { comments : Apache Hadoop Distributed Processing Framework, service_name : MAPREDUCE, +display_name : MapReduce, service_version : 1.2.0.1.3.3.0, stack_name : HDP, stack_version : 1.3.2 @@ -31,6 +32,7 @@ module.exports = { StackServiceComponents : { component_category : MASTER, component_name : HISTORYSERVER, +display_name : History Server, is_client : false, is_master : true, service_name : MAPREDUCE, @@ -43,6 +45,7 @@ module.exports = { StackServiceComponents : { component_category : MASTER, component_name : JOBTRACKER, +display_name : JobTracker, is_client : false, is_master : true, service_name : MAPREDUCE, @@ -55,6 +58,7 @@ module.exports = { StackServiceComponents : { component_category : CLIENT, component_name : MAPREDUCE_CLIENT, +display_name : MapReduce Client, is_client : true, is_master : false, service_name : MAPREDUCE, @@ -67,6 +71,7 @@ module.exports = { StackServiceComponents : { component_category : SLAVE, component_name : TASKTRACKER, +display_name : TaskTracker, is_client : false, is_master : false, service_name : MAPREDUCE, @@ -84,6 +89,7 @@ module.exports = { custom_commands : [ ], service_check_supported : true, service_name : FALCON, +display_name : Falcon, service_version : 0.5.0.2.1, stack_name : HDP, stack_version : 2.1, @@ -118,6 +124,7 @@ module.exports = { cardinality : 1+, component_category : CLIENT, component_name : FALCON_CLIENT, +display_name : Falcon Client, custom_commands : [ ], is_client : true, is_master : false, @@ -133,6 +140,7 @@ module.exports = { cardinality : 1, component_category : MASTER, component_name : FALCON_SERVER, +display_name : Falcon Server, custom_commands : [ ], is_client : false, is_master : true, @@ -172,6 +180,7 @@ module.exports = { custom_commands : [ ], service_check_supported : true, service_name : FLUME, +display_name : Flume, service_version : 1.4.0.2.1.1.0, stack_name : HDP, stack_version : 2.1, @@ -201,6 +210,7 @@ module.exports = { cardinality : 0+, component_category : SLAVE, component_name : FLUME_HANDLER, +display_name : Flume, custom_commands : [ ], is_client : false, is_master : false, @@ -219,6 +229,7 @@ module.exports = { custom_commands : [ ], service_check_supported : false, service_name : GANGLIA, +display_name : Ganglia, service_version : 3.5.0, stack_name : HDP, stack_version : 2.1, @@ -238,6 +249,7 @@ module.exports = { cardinality : ALL, component_category : SLAVE, component_name : GANGLIA_MONITOR, +display_name : Ganglia Monitor, custom_commands : [ ], is_client : false, is_master : false, @@ -256,6 +268,7 @@ module.exports = { cardinality : 1, component_category : MASTER, component_name : GANGLIA_SERVER, +display_name : Ganglia Server, custom_commands : [ ], is_client : false, is_master : true, @@ -274,6 +287,7 @@ module.exports = { custom_commands : [ ], service_check_supported : true, service_name : HBASE, +display_name : HBase, service_version : 0.98.0.2.1, stack_name : HDP, stack_version : 2.1, @@ -308,6 +322,7 @@ module.exports = { cardinality : 1+, component_category : CLIENT, component_name : HBASE_CLIENT, +display_name : HBase Client, custom_commands : [ ], is_client : true, is_master : false, @@ -323,6 +338,7 @@ module.exports = { cardinality : 1+, component_category : MASTER, component_name : HBASE_MASTER, +display_name : HBase Master,
[12/35] git commit: AMBARI-7013. Fix UI Unit tests. (onechiporenko)
AMBARI-7013. Fix UI Unit tests. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/574461df Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/574461df Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/574461df Branch: refs/heads/branch-alerts-dev Commit: 574461df0847b83967ec64c429387fb4859eecd0 Parents: 9094078 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Tue Aug 26 16:25:07 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Tue Aug 26 16:25:07 2014 +0300 -- ambari-web/test/app_test.js | 52 .../dashboard/config_history_controller_test.js | 25 +++--- ambari-web/test/utils/date_test.js | 4 +- .../common/configs/config_history_flow_test.js | 6 +-- 4 files changed, 23 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/574461df/ambari-web/test/app_test.js -- diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js index c16d5f0..85b50ee 100644 --- a/ambari-web/test/app_test.js +++ b/ambari-web/test/app_test.js @@ -81,58 +81,6 @@ describe('App', function () { }); }); - describe('#stack2VersionURL', function () { - -var testCases = [ - { -title: 'if currentStackVersion and defaultStackVersion are empty then stack2VersionURL should contain prefix', -currentStackVersion: '', -defaultStackVersion: '', -result: '/stacks2/HDP/versions/' - }, - { -title: 'if currentStackVersion is HDP-1.3.1 then stack2VersionURL should be /stacks2/HDP/versions/1.3.1', -currentStackVersion: 'HDP-1.3.1', -defaultStackVersion: '', -result: '/stacks2/HDP/versions/1.3.1' - }, - { -title: 'if defaultStackVersion is HDP-1.3.1 then stack2VersionURL should be /stacks/HDP/versions/1.3.1', -currentStackVersion: '', -defaultStackVersion: 'HDP-1.3.1', -result: '/stacks2/HDP/versions/1.3.1' - }, - { -title: 'if defaultStackVersion and currentStackVersion are different then stack2VersionURL should have currentStackVersion value', -currentStackVersion: 'HDP-1.3.2', -defaultStackVersion: 'HDP-1.3.1', -result: '/stacks2/HDP/versions/1.3.2' - }, - { -title: 'if defaultStackVersion is HDPLocal-1.3.1 then stack2VersionURL should be /stacks2/HDPLocal/versions/1.3.1', -currentStackVersion: '', -defaultStackVersion: 'HDPLocal-1.3.1', -result: '/stacks2/HDPLocal/versions/1.3.1' - }, - { -title: 'if currentStackVersion is HDPLocal-1.3.1 then stack2VersionURL should be /stacks2/HDPLocal/versions/1.3.1', -currentStackVersion: 'HDPLocal-1.3.1', -defaultStackVersion: '', -result: '/stacks2/HDPLocal/versions/1.3.1' - } -]; - -testCases.forEach(function (test) { - it(test.title, function () { -App.set('currentStackVersion', test.currentStackVersion); -App.set('defaultStackVersion', test.defaultStackVersion); -expect(App.get('stack2VersionURL')).to.equal(test.result); -App.set('currentStackVersion', HDP-1.2.2); -App.set('defaultStackVersion', HDP-1.2.2); - }); -}); - }); - describe('#falconServerURL', function () { var testCases = [ http://git-wip-us.apache.org/repos/asf/ambari/blob/574461df/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js -- diff --git a/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js b/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js index 257e012..0692b9e 100644 --- a/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js +++ b/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js @@ -28,11 +28,11 @@ describe('MainConfigHistoryController', function () { describe('#realUrl', function () { it('cluster name is empty', function () { App.set('clusterName', ''); - expect(controller.get('realUrl')).to.equal('/api/v1/clusters//configurations/serviceconfigversions?parametersfields=serviceconfigversion,user,appliedtime,createtime,service_name,service_config_version_noteminimal_response=true'); + expect(controller.get('realUrl')).to.equal('/api/v1/clusters//configurations/serviceconfigversions?parametersfields=serviceconfigversion,user,group_id,group_name,createtime,service_name,service_config_version_noteminimal_response=true'); }); it('cluster name is mycluster', function () { App.set('clusterName', 'mycluster'); -
[15/35] AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster (dlysnichenko)
http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java index 13cb231..1cfba46 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java @@ -134,6 +134,8 @@ public class UpgradeCatalog170Test { CaptureDBAccessor.DBColumnInfo clusterConfigAttributesColumnCapture = new CaptureDBAccessor.DBColumnInfo(); CaptureDBAccessor.DBColumnInfo maskColumnCapture = new CaptureDBAccessor.DBColumnInfo(); CaptureDBAccessor.DBColumnInfo maskedColumnCapture = new CaptureDBAccessor.DBColumnInfo(); +CaptureDBAccessor.DBColumnInfo stageCommandParamsColumnCapture = new CaptureDBAccessor.DBColumnInfo(); +CaptureDBAccessor.DBColumnInfo stageHostParamsColumnCapture = new CaptureDBAccessor.DBColumnInfo(); CaptureListDBAccessor.DBColumnInfo alertDefinitionColumnCapture = new CaptureListDBAccessor.DBColumnInfo(); CaptureListDBAccessor.DBColumnInfo alertHistoryColumnCapture = new CaptureListDBAccessor.DBColumnInfo(); CaptureListDBAccessor.DBColumnInfo alertCurrentColumnCapture = new CaptureListDBAccessor.DBColumnInfo(); @@ -148,6 +150,7 @@ public class UpgradeCatalog170Test { setViewExpectations(dbAccessor, maskColumnCapture); setViewParameterExpectations(dbAccessor, maskedColumnCapture); setClusterConfigExpectations(dbAccessor, clusterConfigAttributesColumnCapture); +setStageExpectations(dbAccessor, stageCommandParamsColumnCapture, stageHostParamsColumnCapture); dbAccessor.createTable(eq(alert_definition), capture(alertDefinitionColumnCapture), eq(definition_id)); @@ -200,6 +203,7 @@ public class UpgradeCatalog170Test { assertClusterConfigColumns(clusterConfigAttributesColumnCapture); assertViewColumns(maskColumnCapture); assertViewParameterColumns(maskedColumnCapture); +assertStageColumns(stageCommandParamsColumnCapture, stageHostParamsColumnCapture); assertEquals(12, alertDefinitionColumnCapture.getValue().size()); assertEquals(11, alertHistoryColumnCapture.getValue().size()); @@ -424,6 +428,17 @@ public class UpgradeCatalog170Test { dbAccessor.addColumn(eq(clusterconfig), capture(clusterConfigAttributesColumnCapture)); } + + private void setStageExpectations(DBAccessor dbAccessor, +CaptureDBAccessor.DBColumnInfo stageCommandParamsColumnCapture, +CaptureDBAccessor.DBColumnInfo stageHostParamsColumnCapture) +throws SQLException { +dbAccessor.addColumn(eq(stage), + capture(stageCommandParamsColumnCapture)); + +dbAccessor.addColumn(eq(stage), + capture(stageHostParamsColumnCapture)); + } @Test public void testGetSourceVersion() { @@ -465,4 +480,19 @@ public class UpgradeCatalog170Test { assertNull(column.getDefaultValue()); assertTrue(column.isNullable()); } + + private void assertStageColumns(CaptureDBAccessor.DBColumnInfo stageCommandParamsColumnCapture, + CaptureDBAccessor.DBColumnInfo stageHostParamsColumnCapture) { +DBAccessor.DBColumnInfo column = stageCommandParamsColumnCapture.getValue(); +assertEquals(command_params, column.getName()); +assertEquals(byte[].class, column.getType()); +assertEquals(null, column.getDefaultValue()); +assertTrue(column.isNullable()); + +column = stageHostParamsColumnCapture.getValue(); +assertEquals(host_params, column.getName()); +assertEquals(byte[].class, column.getType()); +assertEquals(null, column.getDefaultValue()); +assertTrue(column.isNullable()); + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java b/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java index 6e587f1..988c67b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java @@ -20,6 +20,8 @@ package org.apache.ambari.server.utils; import static org.easymock.EasyMock.expect; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.powermock.api.easymock.PowerMock.mockStaticPartial; +import static org.powermock.api.easymock.PowerMock.replayAll; import
[22/35] git commit: AMBARI-6010. No such service ambari-agent when trying to use service cmd on agent on SUSE (dlysnichenko)
AMBARI-6010. No such service ambari-agent when trying to use service cmd on agent on SUSE (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb9d884b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb9d884b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb9d884b Branch: refs/heads/branch-alerts-dev Commit: fb9d884be4ea4257831d591cd0e4f19c87321e69 Parents: e984e9b Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Tue Aug 26 21:26:28 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Tue Aug 26 21:26:28 2014 +0300 -- ambari-agent/pom.xml | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb9d884b/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index ebf30fa..a487aa7 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -49,6 +49,7 @@ ambari.server.module../ambari-server/ambari.server.module target.cache.dir${project.build.directory}/cache//target.cache.dir resource.keeper.script${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py/resource.keeper.script +init.d.dir/etc/rc.d/init.d/init.d.dir /properties build plugins @@ -349,7 +350,7 @@ groupnameroot/groupname /mapping mapping - directory/etc/rc.d/init.d/directory + directory${init.d.dir}/directory filemode755/filemode usernameroot/username groupnameroot/groupname @@ -666,4 +667,12 @@ /extension /extensions /build + profiles +profile + idsuse11/id + properties +init.d.dir/etc/init.d/init.d.dir + /properties +/profile + /profiles /project
[19/35] git commit: AMBARI-7015 Config History: API should create exactly one SCV when instructed to save multiple configs in a batch (dsen)
AMBARI-7015 Config History: API should create exactly one SCV when instructed to save multiple configs in a batch (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2cceee2e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2cceee2e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2cceee2e Branch: refs/heads/branch-alerts-dev Commit: 2cceee2ea3933b05cef97e6d48f029dcebe9c200 Parents: d566bca Author: Dmytro Sen d...@hortonworks.com Authored: Tue Aug 26 20:10:18 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Tue Aug 26 20:10:18 2014 +0300 -- .../AmbariManagementControllerImpl.java | 38 .../server/controller/ClusterRequest.java | 16 ++-- .../ambari/server/controller/HostRequest.java | 11 +-- .../internal/AbstractResourceProvider.java | 92 +--- .../internal/ClusterResourceProvider.java | 7 +- .../internal/HostResourceProvider.java | 54 ++-- .../org/apache/ambari/server/state/Cluster.java | 9 +- .../ambari/server/state/ConfigHelper.java | 3 +- .../server/state/cluster/ClusterImpl.java | 52 +++ .../server/upgrade/AbstractUpgradeCatalog.java | 3 +- .../server/agent/TestHeartbeatMonitor.java | 4 +- .../AmbariManagementControllerTest.java | 76 ...hYarnCapacitySchedulerReleaseConfigTest.java | 4 +- .../internal/ClusterResourceProviderTest.java | 40 - .../internal/JMXHostProviderTest.java | 10 +-- .../ambari/server/state/ConfigHelperTest.java | 6 +- .../server/state/cluster/ClusterTest.java | 55 +--- .../server/state/cluster/ClustersTest.java | 3 +- .../svccomphost/ServiceComponentHostTest.java | 3 +- .../server/upgrade/UpgradeCatalogTest.java | 2 +- 20 files changed, 293 insertions(+), 195 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2cceee2e/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 c465189..394f6ad 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 @@ -53,6 +53,7 @@ import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -676,7 +677,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if (config != null) { String authName = getAuthName(); - if (cluster.addDesiredConfig(authName, config) != null) { + if (cluster.addDesiredConfig(authName, Collections.singleton(config)) != null) { LOG.info(cluster ' + cluster.getClusterName() + ' + changed by: ' + authName + '; + type=' + config.getType() + ' @@ -1151,14 +1152,15 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle final Cluster cluster = clusters.getCluster(request.getClusterName()); //save data to return configurations created -ConfigurationResponse configurationResponse = null; +ListConfigurationResponse configurationResponses = + new LinkedListConfigurationResponse(); ServiceConfigVersionResponse serviceConfigVersionResponse = null; // set or create configuration mapping (and optionally create the map of properties) if (null != request.getDesiredConfig()) { - ConfigurationRequest cr = request.getDesiredConfig(); - - Config oldConfig = cluster.getDesiredConfigByType(cr.getType()); + SetConfig configs = new HashSetConfig(); + String note = null; + for (ConfigurationRequest cr: request.getDesiredConfig()) { if (null != cr.getProperties()) { // !!! empty property sets are supported, and need to be able to use @@ -1173,21 +1175,23 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle request.getClusterName())); cr.setClusterName(cluster.getClusterName()); - configurationResponse = createConfiguration(cr); + configurationResponses.add(createConfiguration(cr)); } } - - Config baseConfig = cluster.getConfig(cr.getType(), cr.getVersionTag()); - if (null != baseConfig) { +note
[33/35] git commit: AMBARI-7033 Unable to open Job details(Max Shepel via ababiichuk)
AMBARI-7033 Unable to open Job details(Max Shepel via ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1f48b24f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1f48b24f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1f48b24f Branch: refs/heads/branch-alerts-dev Commit: 1f48b24feae75f35a0ea6f10dcf61332934b8534 Parents: 8d8583b Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 14:59:38 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 14:59:38 2014 +0300 -- ambari-web/app/mappers.js | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1f48b24f/ambari-web/app/mappers.js -- diff --git a/ambari-web/app/mappers.js b/ambari-web/app/mappers.js index 80c7255..aa7aea0 100644 --- a/ambari-web/app/mappers.js +++ b/ambari-web/app/mappers.js @@ -20,6 +20,7 @@ require('mappers/server_data_mapper'); require('mappers/stack_service_mapper'); require('mappers/hosts_mapper'); +require('mappers/jobs_mapper'); require('mappers/cluster_mapper'); require('mappers/runs_mapper'); require('mappers/racks_mapper');
[04/35] git commit: AMBARI-7000. Config History: Service Config page UI tweaks.(xiwang)
AMBARI-7000. Config History: Service Config page UI tweaks.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/46a91dbb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/46a91dbb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/46a91dbb Branch: refs/heads/branch-alerts-dev Commit: 46a91dbb0bfacd5cda1f8a0713061b798eac5722 Parents: 0c1bce0 Author: Xi Wang xiw...@apache.org Authored: Fri Aug 22 15:38:46 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Mon Aug 25 15:47:43 2014 -0700 -- .../data/configurations/service_version.json| 7 +- .../data/configurations/service_versions.json | 77 +++- .../main/dashboard/config_history_controller.js | 6 +- .../controllers/main/service/info/configs.js| 4 +- .../mappers/service_config_version_mapper.js| 3 +- ambari-web/app/messages.js | 1 + ambari-web/app/models/service_config_version.js | 12 ++- ambari-web/app/styles/application.less | 58 +-- .../common/configs/config_history_flow.hbs | 40 ++ .../templates/main/dashboard/config_history.hbs | 6 +- ambari-web/app/utils/ajax/ajax.js | 2 +- .../views/common/configs/config_history_flow.js | 37 +- 12 files changed, 182 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/46a91dbb/ambari-web/app/assets/data/configurations/service_version.json -- diff --git a/ambari-web/app/assets/data/configurations/service_version.json b/ambari-web/app/assets/data/configurations/service_version.json index dc02514..bf48cb7 100644 --- a/ambari-web/app/assets/data/configurations/service_version.json +++ b/ambari-web/app/assets/data/configurations/service_version.json @@ -2,11 +2,12 @@ items: [ { serviceconfigversion: 1, - servicename: HDFS, createtime: 438, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : null, + service_name : HDFS, configurations: [ { type: hdfs-site, http://git-wip-us.apache.org/repos/asf/ambari/blob/46a91dbb/ambari-web/app/assets/data/configurations/service_versions.json -- diff --git a/ambari-web/app/assets/data/configurations/service_versions.json b/ambari-web/app/assets/data/configurations/service_versions.json index 9c1a8a4..ddd59f0 100644 --- a/ambari-web/app/assets/data/configurations/service_versions.json +++ b/ambari-web/app/assets/data/configurations/service_versions.json @@ -2,11 +2,12 @@ items: [ { serviceconfigversion: 1, - servicename: HDFS, createtime: 438, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : Notes should be here, + service_name : HDFS, configurations: [ { type: core-site, @@ -21,11 +22,12 @@ }, { serviceconfigversion: 1, - servicename: YARN, createtime: 433, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : Notes should be here, + service_name : YARN, configurations: [ { type: core-site, @@ -40,11 +42,12 @@ }, { serviceconfigversion: 2, - servicename: HDFS, createtime: 435, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : Notes should be here, + service_name : HDFS, configurations: [ { type: core-site, @@ -59,11 +62,12 @@ }, { serviceconfigversion: 2, - servicename: YARN, createtime: 138, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : Notes should be here, + service_name : YARN, configurations: [ { type: core-site, @@ -78,11 +82,12 @@ }, { serviceconfigversion: 3, - servicename: HDFS, createtime: 238, - appliedtime: 586, author: admin, - notes: Notes should be here, + group_id : null, + group_name : null, + service_config_version_note : Notes should be here, + service_name : HDFS, configurations: [ {
[06/35] git commit: AMBARI-7008. Configuration validations for STORM service should be removed
AMBARI-7008. Configuration validations for STORM service should be removed Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98660b9e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98660b9e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98660b9e Branch: refs/heads/branch-alerts-dev Commit: 98660b9e3ee43ce3b2083f010ed55c556980527b Parents: fb1e0ca Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Aug 25 17:08:48 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Aug 25 17:08:48 2014 -0700 -- .../main/resources/stacks/HDP/2.1/services/stack_advisor.py | 7 --- 1 file changed, 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/98660b9e/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py index 5d7a3bc..e4168d7 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py @@ -82,7 +82,6 @@ class HDP21StackAdvisor(HDP206StackAdvisor): validator = super(HDP21StackAdvisor, self).validateServiceConfigurations(serviceName) if validator is None: return { -STORM: [storm-site, self.validateStormConfigurations], HIVE: [hive-site, self.validateHiveConfigurations], TEZ: [tez-site, self.validateTezConfigurations] }.get(serviceName, None) @@ -95,12 +94,6 @@ class HDP21StackAdvisor(HDP206StackAdvisor): {config-name: 'hive.auto.convert.join.noconditionaltask.size', message: self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'hive.auto.convert.join.noconditionaltask.size')} ] return self.toConfigurationValidationErrors(validationItems, hive-site) - def validateStormConfigurations(self, properties, recommendedDefaults): -validationItems = [ {config-name: 'drpc.childopts', message: self.validateXmxValue(properties, recommendedDefaults, 'drpc.childopts')}, -{config-name: 'ui.childopts', message: self.validateXmxValue(properties, recommendedDefaults, 'ui.childopts')}, -{config-name: 'logviewer.childopts', message: self.validateXmxValue(properties, recommendedDefaults, 'logviewer.childopts')} ] -return self.toConfigurationValidationErrors(validationItems, storm-site) - def validateTezConfigurations(self, properties, recommendedDefaults): validationItems = [ {config-name: 'tez.am.resource.memory.mb', message: self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.am.resource.memory.mb')}, {config-name: 'tez.am.java.opts', message: self.validateXmxValue(properties, recommendedDefaults, 'tez.am.java.opts')} ]
[27/35] git commit: AMBARI-7024 - Alerts: DDL Update For Default Service Alert Groups (jonathanhurley)
AMBARI-7024 - Alerts: DDL Update For Default Service Alert Groups (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e9c744f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e9c744f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e9c744f Branch: refs/heads/branch-alerts-dev Commit: 0e9c744f21a7b8aaada917eafbf3fbbed1a87edc Parents: 1ab3bb5 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Aug 26 17:53:28 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Tue Aug 26 19:51:38 2014 -0400 -- .../server/orm/entities/AlertGroupEntity.java | 74 ++-- .../server/upgrade/UpgradeCatalog170.java | 1 + .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 1 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 1 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 1 + .../server/upgrade/UpgradeCatalog170Test.java | 4 +- 7 files changed, 60 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e9c744f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java index 976855e..1ca592c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java @@ -65,6 +65,9 @@ public class AlertGroupEntity { @Column(name = is_default, nullable = false) private Integer isDefault = Integer.valueOf(0); + @Column(name = service_name, nullable = true, length = 255) + private String serviceName; + /** * Bi-directional many-to-many association to {@link AlertDefinitionEntity} */ @@ -81,7 +84,7 @@ public class AlertGroupEntity { /** * Gets the unique ID of this grouping of alerts. - * + * * @return the ID (never {@code null}). */ public Long getGroupId() { @@ -90,7 +93,7 @@ public class AlertGroupEntity { /** * Sets the unique ID of this grouping of alerts. - * + * * @param groupId * the ID (not {@code null}). */ @@ -100,7 +103,7 @@ public class AlertGroupEntity { /** * Gets the ID of the cluster that this alert group is a part of. - * + * * @return the ID (never {@code null}). */ public Long getClusterId() { @@ -109,7 +112,7 @@ public class AlertGroupEntity { /** * Sets the ID of the cluster that this alert group is a part of. - * + * * @param clusterId * the ID of the cluster (not {@code null}). */ @@ -120,7 +123,7 @@ public class AlertGroupEntity { /** * Gets the name of the grouping of alerts. Group names are unique in a given * cluster. - * + * * @return the group name (never {@code null}). */ public String getGroupName() { @@ -130,7 +133,7 @@ public class AlertGroupEntity { /** * Sets the name of this grouping of alerts. Group names are unique in a given * cluster. - * + * * @param groupName * the name of the group (not {@code null}). */ @@ -143,7 +146,7 @@ public class AlertGroupEntity { * groups cannot have their alert definition groupings changed. New alert * definitions are automtaically added to the default group that belongs to * the service of that definition. - * + * * @return {@code true} if this is a default group, {@code false} otherwise. */ public boolean isDefault() { @@ -152,7 +155,7 @@ public class AlertGroupEntity { /** * Sets whether this is a default group and is immutable. - * + * * @param isDefault * {@code true} to make this group immutable. */ @@ -161,8 +164,31 @@ public class AlertGroupEntity { } /** - * Gets all of the alert definitions that are a part of this grouping. + * Gets the name of the service. This is only applicable when + * {@link #isDefault()} is {@code true}. + * + * @return the service that this is the default group for, or {@code null} if + * this is not a default group. + */ + public String getServiceName() { +return serviceName; + } + + /** + * Set the service name. This is only applicable when {@link #isDefault()} is + * {@code true}. * + * @param serviceName + * the service that this is the default group for, or {@code null} if + * this is not a default group. + */ + public void setServiceName(String serviceName) { +this.serviceName =
[28/35] git commit: AMBARI-7027. Config History: need current version for each config group. (myroslav via mahadev)
AMBARI-7027. Config History: need current version for each config group. (myroslav via mahadev) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8e6736a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8e6736a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8e6736a Branch: refs/heads/branch-alerts-dev Commit: a8e6736ac536f08e86503d037446a4d793db1029 Parents: 0e9c744 Author: Mahadev Konar maha...@apache.org Authored: Tue Aug 26 17:30:30 2014 -0700 Committer: Mahadev Konar maha...@apache.org Committed: Tue Aug 26 17:30:30 2014 -0700 -- .../ServiceConfigVersionResourceDefinition.java | 10 +-- .../AmbariManagementControllerImpl.java | 16 - .../server/controller/ClusterRequest.java | 12 ++-- .../server/controller/ClusterResponse.java | 9 ++- .../server/controller/ConfigGroupRequest.java | 9 +++ .../controller/ServiceConfigVersionRequest.java | 23 +++ .../ServiceConfigVersionResponse.java | 13 +++- .../internal/ClusterResourceProvider.java | 40 +++- .../internal/ConfigGroupResourceProvider.java | 4 ++ .../ServiceConfigVersionResourceProvider.java | 12 ++-- .../ambari/server/orm/dao/ServiceConfigDAO.java | 41 +++- .../org/apache/ambari/server/state/Cluster.java | 6 +- .../server/state/cluster/ClusterImpl.java | 67 .../src/main/resources/properties.json | 5 +- .../server/state/cluster/ClusterTest.java | 13 ++-- 15 files changed, 214 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a8e6736a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java index f5d07f6..ef4108c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java @@ -43,12 +43,12 @@ public class ServiceConfigVersionResourceDefinition extends BaseResourceDefiniti @Override public String getPluralName() { -return serviceconfigversions; +return service_config_versions; } @Override public String getSingularName() { -return serviceconfigversion; +return service_config_version; } private class HrefProcessor extends BaseHrefPostProcessor { @@ -66,10 +66,10 @@ public class ServiceConfigVersionResourceDefinition extends BaseResourceDefiniti idx = href.indexOf(/, idx) + 1; String serviceName = (String) resultNode.getObject().getPropertyValue(service_name); -Long version = (Long) resultNode.getObject().getPropertyValue(serviceconfigversion); +Long version = (Long) resultNode.getObject().getPropertyValue(service_config_version); href = href.substring(0, idx) -+ configurations/serviceconfigversions?service_name= -+ serviceName + serviceconfigversion= + version; ++ configurations/service_config_versions?service_name= ++ serviceName + service_config_version= + version; resultNode.setProperty(href, href); } else { http://git-wip-us.apache.org/repos/asf/ambari/blob/a8e6736a/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 394f6ad..f7f2f2d 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 @@ -140,6 +140,7 @@ import org.slf4j.LoggerFactory; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import com.google.common.collect.Multimaps; import com.google.gson.Gson; import com.google.inject.Inject; import com.google.inject.Injector; @@ -1156,6 +1157,12 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle new LinkedListConfigurationResponse(); ServiceConfigVersionResponse serviceConfigVersionResponse = null; +if (request.getDesiredConfig() != null request.getServiceConfigVersionRequest() !=
[10/35] git commit: AMBARI-7007 - href is wrong for sub resource query of request resource
AMBARI-7007 - href is wrong for sub resource query of request resource Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8bed2592 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8bed2592 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8bed2592 Branch: refs/heads/branch-alerts-dev Commit: 8bed25926031736ae6eed2f774e7996f230b5e13 Parents: 160abc5 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Aug 25 20:04:04 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Tue Aug 26 08:28:45 2014 -0400 -- .../server/api/resources/RequestResourceDefinition.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8bed2592/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestResourceDefinition.java index a3920d1..291b01a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestResourceDefinition.java @@ -83,15 +83,19 @@ public class RequestResourceDefinition extends BaseResourceDefinition { sb.append(href); sb.append('/').append(requestId); } else { -// split the href up into its parts, intercepting clusers in order +// split the href up into its parts, intercepting clusters in order // to rewrite the href to be scoped for requests String[] tokens = href.split(/); -for (int i = 0; i tokens.length; ++i) { +Integer tokenCount = tokens.length; +for (int i = 0; i tokenCount; ++i) { String fragment = tokens[i]; - sb.append(fragment).append('/'); + sb.append(fragment); + if (i tokenCount - 1 ) { +sb.append('/'); + } - if (clusters.equals(fragment) i + 1 tokens.length) { + if (clusters.equals(fragment) i + 1 tokenCount) { String clusterName = tokens[i + 1]; sb.append(clusterName).append(/); sb.append(requests/).append(requestId);
[30/35] git commit: AMBARI-7019. sqoop-env and other configs exists for unavailable services(after upgrade from ambari 1.6.1 - 1.7.0).(vbrodetskyi)
AMBARI-7019. sqoop-env and other configs exists for unavailable services(after upgrade from ambari 1.6.1 - 1.7.0).(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/926acf4f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/926acf4f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/926acf4f Branch: refs/heads/branch-alerts-dev Commit: 926acf4fc681e01f1568f6c3bdbf4ab254040b07 Parents: 2dc55f0 Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Wed Aug 27 13:29:39 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Wed Aug 27 13:29:39 2014 +0300 -- .../controller/AmbariManagementControllerImpl.java | 2 +- .../controller/internal/ClusterResourceProvider.java| 6 +++--- .../org/apache/ambari/server/state/ConfigHelper.java| 12 ++-- .../apache/ambari/server/upgrade/UpgradeCatalog170.java | 6 -- .../controller/AmbariManagementControllerTest.java | 4 +++- .../ambari/server/upgrade/UpgradeCatalog170Test.java| 9 + 6 files changed, 22 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/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 f7f2f2d..c6b2f9f 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 @@ -657,7 +657,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if(request.getType().equals(Configuration.GLOBAL_CONFIG_TAG)) { MapString, MapString, String configTypes = new HashMapString, MapString, String(); configTypes.put(Configuration.GLOBAL_CONFIG_TAG, request.getProperties()); - configHelper.moveDeprecatedGlobals(cluster.getCurrentStackVersion(), configTypes); + configHelper.moveDeprecatedGlobals(cluster.getCurrentStackVersion(), configTypes, cluster.getClusterName()); for(Map.EntryString, MapString, String configType : configTypes.entrySet()) { String configTypeName = configType.getKey(); http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java index 113e7b8..694 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java @@ -870,9 +870,9 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { * @param blueprintConfigurations map of blueprint configurations keyed by type */ private void handleGlobalsBackwardsCompability(Stack stack, - MapString, MapString, String blueprintConfigurations) { + MapString, MapString, String blueprintConfigurations, String clusterName) { StackId stackId = new StackId(stack.getName(), stack.getVersion()); -configHelper.moveDeprecatedGlobals(stackId, blueprintConfigurations); +configHelper.moveDeprecatedGlobals(stackId, blueprintConfigurations, clusterName); } /** @@ -1051,7 +1051,7 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { HostGroupEntity entity = group.getEntity(); MapString, MapString, Config groupConfigs = new HashMapString, MapString, Config(); - handleGlobalsBackwardsCompability(stack, group.getConfigurationProperties()); + handleGlobalsBackwardsCompability(stack, group.getConfigurationProperties(), clusterName); for (Map.EntryString, MapString, String entry: group.getConfigurationProperties().entrySet()) { String type = entry.getKey(); String service = stack.getServiceForConfigType(type); http://git-wip-us.apache.org/repos/asf/ambari/blob/926acf4f/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
[31/35] git commit: AMBARI-7031 FE: Next button not enabled when only /validation ERRORs are there
AMBARI-7031 FE: Next button not enabled when only /validation ERRORs are there Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4430ebf0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4430ebf0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4430ebf0 Branch: refs/heads/branch-alerts-dev Commit: 4430ebf070ddef99bcb5ba610e13d5f39f5cd910 Parents: 926acf4 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 14:32:45 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 14:34:22 2014 +0300 -- .../app/controllers/main/service/info/configs.js | 4 +++- ambari-web/app/mixins/common/serverValidator.js| 17 + 2 files changed, 8 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4430ebf0/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index dce4c35..8eee9cb 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -1095,11 +1095,13 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM App.showConfirmationPopup(function () { self.saveConfigs(); }, Em.I18n.t('services.service.config.confirmDirectoryChange').format(displayName), function () { -self.set('isApplyingChanges', false) +self.set('isApplyingChanges', false); }); } else { self.saveConfigs(); } + }).fail(function() { +self.set('isApplyingChanges', false); }); } else { status = 'started'; http://git-wip-us.apache.org/repos/asf/ambari/blob/4430ebf0/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 462ff62..3a1dbed 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -236,8 +236,8 @@ App.ServerValidatorMixin = Em.Mixin.create({ if ((property.get('filename') == item['config-type'] + '.xml') (property.get('name') == item['config-name'])) { if (item.level == ERROR) { self.set('configValidationError', true); - property.set('errorMessage', item.message); - property.set('error', true); + property.set('warnMessage', item.message); + property.set('warn', true); } else if (item.level == WARN) { self.set('configValidationWarning', true); property.set('warnMessage', item.message); @@ -264,21 +264,14 @@ App.ServerValidatorMixin = Em.Mixin.create({ * @returns {*} */ warnUser: function(deferred) { -var self = this; if (this.get('configValidationFailed')) { - this.set('isSubmitDisabled', false); - this.set(isApplyingChanges, false); deferred.reject(); return App.showAlertPopup(Em.I18n.t('installer.step7.popup.validation.failed.header'), Em.I18n.t('installer.step7.popup.validation.request.failed.body')); } else if (this.get('configValidationWarning') || this.get('configValidationError')) { // Motivation: for server-side validation warnings and EVEN errors allow user to continue wizard - this.set('isSubmitDisabled', true); - this.set(isApplyingChanges, false); - return App.showConfirmationPopup(function () { -self.set('isSubmitDisabled', false); -self.set(isApplyingChanges, true); -deferred.resolve(); - }, Em.I18n.t('installer.step7.popup.validation.warning.body')); + return App.showConfirmationPopup(function () { deferred.resolve(); }, + Em.I18n.t('installer.step7.popup.validation.warning.body'), + function () { deferred.reject(); }); } else { deferred.resolve(); }
[24/35] git commit: AMBARI-7018. Stack API should provide display name for services and components. (jaimin)
AMBARI-7018. Stack API should provide display name for services and components. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/02ee3d44 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/02ee3d44 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/02ee3d44 Branch: refs/heads/branch-alerts-dev Commit: 02ee3d440596c3e159985830ede4f6fe358a576b Parents: fb9d884 Author: Jaimin Jetly jai...@hortonworks.com Authored: Tue Aug 26 12:40:41 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Tue Aug 26 12:40:53 2014 -0700 -- .../server/api/util/StackExtensionHelper.java | 9 +++ .../StackServiceComponentResponse.java | 33 +-- .../server/controller/StackServiceResponse.java | 16 - .../StackServiceComponentResourceProvider.java | 22 +++ .../internal/StackServiceResourceProvider.java | 22 +++ .../ambari/server/state/ComponentInfo.java | 14 - .../apache/ambari/server/state/ServiceInfo.java | 9 +++ .../src/main/resources/properties.json | 2 + .../HDP/1.3.2/services/GANGLIA/metainfo.xml | 3 + .../HDP/1.3.2/services/HBASE/metainfo.xml | 4 ++ .../stacks/HDP/1.3.2/services/HDFS/metainfo.xml | 5 ++ .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 11 +++- .../HDP/1.3.2/services/MAPREDUCE/metainfo.xml | 5 ++ .../HDP/1.3.2/services/NAGIOS/metainfo.xml | 2 + .../HDP/1.3.2/services/OOZIE/metainfo.xml | 3 + .../stacks/HDP/1.3.2/services/PIG/metainfo.xml | 2 + .../HDP/1.3.2/services/SQOOP/metainfo.xml | 2 + .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 4 +- .../HDP/1.3.2/services/ZOOKEEPER/metainfo.xml | 3 + .../HDP/2.0.6/services/FLUME/metainfo.xml | 2 + .../HDP/2.0.6/services/GANGLIA/metainfo.xml | 3 + .../HDP/2.0.6/services/HBASE/metainfo.xml | 4 ++ .../stacks/HDP/2.0.6/services/HDFS/metainfo.xml | 7 +++ .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 11 +++- .../HDP/2.0.6/services/NAGIOS/metainfo.xml | 2 + .../HDP/2.0.6/services/OOZIE/metainfo.xml | 3 + .../stacks/HDP/2.0.6/services/PIG/metainfo.xml | 2 + .../HDP/2.0.6/services/SQOOP/metainfo.xml | 2 + .../HDP/2.0.6/services/WEBHCAT/metainfo.xml | 4 +- .../stacks/HDP/2.0.6/services/YARN/metainfo.xml | 7 +++ .../HDP/2.0.6/services/ZOOKEEPER/metainfo.xml | 2 + .../stacks/HDP/2.1/services/FALCON/metainfo.xml | 3 + .../stacks/HDP/2.1/services/STORM/metainfo.xml | 6 ++ .../stacks/HDP/2.1/services/TEZ/metainfo.xml| 2 + .../stacks/HDP/2.1/services/YARN/metainfo.xml | 2 + .../api/util/StackExtensionHelperTest.java | 2 + .../HDP/2.0.6/services/NAGIOS/metainfo.xml | 2 + .../HDP/2.0.6/services/WEBHCAT/metainfo.xml | 1 + .../stacks/HDP/2.0.6/services/YARN/metainfo.xml | 4 ++ .../HDP/2.0.7/services/HBASE/metainfo.xml | 4 ++ .../stacks/HDP/2.0.7/services/HDFS/metainfo.xml | 7 +++ .../stacks/HDP/2.0.7/services/HIVE/metainfo.xml | 5 ++ .../HDP/2.0.7/services/ZOOKEEPER/metainfo.xml | 3 + .../HDP/2.0.8/services/SQOOP/metainfo.xml | 1 + .../HDP/2.1.1/services/STORM/metainfo.xml | 4 ++ ambari-web/app/mappers/stack_service_mapper.js | 2 + ambari-web/app/mixins.js| 1 - ambari-web/app/mixins/models/service_mixin.js | 30 -- ambari-web/app/models/service.js| 7 ++- ambari-web/app/models/stack_service.js | 5 +- .../app/models/stack_service_component.js | 10 +--- ambari-web/app/utils/helper.js | 15 - ambari-web/test/app_test.js | 2 +- ambari-web/test/service_components.js | 61 54 files changed, 312 insertions(+), 87 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/02ee3d44/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java index c39b2ec..fb3ddc9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java @@ -138,6 +138,10 @@ public class StackExtensionHelper { mergedServiceInfo.setName(childService.getName()); mergedServiceInfo.setComment(childService.getComment()); mergedServiceInfo.setVersion(childService.getVersion()); +mergedServiceInfo.setDisplayName( +childService.getDisplayName() != null ? +childService.getDisplayName() : +
[18/35] git commit: AMBARI-7002 - Views: Creating instance for a view should respond with 409 conflict if that instance already exists
AMBARI-7002 - Views: Creating instance for a view should respond with 409 conflict if that instance already exists Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d566bcaf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d566bcaf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d566bcaf Branch: refs/heads/branch-alerts-dev Commit: d566bcaf6338803fb1a91762333c3b2aec23f1d0 Parents: 6d098ca Author: tbeerbower tbeerbo...@hortonworks.com Authored: Sun Aug 24 21:14:29 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Tue Aug 26 12:24:40 2014 -0400 -- .../internal/ViewInstanceResourceProvider.java | 9 +- .../apache/ambari/server/view/ViewRegistry.java | 15 .../ViewInstanceResourceProviderTest.java | 89 ++-- 3 files changed, 107 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d566bcaf/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java index ae02f0a..ce23e79 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java @@ -19,6 +19,7 @@ package org.apache.ambari.server.controller.internal; import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.DuplicateResourceException; import org.apache.ambari.server.controller.spi.NoSuchParentResourceException; import org.apache.ambari.server.controller.spi.NoSuchResourceException; import org.apache.ambari.server.controller.spi.Predicate; @@ -332,7 +333,13 @@ public class ViewInstanceResourceProvider extends AbstractResourceProvider { @Override public Void invoke() throws AmbariException { try { - ViewRegistry.getInstance().installViewInstance(toEntity(properties)); + ViewRegistry viewRegistry = ViewRegistry.getInstance(); + ViewInstanceEntity instanceEntity = toEntity(properties); + + if (viewRegistry.instanceExists(instanceEntity)) { +throw new DuplicateResourceException(The instance + instanceEntity.getName() + already exists.); + } + viewRegistry.installViewInstance(instanceEntity); } catch (org.apache.ambari.view.SystemException e) { throw new AmbariException(Caught exception trying to create view instance., e); } http://git-wip-us.apache.org/repos/asf/ambari/blob/d566bcaf/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 7542876..6e5f0a2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -466,6 +466,21 @@ public class ViewRegistry { } /** + * Determine whether or not the given view instance exists. + * + * @param instanceEntity the view instance entity + * + * @return true if the the given view instance exists; false otherwise + */ + public boolean instanceExists(ViewInstanceEntity instanceEntity) { + +ViewEntity viewEntity = getDefinition(instanceEntity.getViewName()); + +return viewEntity != null +(getInstanceDefinition(viewEntity.getCommonName(), viewEntity.getVersion(), instanceEntity.getName()) != null); + } + + /** * Install the given view instance with its associated view. * * @param instanceEntity the view instance entity http://git-wip-us.apache.org/repos/asf/ambari/blob/d566bcaf/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java index 52f0231..f409f07 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java +++
[16/35] git commit: AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster (dlysnichenko)
AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9faeaf5a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9faeaf5a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9faeaf5a Branch: refs/heads/branch-alerts-dev Commit: 9faeaf5a525bfee0932c1a654b28651c0b1705dd Parents: db83ea2 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Tue Aug 26 15:02:41 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Tue Aug 26 17:24:48 2014 +0300 -- .../server/actionmanager/ActionScheduler.java | 33 + .../ambari/server/actionmanager/Stage.java | 32 - .../server/actionmanager/StageFactory.java | 4 +- .../ambari/server/agent/ExecutionCommand.java | 2 +- .../controller/AmbariActionExecutionHelper.java | 9 +- .../AmbariCustomCommandExecutionHelper.java | 34 ++--- .../AmbariManagementControllerImpl.java | 128 ++- .../ambari/server/orm/entities/StageEntity.java | 28 .../ambari/server/stageplanner/RoleGraph.java | 3 +- .../server/upgrade/UpgradeCatalog170.java | 7 +- .../apache/ambari/server/utils/StageUtils.java | 57 + .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 2 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 2 +- .../ExecutionCommandWrapperTest.java| 2 +- .../actionmanager/TestActionDBAccessorImpl.java | 20 +-- .../server/actionmanager/TestActionManager.java | 31 +++-- .../actionmanager/TestActionScheduler.java | 33 +++-- .../ambari/server/actionmanager/TestStage.java | 4 +- .../server/agent/TestHeartbeatHandler.java | 15 ++- .../AmbariManagementControllerTest.java | 84 .../server/stageplanner/TestStagePlanner.java | 6 +- .../server/upgrade/UpgradeCatalog170Test.java | 30 + .../ambari/server/utils/TestStageUtils.java | 13 +- .../app/controllers/wizard/step3_controller.js | 1 - 26 files changed, 381 insertions(+), 203 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index b9a67b7..0385686 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -121,6 +121,8 @@ class ActionScheduler implements Runnable { private boolean activeAwakeRequest = false; //Cache for clusterHostinfo, key - stageId-requestId private CacheString, MapString, SetString clusterHostInfoCache; + private CacheString, MapString, String commandParamsStageCache; + private CacheString, MapString, String hostParamsStageCache; public ActionScheduler(long sleepTimeMilliSec, long actionTimeoutMilliSec, ActionDBAccessor db, ActionQueue actionQueue, Clusters fsmObject, @@ -138,6 +140,12 @@ class ActionScheduler implements Runnable { this.clusterHostInfoCache = CacheBuilder.newBuilder(). expireAfterAccess(5, TimeUnit.MINUTES). build(); +this.commandParamsStageCache = CacheBuilder.newBuilder(). + expireAfterAccess(5, TimeUnit.MINUTES). + build(); +this.hostParamsStageCache = CacheBuilder.newBuilder(). + expireAfterAccess(5, TimeUnit.MINUTES). + build(); this.configuration = configuration; } @@ -748,6 +756,31 @@ class ActionScheduler implements Runnable { } cmd.setClusterHostInfo(clusterHostInfo); + +//Try to get commandParams from cache and merge them with command-level parameters +MapString, String commandParams = commandParamsStageCache.getIfPresent(stagePk); + +if (commandParams == null){ + Type type = new TypeTokenMapString, String() {}.getType(); + commandParams = StageUtils.getGson().fromJson(s.getCommandParamsStage(), type); + commandParamsStageCache.put(stagePk, commandParams); +} +MapString, String commandParamsCmd = cmd.getCommandParams(); +commandParamsCmd.putAll(commandParams); +cmd.setCommandParams(commandParamsCmd); + + +//Try to get hostParams from cache and merge them with command-level parameters +MapString, String hostParams = hostParamsStageCache.getIfPresent(stagePk); +if (hostParams == null) { + Type type = new
[07/35] git commit: AMBARI-7009. BE: Configs recommendation API generates incorrect host-groups
AMBARI-7009. BE: Configs recommendation API generates incorrect host-groups Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/336a63da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/336a63da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/336a63da Branch: refs/heads/branch-alerts-dev Commit: 336a63dac9436d35532135e1e719fa3f8b6ac12f Parents: 98660b9 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Aug 25 17:18:01 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Aug 25 17:41:24 2014 -0700 -- .../GetConfigurationRecommnedationCommand.java | 5 +- ...tConfigurationRecommnedationCommandTest.java | 103 +++ 2 files changed, 105 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/336a63da/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommand.java index 52df3d0..b20c966 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommand.java @@ -63,10 +63,9 @@ public class GetConfigurationRecommnedationCommand extends return response; } - private SetHostGroup processHostGroups(StackAdvisorRequest request) { - + protected SetHostGroup processHostGroups(StackAdvisorRequest request) { SetHostGroup resultSet = new HashSetHostGroup(); -for (Map.EntryString, SetString componentHost : request.getComponentHostsMap().entrySet()) { +for (Map.EntryString, SetString componentHost : request.getHostComponents().entrySet()) { String hostGroupName = componentHost.getKey(); SetString components = componentHost.getValue(); if (hostGroupName != null components != null) { http://git-wip-us.apache.org/repos/asf/ambari/blob/336a63da/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommandTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommandTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommandTest.java new file mode 100644 index 000..1bd66a4 --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/commands/GetConfigurationRecommnedationCommandTest.java @@ -0,0 +1,103 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services.stackadvisor.commands; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + +import java.io.File; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.ambari.server.api.services.AmbariMetaInfo; +import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest; +import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner; +import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse; +import org.junit.Test; + +public class GetConfigurationRecommnedationCommandTest { + + @Test + public void testProcessHostGroups() throws Exception { +StackAdvisorRunner
[29/35] git commit: AMBARI-7028. Config History: need to set notes for the new SCV when reverting back via 'Make Current' action.(xiwang)
AMBARI-7028. Config History: need to set notes for the new SCV when reverting back via 'Make Current' action.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2dc55f08 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2dc55f08 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2dc55f08 Branch: refs/heads/branch-alerts-dev Commit: 2dc55f08fe7b1660122145853ede4d7a04c014a8 Parents: a8e6736 Author: Xi Wang xiw...@apache.org Authored: Tue Aug 26 17:35:45 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Tue Aug 26 17:48:46 2014 -0700 -- ambari-web/app/messages.js | 3 +- .../views/common/configs/config_history_flow.js | 32 2 files changed, 28 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2dc55f08/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 31d3e69..9579b04 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1410,7 +1410,7 @@ Em.I18n.translations = { 'on the Ambari Server host to make the JDBC driver available and to enable testing the database connection.', 'services.service.config.configHistory.configGroup': 'Group', - 'services.service.config.configHistory.makeCurrent.message': 'Are you sure you want to make {0} the current version for {1}:{2} ?', + 'services.service.config.configHistory.makeCurrent.message': 'Created from service config version {0}', 'services.add.header':'Add Service Wizard', 'services.reassign.header':'Move Master Wizard', @@ -2000,6 +2000,7 @@ Em.I18n.translations = { 'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle', 'dashboard.configHistory.info-bar.showMore': 'Show more', 'dashboard.configHistory.info-bar.save.popup.title': 'Save Configuration', + 'dashboard.configHistory.info-bar.makeCurrent.popup.title': 'Make Current Confirmation', 'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you change?', 'dashboard.configHistory.info-bar.revert.button': 'Make current', http://git-wip-us.apache.org/repos/asf/ambari/blob/2dc55f08/ambari-web/app/views/common/configs/config_history_flow.js -- diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js index a4c21af..0c0e686 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -245,14 +245,33 @@ App.ConfigHistoryFlowView = Em.View.extend({ if (isDisabled) return; var serviceConfigVersion = event.context || Em.Object.create({ version: this.get('displayedServiceVersion.version'), - serviceName: this.get('displayedServiceVersion.serviceName') + serviceName: this.get('displayedServiceVersion.serviceName'), + notes:'' }); var versionText = event.context ? event.context.get('versionText') : this.get('displayedServiceVersion.versionText'); -App.showConfirmationPopup(function () { +var configGroupName = this.get('displayedServiceVersion.configGroupName'); +return App.ModalPopup.show({ + header: Em.I18n.t('dashboard.configHistory.info-bar.makeCurrent.popup.title'), + serviceConfigNote: Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText), + bodyClass: Em.View.extend({ +templateName: require('templates/common/configs/save_configuration'), +notesArea: Em.TextArea.extend({ + classNames: ['full-width'], + value: Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText), + onChangeValue: function() { +this.get('parentView.parentView').set('serviceConfigNote', this.get('value')); + }.observes('value') +}) + }), + primary: Em.I18n.t('dashboard.configHistory.info-bar.revert.button'), + secondary: Em.I18n.t('common.discard'), + third: Em.I18n.t('common.cancel'), + onPrimary: function () { +serviceConfigVersion.set('serviceConfigNote', this.get('serviceConfigNote')); self.sendRevertCall(serviceConfigVersion); - }, - Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText, this.get('displayedServiceVersion.serviceName'), this.get('displayedServiceVersion.configGroupName')) -); +this.hide(); + } +}); }, /** @@ -268,7 +287,8 @@ App.ConfigHistoryFlowView = Em.View.extend({ Clusters: { desired_serviceconfigversions: {
[09/35] git commit: AMBARI-6986. Upgrade to 1.7.0, ambari+mysql fails on version column.(vbrodetskyi)
AMBARI-6986. Upgrade to 1.7.0, ambari+mysql fails on version column.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/160abc54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/160abc54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/160abc54 Branch: refs/heads/branch-alerts-dev Commit: 160abc549c03cae1f34511582bc8a1cda467157b Parents: a80066a Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Tue Aug 26 13:49:22 2014 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Tue Aug 26 13:49:22 2014 +0300 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/160abc54/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java index eeba932..30059ac 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java @@ -437,7 +437,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog { private void renameSequenceValueColumnName() throws AmbariException, SQLException { final String dbType = getDbType(); if (Configuration.MYSQL_DB_NAME.equals(dbType)) { - dbAccessor.executeQuery(ALTER TABLE ambari_sequences RENAME COLUMN \value\ to sequence_value DECIMAL(38) NOT NULL); + dbAccessor.executeQuery(ALTER TABLE ambari_sequences RENAME COLUMN value to sequence_value DECIMAL(38) NOT NULL); } else if (Configuration.DERBY_DB_NAME.equals(dbType)) { dbAccessor.executeQuery(RENAME COLUMN ambari_sequences.\value\ to sequence_value); } else if (Configuration.ORACLE_DB_NAME.equals(dbType)) {
[26/35] git commit: AMBARI-7025. Config Groups: clean up for config history page (group name filter .etc)(xiwang)
AMBARI-7025. Config Groups: clean up for config history page (group name filter .etc)(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1ab3bb55 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ab3bb55 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ab3bb55 Branch: refs/heads/branch-alerts-dev Commit: 1ab3bb551d3e122fe1a771b98aaffe0e52434f40 Parents: f8193e9 Author: Xi Wang xiw...@apache.org Authored: Tue Aug 26 15:17:56 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Tue Aug 26 16:24:39 2014 -0700 -- .../main/dashboard/config_history_controller.js | 2 +- ambari-web/app/messages.js | 1 + .../templates/common/configs/config_history_flow.hbs| 2 +- .../app/templates/main/dashboard/config_history.hbs | 5 +++-- .../app/views/main/dashboard/config_history_view.js | 12 +++- 5 files changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/controllers/main/dashboard/config_history_controller.js -- diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js index 2a81c28..002504a 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -41,7 +41,7 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin colPropAssoc: function () { var associations = []; associations[1] = 'serviceVersion'; -associations[2] = 'configGroupName'; +associations[2] = 'configGroup'; associations[3] = 'createTime'; associations[4] = 'author'; associations[5] = 'briefNotes'; http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index a02b729..31d3e69 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1994,6 +1994,7 @@ Em.I18n.translations = { 'dashboard.configHistory.table.empty' : 'No history to display', 'dashboard.configHistory.table.version.versionText' : 'V{0}', 'dashboard.configHistory.table.current.tooltip' : 'Current config for {0}:{1}', + 'dashboard.configHistory.table.restart.tooltip' : 'Restart required', 'dashboard.configHistory.table.filteredHostsInfo': '{0} of {1} versions showing', 'dashboard.configHistory.info-bar.authoredOn': 'authored on', 'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle', http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/common/configs/config_history_flow.hbs -- diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs index 9aade90..8fe54c8 100644 --- a/ambari-web/app/templates/common/configs/config_history_flow.hbs +++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs @@ -93,7 +93,7 @@ {{/unless}} /ul /div -div class=label-wrapper span9 data-toggle=tooltip {{bindAttr data-original-title=view.displayedServiceVersion.briefNotes }} +div class=label-wrapper span9 data-toggle=tooltip {{bindAttr data-original-title=view.displayedServiceVersion.briefNotes}} span class=label label-info{{view.displayedServiceVersion.versionText}}/span {{#if view.displayedServiceVersion.isCurrent}} span class=label label-success{{t common.current}}/span http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/main/dashboard/config_history.hbs -- diff --git a/ambari-web/app/templates/main/dashboard/config_history.hbs b/ambari-web/app/templates/main/dashboard/config_history.hbs index de8680a..f0101cc 100644 --- a/ambari-web/app/templates/main/dashboard/config_history.hbs +++ b/ambari-web/app/templates/main/dashboard/config_history.hbs @@ -45,11 +45,12 @@ a {{action goToServiceConfigs item.serviceName}} {{item.serviceName}} /a - i {{bindAttr class=:icon-refresh :restart-required-service item.isRestartRequired::hidden}}/i + i {{bindAttr class=:icon-refresh :restart-required-service item.isRestartRequired::hidden}} +rel=Tooltip {{translateAttr data-original-title=dashboard.configHistory.table.restart.tooltip}}/i
[32/35] git commit: AMBARI-7032 Jobs View: utilize full width
AMBARI-7032 Jobs View: utilize full width Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d8583bd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d8583bd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d8583bd Branch: refs/heads/branch-alerts-dev Commit: 8d8583bd5b7191af8e500cad3ba507817ecee011 Parents: 4430ebf Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Wed Aug 27 14:34:10 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Wed Aug 27 14:34:23 2014 +0300 -- contrib/views/jobs/src/main/resources/ui/app/styles/main.less | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8583bd/contrib/views/jobs/src/main/resources/ui/app/styles/main.less -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/styles/main.less b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less index e648fe0..4c1987f 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/styles/main.less +++ b/contrib/views/jobs/src/main/resources/ui/app/styles/main.less @@ -21,13 +21,18 @@ @import '../../app/bower_components/font-awesome/less/font-awesome'; html { - overflow-y: scroll; + overflow-y: auto; } a { cursor: pointer; } +.container, +.jobs-container { + width: 100%; +} + .jobs-container { margin-top: 20px; }
[21/35] git commit: AMBARI-6496. Additional fix: keberization needs hdfs_principal_name property to be saved in hadoop-env section of command file, otherwise it fails. (Alejandro Fernandez via swagle)
AMBARI-6496. Additional fix: keberization needs hdfs_principal_name property to be saved in hadoop-env section of command file, otherwise it fails. (Alejandro Fernandez via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e984e9b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e984e9b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e984e9b8 Branch: refs/heads/branch-alerts-dev Commit: e984e9b844721efd8eef8ddf781c9ff74486d85c Parents: 6237724 Author: Siddharth Wagle swa...@hortonworks.com Authored: Tue Aug 26 11:22:01 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Tue Aug 26 11:22:01 2014 -0700 -- ambari-web/app/data/HDP2/secure_properties.js | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e984e9b8/ambari-web/app/data/HDP2/secure_properties.js -- diff --git a/ambari-web/app/data/HDP2/secure_properties.js b/ambari-web/app/data/HDP2/secure_properties.js index 6904d6e..8b93c6e 100644 --- a/ambari-web/app/data/HDP2/secure_properties.js +++ b/ambari-web/app/data/HDP2/secure_properties.js @@ -123,6 +123,7 @@ module.exports = isOverridable: false, isReconfigurable: false, serviceName: GENERAL, + filename: hadoop-env.xml, category: AMBARI }, {
[02/35] git commit: AMBARI-7003. Views : Add description property to view version.
AMBARI-7003. Views : Add description property to view version. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2fd25004 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2fd25004 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2fd25004 Branch: refs/heads/branch-alerts-dev Commit: 2fd25004b0c783b4838539b1a39862830b282b02 Parents: fefc129 Author: Siddharth Wagle swa...@hortonworks.com Authored: Mon Aug 25 10:27:25 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Mon Aug 25 11:02:15 2014 -0700 -- .../stackadvisor/StackAdvisorHelper.java.orig | 116 --- .../internal/ViewVersionResourceProvider.java | 3 + .../ambari/server/orm/entities/ViewEntity.java | 39 +-- .../server/upgrade/UpgradeCatalog170.java | 3 + .../server/view/configuration/ViewConfig.java | 14 +++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 2 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 2 +- .../view/configuration/ViewConfigTest.java | 7 ++ .../org/apache/ambari/view/ViewDefinition.java | 7 ++ 11 files changed, 69 insertions(+), 128 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2fd25004/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig deleted file mode 100644 index 213b0f0..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java.orig +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * License); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ambari.server.api.services.stackadvisor; - -import java.io.File; -import java.io.IOException; - -import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest.StackAdvisorRequestType; -import org.apache.ambari.server.api.services.stackadvisor.commands.GetComponentLayoutRecommnedationCommand; -import org.apache.ambari.server.api.services.stackadvisor.commands.GetComponentLayoutValidationCommand; -import org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand; -import org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse; -import org.apache.ambari.server.api.services.stackadvisor.validations.ValidationResponse; -import org.apache.ambari.server.configuration.Configuration; - -import com.google.inject.Inject; -import com.google.inject.Singleton; - -@Singleton -public class StackAdvisorHelper { - - private File recommendationsDir; - private String stackAdvisorScript; - - /* Monotonically increasing requestid */ - private int requestId = 0; - private StackAdvisorRunner saRunner; - - @Inject - public StackAdvisorHelper(Configuration conf, StackAdvisorRunner saRunner) throws IOException { -this.recommendationsDir = conf.getRecommendationsDir(); -this.stackAdvisorScript = conf.getStackAdvisorScript(); -this.saRunner = saRunner; - } - - /** - * Returns validation (component-layout or configurations) result for the - * request. - * - * @param validationRequest the validation request - * @return {@link ValidationResponse} instance - * @throws StackAdvisorException in case of stack advisor script errors - */ - public synchronized ValidationResponse validate(StackAdvisorRequest request) - throws StackAdvisorException { -requestId += 1; - -StackAdvisorCommandValidationResponse command = createValidationCommand(request -.getRequestType()); - -return command.invoke(request); - } - - StackAdvisorCommandValidationResponse createValidationCommand( -
[01/35] git commit: AMBARI-6980. Refactor of 2.1.GlusterFS stack to move global to env (Scott Creeley via subin)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 4a4644b88 - ae8f1e77e AMBARI-6980. Refactor of 2.1.GlusterFS stack to move global to env (Scott Creeley via subin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fefc129b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fefc129b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fefc129b Branch: refs/heads/branch-alerts-dev Commit: fefc129b1a50cdc0c8a07e37893a9b3f6ddda5b9 Parents: 3c13f40 Author: root r...@c6501.ambari.apache.org Authored: Mon Aug 25 17:49:16 2014 + Committer: root r...@c6501.ambari.apache.org Committed: Mon Aug 25 17:49:16 2014 + -- .../FALCON/configuration/falcon-env.xml | 63 ++ .../2.1.GlusterFS/services/FALCON/metainfo.xml | 2 +- .../services/FALCON/package/scripts/params.py | 32 +-- .../FALCON/package/scripts/status_params.py | 2 +- .../GLUSTERFS/configuration/core-site.xml | 26 --- .../GLUSTERFS/configuration/hadoop-env.xml | 207 +++ .../services/GLUSTERFS/metainfo.xml | 7 +- .../2.1.GlusterFS/services/OOZIE/metainfo.xml | 2 +- .../services/STORM/configuration/storm-env.xml | 39 .../2.1.GlusterFS/services/STORM/metainfo.xml | 2 +- .../services/STORM/package/scripts/params.py| 12 +- .../STORM/package/scripts/status_params.py | 2 +- .../services/TEZ/configuration/tez-env.xml | 29 +++ .../HDP/2.1.GlusterFS/services/TEZ/metainfo.xml | 2 +- .../services/TEZ/package/scripts/params.py | 4 +- .../services/YARN/configuration/global.xml | 64 -- .../services/YARN/configuration/yarn-env.xml| 181 .../2.1.GlusterFS/services/YARN/metainfo.xml| 3 +- .../services/YARN/package/scripts/params.py | 41 ++-- .../YARN/package/scripts/status_params.py | 8 +- ambari-web/app/data/HDP2/site_properties.js | 178 ++-- ambari-web/app/data/site_properties.js | 160 -- ambari-web/app/models/stack_service.js | 2 +- 23 files changed, 791 insertions(+), 277 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fefc129b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml new file mode 100644 index 000..fadc02d --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml @@ -0,0 +1,63 @@ +?xml-stylesheet type=text/xsl href=configuration.xsl? +!-- +/** + * 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. + */ +-- +configuration supports_final=false + property +namefalcon_user/name +valuefalcon/value +descriptionFalcon user./description + /property + property +namefalcon_port/name +value15000/value +descriptionPort the Falcon Server listens on./description + /property + property +namefalcon_log_dir/name +value/var/log/falcon/value +descriptionFalcon log directory./description + /property + property +namefalcon_pid_dir/name +value/var/run/falcon/value +descriptionFalcon pid-file directory./description + /property + property +namefalcon_local_dir/name +value/hadoop/falcon/value +descriptionDirectory where Falcon data, such as activemq data, is stored./description + /property + !--embeddedmq properties-- + property +namefalcon.embeddedmq.data/name +value/hadoop/falcon/embeddedmq/data/value +descriptionDirectory in which embeddedmq data is stored./description + /property + property +namefalcon.embeddedmq/name +valuetrue/value +descriptionWhether embeddedmq is enabled or not./description + /property + property +
[20/35] git commit: AMBARI-6957. Fixes NPE during cluster create with blueprint.
AMBARI-6957. Fixes NPE during cluster create with blueprint. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6237724d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6237724d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6237724d Branch: refs/heads/branch-alerts-dev Commit: 6237724d4f5cb02bd1541deba6542a72be04af2a Parents: 2cceee2 Author: Robert Nettleton rnettle...@hortonworks.com Authored: Tue Aug 26 14:04:53 2014 -0400 Committer: John Speidel jspei...@hortonworks.com Committed: Tue Aug 26 14:04:53 2014 -0400 -- .../internal/BaseBlueprintProcessor.java| 37 +- .../BlueprintConfigurationProcessor.java| 5 +- .../internal/ClusterResourceProvider.java | 73 ++- .../internal/ClusterResourceProviderTest.java | 497 ++- 4 files changed, 584 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6237724d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java index a4165d7..c9f0124 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseBlueprintProcessor.java @@ -106,7 +106,7 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP MapString, HostGroupImpl mapHostGroups = new HashMapString, HostGroupImpl(); for (HostGroupEntity hostGroup : blueprint.getHostGroups()) { - mapHostGroups.put(hostGroup.getName(), new HostGroupImpl(hostGroup, stack)); + mapHostGroups.put(hostGroup.getName(), new HostGroupImpl(hostGroup, stack, this)); } return mapHostGroups; } @@ -123,7 +123,7 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP protected Stack parseStack(BlueprintEntity blueprint) throws SystemException { Stack stack; try { - stack = new Stack(blueprint.getStackName(), blueprint.getStackVersion()); + stack = new Stack(blueprint.getStackName(), blueprint.getStackVersion(), getManagementController()); } catch (StackAccessException e) { throw new IllegalArgumentException(Invalid stack information provided for cluster. + stack name: + blueprint.getStackName() + @@ -148,7 +148,7 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP * @throws IllegalArgumentException when validation fails */ protected BlueprintEntity validateTopology(BlueprintEntity blueprint) throws AmbariException { -Stack stack = new Stack(blueprint.getStackName(), blueprint.getStackVersion()); +Stack stack = new Stack(blueprint.getStackName(), blueprint.getStackVersion(), getManagementController()); MapString, HostGroupImpl hostGroupMap = parseBlueprintHostGroups(blueprint, stack); CollectionHostGroupImpl hostGroups = hostGroupMap.values(); MapString, MapString, String clusterConfig = processBlueprintConfigurations(blueprint, null); @@ -455,7 +455,7 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP /** * Encapsulates stack information. */ - protected class Stack { + protected static class Stack { /** * Stack name */ @@ -514,6 +514,12 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP private MapString, MapString, MapString, ConfigProperty serviceConfigurations = new HashMapString, MapString, MapString, ConfigProperty(); + +/** + * Ambari Management Controller, used to obtain Stack definitions + */ +private final AmbariManagementController ambariManagementController; + /** * Contains a configuration property's value and attributes. */ @@ -553,11 +559,12 @@ public abstract class BaseBlueprintProcessor extends AbstractControllerResourceP * @throws AmbariException an exception occurred getting stack information * for the specified name and version */ -public Stack(String name, String version) throws AmbariException { +public Stack(String name, String version, AmbariManagementController ambariManagementController) throws AmbariException { this.name = name; this.version = version; + this.ambariManagementController = ambariManagementController; - SetStackServiceResponse stackServices = getManagementController().getStackServices( +
git commit: AMBARI-7004 - Views: Need ability to remove view event listener.
Repository: ambari Updated Branches: refs/heads/trunk af1db6511 - 8ca145bbd AMBARI-7004 - Views: Need ability to remove view event listener. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ca145bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ca145bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ca145bb Branch: refs/heads/trunk Commit: 8ca145bbda6134f0541c9f14ff7d99a0d3ac081e Parents: af1db65 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Aug 25 14:38:55 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Aug 27 12:45:33 2014 -0400 -- .../ambari/server/view/ViewContextImpl.java | 9 .../apache/ambari/server/view/ViewRegistry.java | 30 ++-- .../ambari/server/view/ViewRegistryTest.java| 50 .../org/apache/ambari/view/ViewController.java | 19 4 files changed, 103 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ca145bb/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java index d36ad6e..8915134 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java @@ -322,6 +322,15 @@ public class ViewContextImpl implements ViewContext, ViewController { viewRegistry.registerListener(listener, viewName, viewVersion); } + @Override + public void unregisterListener(Listener listener, String viewName) { +viewRegistry.unregisterListener(listener, viewName, null); + } + + @Override + public void unregisterListener(Listener listener, String viewName, String viewVersion) { +viewRegistry.unregisterListener(listener, viewName, viewVersion); + } // - helper methods http://git-wip-us.apache.org/repos/asf/ambari/blob/8ca145bb/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 6e5f0a2..36c9081 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -37,6 +37,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.jar.JarEntry; import java.util.jar.JarFile; @@ -46,6 +47,7 @@ import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; +import com.google.common.collect.Sets; import org.apache.ambari.server.api.resources.ResourceInstanceFactoryImpl; import org.apache.ambari.server.api.resources.SubResourceDefinition; import org.apache.ambari.server.api.resources.ViewExternalSubResourceDefinition; @@ -135,8 +137,8 @@ public class ViewRegistry { /** * Mapping of view names to registered listeners. */ - private final MapString, ListListener listeners = - new HashMapString, ListListener(); + private final MapString, SetListener listeners = + new ConcurrentHashMapString, SetListener(); /** * Helper class. @@ -633,10 +635,10 @@ public class ViewRegistry { String name = viewVersion == null ? viewName : ViewEntity.getViewName(viewName, viewVersion); -ListListener listeners = this.listeners.get(name); +SetListener listeners = this.listeners.get(name); if (listeners == null) { - listeners = new LinkedListListener(); + listeners = Sets.newSetFromMap(new ConcurrentHashMapListener, Boolean()); this.listeners.put(name, listeners); } @@ -644,6 +646,24 @@ public class ViewRegistry { } /** + * Un-register the given listener from the view identified by the given name and version. + * + * @param listener the listener + * @param viewName the view name + * @param viewVersion the view version; null indicates all versions + */ + public synchronized void unregisterListener(Listener listener, String viewName, String viewVersion) { + +String name = viewVersion == null ? viewName : ViewEntity.getViewName(viewName, viewVersion); + +SetListener listeners = this.listeners.get(name); + +if (listeners != null) { + listeners.remove(listener); +}
git commit: AMBARI-7026. Config History: FE change to integrate new name 'service_config_version' in api.(XIWANG)
Repository: ambari Updated Branches: refs/heads/trunk e20f15b61 - b267bd828 AMBARI-7026. Config History: FE change to integrate new name 'service_config_version' in api.(XIWANG) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b267bd82 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b267bd82 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b267bd82 Branch: refs/heads/trunk Commit: b267bd82817ede48b73c98274f0c4d19ee2a90a4 Parents: e20f15b Author: Xi Wang xiw...@apache.org Authored: Tue Aug 26 15:32:02 2014 -0700 Committer: Xi Wang xiw...@apache.org Committed: Wed Aug 27 11:10:16 2014 -0700 -- .../controllers/main/dashboard/config_history_controller.js | 6 +++--- ambari-web/app/controllers/main/service/info/configs.js | 6 +++--- ambari-web/app/mappers/service_config_version_mapper.js | 2 +- ambari-web/app/utils/ajax/ajax.js| 8 ambari-web/app/views/common/configs/config_history_flow.js | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b267bd82/ambari-web/app/controllers/main/dashboard/config_history_controller.js -- diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js index 002504a..d8a4722 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -31,7 +31,7 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin filteredCount: 0, mockUrl: '/data/configurations/service_versions.json', realUrl: function () { -return App.apiPrefix + '/clusters/' + App.get('clusterName') + '/configurations/serviceconfigversions?parametersfields=serviceconfigversion,user,group_id,group_name,createtime,service_name,service_config_version_noteminimal_response=true'; +return App.apiPrefix + '/clusters/' + App.get('clusterName') + '/configurations/service_config_versions?parametersfields=service_config_version,user,group_id,group_name,createtime,service_name,service_config_version_noteminimal_response=true'; }.property('App.clusterName'), /** @@ -193,8 +193,8 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin loadCurrentVersionsSuccess: function (data, opt, params) { var currentConfigVersions = {}; -for (var service in data.Clusters.desired_serviceconfigversions) { - currentConfigVersions[service + '_' + data.Clusters.desired_serviceconfigversions[service].serviceconfigversion] = true; +for (var service in data.Clusters.desired_service_config_versions) { + currentConfigVersions[service + '_' + data.Clusters.desired_service_config_versions[service][0].service_config_version] = true; } App.cache['currentConfigVersions'] = currentConfigVersions; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/b267bd82/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 8eee9cb..ab7afeb 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -296,10 +296,10 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM loadCurrentVersionsSuccess: function (data, opt, params) { var currentConfigVersions = {}; var self = this; -for (var service in data.Clusters.desired_serviceconfigversions) { - currentConfigVersions[service + '_' + data.Clusters.desired_serviceconfigversions[service].serviceconfigversion] = true; +for (var service in data.Clusters.desired_service_config_versions) { + currentConfigVersions[service + '_' + data.Clusters.desired_service_config_versions[service][0].service_config_version] = true; if (self.get('content.serviceName') == service) { -self.set('currentVersion', data.Clusters.desired_serviceconfigversions[service].serviceconfigversion); +self.set('currentVersion', data.Clusters.desired_service_config_versions[service][0].service_config_version); } } App.cache['currentConfigVersions'] = currentConfigVersions; http://git-wip-us.apache.org/repos/asf/ambari/blob/b267bd82/ambari-web/app/mappers/service_config_version_mapper.js -- diff --git a/ambari-web/app/mappers/service_config_version_mapper.js
git commit: AMBARI-7041. Select Services page: service dependencies should be derived from stack API. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk b267bd828 - f6ee0747c AMBARI-7041. Select Services page: service dependencies should be derived from stack API. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6ee0747 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6ee0747 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6ee0747 Branch: refs/heads/trunk Commit: f6ee0747c1fa2750f0eb5c6822d5023e489d8b91 Parents: b267bd8 Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Aug 27 13:37:18 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Aug 27 13:37:18 2014 -0700 -- .../app/controllers/wizard/step4_controller.js | 35 +++- ambari-web/app/mappers/stack_service_mapper.js | 1 + ambari-web/app/models/stack_service.js | 44 +-- .../test/controllers/wizard/step4_test.js | 38 - ambari-web/test/service_components.js | 58 +++- 5 files changed, 115 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ee0747/ambari-web/app/controllers/wizard/step4_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 22774d2..92dbed4 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -254,27 +254,34 @@ App.WizardStep4Controller = Em.ArrayController.extend({ * @method serviceDependencyValidation */ serviceDependencyValidation: function() { -var notSelectedServices = this.filterProperty('isSelected',false); -notSelectedServices.forEach(function(service){ - var showWarningPopup; - var dependentServices = service.get('dependentServices'); +var selectedServices = this.filterProperty('isSelected',true); +var missingDependencies = []; +var missingDependenciesDisplayName = []; +selectedServices.forEach(function(service){ + + var dependentServices = service.get('requiredServices'); if (!!dependentServices) { -showWarningPopup = false; dependentServices.forEach(function(_dependentService){ var dependentService = this.findProperty('serviceName', _dependentService); - if (dependentService dependentService.get('isSelected') === true) { -showWarningPopup = true; + if (dependentService dependentService.get('isSelected') === false) { +if(missingDependencies.indexOf(_dependentService) == -1 ) { + missingDependencies.push(_dependentService); + missingDependenciesDisplayName.push(dependentService.get('displayNameOnSelectServicePage')); +} } },this); -if (showWarningPopup) { - this.addValidationError({ -id: 'serviceCheck_' + service.get('serviceName'), -callback: this.needToAddServicePopup, -callbackParams: [{serviceName: service.get('serviceName'), selected: true}, 'serviceCheck', service.get('displayNameOnSelectServicePage')] - }); -} } },this); + +if (missingDependencies.length 0) { + for(var i = 0; i missingDependencies.length; i++) { +this.addValidationError({ + id: 'serviceCheck_' + missingDependencies[i], + callback: this.needToAddServicePopup, + callbackParams: [{serviceName: missingDependencies[i], selected: true}, 'serviceCheck', missingDependenciesDisplayName[i]] +}); + } +} }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ee0747/ambari-web/app/mappers/stack_service_mapper.js -- diff --git a/ambari-web/app/mappers/stack_service_mapper.js b/ambari-web/app/mappers/stack_service_mapper.js index 7609d9d..1f3d0c2 100644 --- a/ambari-web/app/mappers/stack_service_mapper.js +++ b/ambari-web/app/mappers/stack_service_mapper.js @@ -32,6 +32,7 @@ App.stackServiceMapper = App.QuickDataMapper.create({ stack_version: 'stack_version', is_selected: 'is_selected', is_installed: 'is_installed', +required_services: 'required_services', service_check_supported: 'service_check_supported', service_components_key: 'service_components', service_components_type: 'array', http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ee0747/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 7c69804..a711936 100644 ---
git commit: AMBARI-7043. BE: Move stack_advisor.py abstract class one folder up
Repository: ambari Updated Branches: refs/heads/trunk f6ee0747c - 40e3f0fc5 AMBARI-7043. BE: Move stack_advisor.py abstract class one folder up Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40e3f0fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40e3f0fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40e3f0fc Branch: refs/heads/trunk Commit: 40e3f0fc5d34b4d96a95e0e568e8754b042dc6f5 Parents: f6ee074 Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 27 10:56:25 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Aug 27 13:45:36 2014 -0700 -- .../src/main/resources/scripts/stack_advisor.py | 2 +- .../main/resources/stacks/HDP/stack_advisor.py | 37 .../src/main/resources/stacks/stack_advisor.py | 37 .../server/api/services/AmbariMetaInfoTest.java | 4 +- .../AmbariManagementControllerTest.java | 2 +- .../src/test/python/TestStackAdvisor.py | 93 .../stacks/2.0.6/common/test_stack_advisor.py | 2 +- .../stacks/XYZ/1.0.0/services/stack_advisor.py | 67 ++ .../stacks/XYZ/1.0.1/services/stack_advisor.py | 30 +++ 9 files changed, 233 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/40e3f0fc/ambari-server/src/main/resources/scripts/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/scripts/stack_advisor.py b/ambari-server/src/main/resources/scripts/stack_advisor.py index 61d1e09..ed50866 100755 --- a/ambari-server/src/main/resources/scripts/stack_advisor.py +++ b/ambari-server/src/main/resources/scripts/stack_advisor.py @@ -33,7 +33,7 @@ ALL_ACTIONS = [ RECOMMEND_COMPONENT_LAYOUT_ACTION, VALIDATE_COMPONENT_LAYOUT_ACT USAGE = Usage: action hosts_file services_file\nPossible actions are: {0}\n.format( str(ALL_ACTIONS) ) SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) -STACK_ADVISOR_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, '../stacks/{0}/stack_advisor.py') +STACK_ADVISOR_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, '../stacks/stack_advisor.py') STACK_ADVISOR_IMPL_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, './../stacks/{0}/{1}/services/stack_advisor.py') STACK_ADVISOR_IMPL_CLASS_TEMPLATE = '{0}{1}StackAdvisor' http://git-wip-us.apache.org/repos/asf/ambari/blob/40e3f0fc/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py deleted file mode 100644 index 5f66fff..000 --- a/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env ambari-python-wrap - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -License); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an AS IS BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -class StackAdvisor(object): - - def recommendComponentLayout(self, services, hosts): -Returns Services object with hostnames array populated for components -pass - - def validateComponentLayout(self, services, hosts): -Returns array of Validation objects about issues with hostnames components assigned to -pass - - def recommendConfigurations(self, services, hosts): -Returns Services object with configurations object populated -pass - - def validateConfigurations(self, services, hosts): -Returns array of Validation objects about issues with configuration values provided in services -pass - http://git-wip-us.apache.org/repos/asf/ambari/blob/40e3f0fc/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py new file mode 100644 index 000..5f66fff --- /dev/null +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -0,0 +1,37 @@ +#!/usr/bin/env ambari-python-wrap + +Licensed to the
git commit: AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs
Repository: ambari Updated Branches: refs/heads/trunk 40e3f0fc5 - e007d7f4f AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e007d7f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e007d7f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e007d7f4 Branch: refs/heads/trunk Commit: e007d7f4fac0bbef2e753e7004e368a0f6329212 Parents: 40e3f0f Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 27 13:51:39 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Aug 27 13:51:39 2014 -0700 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 56 +++- .../stacks/2.0.6/common/test_stack_advisor.py | 36 ++--- 2 files changed, 60 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e007d7f4/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 ad0dcc0..083286e 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 @@ -415,58 +415,66 @@ class HDP206StackAdvisor(StackAdvisor): YARN: [yarn-site, self.validateYARNConfigurations] }.get(serviceName, None) - def toConfigurationValidationErrors(self, items, siteName): + def toConfigurationValidationProblems(self, validationProblems, siteName): result = [] -for item in items: - if item[message] is not None: -error = { type: 'configuration', level: 'ERROR', message: item[message], config-type: siteName, config-name: item[config-name] } -result.append(error) +for validationProblem in validationProblems: + validationItem = validationProblem.get(item, None) + if validationItem is not None: +problem = { type: 'configuration', level: validationItem[level], message: validationItem[message], + config-type: siteName, config-name: validationProblem[config-name] } +result.append(problem) return result + def getWarnItem(self, message): +return {level: WARN, message: message} + + def getErrorItem(self, message): +return {level: ERROR, message: message} + def validatorLessThenDefaultValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return Value should be set + return self.getErrorItem(Value should be set) value = to_number(properties[propertyName]) if value is None: - return Value should be integer + return self.getErrorItem(Value should be integer) defaultValue = to_number(recommendedDefaults[propertyName]) if defaultValue is None: return None if value defaultValue: - return Value is less than the recommended default of {0}.format(defaultValue) + return self.getWarnItem(Value is less than the recommended default of {0}.format(defaultValue)) return None def validateXmxValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return Value should be set + return self.getErrorItem(Value should be set) value = properties[propertyName] defaultValue = recommendedDefaults[propertyName] if defaultValue is None: - return Config's default value can't be null or undefined + return self.getErrorItem(Config's default value can't be null or undefined) if not checkXmxValueFormat(value): - return 'Invalid value format' + return self.getErrorItem('Invalid value format') valueInt = formatXmxSizeToBytes(getXmxSize(value)) defaultValueXmx = getXmxSize(defaultValue) defaultValueInt = formatXmxSizeToBytes(defaultValueXmx) if valueInt defaultValueInt: - return Value is less than the recommended default of -Xmx + defaultValueXmx + return self.getWarnItem(Value is less than the recommended default of -Xmx + defaultValueXmx) return None def validateMapReduce2Configurations(self, properties, recommendedDefaults): -validationItems = [ {config-name: 'mapreduce.map.java.opts', message: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.map.java.opts')}, -{config-name: 'mapreduce.reduce.java.opts', message: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.reduce.java.opts')}, -{config-name: 'mapreduce.task.io.sort.mb', message:
git commit: AMBARI-7049. Remove the explicit logic of rendering specific configType category just for specific services. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk f77e9e818 - debf29c23 AMBARI-7049. Remove the explicit logic of rendering specific configType category just for specific services. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/debf29c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/debf29c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/debf29c2 Branch: refs/heads/trunk Commit: debf29c23365c0826902f699a3f3cc9e23dc76a6 Parents: f77e9e8 Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Aug 27 15:41:52 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Aug 27 15:41:52 2014 -0700 -- ambari-web/app/models/stack_service.js | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/debf29c2/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index a711936..89b2b81 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -332,25 +332,12 @@ App.StackService.configCategories = function () { serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'})); var configTypes = Object.keys(this.get('configTypes')); - if (this.get('serviceName') !== 'HDFS') { -configTypes = configTypes.without('core-site'); - } + //Falcon has dependency on oozie-site but oozie-site advanced/custom section should not be shown on Falcon page if (this.get('serviceName') !== 'OOZIE') { configTypes = configTypes.without('oozie-site'); } - //Hive has dependency on tez-site but tez-site advanced/custom section should not be shown on Hive page - if (this.get('serviceName') !== 'TEZ') { -configTypes = configTypes.without('tez-site'); - } - - //oozie has dependency on yarn-site but yarn-site advanced/custom section should not be shown on Oozie page - if (this.get('serviceName') !== 'YARN') { -configTypes = configTypes.without('yarn-site'); - } - - // Add Advanced section for every configType to all the services configTypes.forEach(function (type) { var displayName = 'Advanced ' + type;
git commit: Revert AMBARI-7043. BE: Move stack_advisor.py abstract class one folder up
Repository: ambari Updated Branches: refs/heads/trunk debf29c23 - 4c5ed4c0c Revert AMBARI-7043. BE: Move stack_advisor.py abstract class one folder up This reverts commit 40e3f0fc5d34b4d96a95e0e568e8754b042dc6f5. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c5ed4c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c5ed4c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c5ed4c0 Branch: refs/heads/trunk Commit: 4c5ed4c0cf7eb305fcdfbfd110476a015afbd5e1 Parents: debf29c Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Aug 27 15:44:13 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Aug 27 15:44:18 2014 -0700 -- .../src/main/resources/scripts/stack_advisor.py | 2 +- .../main/resources/stacks/HDP/stack_advisor.py | 37 .../src/main/resources/stacks/stack_advisor.py | 37 .../server/api/services/AmbariMetaInfoTest.java | 4 +- .../AmbariManagementControllerTest.java | 2 +- .../src/test/python/TestStackAdvisor.py | 93 .../stacks/2.0.6/common/test_stack_advisor.py | 2 +- .../stacks/XYZ/1.0.0/services/stack_advisor.py | 67 -- .../stacks/XYZ/1.0.1/services/stack_advisor.py | 30 --- 9 files changed, 41 insertions(+), 233 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c5ed4c0/ambari-server/src/main/resources/scripts/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/scripts/stack_advisor.py b/ambari-server/src/main/resources/scripts/stack_advisor.py index ed50866..61d1e09 100755 --- a/ambari-server/src/main/resources/scripts/stack_advisor.py +++ b/ambari-server/src/main/resources/scripts/stack_advisor.py @@ -33,7 +33,7 @@ ALL_ACTIONS = [ RECOMMEND_COMPONENT_LAYOUT_ACTION, VALIDATE_COMPONENT_LAYOUT_ACT USAGE = Usage: action hosts_file services_file\nPossible actions are: {0}\n.format( str(ALL_ACTIONS) ) SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) -STACK_ADVISOR_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, '../stacks/stack_advisor.py') +STACK_ADVISOR_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, '../stacks/{0}/stack_advisor.py') STACK_ADVISOR_IMPL_PATH_TEMPLATE = os.path.join(SCRIPT_DIRECTORY, './../stacks/{0}/{1}/services/stack_advisor.py') STACK_ADVISOR_IMPL_CLASS_TEMPLATE = '{0}{1}StackAdvisor' http://git-wip-us.apache.org/repos/asf/ambari/blob/4c5ed4c0/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py new file mode 100644 index 000..5f66fff --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/stack_advisor.py @@ -0,0 +1,37 @@ +#!/usr/bin/env ambari-python-wrap + +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an AS IS BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +class StackAdvisor(object): + + def recommendComponentLayout(self, services, hosts): +Returns Services object with hostnames array populated for components +pass + + def validateComponentLayout(self, services, hosts): +Returns array of Validation objects about issues with hostnames components assigned to +pass + + def recommendConfigurations(self, services, hosts): +Returns Services object with configurations object populated +pass + + def validateConfigurations(self, services, hosts): +Returns array of Validation objects about issues with configuration values provided in services +pass + http://git-wip-us.apache.org/repos/asf/ambari/blob/4c5ed4c0/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py deleted file mode 100644 index 5f66fff..000 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ /dev/null @@ -1,37 +0,0 @@
git commit: AMBARI-7045. Slider View: When creating slider app, update Ganglia server host value (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 4c5ed4c0c - 9dcb434ea AMBARI-7045. Slider View: When creating slider app, update Ganglia server host value (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9dcb434e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9dcb434e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9dcb434e Branch: refs/heads/trunk Commit: 9dcb434eab370bafc3410e9fd80d8bef33008cb6 Parents: 4c5ed4c Author: Alex Antonenko hiv...@gmail.com Authored: Wed Aug 27 21:34:22 2014 +0300 Committer: Alex Antonenko hiv...@gmail.com Committed: Thu Aug 28 01:49:20 2014 +0300 -- .../createAppWizard/step1_controller.js | 30 .../createAppWizard/step3_controller.js | 9 -- .../src/main/resources/ui/app/helpers/ajax.js | 27 -- .../src/main/resources/ui/app/initialize.js | 2 ++ .../ui/app/mappers/application_status.js| 25 5 files changed, 89 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9dcb434e/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js index 9bfe68c..42c0080 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js @@ -81,11 +81,41 @@ App.CreateAppWizardStep1Controller = Ember.Controller.extend({ * @method loadStep */ loadStep: function () { +this.loadGangliaHost(); this.initializeNewApp(); this.loadAvailableTypes(); }, /** + * Load ganglia server host + * @method loadGangliaHost + */ + loadGangliaHost: function () { +return App.ajax.send({ + name: 'components_hosts', + sender: this, + data: { +componentName: GANGLIA_SERVER, +urlPrefix: '/api/v1/' + }, + success: 'loadGangliaHostSuccessCallback' +}); + + }, + + /** + * Success callback for hosts-request + * Save host name to gangliaHost + * @param {Object} data + * @method loadGangliaHostSuccessCallback + */ + loadGangliaHostSuccessCallback: function (data) { +if(data.items[0]){ + App.set('gangliaHost', Em.get(data.items[0], 'Hosts.host_name')); +} + }, + + /** * Initialize new App and set it to codenewApp/code * @method initializeNewApp */ http://git-wip-us.apache.org/repos/asf/ambari/blob/9dcb434e/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js index b98afb4..12dd699 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js @@ -65,19 +65,24 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({ */ loadStep: function () { this.clearStep(); -this.initConfigs(); +this.initConfigs(true); }, /** * Format init value for codeconfigs/code property + * @param {bool} setDefaults * @method initConfigs */ - initConfigs: function() { + initConfigs: function(setDefaults) { +setDefaults = setDefaults === true ? setDefaults : false; var configs = this.get('newAppConfigs') || {}, c = Em.A(); Object.keys(configs).forEach(function (key) { var label = (!!key.match('^site.'))?key.substr(5):key; + if(key === site.global.ganglia_server_host setDefaults) { +configs[key] = App.get('gangliaHost') ? App.get('gangliaHost') : configs[key]; + } c.push({name:key,value:configs[key],label:label}) }); http://git-wip-us.apache.org/repos/asf/ambari/blob/9dcb434e/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js index 64c8385..255668f 100644 --- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js +++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js @@ -104,6
[1/2] git commit: Revert AMBARI-7048. Change component message from cannot to should not
Repository: ambari Updated Branches: refs/heads/trunk 9dcb434ea - fdb54a10f Revert AMBARI-7048. Change component message from cannot to should not This reverts commit f23e09de6c9aad0523c3fa77e2eaf7bfda72a5cc. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc626c99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc626c99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc626c99 Branch: refs/heads/trunk Commit: fc626c99cf579a37b1e1c8aad4690ceffc02c1e2 Parents: 9dcb434 Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Aug 27 16:00:26 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Aug 27 16:00:26 2014 -0700 -- .../main/resources/stacks/HDP/1.3.2/services/stack_advisor.py| 4 ++-- .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py| 4 ++-- .../src/test/python/stacks/2.0.6/common/test_stack_advisor.py| 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc626c99/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py index 17a26e2..f3c1e1d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py @@ -192,8 +192,8 @@ class HDP132StackAdvisor(StackAdvisor): secondaryNameNodeHosts = secondaryNameNodeHosts[0] commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts)) for host in commonHosts: -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) # Validating cardinality for component in componentsList: http://git-wip-us.apache.org/repos/asf/ambari/blob/fc626c99/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 4eb8f02..083286e 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 @@ -192,8 +192,8 @@ class HDP206StackAdvisor(StackAdvisor): secondaryNameNodeHosts = secondaryNameNodeHosts[0] commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts)) for host in commonHosts: -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) # Validating cardinality for component in componentsList: http://git-wip-us.apache.org/repos/asf/ambari/blob/fc626c99/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py index 71e329b..b8e0d58 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py +++
git commit: Revert AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs
Repository: ambari Updated Branches: refs/heads/trunk fdb54a10f - 51215cc36 Revert AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs This reverts commit e007d7f4fac0bbef2e753e7004e368a0f6329212. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51215cc3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51215cc3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51215cc3 Branch: refs/heads/trunk Commit: 51215cc36e680b6b0cb1ae318901c7ed78930134 Parents: fdb54a1 Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Aug 27 16:03:09 2014 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Aug 27 16:03:09 2014 -0700 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 56 +--- .../stacks/2.0.6/common/test_stack_advisor.py | 36 +++-- 2 files changed, 32 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/51215cc3/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 083286e..ad0dcc0 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 @@ -415,66 +415,58 @@ class HDP206StackAdvisor(StackAdvisor): YARN: [yarn-site, self.validateYARNConfigurations] }.get(serviceName, None) - def toConfigurationValidationProblems(self, validationProblems, siteName): + def toConfigurationValidationErrors(self, items, siteName): result = [] -for validationProblem in validationProblems: - validationItem = validationProblem.get(item, None) - if validationItem is not None: -problem = { type: 'configuration', level: validationItem[level], message: validationItem[message], - config-type: siteName, config-name: validationProblem[config-name] } -result.append(problem) +for item in items: + if item[message] is not None: +error = { type: 'configuration', level: 'ERROR', message: item[message], config-type: siteName, config-name: item[config-name] } +result.append(error) return result - def getWarnItem(self, message): -return {level: WARN, message: message} - - def getErrorItem(self, message): -return {level: ERROR, message: message} - def validatorLessThenDefaultValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return self.getErrorItem(Value should be set) + return Value should be set value = to_number(properties[propertyName]) if value is None: - return self.getErrorItem(Value should be integer) + return Value should be integer defaultValue = to_number(recommendedDefaults[propertyName]) if defaultValue is None: return None if value defaultValue: - return self.getWarnItem(Value is less than the recommended default of {0}.format(defaultValue)) + return Value is less than the recommended default of {0}.format(defaultValue) return None def validateXmxValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return self.getErrorItem(Value should be set) + return Value should be set value = properties[propertyName] defaultValue = recommendedDefaults[propertyName] if defaultValue is None: - return self.getErrorItem(Config's default value can't be null or undefined) + return Config's default value can't be null or undefined if not checkXmxValueFormat(value): - return self.getErrorItem('Invalid value format') + return 'Invalid value format' valueInt = formatXmxSizeToBytes(getXmxSize(value)) defaultValueXmx = getXmxSize(defaultValue) defaultValueInt = formatXmxSizeToBytes(defaultValueXmx) if valueInt defaultValueInt: - return self.getWarnItem(Value is less than the recommended default of -Xmx + defaultValueXmx) + return Value is less than the recommended default of -Xmx + defaultValueXmx return None def validateMapReduce2Configurations(self, properties, recommendedDefaults): -validationItems = [ {config-name: 'mapreduce.map.java.opts', item: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.map.java.opts')}, -{config-name: 'mapreduce.reduce.java.opts', item: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.reduce.java.opts')}, -{config-name:
git commit: AMBARI-7050. Installer incorrectly says Hive + HCatalog + WebHCat needed. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 51215cc36 - 39c7ae74b AMBARI-7050. Installer incorrectly says Hive + HCatalog + WebHCat needed. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/39c7ae74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39c7ae74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39c7ae74 Branch: refs/heads/trunk Commit: 39c7ae74bc9c1b3983a61c032f5c1ca745c9f48c Parents: 51215cc Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Aug 27 16:49:33 2014 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Aug 27 16:49:39 2014 -0700 -- .../app/controllers/wizard/step4_controller.js | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/39c7ae74/ambari-web/app/controllers/wizard/step4_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 92dbed4..d98a848 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -122,9 +122,9 @@ App.WizardStep4Controller = Em.ArrayController.extend({ */ submit: function () { if (!this.get('isSubmitDisabled')) { + this.setGroupedServices(); if (this.validate()) { this.set('errorStack', []); -this.setGroupedServices(); App.router.send('next'); } } @@ -258,15 +258,14 @@ App.WizardStep4Controller = Em.ArrayController.extend({ var missingDependencies = []; var missingDependenciesDisplayName = []; selectedServices.forEach(function(service){ - - var dependentServices = service.get('requiredServices'); - if (!!dependentServices) { -dependentServices.forEach(function(_dependentService){ - var dependentService = this.findProperty('serviceName', _dependentService); - if (dependentService dependentService.get('isSelected') === false) { -if(missingDependencies.indexOf(_dependentService) == -1 ) { - missingDependencies.push(_dependentService); - missingDependenciesDisplayName.push(dependentService.get('displayNameOnSelectServicePage')); + var requiredServices = service.get('requiredServices'); + if (!!requiredServices requiredServices.length) { +requiredServices.forEach(function(_requiredService){ + var requiredService = this.findProperty('serviceName', _requiredService); + if (requiredService requiredService.get('isSelected') === false) { +if(missingDependencies.indexOf(_requiredService) == -1 ) { + missingDependencies.push(_requiredService); + missingDependenciesDisplayName.push(requiredService.get('displayNameOnSelectServicePage')); } } },this);
git commit: AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs
Repository: ambari Updated Branches: refs/heads/trunk d87cf7f8d - fa10e3bff AMBARI-7047. BE: Config validation type of values less than recommended should be WARNs Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa10e3bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa10e3bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa10e3bf Branch: refs/heads/trunk Commit: fa10e3bff6f18aeee1d93eecf1f15ad0d7657235 Parents: d87cf7f Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 27 13:51:39 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Aug 27 18:31:29 2014 -0700 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 56 +++- .../stacks/HDP/2.1/services/stack_advisor.py| 14 ++--- .../stacks/2.0.6/common/test_stack_advisor.py | 36 ++--- 3 files changed, 67 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fa10e3bf/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 ad0dcc0..083286e 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 @@ -415,58 +415,66 @@ class HDP206StackAdvisor(StackAdvisor): YARN: [yarn-site, self.validateYARNConfigurations] }.get(serviceName, None) - def toConfigurationValidationErrors(self, items, siteName): + def toConfigurationValidationProblems(self, validationProblems, siteName): result = [] -for item in items: - if item[message] is not None: -error = { type: 'configuration', level: 'ERROR', message: item[message], config-type: siteName, config-name: item[config-name] } -result.append(error) +for validationProblem in validationProblems: + validationItem = validationProblem.get(item, None) + if validationItem is not None: +problem = { type: 'configuration', level: validationItem[level], message: validationItem[message], + config-type: siteName, config-name: validationProblem[config-name] } +result.append(problem) return result + def getWarnItem(self, message): +return {level: WARN, message: message} + + def getErrorItem(self, message): +return {level: ERROR, message: message} + def validatorLessThenDefaultValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return Value should be set + return self.getErrorItem(Value should be set) value = to_number(properties[propertyName]) if value is None: - return Value should be integer + return self.getErrorItem(Value should be integer) defaultValue = to_number(recommendedDefaults[propertyName]) if defaultValue is None: return None if value defaultValue: - return Value is less than the recommended default of {0}.format(defaultValue) + return self.getWarnItem(Value is less than the recommended default of {0}.format(defaultValue)) return None def validateXmxValue(self, properties, recommendedDefaults, propertyName): if not propertyName in properties: - return Value should be set + return self.getErrorItem(Value should be set) value = properties[propertyName] defaultValue = recommendedDefaults[propertyName] if defaultValue is None: - return Config's default value can't be null or undefined + return self.getErrorItem(Config's default value can't be null or undefined) if not checkXmxValueFormat(value): - return 'Invalid value format' + return self.getErrorItem('Invalid value format') valueInt = formatXmxSizeToBytes(getXmxSize(value)) defaultValueXmx = getXmxSize(defaultValue) defaultValueInt = formatXmxSizeToBytes(defaultValueXmx) if valueInt defaultValueInt: - return Value is less than the recommended default of -Xmx + defaultValueXmx + return self.getWarnItem(Value is less than the recommended default of -Xmx + defaultValueXmx) return None def validateMapReduce2Configurations(self, properties, recommendedDefaults): -validationItems = [ {config-name: 'mapreduce.map.java.opts', message: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.map.java.opts')}, -{config-name: 'mapreduce.reduce.java.opts', message: self.validateXmxValue(properties, recommendedDefaults, 'mapreduce.reduce.java.opts')}, -{config-name:
git commit: AMBARI-7031. FE: Next button not enabled when only /validation ERRORs are there. (ababiichuk via srimanth)
Repository: ambari Updated Branches: refs/heads/trunk fa10e3bff - 94ca14a55 AMBARI-7031. FE: Next button not enabled when only /validation ERRORs are there. (ababiichuk via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94ca14a5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94ca14a5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94ca14a5 Branch: refs/heads/trunk Commit: 94ca14a559ddd9eab59bc2db138dd2005dfffeec Parents: fa10e3b Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 27 14:14:53 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Aug 27 18:39:43 2014 -0700 -- ambari-web/app/mixins/common/serverValidator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94ca14a5/ambari-web/app/mixins/common/serverValidator.js -- diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js index 3a1dbed..71169c5 100644 --- a/ambari-web/app/mixins/common/serverValidator.js +++ b/ambari-web/app/mixins/common/serverValidator.js @@ -236,8 +236,8 @@ App.ServerValidatorMixin = Em.Mixin.create({ if ((property.get('filename') == item['config-type'] + '.xml') (property.get('name') == item['config-name'])) { if (item.level == ERROR) { self.set('configValidationError', true); - property.set('warnMessage', item.message); - property.set('warn', true); + property.set('errorMessage', item.message); + property.set('error', true); } else if (item.level == WARN) { self.set('configValidationWarning', true); property.set('warnMessage', item.message);
git commit: AMBARI-7048. Change component message from cannot to should not
Repository: ambari Updated Branches: refs/heads/trunk 94ca14a55 - 2051c64e7 AMBARI-7048. Change component message from cannot to should not Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2051c64e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2051c64e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2051c64e Branch: refs/heads/trunk Commit: 2051c64e7eec7e5d941cf48d911cf2bbc515db7b Parents: 94ca14a Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Wed Aug 27 14:38:06 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Wed Aug 27 18:41:44 2014 -0700 -- .../main/resources/stacks/HDP/1.3.2/services/stack_advisor.py| 4 ++-- .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py| 4 ++-- .../src/test/python/stacks/2.0.6/common/test_stack_advisor.py| 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2051c64e/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py index f3c1e1d..17a26e2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py @@ -192,8 +192,8 @@ class HDP132StackAdvisor(StackAdvisor): secondaryNameNodeHosts = secondaryNameNodeHosts[0] commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts)) for host in commonHosts: -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) # Validating cardinality for component in componentsList: http://git-wip-us.apache.org/repos/asf/ambari/blob/2051c64e/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 083286e..4eb8f02 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 @@ -192,8 +192,8 @@ class HDP206StackAdvisor(StackAdvisor): secondaryNameNodeHosts = secondaryNameNodeHosts[0] commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts)) for host in commonHosts: -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) -items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode cannot be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'NAMENODE', host: str(host) } ) +items.append( { type: 'host-component', level: 'WARN', message: 'NameNode and Secondary NameNode should not be hosted on same machine', component-name: 'SECONDARY_NAMENODE', host: str(host) } ) # Validating cardinality for component in componentsList: http://git-wip-us.apache.org/repos/asf/ambari/blob/2051c64e/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py index 898797a..b1b9f7a 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py @@