ambari git commit: AMBARI-12489. Ambari server deadlock while deploying using blueprints.
Repository: ambari Updated Branches: refs/heads/trunk 5ecdce4ce -> 558f64d16 AMBARI-12489. Ambari server deadlock while deploying using blueprints. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/558f64d1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/558f64d1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/558f64d1 Branch: refs/heads/trunk Commit: 558f64d164f02e0148e47e3d1714eb430466f437 Parents: 5ecdce4 Author: Siddharth Wagle Authored: Tue Jul 21 19:49:48 2015 -0700 Committer: Siddharth Wagle Committed: Tue Jul 21 19:49:48 2015 -0700 -- .../AmbariManagementControllerImpl.java | 12 --- .../org/apache/ambari/server/state/Cluster.java | 8 +++ .../server/state/cluster/ClusterImpl.java | 22 3 files changed, 39 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/558f64d1/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 5aec7eb..1ded566 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 @@ -60,6 +60,8 @@ import java.util.TreeMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -154,6 +156,7 @@ import org.apache.ambari.server.state.svccomphost.ServiceComponentHostStopEvent; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostUpgradeEvent; import org.apache.ambari.server.utils.StageUtils; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MultiMap; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; @@ -577,9 +580,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle persistServiceComponentHosts(requests); } - @Transactional void persistServiceComponentHosts(Set requests) throws AmbariException { +Multimap schMap = ArrayListMultimap.create(); for (ServiceComponentHostRequest request : requests) { Cluster cluster = clusters.getCluster(request.getClusterName()); @@ -598,8 +601,11 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle sch.setDesiredStackVersion(sc.getDesiredStackVersion()); - sc.addServiceComponentHost(sch); - sch.persist(); + schMap.put(cluster, sch); +} + +for (Cluster cluster : schMap.keySet()) { + cluster.addServiceComponentHosts(schMap.get(cluster)); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/558f64d1/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java index 84980b1..fe669bd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java @@ -108,6 +108,14 @@ public interface Cluster { /** + * Adds schs to cluster AND persists them + * TODO consider making persisting optional + * @param serviceComponentHosts + * @throws AmbariException + */ + void addServiceComponentHosts(Collection serviceComponentHosts) throws AmbariException; + + /** * Remove ServiceComponentHost from cluster * @param svcCompHost */ http://git-wip-us.apache.org/repos/asf/ambari/blob/558f64d1/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java index 8d1e7df..2b3bf05 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/Clus
ambari git commit: AMBARI-12489. Ambari server deadlock while deploying using blueprints.
Repository: ambari Updated Branches: refs/heads/branch-2.1 ec45c1357 -> 89a7d2885 AMBARI-12489. Ambari server deadlock while deploying using blueprints. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/89a7d288 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/89a7d288 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/89a7d288 Branch: refs/heads/branch-2.1 Commit: 89a7d2885467a44308e5f30b18871c324f9feae8 Parents: ec45c13 Author: Siddharth Wagle Authored: Tue Jul 21 19:47:04 2015 -0700 Committer: Siddharth Wagle Committed: Tue Jul 21 19:47:04 2015 -0700 -- .../AmbariManagementControllerImpl.java | 12 --- .../org/apache/ambari/server/state/Cluster.java | 8 +++ .../server/state/cluster/ClusterImpl.java | 22 3 files changed, 39 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/89a7d288/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 5aec7eb..1ded566 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 @@ -60,6 +60,8 @@ import java.util.TreeMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -154,6 +156,7 @@ import org.apache.ambari.server.state.svccomphost.ServiceComponentHostStopEvent; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostUpgradeEvent; import org.apache.ambari.server.utils.StageUtils; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MultiMap; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; @@ -577,9 +580,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle persistServiceComponentHosts(requests); } - @Transactional void persistServiceComponentHosts(Set requests) throws AmbariException { +Multimap schMap = ArrayListMultimap.create(); for (ServiceComponentHostRequest request : requests) { Cluster cluster = clusters.getCluster(request.getClusterName()); @@ -598,8 +601,11 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle sch.setDesiredStackVersion(sc.getDesiredStackVersion()); - sc.addServiceComponentHost(sch); - sch.persist(); + schMap.put(cluster, sch); +} + +for (Cluster cluster : schMap.keySet()) { + cluster.addServiceComponentHosts(schMap.get(cluster)); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/89a7d288/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java index 84980b1..fe669bd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java @@ -108,6 +108,14 @@ public interface Cluster { /** + * Adds schs to cluster AND persists them + * TODO consider making persisting optional + * @param serviceComponentHosts + * @throws AmbariException + */ + void addServiceComponentHosts(Collection serviceComponentHosts) throws AmbariException; + + /** * Remove ServiceComponentHost from cluster * @param svcCompHost */ http://git-wip-us.apache.org/repos/asf/ambari/blob/89a7d288/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java index 8d1e7df..2b3bf05 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cl
ambari git commit: AMBARI-12417. Wizard transitions are slow and hangs the browser (rzang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 508d8db4c -> ec45c1357 AMBARI-12417. Wizard transitions are slow and hangs the browser (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ec45c135 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ec45c135 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ec45c135 Branch: refs/heads/branch-2.1 Commit: ec45c1357a1da4e8f0195979e3ac0911e3e4a585 Parents: 508d8db Author: Richard Zang Authored: Tue Jul 21 17:28:38 2015 -0700 Committer: Richard Zang Committed: Tue Jul 21 18:50:57 2015 -0700 -- ambari-web/app/models/cluster_states.js | 8 +- ambari-web/app/utils/lz-string.js | 510 + ambari-web/test/models/cluster_states_test.js | 11 +- 3 files changed, 527 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ec45c135/ambari-web/app/models/cluster_states.js -- diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js index 9f3ccac..e9e93e1 100644 --- a/ambari-web/app/models/cluster_states.js +++ b/ambari-web/app/models/cluster_states.js @@ -17,7 +17,7 @@ */ var App = require('app'); require('mixins/common/userPref'); - +var LZString = require('utils/lz-string'); App.clusterStatus = Em.Object.create(App.UserPref, { /** @@ -125,6 +125,10 @@ App.clusterStatus = Em.Object.create(App.UserPref, { */ getUserPrefSuccessCallback: function (response, opt, params) { if (response) { + // decompress response + if (typeof response != 'object') { +response = JSON.parse(LZString.decompressFromBase64(response)); + } if (response.clusterState) { this.set('clusterState', response.clusterState); } @@ -239,6 +243,8 @@ App.clusterStatus = Em.Object.create(App.UserPref, { App.db.setLoginName(login); } if (!$.mocho) { +// compress val +val = LZString.compressToBase64(JSON.stringify(val)); this.postUserPref(this.get('key'), val) .done(function () { !!opt && Em.typeOf(opt.successCallback) === 'function' && opt.successCallback.call(opt.sender || this, opt.successCallbackData); http://git-wip-us.apache.org/repos/asf/ambari/blob/ec45c135/ambari-web/app/utils/lz-string.js -- diff --git a/ambari-web/app/utils/lz-string.js b/ambari-web/app/utils/lz-string.js new file mode 100644 index 000..1672af6 --- /dev/null +++ b/ambari-web/app/utils/lz-string.js @@ -0,0 +1,510 @@ +/** + * 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. + */ + +var LZString = (function() { + +// private property + var f = String.fromCharCode; + var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; + var baseReverseDic = {}; + + function getBaseValue(alphabet, character) { +if (!baseReverseDic[alphabet]) { + baseReverseDic[alphabet] = {}; + for (var i=0 ; i>> 8; +buf[i*2+1] = current_value % 256; + } + return buf; +}, + +//decompress from uint8array (UCS-2 big endian format) +decompressFromUint8Array:function (compressed) { + if (compressed===null || compressed===undefined){ +return LZString.decompress(compressed); + } else { +var buf=new Array(compressed.length/2); // 2 bytes per character +for (var i=0, TotalLen=buf.length; i> 1; + } +} else { + value = 1; + for (i=0 ; i> 1; + } +} +context_enlargeIn--; +if (context_enlargeIn == 0) { + context_enlargeIn = Math.pow(2, context_numBits); + context_numBits++; +} +delete context_dictionaryToCreate[context_w]; + } else { +va
ambari git commit: AMBARI-12417. Wizard transitions are slow and hangs the browser (rzang)
Repository: ambari Updated Branches: refs/heads/trunk 114220647 -> 5ecdce4ce AMBARI-12417. Wizard transitions are slow and hangs the browser (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ecdce4c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ecdce4c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ecdce4c Branch: refs/heads/trunk Commit: 5ecdce4cea7e0eeda7e5f855d2f48f14235137c4 Parents: 1142206 Author: Richard Zang Authored: Tue Jul 21 17:28:38 2015 -0700 Committer: Richard Zang Committed: Tue Jul 21 17:28:38 2015 -0700 -- ambari-web/app/models/cluster_states.js | 8 +- ambari-web/app/utils/lz-string.js | 510 + ambari-web/test/models/cluster_states_test.js | 11 +- 3 files changed, 527 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecdce4c/ambari-web/app/models/cluster_states.js -- diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js index 9f3ccac..e9e93e1 100644 --- a/ambari-web/app/models/cluster_states.js +++ b/ambari-web/app/models/cluster_states.js @@ -17,7 +17,7 @@ */ var App = require('app'); require('mixins/common/userPref'); - +var LZString = require('utils/lz-string'); App.clusterStatus = Em.Object.create(App.UserPref, { /** @@ -125,6 +125,10 @@ App.clusterStatus = Em.Object.create(App.UserPref, { */ getUserPrefSuccessCallback: function (response, opt, params) { if (response) { + // decompress response + if (typeof response != 'object') { +response = JSON.parse(LZString.decompressFromBase64(response)); + } if (response.clusterState) { this.set('clusterState', response.clusterState); } @@ -239,6 +243,8 @@ App.clusterStatus = Em.Object.create(App.UserPref, { App.db.setLoginName(login); } if (!$.mocho) { +// compress val +val = LZString.compressToBase64(JSON.stringify(val)); this.postUserPref(this.get('key'), val) .done(function () { !!opt && Em.typeOf(opt.successCallback) === 'function' && opt.successCallback.call(opt.sender || this, opt.successCallbackData); http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecdce4c/ambari-web/app/utils/lz-string.js -- diff --git a/ambari-web/app/utils/lz-string.js b/ambari-web/app/utils/lz-string.js new file mode 100644 index 000..1672af6 --- /dev/null +++ b/ambari-web/app/utils/lz-string.js @@ -0,0 +1,510 @@ +/** + * 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. + */ + +var LZString = (function() { + +// private property + var f = String.fromCharCode; + var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; + var baseReverseDic = {}; + + function getBaseValue(alphabet, character) { +if (!baseReverseDic[alphabet]) { + baseReverseDic[alphabet] = {}; + for (var i=0 ; i>> 8; +buf[i*2+1] = current_value % 256; + } + return buf; +}, + +//decompress from uint8array (UCS-2 big endian format) +decompressFromUint8Array:function (compressed) { + if (compressed===null || compressed===undefined){ +return LZString.decompress(compressed); + } else { +var buf=new Array(compressed.length/2); // 2 bytes per character +for (var i=0, TotalLen=buf.length; i> 1; + } +} else { + value = 1; + for (i=0 ; i> 1; + } +} +context_enlargeIn--; +if (context_enlargeIn == 0) { + context_enlargeIn = Math.pow(2, context_numBits); + context_numBits++; +} +delete context_dictionaryToCreate[context_w]; + } else { +value = cont
ambari git commit: AMBARI-12171 Windows unit tests: Common unit tests: fix the imports & failing patches
Repository: ambari Updated Branches: refs/heads/trunk a6c86eec9 -> 114220647 AMBARI-12171 Windows unit tests: Common unit tests: fix the imports & failing patches Fixed the imports. Coalesced the OS mock. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/11422064 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11422064 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11422064 Branch: refs/heads/trunk Commit: 1142206476aff1fdebe4ddb72b488ad40e87472e Parents: a6c86ee Author: Florian Barca Authored: Tue Jul 21 11:34:23 2015 -0700 Committer: Florian Barca Committed: Tue Jul 21 13:00:34 2015 -0700 -- .../python/resource_management/TestContentSources.py | 6 -- .../python/resource_management/TestDirectoryResource.py | 9 ++--- .../resource_management/TestExecuteHadoopResource.py | 8 ++-- .../python/resource_management/TestExecuteResource.py| 6 -- .../test/python/resource_management/TestFileResource.py | 9 +++-- .../test/python/resource_management/TestGroupResource.py | 8 +--- .../test/python/resource_management/TestLinkResource.py | 8 .../resource_management/TestPropertiesFileResource.py| 6 -- .../python/resource_management/TestRepositoryResource.py | 3 ++- .../python/resource_management/TestServiceResource.py| 11 +-- .../resource_management/TestTemplateConfigResource.py| 9 +++-- .../test/python/resource_management/TestUserResource.py | 7 +-- .../python/resource_management/TestXmlConfigResource.py | 8 ++-- ambari-agent/src/test/python/unitTests.py| 7 +-- 14 files changed, 70 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/11422064/ambari-agent/src/test/python/resource_management/TestContentSources.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestContentSources.py b/ambari-agent/src/test/python/resource_management/TestContentSources.py index 55c3300..5f4ee06 100644 --- a/ambari-agent/src/test/python/resource_management/TestContentSources.py +++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py @@ -18,7 +18,9 @@ limitations under the License. from unittest import TestCase from mock.mock import patch, MagicMock -from only_for_platform import get_platform, not_for_platform, PLATFORM_WINDOWS +from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS + +from ambari_commons.os_check import OSCheck from resource_management.core import Environment from resource_management.core.system import System @@ -35,7 +37,7 @@ import urllib2 import os -@patch.object(System, "os_family", new = 'redhat') +@patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value)) class TestContentSources(TestCase): @patch.object(os.path, "isfile") http://git-wip-us.apache.org/repos/asf/ambari/blob/11422064/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py index f1ca4de..011be6d 100644 --- a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py +++ b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py @@ -18,7 +18,9 @@ limitations under the License. from unittest import TestCase from mock.mock import patch, MagicMock -from only_for_platform import get_platform, not_for_platform, PLATFORM_WINDOWS +from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS + +from ambari_commons.os_check import OSCheck import os from resource_management.core.system import System @@ -30,9 +32,10 @@ if get_platform() != PLATFORM_WINDOWS: import grp -@patch.object(System, "os_family", new = 'redhat') +@patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value)) class TestDirectoryResource(TestCase): - + + @not_for_platform(PLATFORM_WINDOWS) @patch("resource_management.core.sudo.path_exists") @patch("resource_management.core.sudo.makedirs") @patch("resource_management.core.sudo.path_isdir") http://git-wip-us.apache.org/repos/asf/ambari/blob/11422064/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py index 6bb9d0f.
[1/2] ambari git commit: AMBARI-12463. Decrease initial application load time. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 7839c973e -> a6c86eec9 http://git-wip-us.apache.org/repos/asf/ambari/blob/a6c86eec/ambari-web/app/templates/main/host/host_alerts.hbs -- diff --git a/ambari-web/app/templates/main/host/host_alerts.hbs b/ambari-web/app/templates/main/host/host_alerts.hbs index 675f02e..19d44d7 100644 --- a/ambari-web/app/templates/main/host/host_alerts.hbs +++ b/ambari-web/app/templates/main/host/host_alerts.hbs @@ -22,49 +22,53 @@ {{#if App.router.mainAlertInstancesController.isLoaded}} - - + + {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}} {{view view.parentView.serviceSort class="first service-sorting"}} {{view view.parentView.nameSort class="name-sorting"}} {{view view.parentView.statusSort class="status-sorting"}} {{view view.parentView.textSort class="text-sorting"}} {{/view}} - - {{view view.serviceFilterView class="service-filter"}} - {{view view.nameFilterView class="name-filter"}} - {{view view.stateFilterView class="status-filter"}} - {{view view.textView class="text-filter"}} - - - -{{#if view.pageContent}} - {{#each alertInstance in view.pageContent}} + +{{view view.serviceFilterView class="service-filter"}} +{{view view.nameFilterView class="name-filter"}} +{{view view.stateFilterView class="status-filter"}} +{{view view.textView class="text-filter"}} + + + + {{#if view.pageContent}} +{{#each alertInstance in view.pageContent}} + + + {{#if alertInstance.isAmbariServiceName}} +{{alertInstance.serviceDisplayName}} + {{else}} +{{alertInstance.serviceDisplayName}} + {{/if}} + + + {{alertInstance.label}} + +{{{alertInstance.status}}} + {{alertInstance.lastTriggeredForFormatted}} + +{{alertInstance.text}} + +{{/each}} + {{else}} -{{#if alertInstance.isAmbariServiceName}} - {{alertInstance.serviceDisplayName}} -{{else}} - {{alertInstance.serviceDisplayName}} -{{/if}} - - -{{alertInstance.label}} +{{t alerts.table.noAlerts}} - {{{alertInstance.status}}} {{alertInstance.lastTriggeredForFormatted}} - {{alertInstance.text}} + - {{/each}} -{{else}} - - - {{t alerts.table.noAlerts}} - - - -{{/if}} - - + {{/if}} + + {{else}} @@ -74,7 +78,7 @@ {{#if view.showFilteredContent}} {{view.filteredContentInfo}} - {{t tableView.filters.clearAllFilters}} +href="#">{{t tableView.filters.clearAllFilters}} {{/if}} @@ -84,8 +88,10 @@ {{view.paginationInfo}} - - + + http://git-wip-us.apache.org/repos/asf/ambari/blob/a6c86eec/ambari-web/app/templates/main/service/services/hbase.hbs -- diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs b/ambari-web/app/templates/main/service/services/hbase.hbs index 1ed96dd..b728abe 100644 --- a/ambari-web/app/templates/main/service/services/hbase.hbs +++ b/ambari-web/app/templates/main/service/services/hbase.hbs @@ -17,33 +17,39 @@ }} - {{view view.dashboardMasterComponentView}} +{{view view.dashboardMasterComponentView}} - {{t dashboard.services.hbase.regionServers}} + {{t dashboard.services.hbase.regionServers}} - - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} -{{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - +{{#if App.router.clusterController.isComponentsStateLoaded}} + +{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} +{{/view}} + {{t services.service.summary.RegionServersLIVE}} +{{else}} + {{t common.noData}} +{{/if}} {{#if view.showPhoenixInfo}} - {{t dashboard.services.hbase.phoenixServers}} - - +{{t dashboard.services.hbase.phoenixServers}} + + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}} {{view.liveComponents}}/{{view.totalCo
[2/2] ambari git commit: AMBARI-12463. Decrease initial application load time. (jaimin)
AMBARI-12463. Decrease initial application load time. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6c86eec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6c86eec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6c86eec Branch: refs/heads/trunk Commit: a6c86eec9b84a44665024f0727cbbdc3d69cbfba Parents: 7839c97 Author: Jaimin Jetly Authored: Tue Jul 21 12:43:22 2015 -0700 Committer: Jaimin Jetly Committed: Tue Jul 21 12:58:37 2015 -0700 -- .../controllers/global/cluster_controller.js| 258 ++- .../app/controllers/global/update_controller.js | 4 +- ambari-web/app/controllers/main.js | 27 ++ .../nameNode/step5_controller.js| 2 +- .../main/admin/kerberos/step2_controller.js | 5 - .../main/admin/kerberos/wizard_controller.js| 2 +- .../main/alert_definitions_controller.js| 7 - ambari-web/app/controllers/main/host/details.js | 1 - ambari-web/app/controllers/main/service.js | 4 +- .../controllers/main/service/add_controller.js | 4 +- .../controllers/main/service/info/configs.js| 4 +- ambari-web/app/controllers/main/service/item.js | 1 - .../main/service/reassign/step4_controller.js | 2 +- .../main/service/reassign_controller.js | 62 - .../app/controllers/wizard/step7_controller.js | 11 +- .../app/controllers/wizard/step8_controller.js | 22 +- .../mappers/alert_definition_summary_mapper.js | 4 - .../app/mappers/alert_definitions_mapper.js | 3 - ambari-web/app/mappers/cluster_mapper.js| 5 +- .../app/mappers/components_state_mapper.js | 34 ++- ambari-web/app/mappers/racks_mapper.js | 5 - ambari-web/app/mappers/service_mapper.js| 2 + ambari-web/app/messages.js | 2 +- ambari-web/app/mixins/common/serverValidator.js | 2 +- .../app/mixins/wizard/addSecurityConfigs.js | 2 +- .../wizard/wizardProgressPageController.js | 2 +- ambari-web/app/models.js| 1 + ambari-web/app/models/cluster.js| 22 +- ambari-web/app/models/master_component.js | 28 ++ ambari-web/app/models/service.js| 8 + ambari-web/app/router.js| 57 ++-- ambari-web/app/routes/add_service_routes.js | 167 ++-- ambari-web/app/routes/main.js | 27 +- ambari-web/app/templates/application.hbs| 14 +- ambari-web/app/templates/main/alerts.hbs| 105 .../app/templates/main/host/host_alerts.hbs | 78 +++--- .../templates/main/service/services/hbase.hbs | 74 +++--- .../templates/main/service/services/hdfs.hbs| 132 ++ .../templates/main/service/services/storm.hbs | 99 +++ .../templates/main/service/services/yarn.hbs| 77 +++--- ambari-web/app/utils/ajax/ajax.js | 2 +- ambari-web/app/utils/components.js | 29 ++- ambari-web/app/utils/http_client.js | 2 +- ambari-web/app/utils/updater.js | 2 +- .../main/dashboard/widgets/datanode_live.js | 26 +- .../dashboard/widgets/node_managers_live.js | 8 +- .../main/dashboard/widgets/supervisor_live.js | 8 +- .../main/host/details/host_component_view.js| 22 +- ambari-web/app/views/main/host/summary.js | 28 +- .../app/views/main/service/info/configs.js | 5 +- .../views/main/service/reassign/step5_view.js | 4 +- .../global/cluster_controller_test.js | 117 - .../admin/kerberos/step4_controller_test.js | 10 +- .../test/controllers/main/host/details_test.js | 23 +- .../main/service/add_controller_test.js | 4 +- .../test/controllers/main/service/item_test.js | 3 - .../service/reassign/step4_controller_test.js | 24 +- .../test/controllers/main/service_test.js | 2 +- .../test/controllers/wizard/step8_test.js | 6 +- .../wizard/wizardProgressPageController_test.js | 11 +- ambari-web/test/router_test.js | 24 +- .../widgets/node_managers_live_test.js | 10 +- .../host/details/host_component_view_test.js| 22 +- 63 files changed, 843 insertions(+), 915 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a6c86eec/ambari-web/app/controllers/global/cluster_controller.js -- diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js index ad5abd1..d152931 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -25,15 +25,21 @@ App.ClusterController = Em.Controller.extend({
[2/2] ambari git commit: AMBARI-12463. Decrease initial application load time. (jaimin)
AMBARI-12463. Decrease initial application load time. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/508d8db4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/508d8db4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/508d8db4 Branch: refs/heads/branch-2.1 Commit: 508d8db4c138e74cad833dd461862daa825dc52f Parents: 96735e2 Author: Jaimin Jetly Authored: Tue Jul 21 12:43:22 2015 -0700 Committer: Jaimin Jetly Committed: Tue Jul 21 12:43:22 2015 -0700 -- .../controllers/global/cluster_controller.js| 257 ++- .../app/controllers/global/update_controller.js | 4 +- ambari-web/app/controllers/main.js | 27 ++ .../nameNode/step5_controller.js| 2 +- .../main/admin/kerberos/step2_controller.js | 5 - .../main/admin/kerberos/wizard_controller.js| 2 +- .../main/alert_definitions_controller.js| 7 - ambari-web/app/controllers/main/host/details.js | 1 - ambari-web/app/controllers/main/service.js | 4 +- .../controllers/main/service/add_controller.js | 4 +- .../controllers/main/service/info/configs.js| 4 +- ambari-web/app/controllers/main/service/item.js | 1 - .../main/service/reassign/step4_controller.js | 2 +- .../main/service/reassign_controller.js | 62 - .../app/controllers/wizard/step7_controller.js | 9 +- .../app/controllers/wizard/step8_controller.js | 22 +- .../mappers/alert_definition_summary_mapper.js | 4 - .../app/mappers/alert_definitions_mapper.js | 3 - ambari-web/app/mappers/cluster_mapper.js| 5 +- .../app/mappers/components_state_mapper.js | 34 ++- ambari-web/app/mappers/racks_mapper.js | 5 - ambari-web/app/mappers/service_mapper.js| 2 + ambari-web/app/messages.js | 2 +- ambari-web/app/mixins/common/serverValidator.js | 2 +- .../app/mixins/wizard/addSecurityConfigs.js | 2 +- .../wizard/wizardProgressPageController.js | 2 +- ambari-web/app/models.js| 1 + ambari-web/app/models/cluster.js| 22 +- ambari-web/app/models/master_component.js | 28 ++ ambari-web/app/models/service.js| 8 + ambari-web/app/router.js| 57 ++-- ambari-web/app/routes/add_service_routes.js | 167 ++-- ambari-web/app/routes/main.js | 27 +- ambari-web/app/templates/application.hbs| 14 +- ambari-web/app/templates/main/alerts.hbs| 105 .../app/templates/main/host/host_alerts.hbs | 78 +++--- .../templates/main/service/services/hbase.hbs | 74 +++--- .../templates/main/service/services/hdfs.hbs| 132 ++ .../templates/main/service/services/storm.hbs | 99 +++ .../templates/main/service/services/yarn.hbs| 77 +++--- ambari-web/app/utils/ajax/ajax.js | 2 +- ambari-web/app/utils/components.js | 29 ++- ambari-web/app/utils/http_client.js | 2 +- ambari-web/app/utils/updater.js | 2 +- .../main/dashboard/widgets/datanode_live.js | 26 +- .../dashboard/widgets/node_managers_live.js | 8 +- .../main/dashboard/widgets/supervisor_live.js | 8 +- .../main/host/details/host_component_view.js| 22 +- ambari-web/app/views/main/host/summary.js | 28 +- .../app/views/main/service/info/configs.js | 5 +- .../views/main/service/reassign/step5_view.js | 4 +- .../global/cluster_controller_test.js | 117 - .../admin/kerberos/step4_controller_test.js | 10 +- .../test/controllers/main/host/details_test.js | 23 +- .../main/service/add_controller_test.js | 4 +- .../test/controllers/main/service/item_test.js | 3 - .../service/reassign/step4_controller_test.js | 24 +- .../test/controllers/main/service_test.js | 2 +- .../test/controllers/wizard/step8_test.js | 6 +- .../wizard/wizardProgressPageController_test.js | 11 +- ambari-web/test/router_test.js | 24 +- .../widgets/node_managers_live_test.js | 10 +- .../host/details/host_component_view_test.js| 22 +- 63 files changed, 838 insertions(+), 917 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/controllers/global/cluster_controller.js -- diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js index f83d03e..b16de85 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -25,15 +25,21 @@ App.ClusterController = Em.Controller.ext
[1/2] ambari git commit: AMBARI-12463. Decrease initial application load time. (jaimin)
Repository: ambari Updated Branches: refs/heads/branch-2.1 96735e28e -> 508d8db4c http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/templates/main/host/host_alerts.hbs -- diff --git a/ambari-web/app/templates/main/host/host_alerts.hbs b/ambari-web/app/templates/main/host/host_alerts.hbs index 675f02e..19d44d7 100644 --- a/ambari-web/app/templates/main/host/host_alerts.hbs +++ b/ambari-web/app/templates/main/host/host_alerts.hbs @@ -22,49 +22,53 @@ {{#if App.router.mainAlertInstancesController.isLoaded}} - - + + {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}} {{view view.parentView.serviceSort class="first service-sorting"}} {{view view.parentView.nameSort class="name-sorting"}} {{view view.parentView.statusSort class="status-sorting"}} {{view view.parentView.textSort class="text-sorting"}} {{/view}} - - {{view view.serviceFilterView class="service-filter"}} - {{view view.nameFilterView class="name-filter"}} - {{view view.stateFilterView class="status-filter"}} - {{view view.textView class="text-filter"}} - - - -{{#if view.pageContent}} - {{#each alertInstance in view.pageContent}} + +{{view view.serviceFilterView class="service-filter"}} +{{view view.nameFilterView class="name-filter"}} +{{view view.stateFilterView class="status-filter"}} +{{view view.textView class="text-filter"}} + + + + {{#if view.pageContent}} +{{#each alertInstance in view.pageContent}} + + + {{#if alertInstance.isAmbariServiceName}} +{{alertInstance.serviceDisplayName}} + {{else}} +{{alertInstance.serviceDisplayName}} + {{/if}} + + + {{alertInstance.label}} + +{{{alertInstance.status}}} + {{alertInstance.lastTriggeredForFormatted}} + +{{alertInstance.text}} + +{{/each}} + {{else}} -{{#if alertInstance.isAmbariServiceName}} - {{alertInstance.serviceDisplayName}} -{{else}} - {{alertInstance.serviceDisplayName}} -{{/if}} - - -{{alertInstance.label}} +{{t alerts.table.noAlerts}} - {{{alertInstance.status}}} {{alertInstance.lastTriggeredForFormatted}} - {{alertInstance.text}} + - {{/each}} -{{else}} - - - {{t alerts.table.noAlerts}} - - - -{{/if}} - - + {{/if}} + + {{else}} @@ -74,7 +78,7 @@ {{#if view.showFilteredContent}} {{view.filteredContentInfo}} - {{t tableView.filters.clearAllFilters}} +href="#">{{t tableView.filters.clearAllFilters}} {{/if}} @@ -84,8 +88,10 @@ {{view.paginationInfo}} - - + + http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/templates/main/service/services/hbase.hbs -- diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs b/ambari-web/app/templates/main/service/services/hbase.hbs index 1ed96dd..b728abe 100644 --- a/ambari-web/app/templates/main/service/services/hbase.hbs +++ b/ambari-web/app/templates/main/service/services/hbase.hbs @@ -17,33 +17,39 @@ }} - {{view view.dashboardMasterComponentView}} +{{view view.dashboardMasterComponentView}} - {{t dashboard.services.hbase.regionServers}} + {{t dashboard.services.hbase.regionServers}} - - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} -{{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - +{{#if App.router.clusterController.isComponentsStateLoaded}} + +{{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} +{{/view}} + {{t services.service.summary.RegionServersLIVE}} +{{else}} + {{t common.noData}} +{{/if}} {{#if view.showPhoenixInfo}} - {{t dashboard.services.hbase.phoenixServers}} - - +{{t dashboard.services.hbase.phoenixServers}} + + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}} {{view.liveComponents}}/{{view.to
ambari git commit: AMBARI-12227. Kerberos Wizard: temporarily stores admin principal / password in browser's local storage (rzang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 32aa51d9f -> 96735e28e AMBARI-12227. Kerberos Wizard: temporarily stores admin principal / password in browser's local storage (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/96735e28 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96735e28 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96735e28 Branch: refs/heads/branch-2.1 Commit: 96735e28e22013fc52446d4f6e12109e91b1a899 Parents: 32aa51d Author: Richard Zang Authored: Tue Jul 21 12:35:07 2015 -0700 Committer: Richard Zang Committed: Tue Jul 21 12:37:57 2015 -0700 -- ambari-web/app/controllers/wizard.js | 18 +- ambari-web/test/controllers/wizard_test.js | 63 +++ ambari-web/vendor/scripts/lz-string.js | 492 3 files changed, 79 insertions(+), 494 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/96735e28/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 367ef6a..e0f49b6 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -45,6 +45,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM 'serviceComponents' ], + sensibleConfigs: ['admin_principal', 'admin_password'], + init: function () { this.clusters = App.Cluster.find(); this.setIsStepDisabled(); @@ -912,6 +914,10 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM showLabel: _configProperties.get('showLabel'), category: _configProperties.get('category') }; + +if (this.isExcludedConfig(configProperty)) { + configProperty.value = ''; +} serviceConfigProperties.push(configProperty); }, this); // check for configs that need to update for installed services @@ -934,6 +940,11 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM this.set('content.serviceConfigProperties', serviceConfigProperties); this.setDBProperty('fileNamesToUpdate', fileNamesToUpdate); }, + + isExcludedConfig: function (configProperty) { +return this.get('sensibleConfigs').indexOf(configProperty.name) > -1; + }, + /** * save Config groups * @param stepController @@ -1252,15 +1263,18 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM return dfd.promise(); }, - /** - * Cache all step config to local storage in name value pairs + * Cache "stepConfigs" to local storage in name value pairs * @param stepController */ cacheStepConfigValues: function(stepController) { +var self = this; var stepConfigs = []; stepController.get("stepConfigs").forEach(function (category) { var configs = category.configs.map(function(config) { +if (self.isExcludedConfig(config)) { + config.set('value', ''); +} return { name: config.name, value: config.value http://git-wip-us.apache.org/repos/asf/ambari/blob/96735e28/ambari-web/test/controllers/wizard_test.js -- diff --git a/ambari-web/test/controllers/wizard_test.js b/ambari-web/test/controllers/wizard_test.js index 95f7f5c..a9d1317 100644 --- a/ambari-web/test/controllers/wizard_test.js +++ b/ambari-web/test/controllers/wizard_test.js @@ -965,6 +965,62 @@ describe('App.WizardController', function () { c.setDBProperty.restore(); }); +var kerberosStepController = Em.Object.create({ + installedServiceNames: ['KERBEROS'], + stepConfigs: [ +Em.Object.create({ + serviceName: 'KERBEROS', + configs: [ +Em.Object.create({ + id: 'id', + name: 'admin_password', + value: 'value', + defaultValue: 'defaultValue', + description: 'description', + serviceName: 'serviceName', + domain: 'domain', + isVisible: true, + isNotDefaultValue: true, + isFinal: true, + defaultIsFinal: true, + supportsFinal: true, + filename: 'filename', + displayType: 'string', + isRequiredByAgent: true, + hasInitialValue: true, + isRequired: true, + group: {name: 'group'}, + showLabel: true, + category: 'some_category' +}), + +Em.Object.create({ + id: 'id', + name: 'admin_principal', + value: 'valu
ambari git commit: AMBARI-12227. Kerberos Wizard: temporarily stores admin principal / password in browser's local storage (rzang)
Repository: ambari Updated Branches: refs/heads/trunk fb7e4e608 -> 7839c973e AMBARI-12227. Kerberos Wizard: temporarily stores admin principal / password in browser's local storage (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7839c973 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7839c973 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7839c973 Branch: refs/heads/trunk Commit: 7839c973e9581b24a4dea37c1683aec45361b8da Parents: fb7e4e6 Author: Richard Zang Authored: Tue Jul 21 12:35:07 2015 -0700 Committer: Richard Zang Committed: Tue Jul 21 12:36:01 2015 -0700 -- ambari-web/app/controllers/wizard.js | 18 +- ambari-web/test/controllers/wizard_test.js | 63 +++ ambari-web/vendor/scripts/lz-string.js | 492 3 files changed, 79 insertions(+), 494 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7839c973/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 1124188..4cc0c1e 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -46,6 +46,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM 'serviceComponents' ], + sensibleConfigs: ['admin_principal', 'admin_password'], + init: function () { this.clusters = App.Cluster.find(); this.setIsStepDisabled(); @@ -878,6 +880,10 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM category: _configProperties.get('category'), configId: App.config.configId(_configProperties.get('name'),_configProperties.get('filename')) }; + +if (this.isExcludedConfig(configProperty)) { + configProperty.value = ''; +} serviceConfigProperties.push(configProperty); }, this); // check for configs that need to update for installed services @@ -900,6 +906,11 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM this.set('content.serviceConfigProperties', serviceConfigProperties); this.setDBProperty('fileNamesToUpdate', fileNamesToUpdate); }, + + isExcludedConfig: function (configProperty) { +return this.get('sensibleConfigs').indexOf(configProperty.name) > -1; + }, + /** * save Config groups * @param stepController @@ -1246,15 +1257,18 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM return dfd.promise(); }, - /** - * Cache all step config to local storage in name value pairs + * Cache "stepConfigs" to local storage in name value pairs * @param stepController */ cacheStepConfigValues: function(stepController) { +var self = this; var stepConfigs = []; stepController.get("stepConfigs").forEach(function (category) { var configs = category.configs.map(function(config) { +if (self.isExcludedConfig(config)) { + config.set('value', ''); +} return { name: config.name, value: config.value http://git-wip-us.apache.org/repos/asf/ambari/blob/7839c973/ambari-web/test/controllers/wizard_test.js -- diff --git a/ambari-web/test/controllers/wizard_test.js b/ambari-web/test/controllers/wizard_test.js index 3d938e3..a3ce6f2 100644 --- a/ambari-web/test/controllers/wizard_test.js +++ b/ambari-web/test/controllers/wizard_test.js @@ -922,6 +922,62 @@ describe('App.WizardController', function () { c.setDBProperty.restore(); }); +var kerberosStepController = Em.Object.create({ + installedServiceNames: ['KERBEROS'], + stepConfigs: [ +Em.Object.create({ + serviceName: 'KERBEROS', + configs: [ +Em.Object.create({ + id: 'id', + name: 'admin_password', + value: 'value', + defaultValue: 'defaultValue', + description: 'description', + serviceName: 'serviceName', + domain: 'domain', + isVisible: true, + isNotDefaultValue: true, + isFinal: true, + defaultIsFinal: true, + supportsFinal: true, + filename: 'filename', + displayType: 'string', + isRequiredByAgent: true, + hasInitialValue: true, + isRequired: true, + group: {name: 'group'}, + showLabel: true, + category: 'some_category' +}), + +Em.Object.create({ + id: 'id', + name: 'admin
ambari git commit: AMBARI-12475 Optimize serviceConfigVersionsMapper execution time. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 81b4febe6 -> fb7e4e608 AMBARI-12475 Optimize serviceConfigVersionsMapper execution time. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb7e4e60 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb7e4e60 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb7e4e60 Branch: refs/heads/trunk Commit: fb7e4e608421e50807310bf46b2c35e5ced69bfe Parents: 81b4feb Author: Andrii Tkach Authored: Tue Jul 21 22:29:52 2015 +0300 Committer: Andrii Tkach Committed: Tue Jul 21 22:30:11 2015 +0300 -- .../main/dashboard/config_history_controller.js | 5 +--- .../mappers/service_config_version_mapper.js| 31 ++-- 2 files changed, 17 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb7e4e60/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 a2e6f52..66ae200 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -21,10 +21,7 @@ var App = require('app'); App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin, { name: 'mainConfigHistoryController', - dataSource: App.ServiceConfigVersion.find(), - content: function () { -return this.get('dataSource').filterProperty('isRequested'); - }.property('dataSource.@each.isRequested'), + content: App.ServiceConfigVersion.find(), isPolling: false, totalCount: 0, filteredCount: 0, http://git-wip-us.apache.org/repos/asf/ambari/blob/fb7e4e60/ambari-web/app/mappers/service_config_version_mapper.js -- diff --git a/ambari-web/app/mappers/service_config_version_mapper.js b/ambari-web/app/mappers/service_config_version_mapper.js index 69bc35c..20d876a 100644 --- a/ambari-web/app/mappers/service_config_version_mapper.js +++ b/ambari-web/app/mappers/service_config_version_mapper.js @@ -36,11 +36,19 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ is_compatible: 'is_cluster_compatible' }, map: function (json) { +console.time('App.serviceConfigVersionsMapper'); var result = []; var itemIds = {}; var serviceToHostMap = {}; +var currentVersionsMap = {}; if (json && json.items) { + App.ServiceConfigVersion.find().forEach(function (v) { +if (v.get('isCurrent')) { + currentVersionsMap[v.get('serviceName') + "_" + v.get('groupName')] = v; +} + }); + json.items.forEach(function (item, index) { var parsedItem = this.parseIt(item, this.get('config')); parsedItem.id = parsedItem.service_name + '_' + parsedItem.version; @@ -52,18 +60,19 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ } else { serviceToHostMap[item.service_name] = item.hosts; } + +// if loaded only latest versions(later than current), then current version should be reset +if (parsedItem.is_current && currentVersionsMap[parsedItem.service_name + "_" + parsedItem.group_name]) { + currentVersionsMap[parsedItem.service_name + "_" + parsedItem.group_name].set('isCurrent', false); +} result.push(parsedItem); }, this); - this.get('model').find().forEach(function (item) { -if (!itemIds[item.get('id')]) { - item.set('isRequested', false); -} - }); var itemTotal = parseInt(json.itemTotal); if (!isNaN(itemTotal)) { App.router.set('mainConfigHistoryController.filteredCount', itemTotal); } + /** * this code sets hostNames for default config group * by excluding hostNames that belongs to not default groups @@ -82,17 +91,9 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ } }); - result.forEach(function(v) { -if (v.is_current) { - var formerCurrent = App.ServiceConfigVersion.find().filterProperty('isCurrent').filterProperty('serviceName', v.service_name).findProperty('groupName', v.group_name); - if (formerCurrent) { -formerCurrent.set('isCurrent', false); - } -} - }); - - App.store.commit(); + this.get('model').find().clear(); App.store.loadMany(this.get('model'), result); + console.timeEnd('App.serviceConfigVersionsMapper'); } } });
ambari git commit: AMBARI-12475 Optimize serviceConfigVersionsMapper execution time. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ad2092cd7 -> 32aa51d9f AMBARI-12475 Optimize serviceConfigVersionsMapper execution time. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32aa51d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32aa51d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32aa51d9 Branch: refs/heads/branch-2.1 Commit: 32aa51d9f54c10154b064c6955691ec6c9c938b0 Parents: ad2092c Author: Andrii Tkach Authored: Tue Jul 21 22:19:05 2015 +0300 Committer: Andrii Tkach Committed: Tue Jul 21 22:19:05 2015 +0300 -- .../main/dashboard/config_history_controller.js | 5 +--- .../mappers/service_config_version_mapper.js| 31 ++-- 2 files changed, 17 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32aa51d9/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 a2e6f52..66ae200 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -21,10 +21,7 @@ var App = require('app'); App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin, { name: 'mainConfigHistoryController', - dataSource: App.ServiceConfigVersion.find(), - content: function () { -return this.get('dataSource').filterProperty('isRequested'); - }.property('dataSource.@each.isRequested'), + content: App.ServiceConfigVersion.find(), isPolling: false, totalCount: 0, filteredCount: 0, http://git-wip-us.apache.org/repos/asf/ambari/blob/32aa51d9/ambari-web/app/mappers/service_config_version_mapper.js -- diff --git a/ambari-web/app/mappers/service_config_version_mapper.js b/ambari-web/app/mappers/service_config_version_mapper.js index 69bc35c..20d876a 100644 --- a/ambari-web/app/mappers/service_config_version_mapper.js +++ b/ambari-web/app/mappers/service_config_version_mapper.js @@ -36,11 +36,19 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ is_compatible: 'is_cluster_compatible' }, map: function (json) { +console.time('App.serviceConfigVersionsMapper'); var result = []; var itemIds = {}; var serviceToHostMap = {}; +var currentVersionsMap = {}; if (json && json.items) { + App.ServiceConfigVersion.find().forEach(function (v) { +if (v.get('isCurrent')) { + currentVersionsMap[v.get('serviceName') + "_" + v.get('groupName')] = v; +} + }); + json.items.forEach(function (item, index) { var parsedItem = this.parseIt(item, this.get('config')); parsedItem.id = parsedItem.service_name + '_' + parsedItem.version; @@ -52,18 +60,19 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ } else { serviceToHostMap[item.service_name] = item.hosts; } + +// if loaded only latest versions(later than current), then current version should be reset +if (parsedItem.is_current && currentVersionsMap[parsedItem.service_name + "_" + parsedItem.group_name]) { + currentVersionsMap[parsedItem.service_name + "_" + parsedItem.group_name].set('isCurrent', false); +} result.push(parsedItem); }, this); - this.get('model').find().forEach(function (item) { -if (!itemIds[item.get('id')]) { - item.set('isRequested', false); -} - }); var itemTotal = parseInt(json.itemTotal); if (!isNaN(itemTotal)) { App.router.set('mainConfigHistoryController.filteredCount', itemTotal); } + /** * this code sets hostNames for default config group * by excluding hostNames that belongs to not default groups @@ -82,17 +91,9 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ } }); - result.forEach(function(v) { -if (v.is_current) { - var formerCurrent = App.ServiceConfigVersion.find().filterProperty('isCurrent').filterProperty('serviceName', v.service_name).findProperty('groupName', v.group_name); - if (formerCurrent) { -formerCurrent.set('isCurrent', false); - } -} - }); - - App.store.commit(); + this.get('model').find().clear(); App.store.loadMany(this.get('model'), result); + console.timeEnd('App.serviceConfigVersionsMapper'); } } });
ambari git commit: AMBARI-12177 Windows unit tests: Metrics unit tests: fix the imports & failing patches
Repository: ambari Updated Branches: refs/heads/trunk 1157dac6d -> 81b4febe6 AMBARI-12177 Windows unit tests: Metrics unit tests: fix the imports & failing patches Fixed the imports. Coalesced the OS mock. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81b4febe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81b4febe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81b4febe Branch: refs/heads/trunk Commit: 81b4febe63f0f2e826664567e871a8fbebe0b9b7 Parents: 1157dac Author: Florian Barca Authored: Tue Jul 21 11:33:43 2015 -0700 Committer: Florian Barca Committed: Tue Jul 21 11:35:31 2015 -0700 -- .../src/test/python/core/TestEmitter.py| 17 +++-- .../src/test/python/core/TestMetricCollector.py| 10 +- .../src/test/python/unitTests.py | 8 +--- 3 files changed, 17 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81b4febe/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestEmitter.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestEmitter.py b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestEmitter.py index a9357fb..8f5236a 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestEmitter.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestEmitter.py @@ -23,21 +23,18 @@ import urllib2 import logging from unittest import TestCase -from only_for_platform import get_platform, PLATFORM_WINDOWS +from only_for_platform import get_platform, os_distro_value, PLATFORM_WINDOWS -from mock.mock import patch, MagicMock +from ambari_commons.os_check import OSCheck -if get_platform() != PLATFORM_WINDOWS: - os_distro_value = ('Suse','11','Final') -else: - os_distro_value = ('win2012serverr2','6.3','WindowsServer') +from mock.mock import patch, MagicMock with patch("platform.linux_distribution", return_value = os_distro_value): from ambari_commons import OSCheck - from application_metric_map import ApplicationMetricMap - from config_reader import Configuration - from emitter import Emitter - from stop_handler import bind_signal_handlers + from core.application_metric_map import ApplicationMetricMap + from core.config_reader import Configuration + from core.emitter import Emitter + from core.stop_handler import bind_signal_handlers logger = logging.getLogger() http://git-wip-us.apache.org/repos/asf/ambari/blob/81b4febe/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py index 30cc023..11a85eb 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/core/TestMetricCollector.py @@ -19,12 +19,12 @@ limitations under the License. ''' import logging from unittest import TestCase - -from application_metric_map import ApplicationMetricMap -from metric_collector import MetricsCollector -from event_definition import HostMetricCollectEvent from mock.mock import patch -from host_info import HostInfo + +from core.application_metric_map import ApplicationMetricMap +from core.metric_collector import MetricsCollector +from core.event_definition import HostMetricCollectEvent +from core.host_info import HostInfo logger = logging.getLogger() http://git-wip-us.apache.org/repos/asf/ambari/blob/81b4febe/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py index 3469de1..4ffaec8 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py @@ -53,16 +53,18 @@ def get_test_files(path, mask = None, recursive=True): """ current = [] directory_items = os.listdir(path) + directory_items.sort() for item in directory_items: add_to_pythonpath = False -if os.path.isfile(path + "/" + item): +item_path = os.path.join(path, item) +if os.path.isfile(item_path): if fnmatch.fnmatch(item, mask): add_to_pythonpath = True current.append(item) -elif os.path.isd
[2/3] ambari git commit: AMBARI-12383. Gauge warning gets overflowed on service summary page.(xiwang)
AMBARI-12383. Gauge warning gets overflowed on service summary page.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4a26ccd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4a26ccd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4a26ccd Branch: refs/heads/branch-2.1 Commit: d4a26ccd04cf3546c3998461d791d422774e6169 Parents: c02b13e Author: Xi Wang Authored: Fri Jul 10 16:25:18 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:28:31 2015 -0700 -- ambari-web/app/styles/enhanced_service_dashboard.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4a26ccd/ambari-web/app/styles/enhanced_service_dashboard.less -- diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less index a734361..77d03f9 100644 --- a/ambari-web/app/styles/enhanced_service_dashboard.less +++ b/ambari-web/app/styles/enhanced_service_dashboard.less @@ -164,9 +164,10 @@ padding-top: 30px; } .overflow-warning { - font-size: 14px; + font-size: 13px; + font-weight: normal; margin-left: 10px; - padding: 10px 20px; + padding: 7px 7px; } } }
[1/3] ambari git commit: AMBARI-12206. Ambari Metrics refresh and alerts icons are overflowed.(xiwang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e60cf9780 -> ad2092cd7 AMBARI-12206. Ambari Metrics refresh and alerts icons are overflowed.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c02b13ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c02b13ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c02b13ec Branch: refs/heads/branch-2.1 Commit: c02b13ec8b09da23b0db60eaec9e8ae843bd37a0 Parents: e60cf97 Author: Xi Wang Authored: Thu Jul 9 13:40:08 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:28:08 2015 -0700 -- ambari-web/app/styles/application.less | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c02b13ec/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 6313a01..d671118 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2281,7 +2281,7 @@ a:focus { list-style: none; height: 20px; width: 20px; - margin-left: 6px; + margin-left: 2px; display: inline; float: none; } @@ -2310,7 +2310,7 @@ a:focus { padding: 1px 4px; background: @health-status-red; float: right; -margin-right: 5px; +margin-right: 1px; margin-top: 3px; &.alerts-crit-count { background: @health-status-red; @@ -2328,7 +2328,7 @@ a:focus { } .icon-laptop { color: #555; - padding-left: 5px; + padding-left: 1px; } .active { .icon-laptop { @@ -3563,7 +3563,7 @@ table.graphs { .services-menu { .icon-refresh { color: @restart-indicator-color; -margin-left: 4px; +margin-left: 1px; } } #host-details, #serviceConfig { @@ -5327,6 +5327,20 @@ i.icon-asterisks { } } } + + .services-menu .nav-list li { +.label.alerts-count { + margin-right: 4px; +} +.icon-laptop { + padding-left: 5px; +} +.health-status-LIVE, .health-status-STARTING, +.health-status-DEAD-RED, .health-status-STOPPING, +.health-status-DEAD-YELLOW { + margin-left: 6px; +} + } } .filter-combobox{
[3/3] ambari git commit: AMBARI-12452. Template widget type should show n/a if no data available.(xiwang)
AMBARI-12452. Template widget type should show n/a if no data available.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad2092cd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad2092cd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad2092cd Branch: refs/heads/branch-2.1 Commit: ad2092cd70853246fcc2eeaa3f783db63a5c3bea Parents: d4a26cc Author: Xi Wang Authored: Fri Jul 17 15:18:51 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:28:43 2015 -0700 -- ambari-web/app/mixins/common/widgets/widget_mixin.js | 4 ++-- ambari-web/app/templates/common/widget/template_widget.hbs | 2 +- ambari-web/test/mixins/common/widget_mixin_test.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad2092cd/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index ac2c6e3..c07e23e 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -406,7 +406,7 @@ App.WidgetMixin = Ember.Mixin.create({ value.computedValue = value.value.replace(this.get('EXPRESSION_REGEX'), function (match) { var float = parseFloat(computeExpression[match]); if (isNaN(float)) { - return computeExpression[match] || ""; + return computeExpression[match] || "n/a"; } else { return String((float % 1 !== 0) ? float.toFixed(2) : float); } @@ -751,4 +751,4 @@ App.WidgetLoadAggregator = Em.Object.create({ })(bulks[id]); } } -}); \ No newline at end of file +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/ad2092cd/ambari-web/app/templates/common/widget/template_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/template_widget.hbs b/ambari-web/app/templates/common/widget/template_widget.hbs index ba323ca..508c07b 100644 --- a/ambari-web/app/templates/common/widget/template_widget.hbs +++ b/ambari-web/app/templates/common/widget/template_widget.hbs @@ -30,7 +30,7 @@ {{/isAccessible}} -{{view.displayValue}} +{{{view.displayValue}}} {{#if view.content.description}} {{view.content.description}} http://git-wip-us.apache.org/repos/asf/ambari/blob/ad2092cd/ambari-web/test/mixins/common/widget_mixin_test.js -- diff --git a/ambari-web/test/mixins/common/widget_mixin_test.js b/ambari-web/test/mixins/common/widget_mixin_test.js index f0f663c..e8416d9 100644 --- a/ambari-web/test/mixins/common/widget_mixin_test.js +++ b/ambari-web/test/mixins/common/widget_mixin_test.js @@ -294,7 +294,7 @@ describe('App.WidgetMixin', function () { value: '${a}' }]); mixinObject.calculateValues(); - expect(mixinObject.get('content.values')[0].computedValue).to.be.empty; + expect(mixinObject.get('content.values')[0].computedValue).to.equal('n/a'); }); it("value is null", function () { this.mock.returns({'${a}': null}); @@ -302,7 +302,7 @@ describe('App.WidgetMixin', function () { value: '${a}' }]); mixinObject.calculateValues(); - expect(mixinObject.get('content.values')[0].computedValue).to.be.empty; + expect(mixinObject.get('content.values')[0].computedValue).to.equal('n/a'); }); });
[2/3] ambari git commit: AMBARI-12383. Gauge warning gets overflowed on service summary page.(xiwang)
AMBARI-12383. Gauge warning gets overflowed on service summary page.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8225cdb5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8225cdb5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8225cdb5 Branch: refs/heads/trunk Commit: 8225cdb5b463c655b85bd80a62665086909a9e06 Parents: a541127 Author: Xi Wang Authored: Fri Jul 10 16:25:18 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:25:05 2015 -0700 -- ambari-web/app/styles/enhanced_service_dashboard.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8225cdb5/ambari-web/app/styles/enhanced_service_dashboard.less -- diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less index a734361..77d03f9 100644 --- a/ambari-web/app/styles/enhanced_service_dashboard.less +++ b/ambari-web/app/styles/enhanced_service_dashboard.less @@ -164,9 +164,10 @@ padding-top: 30px; } .overflow-warning { - font-size: 14px; + font-size: 13px; + font-weight: normal; margin-left: 10px; - padding: 10px 20px; + padding: 7px 7px; } } }
[3/3] ambari git commit: AMBARI-12206. Ambari Metrics refresh and alerts icons are overflowed.(xiwang)
AMBARI-12206. Ambari Metrics refresh and alerts icons are overflowed.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a541127a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a541127a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a541127a Branch: refs/heads/trunk Commit: a541127a52622c75373493de2e6954da13e67690 Parents: fe55b9c Author: Xi Wang Authored: Thu Jul 9 13:40:08 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:25:05 2015 -0700 -- ambari-web/app/styles/application.less | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a541127a/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 6313a01..d671118 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2281,7 +2281,7 @@ a:focus { list-style: none; height: 20px; width: 20px; - margin-left: 6px; + margin-left: 2px; display: inline; float: none; } @@ -2310,7 +2310,7 @@ a:focus { padding: 1px 4px; background: @health-status-red; float: right; -margin-right: 5px; +margin-right: 1px; margin-top: 3px; &.alerts-crit-count { background: @health-status-red; @@ -2328,7 +2328,7 @@ a:focus { } .icon-laptop { color: #555; - padding-left: 5px; + padding-left: 1px; } .active { .icon-laptop { @@ -3563,7 +3563,7 @@ table.graphs { .services-menu { .icon-refresh { color: @restart-indicator-color; -margin-left: 4px; +margin-left: 1px; } } #host-details, #serviceConfig { @@ -5327,6 +5327,20 @@ i.icon-asterisks { } } } + + .services-menu .nav-list li { +.label.alerts-count { + margin-right: 4px; +} +.icon-laptop { + padding-left: 5px; +} +.health-status-LIVE, .health-status-STARTING, +.health-status-DEAD-RED, .health-status-STOPPING, +.health-status-DEAD-YELLOW { + margin-left: 6px; +} + } } .filter-combobox{
[1/3] ambari git commit: AMBARI-12452. Template widget type should show n/a if no data available.(xiwang)
Repository: ambari Updated Branches: refs/heads/trunk fe55b9c95 -> 1157dac6d AMBARI-12452. Template widget type should show n/a if no data available.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1157dac6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1157dac6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1157dac6 Branch: refs/heads/trunk Commit: 1157dac6d1f635bb4c46e0fb98e2c8e1ec83f388 Parents: 8225cdb Author: Xi Wang Authored: Fri Jul 17 15:18:51 2015 -0700 Committer: Xi Wang Committed: Tue Jul 21 11:25:05 2015 -0700 -- ambari-web/app/mixins/common/widgets/widget_mixin.js | 2 +- ambari-web/app/templates/common/widget/template_widget.hbs | 2 +- ambari-web/test/mixins/common/widget_mixin_test.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1157dac6/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index c96238b..1a92862 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -406,7 +406,7 @@ App.WidgetMixin = Ember.Mixin.create({ value.computedValue = value.value.replace(this.get('EXPRESSION_REGEX'), function (match) { var float = parseFloat(computeExpression[match]); if (isNaN(float)) { - return computeExpression[match] || ""; + return computeExpression[match] || "n/a"; } else { return String((float % 1 !== 0) ? float.toFixed(2) : float); } http://git-wip-us.apache.org/repos/asf/ambari/blob/1157dac6/ambari-web/app/templates/common/widget/template_widget.hbs -- diff --git a/ambari-web/app/templates/common/widget/template_widget.hbs b/ambari-web/app/templates/common/widget/template_widget.hbs index ba323ca..508c07b 100644 --- a/ambari-web/app/templates/common/widget/template_widget.hbs +++ b/ambari-web/app/templates/common/widget/template_widget.hbs @@ -30,7 +30,7 @@ {{/isAccessible}} -{{view.displayValue}} +{{{view.displayValue}}} {{#if view.content.description}} {{view.content.description}} http://git-wip-us.apache.org/repos/asf/ambari/blob/1157dac6/ambari-web/test/mixins/common/widget_mixin_test.js -- diff --git a/ambari-web/test/mixins/common/widget_mixin_test.js b/ambari-web/test/mixins/common/widget_mixin_test.js index b9885cb..3917dfc 100644 --- a/ambari-web/test/mixins/common/widget_mixin_test.js +++ b/ambari-web/test/mixins/common/widget_mixin_test.js @@ -294,7 +294,7 @@ describe('App.WidgetMixin', function () { value: '${a}' }]); mixinObject.calculateValues(); - expect(mixinObject.get('content.values')[0].computedValue).to.be.empty; + expect(mixinObject.get('content.values')[0].computedValue).to.equal('n/a'); }); it("value is null", function () { this.mock.returns({'${a}': null}); @@ -302,7 +302,7 @@ describe('App.WidgetMixin', function () { value: '${a}' }]); mixinObject.calculateValues(); - expect(mixinObject.get('content.values')[0].computedValue).to.be.empty; + expect(mixinObject.get('content.values')[0].computedValue).to.equal('n/a'); }); });
ambari git commit: AMBARI-12440. RU: hdp-select set all should be called before finalize (ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.1 650857c39 -> e60cf9780 AMBARI-12440. RU: hdp-select set all should be called before finalize (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e60cf978 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e60cf978 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e60cf978 Branch: refs/heads/branch-2.1 Commit: e60cf9780a94e11919039c2185970716d6086a63 Parents: 650857c Author: Nate Cole Authored: Tue Jul 21 13:55:40 2015 -0400 Committer: Nate Cole Committed: Tue Jul 21 13:55:40 2015 -0400 -- .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 15 --- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 16 +--- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 16 +--- .../ambari/server/state/UpgradeHelperTest.java| 8 +++- .../server/state/stack/UpgradePackTest.java | 18 ++ .../HDP/2.1.1/upgrades/upgrade_direction.xml | 9 + 6 files changed, 56 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e60cf978/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml index 95834fd..fedba07 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml @@ -267,6 +267,14 @@ + + + + scripts/ru_set_all.py + actionexecute + + + true @@ -290,13 +298,6 @@ - - - scripts/ru_set_all.py - actionexecute - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/e60cf978/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 20e1a37..5cc30b2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -287,6 +287,15 @@ + + + + scripts/ru_set_all.py + actionexecute + + + + true @@ -309,13 +318,6 @@ - - - scripts/ru_set_all.py - actionexecute - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/e60cf978/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml index 938d16d..ba16159 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml @@ -307,6 +307,15 @@ + + + + scripts/ru_set_all.py + actionexecute + + + + true @@ -329,13 +338,6 @@ - - - scripts/ru_set_all.py - actionexecute - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/e60cf978/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java index f5a4a54..6267f53 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java @@ -940,11 +940,17 @@ public class UpgradeHelperTest { assertNotNull(upgrade); List groups = m_upgradeHelper.createSequence(upgrade, context); -assertEquals(1, groups.size()); +assertEquals(2, groups.size()); UpgradeGroupHolder group = groups.get(0); +assertEquals(1, group.items.size()); +assertEquals("PRE_POST_CLUSTER", group.name); + +group = groups.get(1); +assertEquals("POST_CLUSTER",
ambari git commit: AMBARI-12038 Windows unit tests: Server unit tests: fix the imports & failing patches
Repository: ambari Updated Branches: refs/heads/trunk 53969a530 -> fe55b9c95 AMBARI-12038 Windows unit tests: Server unit tests: fix the imports & failing patches Fixed the imports. Coalesced the OS mock. Excluded the obviously inapplicable Windows tests (Atlas, Ganglia, Kerberos, Mahout, NFSGateway, Phoenix, Ranger, Spark). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fe55b9c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fe55b9c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fe55b9c9 Branch: refs/heads/trunk Commit: fe55b9c9555f21c224c00af3ec58f1511cb084d2 Parents: 53969a5 Author: Florian Barca Authored: Tue Jul 21 09:36:33 2015 -0700 Committer: Florian Barca Committed: Tue Jul 21 09:42:36 2015 -0700 -- .../0.1.0/package/scripts/params_windows.py| 13 ++--- ambari-server/src/test/python/TestAmbariServer.py | 11 ++- ambari-server/src/test/python/TestBootstrap.py | 4 ++-- ambari-server/src/test/python/TestValidateConfigs.py | 5 - .../src/test/python/custom_actions/TestCheckHost.py| 5 + .../test/python/custom_actions/TestInstallPackages.py | 8 ++-- .../src/test/python/host_scripts/TestAlertDiskSpace.py | 6 +- .../stacks/2.0.6/GANGLIA/test_ganglia_monitor.py | 2 ++ .../python/stacks/2.0.6/GANGLIA/test_ganglia_server.py | 3 +++ .../stacks/2.0.6/HBASE/test_phoenix_queryserver.py | 5 +++-- .../test/python/stacks/2.0.6/HDFS/test_nfsgateway.py | 3 +++ .../test/python/stacks/2.0.6/HIVE/test_mysql_server.py | 3 +++ .../python/stacks/2.2/ACCUMULO/test_accumulo_client.py | 2 ++ .../test/python/stacks/2.2/KAFKA/test_kafka_broker.py | 3 +++ .../python/stacks/2.2/KERBEROS/test_kerberos_client.py | 2 ++ .../python/stacks/2.2/KERBEROS/test_kerberos_server.py | 3 +++ .../test/python/stacks/2.2/RANGER/test_ranger_admin.py | 3 +++ .../python/stacks/2.2/RANGER/test_ranger_usersync.py | 3 +++ .../python/stacks/2.2/SPARK/test_job_history_server.py | 3 +++ .../test/python/stacks/2.2/SPARK/test_spark_client.py | 3 +++ .../stacks/2.2/SPARK/test_spark_service_check.py | 3 +++ .../python/stacks/2.3/ATLAS/test_metadata_server.py| 2 ++ .../python/stacks/2.3/MAHOUT/test_mahout_client.py | 3 +++ .../stacks/2.3/MAHOUT/test_mahout_service_check.py | 5 - 24 files changed, 78 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fe55b9c9/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py index acb5bba..8eaee70 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py @@ -46,8 +46,15 @@ except: ams_monitor_conf_dir = None ams_monitor_home_dir = None -hadoop_native_lib = os.path.join(os.environ["HADOOP_HOME"], "bin") -hadoop_bin_dir = os.path.join(os.environ["HADOOP_HOME"], "bin") -hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") +hadoop_native_lib = None +hadoop_bin_dir = None +hadoop_conf_dir = None + +try: + hadoop_native_lib = os.path.join(os.environ["HADOOP_HOME"], "bin") + hadoop_bin_dir = os.path.join(os.environ["HADOOP_HOME"], "bin") + hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") +except: + pass from service_mapping import * http://git-wip-us.apache.org/repos/asf/ambari/blob/fe55b9c9/ambari-server/src/test/python/TestAmbariServer.py -- diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py index 795ea0a..0981a49 100644 --- a/ambari-server/src/test/python/TestAmbariServer.py +++ b/ambari-server/src/test/python/TestAmbariServer.py @@ -34,14 +34,10 @@ import StringIO import tempfile from unittest import TestCase -from only_for_platform import get_platform, not_for_platform, only_for_platform, PLATFORM_LINUX, PLATFORM_WINDOWS +from only_for_platform import get_platform, not_for_platform, only_for_platform, os_distro_value, PLATFORM_LINUX, PLATFORM_WINDOWS if get_platform() != PLATFORM_WINDOWS: - os_distro_value = ('Suse','11','Final') from pwd import getpwnam -else: - #No Windows tests for now, but start getting prepared - os_distro_value = ('win2012serverr2','6.3','WindowsServer') # We have to use this import
ambari git commit: AMBARI-12027 ambari-server unit tests: HDP stack test suite freezes on test error/failure
Repository: ambari Updated Branches: refs/heads/trunk 4e2b2d848 -> 53969a530 AMBARI-12027 ambari-server unit tests: HDP stack test suite freezes on test error/failure Avoided waiting on the results queue Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/53969a53 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/53969a53 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/53969a53 Branch: refs/heads/trunk Commit: 53969a5304fdba6ceb809fb90aff02b0243a1689 Parents: 4e2b2d8 Author: Florian Barca Authored: Tue Jul 21 09:35:48 2015 -0700 Committer: Florian Barca Committed: Tue Jul 21 09:42:36 2015 -0700 -- ambari-server/src/test/python/unitTests.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/53969a53/ambari-server/src/test/python/unitTests.py -- diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py index 7ad3add..f16c280 100644 --- a/ambari-server/src/test/python/unitTests.py +++ b/ambari-server/src/test/python/unitTests.py @@ -20,6 +20,7 @@ import unittest import multiprocessing import os import sys +from Queue import Empty from random import shuffle import fnmatch import tempfile @@ -187,11 +188,19 @@ def main(): executor_result) ) process.start() -process.join() -#for pretty output -sys.stdout.flush() -sys.stderr.flush() -variant_result = executor_result.get() +while process.is_alive(): + process.join(10) + + #for pretty output + sys.stdout.flush() + sys.stderr.flush() + + try: +variant_result = executor_result.get_nowait() +break + except Empty as ex: +pass + test_runs += variant_result['tests_run'] test_errors.extend(variant_result['errors']) test_failures.extend(variant_result['failures'])
ambari git commit: AMBARI-12036 Windows unit tests: Agent unit tests: fix the imports & failing patches
Repository: ambari Updated Branches: refs/heads/trunk 99cac719d -> 4e2b2d848 AMBARI-12036 Windows unit tests: Agent unit tests: fix the imports & failing patches Excluded the inapplicable tests for now. Coalesced the OS mock. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e2b2d84 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e2b2d84 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e2b2d84 Branch: refs/heads/trunk Commit: 4e2b2d8481260f1d2c06c2251b97a4105e987be7 Parents: 99cac71 Author: Florian Barca Authored: Tue Jul 21 09:35:04 2015 -0700 Committer: Florian Barca Committed: Tue Jul 21 09:40:52 2015 -0700 -- .../test/python/ambari_agent/TestActionQueue.py | 24 +++--- .../ambari_agent/TestActualConfigHandler.py | 7 +- .../python/ambari_agent/TestCertGeneration.py | 12 +-- .../test/python/ambari_agent/TestController.py | 6 +- .../TestCustomServiceOrchestrator.py| 25 +++--- .../test/python/ambari_agent/TestDataCleaner.py | 9 +-- .../test/python/ambari_agent/TestFileCache.py | 4 +- .../test/python/ambari_agent/TestHostInfo.py| 4 +- .../test/python/ambari_agent/TestHostname.py| 11 +-- .../test/python/ambari_agent/TestLiveStatus.py | 7 +- .../src/test/python/ambari_agent/TestMain.py| 55 ++--- .../src/test/python/ambari_agent/TestNetUtil.py | 9 +-- .../python/ambari_agent/TestPythonExecutor.py | 11 +-- .../test/python/ambari_agent/TestSecurity.py| 7 +- .../test/python/ambari_agent/TestStatusCheck.py | 7 +- .../resource_management/TestContentSources.py | 5 +- .../TestDirectoryResource.py| 65 .../resource_management/TestExecuteResource.py | 13 ++-- .../resource_management/TestFileResource.py | 81 ++-- .../resource_management/TestGroupResource.py| 20 +++-- .../resource_management/TestLinkResource.py | 36 - .../TestPropertiesFileResource.py | 36 + .../TestRepositoryResource.py | 10 ++- .../resource_management/TestUserResource.py | 32 .../TestXmlConfigResource.py| 32 .../src/test/python/only_for_platform.py| 5 ++ 26 files changed, 256 insertions(+), 277 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4e2b2d84/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py index 4e130f9..5a22843 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py +++ b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py @@ -36,14 +36,9 @@ from ambari_agent.PythonExecutor import PythonExecutor from ambari_agent.CommandStatusDict import CommandStatusDict from ambari_agent.ActualConfigHandler import ActualConfigHandler from ambari_agent.RecoveryManager import RecoveryManager -from FileCache import FileCache +from ambari_agent.FileCache import FileCache from ambari_commons import OSCheck -from only_for_platform import only_for_platform, get_platform, not_for_platform, PLATFORM_LINUX, PLATFORM_WINDOWS - -if get_platform() != PLATFORM_WINDOWS: - os_distro_value = ('Suse','11','Final') -else: - os_distro_value = ('win2012serverr2','6.3','WindowsServer') +from only_for_platform import not_for_platform, os_distro_value, PLATFORM_WINDOWS class TestActionQueue(TestCase): def setUp(self): @@ -818,9 +813,12 @@ class TestActionQueue(TestCase): self.assertEqual(2, sleep_mock.call_count) sleep_mock.assert_has_calls([call(2), call(3)], False) runCommand_mock.assert_has_calls([ - call(command, '/tmp/ambari-agent/output-19.txt', '/tmp/ambari-agent/errors-19.txt', override_output_files=True, retry=False), - call(command, '/tmp/ambari-agent/output-19.txt', '/tmp/ambari-agent/errors-19.txt', override_output_files=False, retry=True), - call(command, '/tmp/ambari-agent/output-19.txt', '/tmp/ambari-agent/errors-19.txt', override_output_files=False, retry=True)]) + call(command, os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'output-19.txt', + os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'errors-19.txt', override_output_files=True, retry=False), + call(command, os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'output-19.txt', + os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'errors-19.txt', override_output_files=False, retry=True), + call(command, os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'output-19.txt', + os.sep + 'tmp' + os.sep + 'ambari-agent' + os.sep + 'errors-19.txt', override_output_files
ambari git commit: AMBARI-12469 Ambari Web Scalability: performance analysis. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk e7726e447 -> 99cac719d AMBARI-12469 Ambari Web Scalability: performance analysis. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99cac719 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99cac719 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99cac719 Branch: refs/heads/trunk Commit: 99cac719dbcbb97f35b58be730cc3f856156f13a Parents: e7726e4 Author: Andrii Tkach Authored: Tue Jul 21 19:39:11 2015 +0300 Committer: Andrii Tkach Committed: Tue Jul 21 19:39:11 2015 +0300 -- ambari-web/app/controllers/main/host.js | 13 +-- ambari-web/app/controllers/main/host/details.js | 1 + .../app/mappers/component_config_mapper.js | 1 - ambari-web/app/mappers/hosts_mapper.js | 42 +++--- ambari-web/app/mappers/server_data_mapper.js| 36 .../app/mappers/service_metrics_mapper.js | 87 .../mixins/common/table_server_view_mixin.js| 8 +- ambari-web/app/models/host.js | 51 +--- ambari-web/app/models/service.js| 8 +- ambari-web/app/models/service/hbase.js | 4 +- ambari-web/app/models/service/hdfs.js | 12 +-- ambari-web/app/models/service/mapreduce2.js | 4 +- ambari-web/app/models/service/yarn.js | 12 +-- .../main/dashboard/widgets/flume_agent_live.js | 24 -- ambari-web/app/views/main/host.js | 15 ++-- .../test/mappers/server_data_mapper_test.js | 6 +- ambari-web/test/mappers/service_mapper_test.js | 12 +++ ambari-web/test/models/host_test.js | 4 +- ambari-web/test/models/service/hdfs_test.js | 56 + ambari-web/test/models/service_test.js | 16 ++-- 20 files changed, 185 insertions(+), 227 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/99cac719/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index a798f0b..9d8347c 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -54,18 +54,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { return installedComponents; }.property('App.router.clusterController.isLoaded'), - content: [], - - requestedObserver: function() { -Em.run.once(this, 'setContentOnce'); - }.observes('dataSource.@each.isRequested'), - - setContentOnce: function() { -var self = this; -Em.run.next(function() { - self.set('content', self.get('dataSource').filterProperty('isRequested')); -}); - }, + content: App.Host.find(), allHostStackVersions: App.HostStackVersion.find(), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/99cac719/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index c3a17ca..aaca4f0 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -382,6 +382,7 @@ App.MainHostDetailsController = Em.Controller.extend({ */ removeHostComponentModel: function(componentName, hostName) { var component = App.HostComponent.find().filterProperty('componentName', componentName).findProperty('hostName', hostName); +App.cache['services'].findProperty('ServiceInfo.service_name', component.get('serviceName')).host_components.without(component.get('id')); App.serviceMapper.deleteRecord(component); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/99cac719/ambari-web/app/mappers/component_config_mapper.js -- diff --git a/ambari-web/app/mappers/component_config_mapper.js b/ambari-web/app/mappers/component_config_mapper.js index dddb79a..334fd57 100644 --- a/ambari-web/app/mappers/component_config_mapper.js +++ b/ambari-web/app/mappers/component_config_mapper.js @@ -42,7 +42,6 @@ App.componentConfigMapper = App.QuickDataMapper.create({ // We do not want to parse JSON if there is no need to var hostComponentJsonMap = {}; var hostComponentJsonIds = []; -var hostComponentLoaded = {}; if (json.items.length > 0 || this.get('model').find().someProperty('staleConfigs', true)) { json.items.forEach(function (item) { http://git-wip-us.apache.org/repos/asf/ambari/blob/99cac719/ambari-web/app/mappers/hosts_mapper.js -- diff --git a/ambari-web/app/mappers/hosts_mapper.js b/ambari-w
ambari git commit: AMBARI-12469 Ambari Web Scalability: performance analysis. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.1 1b84c3448 -> 650857c39 AMBARI-12469 Ambari Web Scalability: performance analysis. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/650857c3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/650857c3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/650857c3 Branch: refs/heads/branch-2.1 Commit: 650857c39d7e6aeee66b5e314021500bf81d32a9 Parents: 1b84c34 Author: Andrii Tkach Authored: Tue Jul 21 13:08:15 2015 +0300 Committer: Andrii Tkach Committed: Tue Jul 21 19:04:25 2015 +0300 -- ambari-web/app/controllers/main/host.js | 13 +-- ambari-web/app/controllers/main/host/details.js | 1 + .../app/mappers/component_config_mapper.js | 1 - ambari-web/app/mappers/hosts_mapper.js | 42 +++--- ambari-web/app/mappers/server_data_mapper.js| 36 .../app/mappers/service_metrics_mapper.js | 87 .../mixins/common/table_server_view_mixin.js| 8 +- ambari-web/app/models/host.js | 51 +--- ambari-web/app/models/service.js| 8 +- ambari-web/app/models/service/hbase.js | 4 +- ambari-web/app/models/service/hdfs.js | 12 +-- ambari-web/app/models/service/mapreduce2.js | 4 +- ambari-web/app/models/service/yarn.js | 12 +-- .../main/dashboard/widgets/flume_agent_live.js | 24 -- ambari-web/app/views/main/host.js | 15 ++-- .../test/mappers/server_data_mapper_test.js | 6 +- ambari-web/test/mappers/service_mapper_test.js | 12 +++ ambari-web/test/models/host_test.js | 4 +- ambari-web/test/models/service/hdfs_test.js | 56 + ambari-web/test/models/service_test.js | 16 ++-- 20 files changed, 185 insertions(+), 227 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/650857c3/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index a798f0b..9d8347c 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -54,18 +54,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { return installedComponents; }.property('App.router.clusterController.isLoaded'), - content: [], - - requestedObserver: function() { -Em.run.once(this, 'setContentOnce'); - }.observes('dataSource.@each.isRequested'), - - setContentOnce: function() { -var self = this; -Em.run.next(function() { - self.set('content', self.get('dataSource').filterProperty('isRequested')); -}); - }, + content: App.Host.find(), allHostStackVersions: App.HostStackVersion.find(), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/650857c3/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 94ba5ec..87da8c2 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -382,6 +382,7 @@ App.MainHostDetailsController = Em.Controller.extend({ */ removeHostComponentModel: function(componentName, hostName) { var component = App.HostComponent.find().filterProperty('componentName', componentName).findProperty('hostName', hostName); +App.cache['services'].findProperty('ServiceInfo.service_name', component.get('serviceName')).host_components.without(component.get('id')); App.serviceMapper.deleteRecord(component); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/650857c3/ambari-web/app/mappers/component_config_mapper.js -- diff --git a/ambari-web/app/mappers/component_config_mapper.js b/ambari-web/app/mappers/component_config_mapper.js index dddb79a..334fd57 100644 --- a/ambari-web/app/mappers/component_config_mapper.js +++ b/ambari-web/app/mappers/component_config_mapper.js @@ -42,7 +42,6 @@ App.componentConfigMapper = App.QuickDataMapper.create({ // We do not want to parse JSON if there is no need to var hostComponentJsonMap = {}; var hostComponentJsonIds = []; -var hostComponentLoaded = {}; if (json.items.length > 0 || this.get('model').find().someProperty('staleConfigs', true)) { json.items.forEach(function (item) { http://git-wip-us.apache.org/repos/asf/ambari/blob/650857c3/ambari-web/app/mappers/hosts_mapper.js -- diff --git a/ambari-web/app/mappers/hosts_mapper.js
ambari git commit: AMBARI-12477 Optimize stackConfigPropertiesMapper execution time. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 88d38ab3a -> 1b84c3448 AMBARI-12477 Optimize stackConfigPropertiesMapper execution time. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b84c344 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b84c344 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b84c344 Branch: refs/heads/branch-2.1 Commit: 1b84c34480360c1b0b4dc4bc9685095cd1e06407 Parents: 88d38ab Author: aBabiichuk Authored: Tue Jul 21 18:22:08 2015 +0300 Committer: aBabiichuk Committed: Tue Jul 21 18:22:08 2015 +0300 -- ambari-web/app/data/HDP2/site_properties.js | 1 + .../configs/stack_config_properties_mapper.js | 59 +--- ambari-web/app/utils/config.js | 43 +++--- .../main/service/info/config_test.js| 26 + .../stack_config_properties_mapper_test.js | 4 +- ambari-web/test/utils/config_test.js| 14 - 6 files changed, 93 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b84c344/ambari-web/app/data/HDP2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index d946900..e359a41 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -181,6 +181,7 @@ var hdp2properties = [ "isRequiredByAgent": false, "isVisible": false, "category": "Advanced hdfs-site", +"filename": "hdfs-site.xml", "serviceName": "HDFS" }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/1b84c344/ambari-web/app/mappers/configs/stack_config_properties_mapper.js -- diff --git a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js index 5913943..09f3cf9 100644 --- a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js +++ b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js @@ -63,6 +63,20 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ type : dep.StackConfigurationDependency.dependency_type, name : dep.StackConfigurationDependency.dependency_name }); + var service = App.StackService.find(config.StackConfigurations.service_name); + var dependentService = App.config.getServiceByConfigType(dep.StackConfigurationDependency.dependency_type); + if (dependentService && service && dependentService.get('serviceName') != service.get('serviceName') && !service.get('dependentServiceNames').contains(dependentService.get('serviceName'))) { +service.set('dependentServiceNames', service.get('dependentServiceNames').concat(dependentService.get('serviceName'))); + } +}); + } + if (Em.get(config, 'config.StackConfigurations.property_depends_on.length') > 0) { + config.StackConfigurations.property_depends_on.forEach(function(dep) { + var service = App.StackService.find(config.StackConfigurations.service_name); + var dependentService = App.config.getServiceByConfigType(dep.type); + if (dependentService && service && dependentService.get('serviceName') != service.get('serviceName') && !service.get('dependentServiceNames').contains(dependentService.get('serviceName'))) { +service.set('dependentServiceNames', service.get('dependentServiceNames').concat(dependentService.get('serviceName'))); + } }); } /** @@ -75,10 +89,6 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ }, this); }, this); App.store.loadMany(this.get('model'), configs); - - App.StackService.find().filterProperty('id').forEach(function(service) { -this.setDependentServices(service); - }, this); } console.timeEnd('stackConfigMapper execution time'); }, @@ -110,45 +120,6 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ * @method getUIConfig */ getUIConfig: function(propertyName, siteName) { -return App.config.get('preDefinedSiteProperties').filterProperty('filename', siteName).findProperty('name', propertyName); - }, - - /** - * runs setDependentServicesAndFileNames - * for stack properties for current service - * @method loadDependentConfigs - */ - setDependentServices: function(service) { -App.StackConfigProperty.find().filterProperty('serviceName', service.get('serviceName')).forEach(function(stackPropert
ambari git commit: AMBARI-12450. Kerberos: ServiceResourceProvider queries for KDC connectivity when not needed (rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.1 67df5c6e4 -> 88d38ab3a AMBARI-12450. Kerberos: ServiceResourceProvider queries for KDC connectivity when not needed (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/88d38ab3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/88d38ab3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/88d38ab3 Branch: refs/heads/branch-2.1 Commit: 88d38ab3a6b26d9b23666f661da69d8253385880 Parents: 67df5c6 Author: Robert Levas Authored: Tue Jul 21 11:04:07 2015 -0400 Committer: Robert Levas Committed: Tue Jul 21 11:04:12 2015 -0400 -- .../controller/internal/BaseProvider.java | 4 +- .../internal/ServiceResourceProvider.java | 60 ++--- .../internal/ServiceResourceProviderTest.java | 71 3 files changed, 107 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/88d38ab3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java index ca5e70e..9024a7e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java @@ -384,7 +384,7 @@ public abstract class BaseProvider { * * @return true if the given property is a category for any of the requested ids */ - private static boolean isPropertyEntryRequested(String propertyId, Set requestedIds) { + protected static boolean isPropertyEntryRequested(String propertyId, Set requestedIds) { for (String requestedId : requestedIds) { if (requestedId.startsWith(propertyId)) { return true; @@ -403,7 +403,7 @@ public abstract class BaseProvider { * * @return true if the given property's category is part of the given set of requested ids */ - private static boolean isPropertyCategoryRequested(String propertyId, Set requestedIds) { + protected static boolean isPropertyCategoryRequested(String propertyId, Set requestedIds) { String category = PropertyHelper.getPropertyCategory(propertyId); while (category != null ) { if (requestedIds.contains(category)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/88d38ab3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index a13bbd3..a79c04b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -89,6 +89,8 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider public static final String SERVICE_SERVICE_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("ServiceInfo", "state"); public static final String SERVICE_MAINTENANCE_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("ServiceInfo", "maintenance_state"); + public static final String SERVICE_ATTRIBUTES_PROPERTY_ID = PropertyHelper.getPropertyId("Services", "attributes"); + //Parameters from the predicate private static final String QUERY_PARAMETERS_RUN_SMOKE_TEST_ID = "params/run_smoke_test"; @@ -200,7 +202,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider response.getMaintenanceState(), requestedIds); Map serviceSpecificProperties = getServiceSpecificProperties( - response.getClusterName(), response.getServiceName()); + response.getClusterName(), response.getServiceName(), requestedIds); for (Map.Entry entry : serviceSpecificProperties.entrySet()) { setResourceProperty(resource, entry.getKey(), entry.getValue(), requestedIds); @@ -1387,35 +1389,41 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider * * @param clusterName cluster name * @param serviceName service name + * @param requestedIds relevant request property ids */ - private Map getServiceSpecificProperties(String clusterName, String serviceName) { + private Map getServiceSpecificProperties(String clusterName, String serviceName, Set requestedIds) {
ambari git commit: AMBARI-12477 Optimize stackConfigPropertiesMapper execution time. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk a30d31795 -> e7726e447 AMBARI-12477 Optimize stackConfigPropertiesMapper execution time. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7726e44 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7726e44 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7726e44 Branch: refs/heads/trunk Commit: e7726e44773db9d3ba506c9bdff99a1eca158b24 Parents: a30d317 Author: aBabiichuk Authored: Tue Jul 21 17:50:08 2015 +0300 Committer: aBabiichuk Committed: Tue Jul 21 17:50:08 2015 +0300 -- .../configs/stack_config_properties_mapper.js | 57 +--- .../stack_config_properties_mapper_test.js | 2 + 2 files changed, 16 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7726e44/ambari-web/app/mappers/configs/stack_config_properties_mapper.js -- diff --git a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js index 0fc5340..e907020 100644 --- a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js +++ b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js @@ -72,6 +72,20 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ type : dep.StackConfigurationDependency.dependency_type, name : dep.StackConfigurationDependency.dependency_name }); + var service = App.StackService.find(config.StackConfigurations.service_name); + var dependentService = App.config.getServiceByConfigType(dep.StackConfigurationDependency.dependency_type); + if (dependentService && service && dependentService.get('serviceName') != service.get('serviceName') && !service.get('dependentServiceNames').contains(dependentService.get('serviceName'))) { +service.set('dependentServiceNames', service.get('dependentServiceNames').concat(dependentService.get('serviceName'))); + } +}); + } + if (Em.get(config, 'config.StackConfigurations.property_depends_on.length') > 0) { + config.StackConfigurations.property_depends_on.forEach(function(dep) { + var service = App.StackService.find(config.StackConfigurations.service_name); + var dependentService = App.config.getServiceByConfigType(dep.type); + if (dependentService && service && dependentService.get('serviceName') != service.get('serviceName') && !service.get('dependentServiceNames').contains(dependentService.get('serviceName'))) { +service.set('dependentServiceNames', service.get('dependentServiceNames').concat(dependentService.get('serviceName'))); + } }); } /** @@ -84,10 +98,6 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ }, this); }, this); App.store.loadMany(this.get('model'), configs); - - App.StackService.find().filterProperty('id').forEach(function(service) { -this.setDependentServices(service); - }, this); } console.timeEnd('stackConfigPropertiesMapper execution time'); }, @@ -125,44 +135,5 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({ */ getUIConfig: function(propertyName, siteName) { return App.config.get('preDefinedSitePropertiesMap')[App.config.configId(propertyName, siteName)]; - }, - - /** - * runs setDependentServicesAndFileNames - * for stack properties for current service - * @method loadDependentConfigs - */ - setDependentServices: function(service) { -App.StackConfigProperty.find().filterProperty('serviceName', service.get('serviceName')).forEach(function(stackProperty) { - if (stackProperty.get('propertyDependedBy.length')) { -this._setDependentServices(stackProperty, 'propertyDependedBy', service); - } - if (stackProperty.get('propertyDependsOn.length')) { -this._setDependentServices(stackProperty, 'propertyDependsOn', service); - } -}, this); - }, - /** - * defines service names for configs and set them to dependentServiceNames - * @param {App.StackConfigProperty} stackProperty - * @param {String} [key='propertyDependedBy'] - attribute to check dependent configs - * @param service - * @private - */ - _setDependentServices: function(stackProperty, key, service) { -key = key || 'propertyDependedBy'; -if (stackProperty.get(key + '.length') > 0) { - stackProperty.get(key).forEach(function(dependent) { -var tag = App.config.getConfigTagFromFileName(dependent.type); -/** setting dependent
ambari git commit: AMBARI-12395. Loading Admin > Stacks and Versions > Versions is extremely slow (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ceab346d7 -> 67df5c6e4 AMBARI-12395. Loading Admin > Stacks and Versions > Versions is extremely slow (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67df5c6e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67df5c6e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67df5c6e Branch: refs/heads/branch-2.1 Commit: 67df5c6e4f12035dcb006de5f22da82eea04f6f2 Parents: ceab346 Author: Alex Antonenko Authored: Tue Jul 21 17:34:46 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:52:42 2015 +0300 -- ambari-web/app/views/main/admin/stack_upgrade/versions_view.js | 2 +- .../test/views/main/admin/stack_upgrade/version_view_test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/67df5c6e/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js -- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js index 195320f..0e21794 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js @@ -195,7 +195,7 @@ App.MainAdminStackVersionsView = Em.View.extend({ * load ClusterStackVersions data */ willInsertElement: function () { -this.doPolling(); +this.poll(); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/67df5c6e/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js -- diff --git a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js index 8090482..a46cd0c 100644 --- a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js +++ b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js @@ -318,14 +318,14 @@ describe('App.mainAdminStackVersionsView', function () { describe("#willInsertElement()", function() { before(function () { - sinon.stub(view, 'doPolling', Em.K); + sinon.stub(view, 'poll', Em.K); }); after(function () { - view.doPolling.restore(); + view.poll.restore(); }); it("", function() { view.willInsertElement(); - expect(view.doPolling.calledOnce).to.be.true; + expect(view.poll.calledOnce).to.be.true; }); });
ambari git commit: AMBARI-12395. Loading Admin > Stacks and Versions > Versions is extremely slow (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 82589fc4d -> a30d31795 AMBARI-12395. Loading Admin > Stacks and Versions > Versions is extremely slow (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a30d3179 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a30d3179 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a30d3179 Branch: refs/heads/trunk Commit: a30d31795e2ed830e10e6dc0cc78a9f1191cef43 Parents: 82589fc Author: Alex Antonenko Authored: Tue Jul 21 17:34:46 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:34:46 2015 +0300 -- ambari-web/app/views/main/admin/stack_upgrade/versions_view.js | 2 +- .../test/views/main/admin/stack_upgrade/version_view_test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a30d3179/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js -- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js index 195320f..0e21794 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js @@ -195,7 +195,7 @@ App.MainAdminStackVersionsView = Em.View.extend({ * load ClusterStackVersions data */ willInsertElement: function () { -this.doPolling(); +this.poll(); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/a30d3179/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js -- diff --git a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js index 8090482..a46cd0c 100644 --- a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js +++ b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js @@ -318,14 +318,14 @@ describe('App.mainAdminStackVersionsView', function () { describe("#willInsertElement()", function() { before(function () { - sinon.stub(view, 'doPolling', Em.K); + sinon.stub(view, 'poll', Em.K); }); after(function () { - view.doPolling.restore(); + view.poll.restore(); }); it("", function() { view.willInsertElement(); - expect(view.doPolling.calledOnce).to.be.true; + expect(view.poll.calledOnce).to.be.true; }); });
[1/2] ambari git commit: AMBARI-12470. Can't switch config group on the host's configs page (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a30f44912 -> ceab346d7 AMBARI-12470. Can't switch config group on the host's configs page (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ceab346d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ceab346d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ceab346d Branch: refs/heads/branch-2.1 Commit: ceab346d76105a4de5e4561f3ff2879d9957a76f Parents: 2da898b Author: Alex Antonenko Authored: Tue Jul 21 17:24:23 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:30:08 2015 +0300 -- ambari-web/app/mixins/main/service/configs/config_overridable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ceab346d/ambari-web/app/mixins/main/service/configs/config_overridable.js -- diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js index 324ce1e..f2a3916 100644 --- a/ambari-web/app/mixins/main/service/configs/config_overridable.js +++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js @@ -271,6 +271,7 @@ App.ConfigOverridable = Em.Mixin.create({ * @method updateConfigurationGroup */ updateConfigurationGroup: function (configGroup, successCallback, errorCallback) { +var configSiteTags = configGroup.get('configSiteTags') || []; var putConfigGroup = { ConfigGroup: { group_name: configGroup.get('name'), @@ -281,7 +282,7 @@ App.ConfigOverridable = Em.Mixin.create({ host_name: h }; }), -desired_configs: configGroup.get('configSiteTags').map(function (cst) { +desired_configs: configSiteTags.map(function (cst) { return { type: cst.get('site'), tag: cst.get('tag')
[2/2] ambari git commit: AMBARI-12471. Unsaved Configs popup appears when switching config versions quickly (alexantonenko)
AMBARI-12471. Unsaved Configs popup appears when switching config versions quickly (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2da898b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2da898b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2da898b8 Branch: refs/heads/branch-2.1 Commit: 2da898b8c078f965e606e35d54245c23063493fb Parents: a30f449 Author: Alex Antonenko Authored: Tue Jul 21 17:08:11 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:30:08 2015 +0300 -- .../views/common/configs/config_history_flow.js | 25 1 file changed, 20 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2da898b8/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 364d1c5..4f11bfd 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -118,6 +118,17 @@ App.ConfigHistoryFlowView = Em.View.extend({ }.property('serviceName', 'controller.selectedConfigGroup.name'), /** + * disable versions visible to the user to prevent actions on them + */ + disableVersions: function () { +var allServiceVersions = App.ServiceConfigVersion.find().filterProperty('serviceName', this.get('serviceName')); + +allServiceVersions.forEach(function (version) { + version.set('isDisabled', true); +}, this); + }, + + /** * service versions which in viewport and visible to user */ visibleServiceVersion: function () { @@ -309,11 +320,15 @@ App.ConfigHistoryFlowView = Em.View.extend({ self[type].call(self, event); } -if (controller.hasUnsavedChanges()) { - controller.showSavePopup(null, callback); - return; -} -callback(); +Em.run.next(function() { + if (controller.hasUnsavedChanges()) { +controller.showSavePopup(null, callback); +return; + } + + self.disableVersions(); + callback(); +}); }, /**
[1/2] ambari git commit: AMBARI-12471. Unsaved Configs popup appears when switching config versions quickly (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 1472e1b09 -> 82589fc4d AMBARI-12471. Unsaved Configs popup appears when switching config versions quickly (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c0a52967 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c0a52967 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c0a52967 Branch: refs/heads/trunk Commit: c0a5296759ea5e79b54535cc6808a601a3e116ba Parents: 1472e1b Author: Alex Antonenko Authored: Tue Jul 21 17:08:11 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:08:11 2015 +0300 -- .../views/common/configs/config_history_flow.js | 25 1 file changed, 20 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c0a52967/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 364d1c5..4f11bfd 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -118,6 +118,17 @@ App.ConfigHistoryFlowView = Em.View.extend({ }.property('serviceName', 'controller.selectedConfigGroup.name'), /** + * disable versions visible to the user to prevent actions on them + */ + disableVersions: function () { +var allServiceVersions = App.ServiceConfigVersion.find().filterProperty('serviceName', this.get('serviceName')); + +allServiceVersions.forEach(function (version) { + version.set('isDisabled', true); +}, this); + }, + + /** * service versions which in viewport and visible to user */ visibleServiceVersion: function () { @@ -309,11 +320,15 @@ App.ConfigHistoryFlowView = Em.View.extend({ self[type].call(self, event); } -if (controller.hasUnsavedChanges()) { - controller.showSavePopup(null, callback); - return; -} -callback(); +Em.run.next(function() { + if (controller.hasUnsavedChanges()) { +controller.showSavePopup(null, callback); +return; + } + + self.disableVersions(); + callback(); +}); }, /**
[2/2] ambari git commit: AMBARI-12470. Can't switch config group on the host's configs page (alexantonenko)
AMBARI-12470. Can't switch config group on the host's configs page (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82589fc4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82589fc4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82589fc4 Branch: refs/heads/trunk Commit: 82589fc4d060443a88d3709631a9f07edc11e715 Parents: c0a5296 Author: Alex Antonenko Authored: Tue Jul 21 17:24:23 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 17:24:23 2015 +0300 -- ambari-web/app/mixins/main/service/configs/config_overridable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82589fc4/ambari-web/app/mixins/main/service/configs/config_overridable.js -- diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js index e1eeb60..3c51c39 100644 --- a/ambari-web/app/mixins/main/service/configs/config_overridable.js +++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js @@ -274,6 +274,7 @@ App.ConfigOverridable = Em.Mixin.create({ * @method updateConfigurationGroup */ updateConfigurationGroup: function (configGroup, successCallback, errorCallback) { +var configSiteTags = configGroup.get('configSiteTags') || []; var putConfigGroup = { ConfigGroup: { group_name: configGroup.get('name'), @@ -284,7 +285,7 @@ App.ConfigOverridable = Em.Mixin.create({ host_name: h }; }), -desired_configs: configGroup.get('configSiteTags').map(function (cst) { +desired_configs: configSiteTags.map(function (cst) { return { type: cst.get('site'), tag: cst.get('tag')
[2/2] ambari git commit: AMBARI-12474. Ubuntu package is missing sql server scripts (aonishuk)
AMBARI-12474. Ubuntu package is missing sql server scripts (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a30f4491 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a30f4491 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a30f4491 Branch: refs/heads/branch-2.1 Commit: a30f449123dc1f39271b32fafca94ad06268f14e Parents: 8af94e4 Author: Andrew Onishuk Authored: Tue Jul 21 15:36:32 2015 +0300 Committer: Andrew Onishuk Committed: Tue Jul 21 15:36:32 2015 +0300 -- ambari-server/pom.xml | 24 1 file changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a30f4491/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index dd634dd..1a4dc16 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -927,6 +927,30 @@ + target/classes/Ambari-DDL-SQLServer-CREATE.sql + file + +perm +/var/lib/ambari-server/resources + + + + target/classes/Ambari-DDL-SQLServer-CREATELOCAL.sql + file + +perm +/var/lib/ambari-server/resources + + + + src/main/resources/Ambari-DDL-SQLServer-DROP.sql + file + +perm +/var/lib/ambari-server/resources + + + ${project.build.directory}/DBConnectionVerification.jar file
[1/2] ambari git commit: AMBARI-12474. Ubuntu package is missing sql server scripts (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8af94e4db -> a30f44912 refs/heads/trunk dca90aaa2 -> 1472e1b09 AMBARI-12474. Ubuntu package is missing sql server scripts (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1472e1b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1472e1b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1472e1b0 Branch: refs/heads/trunk Commit: 1472e1b09309851c2d60acbf44e644a1797ae5ea Parents: dca90aa Author: Andrew Onishuk Authored: Tue Jul 21 15:36:29 2015 +0300 Committer: Andrew Onishuk Committed: Tue Jul 21 15:36:29 2015 +0300 -- ambari-server/pom.xml | 24 1 file changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1472e1b0/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 912f639..7d5575a 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -927,6 +927,30 @@ + target/classes/Ambari-DDL-SQLServer-CREATE.sql + file + +perm +/var/lib/ambari-server/resources + + + + target/classes/Ambari-DDL-SQLServer-CREATELOCAL.sql + file + +perm +/var/lib/ambari-server/resources + + + + src/main/resources/Ambari-DDL-SQLServer-DROP.sql + file + +perm +/var/lib/ambari-server/resources + + + ${project.build.directory}/DBConnectionVerification.jar file
ambari git commit: AMBARI-12473. Replace checks for redhat7 in code to more generic to avoid issues with os support in future (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 78286e21a -> dca90aaa2 AMBARI-12473. Replace checks for redhat7 in code to more generic to avoid issues with os support in future (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dca90aaa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dca90aaa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dca90aaa Branch: refs/heads/trunk Commit: dca90aaa2eadcbde94f45ffc005816a0db2be64a Parents: 78286e2 Author: Andrew Onishuk Authored: Tue Jul 21 15:35:55 2015 +0300 Committer: Andrew Onishuk Committed: Tue Jul 21 15:35:55 2015 +0300 -- .../src/main/python/ambari_agent/Facter.py | 45 +- .../test/python/ambari_agent/TestController.py | 5 ++ .../test/python/ambari_agent/TestHardware.py| 88 +++- .../python/ambari_agent/TestRegistration.py | 3 + .../src/main/python/ambari_commons/os_check.py | 15 .../src/main/python/ambari_server/utils.py | 2 +- 6 files changed, 41 insertions(+), 117 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dca90aaa/ambari-agent/src/main/python/ambari_agent/Facter.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py index 20b0447..56ca702 100644 --- a/ambari-agent/src/main/python/ambari_agent/Facter.py +++ b/ambari-agent/src/main/python/ambari_agent/Facter.py @@ -285,7 +285,7 @@ class FacterWindows(Facter): class FacterLinux(Facter): # selinux command GET_SE_LINUX_ST_CMD = "/usr/sbin/sestatus" - GET_IFCONFIG_CMD = "ifconfig" + GET_IFCONFIG_SHORT_CMD = "ifconfig -s" GET_UPTIME_CMD = "cat /proc/uptime" GET_MEMINFO_CMD = "cat /proc/meminfo" @@ -294,18 +294,18 @@ class FacterLinux(Facter): def __init__(self): -self.DATA_IFCONFIG_OUTPUT = FacterLinux.setDataIfConfigOutput() +self.DATA_IFCONFIG_SHORT_OUTPUT = FacterLinux.setDataIfConfigShortOutput() self.DATA_UPTIME_OUTPUT = FacterLinux.setDataUpTimeOutput() self.DATA_MEMINFO_OUTPUT = FacterLinux.setMemInfoOutput() @staticmethod - def setDataIfConfigOutput(): + def setDataIfConfigShortOutput(): try: - result = os.popen(FacterLinux.GET_IFCONFIG_CMD).read() + result = os.popen(FacterLinux.GET_IFCONFIG_SHORT_CMD).read() return result except OSError: - log.warn("Can't execute {0}".format(FacterLinux.GET_IFCONFIG_CMD)) + log.warn("Can't execute {0}".format(FacterLinux.GET_IFCONFIG_SHORT_CMD)) return "" @staticmethod @@ -353,13 +353,11 @@ class FacterLinux(Facter): log.warn("Could not run {0}: OK".format(FacterLinux.GET_SE_LINUX_ST_CMD)) return False - # Function that returns list of values that matches - # Return empty str if no matches - def data_return_list(self, patern, data): -full_list = re.findall(patern, data) + def return_first_words_from_list(self, list): result = "" -for i in full_list: - result = result + i + "," +for i in list: + if i.strip(): +result = result + i.split()[0].strip() + "," result = re.sub(r',$', "", result) return result @@ -377,15 +375,15 @@ class FacterLinux(Facter): import fcntl import struct primary_ip = self.getIpAddress().strip() -interface_pattern="(\w+)(?:.*Link encap:)" -if OSCheck.is_redhat7(): - interface_pattern="(\w+)(?:.*flags=)" -for i in re.findall(interface_pattern, self.DATA_IFCONFIG_OUTPUT): - ip_address_by_ifname = self.get_ip_address_by_ifname(i.strip()) - if ip_address_by_ifname is not None: -if primary_ip == ip_address_by_ifname.strip(): - return socket.inet_ntoa(fcntl.ioctl(socket.socket(socket.AF_INET, socket.SOCK_DGRAM), 35099, struct.pack('256s', i))[20:24]) - + +for line in self.DATA_IFCONFIG_SHORT_OUTPUT.splitlines()[1:]: + if line.strip(): +i = line.split()[0] +ip_address_by_ifname = self.get_ip_address_by_ifname(i.strip()) +if ip_address_by_ifname is not None: + if primary_ip == ip_address_by_ifname.strip(): +return socket.inet_ntoa(fcntl.ioctl(socket.socket(socket.AF_INET, socket.SOCK_DGRAM), 35099, struct.pack('256s', i))[20:24]) + return None # Return IP by interface name @@ -408,12 +406,9 @@ class FacterLinux(Facter): # Return interfaces def getInterfaces(self): -interface_pattern="(\w+)(?:.*Link encap:)" -if OSCheck.is_redhat7(): - interface_pattern="(\w+)(?:.*flags=)" -result = self.data_return_list(interface_pattern, self.DATA_IFCONFIG_OUTPUT) +result = self.return_first_words_from_list(self.DATA_IFCONFIG_SHORT_OUTPUT.splitlines()[1:]) if result == '':
ambari git commit: AMBARI-12450. Kerberos: ServiceResourceProvider queries for KDC connectivity when not needed (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk e6ada901a -> 78286e21a AMBARI-12450. Kerberos: ServiceResourceProvider queries for KDC connectivity when not needed (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78286e21 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78286e21 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78286e21 Branch: refs/heads/trunk Commit: 78286e21aa35e13e05ecc3a552579c42842cc800 Parents: e6ada90 Author: Robert Levas Authored: Tue Jul 21 08:35:17 2015 -0400 Committer: Robert Levas Committed: Tue Jul 21 08:35:17 2015 -0400 -- .../controller/internal/BaseProvider.java | 4 +- .../internal/ServiceResourceProvider.java | 60 ++--- .../internal/ServiceResourceProviderTest.java | 71 3 files changed, 107 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/78286e21/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java index ca5e70e..9024a7e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java @@ -384,7 +384,7 @@ public abstract class BaseProvider { * * @return true if the given property is a category for any of the requested ids */ - private static boolean isPropertyEntryRequested(String propertyId, Set requestedIds) { + protected static boolean isPropertyEntryRequested(String propertyId, Set requestedIds) { for (String requestedId : requestedIds) { if (requestedId.startsWith(propertyId)) { return true; @@ -403,7 +403,7 @@ public abstract class BaseProvider { * * @return true if the given property's category is part of the given set of requested ids */ - private static boolean isPropertyCategoryRequested(String propertyId, Set requestedIds) { + protected static boolean isPropertyCategoryRequested(String propertyId, Set requestedIds) { String category = PropertyHelper.getPropertyCategory(propertyId); while (category != null ) { if (requestedIds.contains(category)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/78286e21/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index a13bbd3..a79c04b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -89,6 +89,8 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider public static final String SERVICE_SERVICE_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("ServiceInfo", "state"); public static final String SERVICE_MAINTENANCE_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("ServiceInfo", "maintenance_state"); + public static final String SERVICE_ATTRIBUTES_PROPERTY_ID = PropertyHelper.getPropertyId("Services", "attributes"); + //Parameters from the predicate private static final String QUERY_PARAMETERS_RUN_SMOKE_TEST_ID = "params/run_smoke_test"; @@ -200,7 +202,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider response.getMaintenanceState(), requestedIds); Map serviceSpecificProperties = getServiceSpecificProperties( - response.getClusterName(), response.getServiceName()); + response.getClusterName(), response.getServiceName(), requestedIds); for (Map.Entry entry : serviceSpecificProperties.entrySet()) { setResourceProperty(resource, entry.getKey(), entry.getValue(), requestedIds); @@ -1387,35 +1389,41 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider * * @param clusterName cluster name * @param serviceName service name + * @param requestedIds relevant request property ids */ - private Map getServiceSpecificProperties(String clusterName, String serviceName) { + private Map getServiceSpecificProperties(String clusterName, String serviceName, Set requestedIds) { Map servi
ambari git commit: AMBARI-12421 FE: Ambari login is making POST call for all hosts. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 79b951c2f -> 8af94e4db AMBARI-12421 FE: Ambari login is making POST call for all hosts. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8af94e4d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8af94e4d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8af94e4d Branch: refs/heads/branch-2.1 Commit: 8af94e4dbeaf1e829c40cdf90d579850d5f891ab Parents: 79b951c Author: aBabiichuk Authored: Tue Jul 21 14:02:10 2015 +0300 Committer: aBabiichuk Committed: Tue Jul 21 14:06:23 2015 +0300 -- ambari-web/app/controllers/global/update_controller.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8af94e4d/ambari-web/app/controllers/global/update_controller.js -- diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js index f5c5b84..9a1d53a 100644 --- a/ambari-web/app/controllers/global/update_controller.js +++ b/ambari-web/app/controllers/global/update_controller.js @@ -193,11 +193,10 @@ App.UpdateController = Em.Controller.extend({ 'stack_versions/repository_versions/RepositoryVersions/display_name', mainHostController = App.router.get('mainHostController'), sortProperties = mainHostController.getSortProps(); - +this.get('queryParams').set('Hosts', mainHostController.getQueryParameters(true)); if (App.router.get('currentState.parentState.name') == 'hosts') { App.updater.updateInterval('updateHost', App.get('contentUpdateInterval')); hostDetailsParams = ''; - this.get('queryParams').set('Hosts', mainHostController.getQueryParameters(true)); } else { if (App.router.get('currentState.parentState.name') == 'hostDetails') {
ambari git commit: AMBARI-12421 FE: Ambari login is making POST call for all hosts. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 4f78030c4 -> e6ada901a AMBARI-12421 FE: Ambari login is making POST call for all hosts. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e6ada901 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e6ada901 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e6ada901 Branch: refs/heads/trunk Commit: e6ada901a63fdea3e6244e3ecc00f34f069325fa Parents: 4f78030 Author: aBabiichuk Authored: Tue Jul 21 14:02:10 2015 +0300 Committer: aBabiichuk Committed: Tue Jul 21 14:02:10 2015 +0300 -- ambari-web/app/controllers/global/update_controller.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e6ada901/ambari-web/app/controllers/global/update_controller.js -- diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js index f5c5b84..9a1d53a 100644 --- a/ambari-web/app/controllers/global/update_controller.js +++ b/ambari-web/app/controllers/global/update_controller.js @@ -193,11 +193,10 @@ App.UpdateController = Em.Controller.extend({ 'stack_versions/repository_versions/RepositoryVersions/display_name', mainHostController = App.router.get('mainHostController'), sortProperties = mainHostController.getSortProps(); - +this.get('queryParams').set('Hosts', mainHostController.getQueryParameters(true)); if (App.router.get('currentState.parentState.name') == 'hosts') { App.updater.updateInterval('updateHost', App.get('contentUpdateInterval')); hostDetailsParams = ''; - this.get('queryParams').set('Hosts', mainHostController.getQueryParameters(true)); } else { if (App.router.get('currentState.parentState.name') == 'hostDetails') {
[1/2] ambari git commit: AMBARI-12468 Remove requests for advanced configs and refactor mergePredefinedWithStored. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 4bdf0253c -> 4f78030c4 http://git-wip-us.apache.org/repos/asf/ambari/blob/4f78030c/ambari-web/test/utils/config_test.js -- diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js index 970060f..d30fa1d 100644 --- a/ambari-web/test/utils/config_test.js +++ b/ambari-web/test/utils/config_test.js @@ -223,40 +223,6 @@ describe('App.config', function () { }); }); - describe('#addAvancedConfigs()', function() { -beforeEach(function() { - this.storedConfigs = modelSetup.setupStoredConfigsObject(); -}); - -it('`custom.zoo.cfg` absent in stored configs', function() { - expect(this.storedConfigs.findProperty('name', 'custom.zoo.cfg')).to.be.undefined; -}); - -it('`custom.zoo.cfg.` from advanced configs should be added to stored configs', function() { - App.config.addAdvancedConfigs(this.storedConfigs, modelSetup.setupAdvancedConfigsObject(), 'ZOOKEEPER'); - var property = this.storedConfigs.findProperty('name', 'custom.zoo.cfg'); - expect(property).to.be.ok; - expect(property.category).to.eql('Advanced zoo.cfg'); -}); - -it('`capacity-scheduler.xml` property with name `content` should have `displayType` `multiLine`', function() { - App.config.addAdvancedConfigs(this.storedConfigs, modelSetup.setupAdvancedConfigsObject(), 'YARN'); - expect(this.storedConfigs.filterProperty('filename', 'capacity-scheduler.xml').findProperty('name','content').displayType).to.eql('multiLine'); -}); - -it('storing different configs with the same name', function () { - App.config.addAdvancedConfigs(this.storedConfigs, modelSetup.setupAdvancedConfigsObject(), 'HBASE'); - var properties = this.storedConfigs.filterProperty('name', 'hbase_log_dir'); - var hbaseProperty = properties.findProperty('filename', 'hbase-env.xml'); - var amsProperty = properties.findProperty('filename', 'ams-hbase-env.xml'); - expect(properties).to.have.length(2); - expect(hbaseProperty.serviceName).to.equal('HBASE'); - expect(hbaseProperty.value).to.equal('/hadoop/hbase'); - expect(amsProperty.serviceName).to.equal('AMBARI_METRICS'); - expect(amsProperty.value).to.equal('/hadoop/ams-hbase'); -}); - }); - describe('#trimProperty',function() { var testMessage = 'displayType `{0}`, value `{1}`{3} should return `{2}`'; var tests = [ @@ -382,6 +348,7 @@ describe('App.config', function () { }); it('bigtop should use New PostgreSQL Database as its default hive metastore database', function () { + App.StackService.createRecord({serviceName: 'HIVE'}); expect(App.config.get('preDefinedSiteProperties').findProperty('recommendedValue', 'New PostgreSQL Database')).to.be.ok; }); @@ -396,6 +363,7 @@ describe('App.config', function () { }); it('HDP2 should use New MySQL Database as its default hive metastore database', function () { + App.StackService.createRecord({serviceName: 'HIVE'}); expect(App.config.get('preDefinedSiteProperties').findProperty('recommendedValue', 'New MySQL Database')).to.be.ok; }); @@ -508,117 +476,6 @@ describe('App.config', function () { }); - describe('#createAdvancedPropertyObject', function() { -var tests = [ - { -name: 'proxyuser_group', -cases: [ - { -key: 'displayType', -e: 'user' - }, - { -key: 'serviceName', -e: 'MISC' - }, - { -key: 'belongsToService', -e: ['HIVE', 'OOZIE', 'FALCON'] - } -] - }, - { -name: 'oozie.service.JPAService.jdbc.password', -cases: [ - { -key: 'displayType', -e: 'password' - }, - { -key: 'isVisible', -e: true - } -] - }, - { -name: 'ignore_groupsusers_create', -cases: [ - { -key: 'isVisible', -e: false - } -] - }, - { -name: 'user_group', -cases: [ - { -key: 'isVisible', -e: true - }, - { -key: 'index', -e: 30 - }, - { -key: 'displayName', -e: 'Hadoop Group' - } -] - }, - { -name: 'zk_user', -cases: [ - { -key: 'displayName', -e: 'ZooKeeper User' - } -] - }, - { -name: 'mapred_user', -cases: [ - { -key: 'displayName', -e: 'MapReduce User' - } -] - }, - { -name: 'smokeuser', -cases: [ - { -key: 'displayName', -e: 'Smoke Test Us
[2/2] ambari git commit: AMBARI-12468 Remove requests for advanced configs and refactor mergePredefinedWithStored. (ababiichuk)
AMBARI-12468 Remove requests for advanced configs and refactor mergePredefinedWithStored. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4f78030c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4f78030c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4f78030c Branch: refs/heads/trunk Commit: 4f78030c424556a1040879697dbc87c44c73459e Parents: 4bdf025 Author: aBabiichuk Authored: Tue Jul 21 13:53:51 2015 +0300 Committer: aBabiichuk Committed: Tue Jul 21 13:57:43 2015 +0300 -- .../controllers/global/cluster_controller.js| 1 + .../main/admin/kerberos/step2_controller.js | 9 +- .../main/admin/kerberos/wizard_controller.js| 24 +- .../main/admin/serviceAccounts_controller.js| 21 +- ambari-web/app/controllers/wizard.js| 52 +- .../app/controllers/wizard/step7_controller.js | 14 +- ambari-web/app/data/HDP2.3/site_properties.js | 7 +- ambari-web/app/data/HDP2/site_properties.js | 1 + .../configs/stack_config_properties_mapper.js | 48 +- ambari-web/app/mappers/configs/themes_mapper.js | 2 +- .../mixins/common/configs/enhanced_configs.js | 2 +- .../app/models/configs/stack_config_property.js | 9 +- ambari-web/app/routes/add_service_routes.js | 1 - ambari-web/app/routes/installer.js | 5 +- ambari-web/app/utils/ajax/ajax.js | 5 + ambari-web/app/utils/config.js | 562 +-- .../app/views/common/configs/services_config.js | 4 +- ambari-web/app/views/common/controls_view.js| 2 +- .../main/service/info/config_test.js| 26 + .../test/controllers/wizard/step7_test.js | 8 +- ambari-web/test/controllers/wizard_test.js | 43 -- .../stack_config_properties_mapper_test.js | 32 +- .../test/mappers/configs/themes_mapper_test.js | 8 +- ambari-web/test/utils/config_test.js| 390 + 24 files changed, 319 insertions(+), 957 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4f78030c/ambari-web/app/controllers/global/cluster_controller.js -- diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js index f83d03e..ad5abd1 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -285,6 +285,7 @@ App.ClusterController = Em.Controller.extend({ }); updater.updateServiceMetric(function () { +App.config.loadClusterConfigsFromStack(); App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function () { updater.updateComponentConfig(function () { self.updateLoadStatus('componentConfigs'); http://git-wip-us.apache.org/repos/asf/ambari/blob/4f78030c/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js index 0691891..007ac05 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js @@ -72,6 +72,10 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ }, + isConfigsLoaded: function () { +return this.get('wizardController.stackConfigsLoaded'); + }.property('wizardController.stackConfigsLoaded'), + /** * On load function * @method loadStep @@ -83,7 +87,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ } this.clearStep(); //STEP 1: Load advanced configs -var advancedConfigs = this.get('content.advancedServiceConfig'); +var advancedConfigs = App.StackConfigProperty.find(); //STEP 2: Load on-site configs by service from local DB var storedConfigs = this.get('content.serviceConfigProperties'); //STEP 3: Merge pre-defined configs with loaded on-site configs @@ -92,8 +96,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ advancedConfigs, this.get('selectedServiceNames'))); App.config.setPreDefinedServiceConfigs(this.get('addMiscTabToPage')); -//STEP 4: Add advanced configs -App.config.addAdvancedConfigs(this.get('configs'), advancedConfigs); + this.filterConfigs(this.get('configs')); this.applyServicesConfigs(this.get('configs'), storedConfigs); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/4f78030c/ambari-web/app/controllers/main/admin/kerberos/wizard_contro
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 5170cd766 -> 79b951c2f AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/79b951c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/79b951c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/79b951c2 Branch: refs/heads/branch-2.1 Commit: 79b951c2f35b8e8a5952993bad6680a92ab44473 Parents: 5170cd7 Author: Artem Baranchuk Authored: Tue Jul 21 13:44:49 2015 +0300 Committer: Artem Baranchuk Committed: Tue Jul 21 13:44:49 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 40 ++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 169 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/79b951c2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 981890d..3c274b2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1560,21 +1560,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemo
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk eddaa2982 -> 4bdf0253c AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4bdf0253 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4bdf0253 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4bdf0253 Branch: refs/heads/trunk Commit: 4bdf0253c0eaee3440346f8f15d2ceb16d315714 Parents: eddaa29 Author: Artem Baranchuk Authored: Mon Jul 13 12:33:00 2015 +0300 Committer: Artem Baranchuk Committed: Tue Jul 21 13:42:51 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 40 ++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 169 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4bdf0253/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 981890d..3c274b2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1560,21 +1560,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemoveProps.ad
ambari git commit: AMBARI-12106. Versions list goes beyond browser window (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 60302b397 -> 5170cd766 AMBARI-12106. Versions list goes beyond browser window (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5170cd76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5170cd76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5170cd76 Branch: refs/heads/branch-2.1 Commit: 5170cd76697c08fdf0571619f3bbe5c6cbe2a50f Parents: 60302b3 Author: Alex Antonenko Authored: Wed Jun 24 00:10:20 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 13:16:20 2015 +0300 -- .../templates/common/configs/config_history_flow.hbs | 2 +- .../app/views/common/configs/config_history_flow.js | 15 +++ 2 files changed, 16 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5170cd76/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 b48b4b8..db18a9b 100644 --- a/ambari-web/app/templates/common/configs/config_history_flow.hbs +++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs @@ -62,7 +62,7 @@ {{#each serviceVersion in view.dropDownList}} - + {{serviceVersion.versionText}} {{serviceVersion.createdDate}} http://git-wip-us.apache.org/repos/asf/ambari/blob/5170cd76/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 bd5a50b..364d1c5 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -153,10 +153,25 @@ App.ConfigHistoryFlowView = Em.View.extend({ event.stopPropagation(); this.set('showFullList', true); }, + hideFullList: function (event) { this.set('showFullList', !(this.get('serviceVersions.length') > this.VERSIONS_IN_DROPDOWN)); }, + computePosition: function(event) { +var $el = Em.$('.dropdown-menu', event.currentTarget); +// remove existing style - in case user scrolls the page +$el.removeAttr('style'); +var elHeight = $el.outerHeight(), + parentHeight = $el.parent().outerHeight(), + pagePosition = window.innerHeight + window.pageYOffset, + elBottomPosition = $el.offset().top + elHeight, + shouldShowUp = elBottomPosition > pagePosition ; +if (shouldShowUp) { + $el.css('margin-top', -(elHeight - parentHeight)); +} + }, + didInsertElement: function () { App.tooltip(this.$('[data-toggle=tooltip]'),{ placement: 'bottom',
ambari git commit: AMBARI-12467. Datanode fails to start as it tries to install hadoop-lzo that is not part of 2.2.4.2 repo.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 cc8f74776 -> 08403ed47 AMBARI-12467. Datanode fails to start as it tries to install hadoop-lzo that is not part of 2.2.4.2 repo.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08403ed4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08403ed4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08403ed4 Branch: refs/heads/branch-2.1 Commit: 08403ed47feb244f182f0f9b8939db750239445c Parents: cc8f747 Author: Vitaly Brodetskyi Authored: Tue Jul 21 13:13:27 2015 +0300 Committer: Vitaly Brodetskyi Committed: Tue Jul 21 13:13:27 2015 +0300 -- .../libraries/functions/get_lzo_packages.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08403ed4/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py index 2f2cc33..6dbcef5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py @@ -26,11 +26,11 @@ from resource_management.libraries.functions.version import compare_versions, fo from resource_management.libraries.functions.format import format def get_lzo_packages(stack_version_unformatted): - lzo_packages = ["hadoop-lzo"] + lzo_packages = [] if OSCheck.is_redhat_family() or OSCheck.is_suse_family(): lzo_packages += ["lzo", "hadoop-lzo-native"] - elif OSCheck.is_ubuntu_family(): + elif OSCheck.is_ubuntu_family(): lzo_packages += ["liblzo2-2"] underscored_version = stack_version_unformatted.replace('.', '_') @@ -42,6 +42,7 @@ def get_lzo_packages(stack_version_unformatted): lzo_packages += [format("hadooplzo_{underscored_version}_*")] elif OSCheck.is_ubuntu_family(): lzo_packages += [format("hadooplzo_{dashed_version}_*")] + else: +lzo_packages += ["hadoop-lzo"] return lzo_packages - \ No newline at end of file
ambari git commit: AMBARI-12108. Alert Groups: edit + cancel notitications removes notification target (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 08403ed47 -> 60302b397 AMBARI-12108. Alert Groups: edit + cancel notitications removes notification target (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60302b39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60302b39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60302b39 Branch: refs/heads/branch-2.1 Commit: 60302b397cc89eca7ad60bf5722ad0f99cdb4bc9 Parents: 08403ed Author: Alex Antonenko Authored: Wed Jun 24 00:11:34 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 13:14:18 2015 +0300 -- ambari-web/app/views/common/editable_list.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60302b39/ambari-web/app/views/common/editable_list.js -- diff --git a/ambari-web/app/views/common/editable_list.js b/ambari-web/app/views/common/editable_list.js index 579ea66..b1d187d 100644 --- a/ambari-web/app/views/common/editable_list.js +++ b/ambari-web/app/views/common/editable_list.js @@ -33,11 +33,15 @@ App.EditableList = Ember.View.extend({ init: function () { this._super(); -this.set('itemsOriginal', Em.copy(this.get('items'))); +this.updateItemsOriginal(); this.set('input', ''); this.set('editMode', false); }, + updateItemsOriginal: function () { +this.set('itemsOriginal', Em.copy(this.get('items'))); + }.observes('items'), + onPrimary: function (event) { this.set('editMode', false); this.set('input', '');
ambari git commit: AMBARI-12467. Datanode fails to start as it tries to install hadoop-lzo that is not part of 2.2.4.2 repo.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 5dab6ca07 -> eddaa2982 AMBARI-12467. Datanode fails to start as it tries to install hadoop-lzo that is not part of 2.2.4.2 repo.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eddaa298 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eddaa298 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eddaa298 Branch: refs/heads/trunk Commit: eddaa298295687a0e653b32b5f5894ffedbf046f Parents: 5dab6ca Author: Vitaly Brodetskyi Authored: Tue Jul 21 13:11:16 2015 +0300 Committer: Vitaly Brodetskyi Committed: Tue Jul 21 13:11:16 2015 +0300 -- .../libraries/functions/get_lzo_packages.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eddaa298/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py index 2f2cc33..6dbcef5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py @@ -26,11 +26,11 @@ from resource_management.libraries.functions.version import compare_versions, fo from resource_management.libraries.functions.format import format def get_lzo_packages(stack_version_unformatted): - lzo_packages = ["hadoop-lzo"] + lzo_packages = [] if OSCheck.is_redhat_family() or OSCheck.is_suse_family(): lzo_packages += ["lzo", "hadoop-lzo-native"] - elif OSCheck.is_ubuntu_family(): + elif OSCheck.is_ubuntu_family(): lzo_packages += ["liblzo2-2"] underscored_version = stack_version_unformatted.replace('.', '_') @@ -42,6 +42,7 @@ def get_lzo_packages(stack_version_unformatted): lzo_packages += [format("hadooplzo_{underscored_version}_*")] elif OSCheck.is_ubuntu_family(): lzo_packages += [format("hadooplzo_{dashed_version}_*")] + else: +lzo_packages += ["hadoop-lzo"] return lzo_packages - \ No newline at end of file
[2/2] ambari git commit: AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi)
AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc8f7477 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc8f7477 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc8f7477 Branch: refs/heads/branch-2.1 Commit: cc8f74776bea30df631dd93f10e87915a6b0b4a5 Parents: e3e3d5c Author: Vitaly Brodetskyi Authored: Tue Jul 21 13:07:27 2015 +0300 Committer: Vitaly Brodetskyi Committed: Tue Jul 21 13:07:27 2015 +0300 -- ambari-server/src/main/python/upgradeHelper.py | 44 +- .../catalog/UpgradeCatalog_2.2_to_2.3.json | 3848 ++ 2 files changed, 2141 insertions(+), 1751 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc8f7477/ambari-server/src/main/python/upgradeHelper.py -- diff --git a/ambari-server/src/main/python/upgradeHelper.py b/ambari-server/src/main/python/upgradeHelper.py index cc760ab..c38ce5f 100644 --- a/ambari-server/src/main/python/upgradeHelper.py +++ b/ambari-server/src/main/python/upgradeHelper.py @@ -160,6 +160,10 @@ class CatalogNotFoundException(Exception): pass +class TemplateProcessingException(Exception): + pass + + class CatalogExistException(Exception): pass @@ -501,12 +505,15 @@ class UpgradeCatalog(object): if CatConst.TEMPLATE_HANDLER in self._handlers and self._handlers is not None and \ CatConst.VALUE_TEMPLATE_TAG in catalog_property_item and catalog_property_item[ CatConst.VALUE_TEMPLATE_TAG] == CatConst.TRUE_TAG: - parsed_value = self._handlers[CatConst.TEMPLATE_HANDLER]( -self, - self._search_pattern.findall(catalog_property_item[CatConst.PROPERTY_VALUE_TAG]), -catalog_property_item[CatConst.PROPERTY_VALUE_TAG] - ) - catalog_property_item[CatConst.PROPERTY_VALUE_TAG] = parsed_value + try: +parsed_value = self._handlers[CatConst.TEMPLATE_HANDLER]( + self, + self._search_pattern.findall(catalog_property_item[CatConst.PROPERTY_VALUE_TAG]), + catalog_property_item[CatConst.PROPERTY_VALUE_TAG] +) +catalog_property_item[CatConst.PROPERTY_VALUE_TAG] = parsed_value + except TemplateProcessingException: +pass def __handle_add_new(self, catalog_item_name, catalog_property_item, properties): """ @@ -691,13 +698,15 @@ class ServerConfigFactory(object): """ if CatConst.VALUE_TEMPLATE_TAG in item and CatConst.TEMPLATE_HANDLER in catalog.action_handlers and\ CatConst.PROPERTY_DEFAULT in item and item[CatConst.VALUE_TEMPLATE_TAG] == CatConst.TRUE_TAG: - - parsed_value = catalog.action_handlers[CatConst.TEMPLATE_HANDLER]( -catalog, -catalog.tag_search_pattern.findall(item[CatConst.PROPERTY_DEFAULT]), -item[CatConst.PROPERTY_DEFAULT] - ) - item[CatConst.PROPERTY_DEFAULT] = parsed_value + try: +parsed_value = catalog.action_handlers[CatConst.TEMPLATE_HANDLER]( + catalog, + catalog.tag_search_pattern.findall(item[CatConst.PROPERTY_DEFAULT]), + item[CatConst.PROPERTY_DEFAULT] +) +item[CatConst.PROPERTY_DEFAULT] = parsed_value + except TemplateProcessingException: +pass def _process_property_value_transformation(self, catalog, property_map_definition, old_value): """ @@ -1105,9 +1114,16 @@ def get_zookeeper_quorum(): return ",".join(zoo_quorum) + def get_tez_history_url_base(): - tez_view = curl(Options.TEZ_VIEW_URL, validate=False, simulate=False, parse=True) + try: +tez_view = curl(Options.TEZ_VIEW_URL, validate=False, simulate=False, parse=True) + except HTTPError as e: +raise TemplateProcessingException(str(e)) + version = "" + + if "versions" in tez_view and \ len(tez_view['versions']) > 0 and \ "ViewVersionInfo" in tez_view['versions'][0] and \
[1/2] ambari git commit: AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e3e3d5c14 -> cc8f74776 http://git-wip-us.apache.org/repos/asf/ambari/blob/cc8f7477/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json -- diff --git a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json index 818c898..d99232f 100644 --- a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json +++ b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json @@ -1,1741 +1,2115 @@ { -"version": "1.0", -"stacks": [ -{ -"name": "HDP", -"old-version": "2.2", -"target-version": "2.3", -"options": { -"config-types": { -"falcon-startup.properties": { - "merged-copy": "yes", - "required-services": ["FALCON"] -}, -"tez-site":{ - "merged-copy": "yes", - "required-services": ["TEZ"] -}, -"oozie-site": { - "merged-copy": "yes", - "required-services": ["OOZIE"] -}, -"hbase-site": { - "merged-copy": "yes", - "required-services": ["HBASE"] -}, -"mapred-site": { - "merged-copy": "yes", - "required-services": ["MAPREDUCE2"] -}, -"hdfs-site": { - "merged-copy": "yes", - "required-services": ["HDFS"] -}, -"yarn-site": { - "merged-copy": "yes", - "required-services": ["YARN"] -}, -"capacity-scheduler": { - "merged-copy": "yes", - "required-services": ["YARN"] -}, -"kafka-broker": { - "merged-copy": "yes", - "required-services": ["KAFKA"] -}, - "ranger-hdfs-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hbase-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hive-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-knox-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-knox-security": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-knox-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-
[2/2] ambari git commit: AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi)
AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5dab6ca0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5dab6ca0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5dab6ca0 Branch: refs/heads/trunk Commit: 5dab6ca07c3deea026b2fe279d3dc2fca5817ebe Parents: aa16e8d Author: Vitaly Brodetskyi Authored: Tue Jul 21 13:06:14 2015 +0300 Committer: Vitaly Brodetskyi Committed: Tue Jul 21 13:06:14 2015 +0300 -- ambari-server/src/main/python/upgradeHelper.py | 44 +- .../catalog/UpgradeCatalog_2.2_to_2.3.json | 3848 ++ 2 files changed, 2141 insertions(+), 1751 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5dab6ca0/ambari-server/src/main/python/upgradeHelper.py -- diff --git a/ambari-server/src/main/python/upgradeHelper.py b/ambari-server/src/main/python/upgradeHelper.py index cc760ab..c38ce5f 100644 --- a/ambari-server/src/main/python/upgradeHelper.py +++ b/ambari-server/src/main/python/upgradeHelper.py @@ -160,6 +160,10 @@ class CatalogNotFoundException(Exception): pass +class TemplateProcessingException(Exception): + pass + + class CatalogExistException(Exception): pass @@ -501,12 +505,15 @@ class UpgradeCatalog(object): if CatConst.TEMPLATE_HANDLER in self._handlers and self._handlers is not None and \ CatConst.VALUE_TEMPLATE_TAG in catalog_property_item and catalog_property_item[ CatConst.VALUE_TEMPLATE_TAG] == CatConst.TRUE_TAG: - parsed_value = self._handlers[CatConst.TEMPLATE_HANDLER]( -self, - self._search_pattern.findall(catalog_property_item[CatConst.PROPERTY_VALUE_TAG]), -catalog_property_item[CatConst.PROPERTY_VALUE_TAG] - ) - catalog_property_item[CatConst.PROPERTY_VALUE_TAG] = parsed_value + try: +parsed_value = self._handlers[CatConst.TEMPLATE_HANDLER]( + self, + self._search_pattern.findall(catalog_property_item[CatConst.PROPERTY_VALUE_TAG]), + catalog_property_item[CatConst.PROPERTY_VALUE_TAG] +) +catalog_property_item[CatConst.PROPERTY_VALUE_TAG] = parsed_value + except TemplateProcessingException: +pass def __handle_add_new(self, catalog_item_name, catalog_property_item, properties): """ @@ -691,13 +698,15 @@ class ServerConfigFactory(object): """ if CatConst.VALUE_TEMPLATE_TAG in item and CatConst.TEMPLATE_HANDLER in catalog.action_handlers and\ CatConst.PROPERTY_DEFAULT in item and item[CatConst.VALUE_TEMPLATE_TAG] == CatConst.TRUE_TAG: - - parsed_value = catalog.action_handlers[CatConst.TEMPLATE_HANDLER]( -catalog, -catalog.tag_search_pattern.findall(item[CatConst.PROPERTY_DEFAULT]), -item[CatConst.PROPERTY_DEFAULT] - ) - item[CatConst.PROPERTY_DEFAULT] = parsed_value + try: +parsed_value = catalog.action_handlers[CatConst.TEMPLATE_HANDLER]( + catalog, + catalog.tag_search_pattern.findall(item[CatConst.PROPERTY_DEFAULT]), + item[CatConst.PROPERTY_DEFAULT] +) +item[CatConst.PROPERTY_DEFAULT] = parsed_value + except TemplateProcessingException: +pass def _process_property_value_transformation(self, catalog, property_map_definition, old_value): """ @@ -1105,9 +1114,16 @@ def get_zookeeper_quorum(): return ",".join(zoo_quorum) + def get_tez_history_url_base(): - tez_view = curl(Options.TEZ_VIEW_URL, validate=False, simulate=False, parse=True) + try: +tez_view = curl(Options.TEZ_VIEW_URL, validate=False, simulate=False, parse=True) + except HTTPError as e: +raise TemplateProcessingException(str(e)) + version = "" + + if "versions" in tez_view and \ len(tez_view['versions']) > 0 and \ "ViewVersionInfo" in tez_view['versions'][0] and \
[1/2] ambari git commit: AMBARI-12466. Manual upgrade should fix some of the templeton properties in webhcat.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk aa16e8da2 -> 5dab6ca07 http://git-wip-us.apache.org/repos/asf/ambari/blob/5dab6ca0/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json -- diff --git a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json index 818c898..d99232f 100644 --- a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json +++ b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json @@ -1,1741 +1,2115 @@ { -"version": "1.0", -"stacks": [ -{ -"name": "HDP", -"old-version": "2.2", -"target-version": "2.3", -"options": { -"config-types": { -"falcon-startup.properties": { - "merged-copy": "yes", - "required-services": ["FALCON"] -}, -"tez-site":{ - "merged-copy": "yes", - "required-services": ["TEZ"] -}, -"oozie-site": { - "merged-copy": "yes", - "required-services": ["OOZIE"] -}, -"hbase-site": { - "merged-copy": "yes", - "required-services": ["HBASE"] -}, -"mapred-site": { - "merged-copy": "yes", - "required-services": ["MAPREDUCE2"] -}, -"hdfs-site": { - "merged-copy": "yes", - "required-services": ["HDFS"] -}, -"yarn-site": { - "merged-copy": "yes", - "required-services": ["YARN"] -}, -"capacity-scheduler": { - "merged-copy": "yes", - "required-services": ["YARN"] -}, -"kafka-broker": { - "merged-copy": "yes", - "required-services": ["KAFKA"] -}, - "ranger-hdfs-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hdfs-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HDFS"] - }, - "ranger-hbase-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hbase-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HBASE"] - }, - "ranger-hive-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-security": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-hive-plugin-properties": { -"merged-copy": "yes", -"required-services": ["RANGER","HIVE"] - }, - "ranger-knox-policymgr-ssl": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-knox-security": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-knox-audit": { -"merged-copy": "yes", -"required-services": ["RANGER","KNOX"] - }, - "ranger-knox-
[1/2] ambari git commit: AMBARI-12423. Ambari - Deleting a Zookeeper server doesn't update the the storm.zookeeper.servers property for Storm (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 0053a9ac2 -> e3e3d5c14 AMBARI-12423. Ambari - Deleting a Zookeeper server doesn't update the the storm.zookeeper.servers property for Storm (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09346edf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09346edf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09346edf Branch: refs/heads/branch-2.1 Commit: 09346edf0953e4b358fa903fa806e6140eb1ea85 Parents: 0053a9a Author: Alex Antonenko Authored: Tue Jul 21 13:02:44 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 13:02:44 2015 +0300 -- ambari-web/app/controllers/main/host/details.js | 36 .../test/controllers/main/host/details_test.js | 2 +- 2 files changed, 31 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/09346edf/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 93ecf25..94ba5ec 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -346,6 +346,7 @@ App.MainHostDetailsController = Em.Controller.extend({ this.removeHostComponentModel(data.componentName, data.hostName); if (data.componentName == 'ZOOKEEPER_SERVER') { this.set('fromDeleteZkServer', true); + this.updateStormConfigs(); this.loadConfigs(); } else if (data.componentName == 'HIVE_METASTORE') { this.set('deleteHiveMetaStore', true); @@ -697,6 +698,19 @@ App.MainHostDetailsController = Em.Controller.extend({ }, /** + * Update zk configs + * @param {object} configs + * @method updateZkConfigs + */ + updateZkConfigs: function(configs) { +var zks = this.getZkServerHosts(); +var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort'); +var zkPort = typeof portValue === 'udefined' ? '2181' : portValue; +var zksWithPort = this.concatZkNames(zks, zkPort); +this.setZKConfigs(configs, zksWithPort, zks); + }, + + /** * update and save Storm related configs to server * @param {object} data * @method onLoadStormConfigs @@ -712,6 +726,8 @@ App.MainHostDetailsController = Em.Controller.extend({ attributes[item.type] = item.properties_attributes || {}; }, this); +this.updateZkConfigs(configs); + configs['storm-site']['nimbus.seeds'] = JSON.stringify(stormNimbusHosts).replace(/"/g, "'"); var groups = [ { @@ -1018,6 +1034,16 @@ App.MainHostDetailsController = Em.Controller.extend({ this.showBackgroundOperationsPopup(); }, + /** + * Update storm config + * @method updateStormConfigs + */ + updateStormConfigs: function() { +if (App.Service.find().findProperty('serviceName', 'STORM')) { + this.loadConfigs("loadStormConfigs"); +} + }, + /** * Load tags * @method checkZkConfigs @@ -1028,6 +1054,7 @@ App.MainHostDetailsController = Em.Controller.extend({ var self = this; this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkZkConfigs); setTimeout(function () { +self.updateStormConfigs(); self.loadConfigs(); }, App.get('componentsUpdateInterval')); } @@ -1116,11 +1143,8 @@ App.MainHostDetailsController = Em.Controller.extend({ attributes[item.type] = item.properties_attributes || {}; }, this); -var zks = this.getZkServerHosts(); -var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort'); -var zkPort = typeof portValue === 'udefined' ? '2181' : portValue; -var zksWithPort = this.concatZkNames(zks, zkPort); -this.setZKConfigs(configs, zksWithPort, zks); +this.updateZkConfigs(configs); + var groups = [ { properties: { @@ -1856,7 +1880,7 @@ App.MainHostDetailsController = Em.Controller.extend({ runningComponents: [], nonDeletableComponents: [], unknownComponents: [] -}; +}; var self = this; if (componentsOnHost && componentsOnHost.get('length') > 0) { componentsOnHost.forEach(function (cInstance) { http://git-wip-us.apache.org/repos/asf/ambari/blob/09346edf/ambari-web/test/controllers/main/host/details_test.js -- diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js index 1883c70..cd35981 100644 --- a/ambari-web/test/controllers/main/host/details_test.js +++ b/ambari-web/test/controllers/main/host/details_test.js @
[2/2] ambari git commit: AMBARI-12464. Falcon *.falcon.http.authentication.kerberos.name.rules should be text box, not field (alexantonenko)
AMBARI-12464. Falcon *.falcon.http.authentication.kerberos.name.rules should be text box, not field (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3e3d5c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3e3d5c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3e3d5c1 Branch: refs/heads/branch-2.1 Commit: e3e3d5c147f1cb1d441d8e3f5c4d75ebcfed6324 Parents: 09346ed Author: Alex Antonenko Authored: Tue Jul 21 09:47:51 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 13:03:48 2015 +0300 -- ambari-web/app/data/BIGTOP/site_properties.js | 1 + ambari-web/app/data/HDP2/site_properties.js | 1 + ambari-web/app/data/PHD/site_properties.js| 1 + 3 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3e3d5c1/ambari-web/app/data/BIGTOP/site_properties.js -- diff --git a/ambari-web/app/data/BIGTOP/site_properties.js b/ambari-web/app/data/BIGTOP/site_properties.js index c01ac87..e71cab4 100644 --- a/ambari-web/app/data/BIGTOP/site_properties.js +++ b/ambari-web/app/data/BIGTOP/site_properties.js @@ -1637,6 +1637,7 @@ module.exports = "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", "category": "FalconStartupSite", + "displayType": "multiLine", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/e3e3d5c1/ambari-web/app/data/HDP2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index ccea488..d946900 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1689,6 +1689,7 @@ var hdp2properties = [ "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", "category": "FalconStartupSite", +"displayType": "multiLine", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/e3e3d5c1/ambari-web/app/data/PHD/site_properties.js -- diff --git a/ambari-web/app/data/PHD/site_properties.js b/ambari-web/app/data/PHD/site_properties.js index f3eccfc..b6e548c 100644 --- a/ambari-web/app/data/PHD/site_properties.js +++ b/ambari-web/app/data/PHD/site_properties.js @@ -1577,6 +1577,7 @@ module.exports = "id": "site property", "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", + "displayType": "multiLine", "category": "FalconStartupSite", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml"
[1/3] ambari git commit: AMBARI-12422. Hive queries against HiveServer2 failing in Hive HA enabled cluster (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk b1add6e16 -> aa16e8da2 AMBARI-12422. Hive queries against HiveServer2 failing in Hive HA enabled cluster (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa16e8da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa16e8da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa16e8da Branch: refs/heads/trunk Commit: aa16e8da2ce27bc513469f530e32d33b65b56f2c Parents: 0cb2f9b Author: Alex Antonenko Authored: Tue Jul 21 12:41:50 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 12:57:35 2015 +0300 -- ambari-web/app/controllers/main/host/details.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aa16e8da/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 8f97044..c3a17ca 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -39,6 +39,12 @@ App.MainHostDetailsController = Em.Controller.extend({ isFromHosts: false, /** + * Are we adding hive server2 component + * @type {bool} + */ + addHiveServer: false, + + /** * path to page visited before * @type {string} */ @@ -628,6 +634,7 @@ App.MainHostDetailsController = Em.Controller.extend({ var self = this; this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkHiveDone); setTimeout(function () { +self.set('addHiveServer', true); self.loadConfigs("loadHiveConfigs"); }, App.get('componentsUpdateInterval')); } @@ -800,7 +807,8 @@ App.MainHostDetailsController = Em.Controller.extend({ } } ]; -this.saveConfigsBatch(groups, 'HIVE_METASTORE', hiveMetastoreHost); +this.saveConfigsBatch(groups, this.get('addHiveServer') ? 'HIVE_SERVER' : 'HIVE_METASTORE', hiveMetastoreHost); +this.set('addHiveServer', false); }, /**
[3/3] ambari git commit: AMBARI-12423. Ambari - Deleting a Zookeeper server doesn't update the the storm.zookeeper.servers property for Storm (alexantonenko)
AMBARI-12423. Ambari - Deleting a Zookeeper server doesn't update the the storm.zookeeper.servers property for Storm (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6172fb86 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6172fb86 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6172fb86 Branch: refs/heads/trunk Commit: 6172fb8634887bba485beb7ebb2f7ff54d55e702 Parents: b1add6e Author: Alex Antonenko Authored: Tue Jul 21 08:57:05 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 12:57:35 2015 +0300 -- ambari-web/app/controllers/main/host/details.js | 36 .../test/controllers/main/host/details_test.js | 2 +- 2 files changed, 31 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6172fb86/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 2413ae2..8f97044 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -340,6 +340,7 @@ App.MainHostDetailsController = Em.Controller.extend({ this.removeHostComponentModel(data.componentName, data.hostName); if (data.componentName == 'ZOOKEEPER_SERVER') { this.set('fromDeleteZkServer', true); + this.updateStormConfigs(); this.loadConfigs(); } else if (data.componentName == 'HIVE_METASTORE') { this.set('deleteHiveMetaStore', true); @@ -681,6 +682,19 @@ App.MainHostDetailsController = Em.Controller.extend({ }, /** + * Update zk configs + * @param {object} configs + * @method updateZkConfigs + */ + updateZkConfigs: function(configs) { +var zks = this.getZkServerHosts(); +var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort'); +var zkPort = typeof portValue === 'udefined' ? '2181' : portValue; +var zksWithPort = this.concatZkNames(zks, zkPort); +this.setZKConfigs(configs, zksWithPort, zks); + }, + + /** * update and save Storm related configs to server * @param {object} data * @method onLoadStormConfigs @@ -696,6 +710,8 @@ App.MainHostDetailsController = Em.Controller.extend({ attributes[item.type] = item.properties_attributes || {}; }, this); +this.updateZkConfigs(configs); + configs['storm-site']['nimbus.seeds'] = JSON.stringify(stormNimbusHosts).replace(/"/g, "'"); var groups = [ { @@ -1001,6 +1017,16 @@ App.MainHostDetailsController = Em.Controller.extend({ this.showBackgroundOperationsPopup(); }, + /** + * Update storm config + * @method updateStormConfigs + */ + updateStormConfigs: function() { +if (App.Service.find().findProperty('serviceName', 'STORM')) { + this.loadConfigs("loadStormConfigs"); +} + }, + /** * Load tags * @method checkZkConfigs @@ -1011,6 +1037,7 @@ App.MainHostDetailsController = Em.Controller.extend({ var self = this; this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkZkConfigs); setTimeout(function () { +self.updateStormConfigs(); self.loadConfigs(); }, App.get('componentsUpdateInterval')); } @@ -1099,11 +1126,8 @@ App.MainHostDetailsController = Em.Controller.extend({ attributes[item.type] = item.properties_attributes || {}; }, this); -var zks = this.getZkServerHosts(); -var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort'); -var zkPort = typeof portValue === 'udefined' ? '2181' : portValue; -var zksWithPort = this.concatZkNames(zks, zkPort); -this.setZKConfigs(configs, zksWithPort, zks); +this.updateZkConfigs(configs); + var groups = [ { properties: { @@ -1840,7 +1864,7 @@ App.MainHostDetailsController = Em.Controller.extend({ nonDeletableComponents: [], unknownComponents: [], toDecommissionComponents: [] -}; +}; var self = this; if (componentsOnHost && componentsOnHost.get('length') > 0) { componentsOnHost.forEach(function (cInstance) { http://git-wip-us.apache.org/repos/asf/ambari/blob/6172fb86/ambari-web/test/controllers/main/host/details_test.js -- diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js index c01b6df..1345803 100644 --- a/ambari-web/test/controllers/main/host/details_test.js +++ b/ambari-web/test/controllers/main/host/details_test.js @@ -1037,7 +1037,7 @@ describe('App.MainHostDetailsController', function () {
[2/3] ambari git commit: AMBARI-12464. Falcon *.falcon.http.authentication.kerberos.name.rules should be text box, not field (alexantonenko)
AMBARI-12464. Falcon *.falcon.http.authentication.kerberos.name.rules should be text box, not field (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0cb2f9b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0cb2f9b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0cb2f9b0 Branch: refs/heads/trunk Commit: 0cb2f9b0c09ce80a5af398e00e2fd87f2a54d89c Parents: 6172fb8 Author: Alex Antonenko Authored: Tue Jul 21 09:47:51 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 12:57:35 2015 +0300 -- ambari-web/app/data/BIGTOP/site_properties.js | 1 + ambari-web/app/data/HDP2/site_properties.js | 1 + ambari-web/app/data/PHD/site_properties.js| 1 + 3 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0cb2f9b0/ambari-web/app/data/BIGTOP/site_properties.js -- diff --git a/ambari-web/app/data/BIGTOP/site_properties.js b/ambari-web/app/data/BIGTOP/site_properties.js index c01ac87..e71cab4 100644 --- a/ambari-web/app/data/BIGTOP/site_properties.js +++ b/ambari-web/app/data/BIGTOP/site_properties.js @@ -1637,6 +1637,7 @@ module.exports = "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", "category": "FalconStartupSite", + "displayType": "multiLine", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/0cb2f9b0/ambari-web/app/data/HDP2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index ccea488..d946900 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1689,6 +1689,7 @@ var hdp2properties = [ "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", "category": "FalconStartupSite", +"displayType": "multiLine", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/0cb2f9b0/ambari-web/app/data/PHD/site_properties.js -- diff --git a/ambari-web/app/data/PHD/site_properties.js b/ambari-web/app/data/PHD/site_properties.js index f3eccfc..b6e548c 100644 --- a/ambari-web/app/data/PHD/site_properties.js +++ b/ambari-web/app/data/PHD/site_properties.js @@ -1577,6 +1577,7 @@ module.exports = "id": "site property", "name": "*.falcon.http.authentication.kerberos.name.rules", "displayName": "*.falcon.http.authentication.kerberos.name.rules", + "displayType": "multiLine", "category": "FalconStartupSite", "serviceName": "FALCON", "filename": "falcon-startup.properties.xml"
ambari git commit: AMBARI-12422. Hive queries against HiveServer2 failing in Hive HA enabled cluster (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8b2186937 -> 0053a9ac2 AMBARI-12422. Hive queries against HiveServer2 failing in Hive HA enabled cluster (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0053a9ac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0053a9ac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0053a9ac Branch: refs/heads/branch-2.1 Commit: 0053a9ac2de7f264293728d83476d9f36f965db1 Parents: 8b21869 Author: Alex Antonenko Authored: Tue Jul 21 12:41:50 2015 +0300 Committer: Alex Antonenko Committed: Tue Jul 21 12:55:29 2015 +0300 -- ambari-web/app/controllers/main/host/details.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0053a9ac/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 527d07e..93ecf25 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -39,6 +39,12 @@ App.MainHostDetailsController = Em.Controller.extend({ isFromHosts: false, /** + * Are we adding hive server2 component + * @type {bool} + */ + addHiveServer: false, + + /** * path to page visited before * @type {string} */ @@ -636,6 +642,7 @@ App.MainHostDetailsController = Em.Controller.extend({ var self = this; this.removeObserver('App.router.backgroundOperationsController.serviceTimestamp', this, this.checkHiveDone); setTimeout(function () { +self.set('addHiveServer', true); self.loadConfigs("loadHiveConfigs"); }, App.get('componentsUpdateInterval')); } @@ -793,7 +800,8 @@ App.MainHostDetailsController = Em.Controller.extend({ } } ]; -this.saveConfigsBatch(groups, 'HIVE_METASTORE', hiveMetastoreHost); +this.saveConfigsBatch(groups, this.get('addHiveServer') ? 'HIVE_SERVER' : 'HIVE_METASTORE', hiveMetastoreHost); +this.set('addHiveServer', false); }, /**
[2/2] ambari git commit: AMBARI-12465. Non-Root: Knox fails to start during install with custom pid directory (aonishuk)
AMBARI-12465. Non-Root: Knox fails to start during install with custom pid directory (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b218693 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b218693 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b218693 Branch: refs/heads/branch-2.1 Commit: 8b218693754d5b51fca39c7e53191e92caee7654 Parents: 6ce4214 Author: Andrew Onishuk Authored: Tue Jul 21 12:45:13 2015 +0300 Committer: Andrew Onishuk Committed: Tue Jul 21 12:45:13 2015 +0300 -- .../KNOX/0.5.0.2.2/package/scripts/knox_gateway.py | 13 - .../test/python/stacks/2.2/KNOX/test_knox_gateway.py | 10 -- 2 files changed, 12 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b218693/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py index 8117312..7323a73 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py @@ -32,7 +32,7 @@ from resource_management.libraries.functions import Direction from resource_management.libraries.functions.security_commons import build_expectations, \ cached_kinit_executor, validate_security_config_properties, get_params_from_filesystem, \ FILE_TYPE_XML -from resource_management.core.resources.system import File, Execute, Directory +from resource_management.core.resources.system import File, Execute, Directory, Link from resource_management.core.resources.service import Service from resource_management.core.logger import Logger @@ -148,9 +148,10 @@ class KnoxGatewayDefault(KnoxGateway): no_op_test = format('ls {knox_pid_file} >/dev/null 2>&1 && ps -p `cat {knox_pid_file}` >/dev/null 2>&1') setup_ranger_knox(rolling_upgrade=rolling_restart) # Used to setup symlink, needed to update the knox managed symlink, in case of custom locations -if os.path.islink(params.knox_managed_pid_symlink) and os.path.realpath(params.knox_managed_pid_symlink) != params.knox_pid_dir: - os.unlink(params.knox_managed_pid_symlink) - os.symlink(params.knox_pid_dir, params.knox_managed_pid_symlink) +if os.path.islink(params.knox_managed_pid_symlink): + Link(params.knox_managed_pid_symlink, + to = params.knox_pid_dir, + ) Execute(daemon_cmd, user=params.knox_user, @@ -196,7 +197,9 @@ class KnoxGatewayDefault(KnoxGateway): environment={'JAVA_HOME': params.java_home}, user=params.knox_user, ) -Execute (format("rm -f {ldap_pid_file}")) +File(params.ldap_pid_file, + action = "delete" +) def security_status(self, env): import status_params http://git-wip-us.apache.org/repos/asf/ambari/blob/8b218693/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py index 5ca5251..11f476e 100644 --- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py +++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py @@ -319,10 +319,7 @@ class TestKnoxGateway(RMFTestCase): mocks_dict['call'].call_args_list[0][0][0]) @patch("os.path.islink") - @patch("os.path.realpath") - @patch("os.unlink") - @patch("os.symlink") - def test_start_default(self, symlink_mock, unlink_mock, realpath_mock, islink_mock): + def test_start_default(self, islink_mock): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/knox_gateway.py", @@ -409,12 +406,13 @@ class TestKnoxGateway(RMFTestCase): owner = 'knox', content = self.getConfig()['configurations']['users-ldif']['content'] ) - +self.assertResourceCalled('Link', '/usr/hdp/current/knox-server/pids', +to = '/var/run/knox', +) self.assertResourceCalled("Execute", "/usr/hdp/current/knox-server/bin/gateway.sh start", environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, not_if = u'ls /var/run/knox/gateway.pid >/dev/null 2>&1 && ps -p `cat /var/run/knox/gateway.pid` >/dev/null 2>&1', user = u'knox',)
[1/2] ambari git commit: AMBARI-12465. Non-Root: Knox fails to start during install with custom pid directory (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 6ce421442 -> 8b2186937 refs/heads/trunk 41019f051 -> b1add6e16 AMBARI-12465. Non-Root: Knox fails to start during install with custom pid directory (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b1add6e1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b1add6e1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b1add6e1 Branch: refs/heads/trunk Commit: b1add6e16336a638f1cfc12fe1f2a7a0b957df23 Parents: 41019f0 Author: Andrew Onishuk Authored: Tue Jul 21 12:45:11 2015 +0300 Committer: Andrew Onishuk Committed: Tue Jul 21 12:45:11 2015 +0300 -- .../KNOX/0.5.0.2.2/package/scripts/knox_gateway.py | 13 - .../test/python/stacks/2.2/KNOX/test_knox_gateway.py | 10 -- 2 files changed, 12 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b1add6e1/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py index 8117312..7323a73 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py @@ -32,7 +32,7 @@ from resource_management.libraries.functions import Direction from resource_management.libraries.functions.security_commons import build_expectations, \ cached_kinit_executor, validate_security_config_properties, get_params_from_filesystem, \ FILE_TYPE_XML -from resource_management.core.resources.system import File, Execute, Directory +from resource_management.core.resources.system import File, Execute, Directory, Link from resource_management.core.resources.service import Service from resource_management.core.logger import Logger @@ -148,9 +148,10 @@ class KnoxGatewayDefault(KnoxGateway): no_op_test = format('ls {knox_pid_file} >/dev/null 2>&1 && ps -p `cat {knox_pid_file}` >/dev/null 2>&1') setup_ranger_knox(rolling_upgrade=rolling_restart) # Used to setup symlink, needed to update the knox managed symlink, in case of custom locations -if os.path.islink(params.knox_managed_pid_symlink) and os.path.realpath(params.knox_managed_pid_symlink) != params.knox_pid_dir: - os.unlink(params.knox_managed_pid_symlink) - os.symlink(params.knox_pid_dir, params.knox_managed_pid_symlink) +if os.path.islink(params.knox_managed_pid_symlink): + Link(params.knox_managed_pid_symlink, + to = params.knox_pid_dir, + ) Execute(daemon_cmd, user=params.knox_user, @@ -196,7 +197,9 @@ class KnoxGatewayDefault(KnoxGateway): environment={'JAVA_HOME': params.java_home}, user=params.knox_user, ) -Execute (format("rm -f {ldap_pid_file}")) +File(params.ldap_pid_file, + action = "delete" +) def security_status(self, env): import status_params http://git-wip-us.apache.org/repos/asf/ambari/blob/b1add6e1/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py index 5ca5251..11f476e 100644 --- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py +++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py @@ -319,10 +319,7 @@ class TestKnoxGateway(RMFTestCase): mocks_dict['call'].call_args_list[0][0][0]) @patch("os.path.islink") - @patch("os.path.realpath") - @patch("os.unlink") - @patch("os.symlink") - def test_start_default(self, symlink_mock, unlink_mock, realpath_mock, islink_mock): + def test_start_default(self, islink_mock): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/knox_gateway.py", @@ -409,12 +406,13 @@ class TestKnoxGateway(RMFTestCase): owner = 'knox', content = self.getConfig()['configurations']['users-ldif']['content'] ) - +self.assertResourceCalled('Link', '/usr/hdp/current/knox-server/pids', +to = '/var/run/knox', +) self.assertResourceCalled("Execute", "/usr/hdp/current/knox-server/bin/gateway.sh start", environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, not_if = u'ls /var/run/knox/gateway.pid >/de