[ambari] branch branch-2.7 updated: AMBARI-25683 Ambari 2.7.6 Release (addendum) (#3323) sziszo via dgrinenko
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 388e072 AMBARI-25683 Ambari 2.7.6 Release (addendum) (#3323) sziszo via dgrinenko 388e072 is described below commit 388e072381e71c7755673b7743531c03a4d61be8 Author: Szilárd Antal AuthorDate: Thu Nov 11 13:07:58 2021 +0100 AMBARI-25683 Ambari 2.7.6 Release (addendum) (#3323) sziszo via dgrinenko --- ambari-infra/ambari-infra-assembly/pom.xml| 2 +- ambari-infra/ambari-infra-manager-it/pom.xml | 2 +- ambari-infra/ambari-infra-manager/pom.xml | 2 +- ambari-infra/ambari-infra-solr-client/pom.xml | 2 +- ambari-infra/ambari-infra-solr-plugin/pom.xml | 2 +- ambari-infra/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-appender/pom.xml| 2 +- ambari-logsearch/ambari-logsearch-assembly/pom.xml| 2 +- ambari-logsearch/ambari-logsearch-config-api/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-config-json/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-config-local/pom.xml| 2 +- ambari-logsearch/ambari-logsearch-config-solr/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-config-zookeeper/pom.xml| 2 +- ambari-logsearch/ambari-logsearch-it/pom.xml | 2 +- .../ambari-logsearch-logfeeder-container-registry/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-logfeeder-plugin-api/pom.xml| 2 +- ambari-logsearch/ambari-logsearch-logfeeder/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-server/pom.xml | 2 +- ambari-logsearch/ambari-logsearch-web/pom.xml | 4 ++-- ambari-logsearch/pom.xml | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ambari-infra/ambari-infra-assembly/pom.xml b/ambari-infra/ambari-infra-assembly/pom.xml index ef4a062..01d2cdb 100644 --- a/ambari-infra/ambari-infra-assembly/pom.xml +++ b/ambari-infra/ambari-infra-assembly/pom.xml @@ -21,7 +21,7 @@ ambari-infra org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 4.0.0 ambari-infra-assembly diff --git a/ambari-infra/ambari-infra-manager-it/pom.xml b/ambari-infra/ambari-infra-manager-it/pom.xml index 21a61bc..07635d6 100644 --- a/ambari-infra/ambari-infra-manager-it/pom.xml +++ b/ambari-infra/ambari-infra-manager-it/pom.xml @@ -22,7 +22,7 @@ ambari-infra org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 Ambari Infra Manager Integration Tests diff --git a/ambari-infra/ambari-infra-manager/pom.xml b/ambari-infra/ambari-infra-manager/pom.xml index 8dac3b1..17a19d2 100644 --- a/ambari-infra/ambari-infra-manager/pom.xml +++ b/ambari-infra/ambari-infra-manager/pom.xml @@ -21,7 +21,7 @@ ambari-infra org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 Ambari Infra Manager 4.0.0 diff --git a/ambari-infra/ambari-infra-solr-client/pom.xml b/ambari-infra/ambari-infra-solr-client/pom.xml index ff94b2a..cc26de2 100644 --- a/ambari-infra/ambari-infra-solr-client/pom.xml +++ b/ambari-infra/ambari-infra-solr-client/pom.xml @@ -21,7 +21,7 @@ ambari-infra org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 4.0.0 Ambari Infra Solr Client diff --git a/ambari-infra/ambari-infra-solr-plugin/pom.xml b/ambari-infra/ambari-infra-solr-plugin/pom.xml index 67f5d1b..59c2575 100644 --- a/ambari-infra/ambari-infra-solr-plugin/pom.xml +++ b/ambari-infra/ambari-infra-solr-plugin/pom.xml @@ -21,7 +21,7 @@ ambari-infra org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 Ambari Infra Solr Plugin 4.0.0 diff --git a/ambari-infra/pom.xml b/ambari-infra/pom.xml index a9ef573..8222be4 100644 --- a/ambari-infra/pom.xml +++ b/ambari-infra/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.apache.ambari ambari-infra - 2.7.5.0.0 + 2.7.6.0.0 pom diff --git a/ambari-logsearch/ambari-logsearch-appender/pom.xml b/ambari-logsearch/ambari-logsearch-appender/pom.xml index fc2d03b..bf96379 100644 --- a/ambari-logsearch/ambari-logsearch-appender/pom.xml +++ b/ambari-logsearch/ambari-logsearch-appender/pom.xml @@ -21,7 +21,7 @@ ambari-logsearch org.apache.ambari -2.7.5.0.0 +2.7.6.0.0 ambari-logsearch-appender diff --git a/ambari-logsearch/ambari-logsearch-assembly/pom.xml b/ambari-logsearch/ambari-logsearch-assembly/pom.xml index 6559156..9138720 100644 --- a/ambari-logsearch/ambari-logsearch-assembly/pom.xml +++ b/ambari-logsearch/ambari-logsearch-assembly/pom.xml @@ -21,7 +21,7 @@ ambari-logsearch
[ambari] branch branch-2.7 updated: AMBARI-25695 Pull request tests fail due to Maven 3.8.x blocks http repositories (santal) (#3321)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0fc5d44 AMBARI-25695 Pull request tests fail due to Maven 3.8.x blocks http repositories (santal) (#3321) 0fc5d44 is described below commit 0fc5d4401da8c0dc42f643d27610633321c9ec7e Author: Szilárd Antal AuthorDate: Mon Nov 8 11:05:41 2021 +0100 AMBARI-25695 Pull request tests fail due to Maven 3.8.x blocks http repositories (santal) (#3321) --- ambari-infra/pom.xml | 5 + ambari-logsearch/pom.xml | 5 + 2 files changed, 10 insertions(+) diff --git a/ambari-infra/pom.xml b/ambari-infra/pom.xml index 17bba7b..a9ef573 100644 --- a/ambari-infra/pom.xml +++ b/ambari-infra/pom.xml @@ -87,6 +87,11 @@ false + + maven-restlet + Public online Restlet repository + https://maven.restlet.com + diff --git a/ambari-logsearch/pom.xml b/ambari-logsearch/pom.xml index b2b21fb..c2f8142 100644 --- a/ambari-logsearch/pom.xml +++ b/ambari-logsearch/pom.xml @@ -103,6 +103,11 @@ false + + maven-restlet + Public online Restlet repository + https://maven.restlet.com +
[ambari] branch branch-2.7 updated: AMBARI-25693 Ambari Admin View failed to build due to PhantomJS (#3318)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 20298d4 AMBARI-25693 Ambari Admin View failed to build due to PhantomJS (#3318) 20298d4 is described below commit 20298d4ba48fae921f7b6a81ff563c30fa97d6f4 Author: Szilárd Antal AuthorDate: Tue Nov 2 13:21:55 2021 +0100 AMBARI-25693 Ambari Admin View failed to build due to PhantomJS (#3318) AMBARI-25693 Ambari Admin View failed to build due to PhantomJS (santal via dgrinenko) --- ambari-admin/pom.xml | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index aac5562..9ab45a8 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -61,29 +61,34 @@ com.github.eirslett frontend-maven-plugin -1.3 +1.4 v4.5.0 - 2.15.0 + v0.23.2 src/main/resources/ui/admin-web/ - false + false + + +/tmp/npm_config_tmp + -install node and npm +install node and yarn generate-sources - install-node-and-npm + install-node-and-yarn -npm install +yarn install generate-sources - npm + yarn - install --unsafe-perm + install --ignore-engines --pure-lockfile @@ -259,7 +264,7 @@ / sh sh - +
[ambari] branch branch-2.7 updated: AMBARI-25635 Clear Cluster and METRIC_AGGREGATORS MBeans upon shutdown (#3304) (payert via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 9938407 AMBARI-25635 Clear Cluster and METRIC_AGGREGATORS MBeans upon shutdown (#3304) (payert via dgrinenko) 9938407 is described below commit 99384078da451f65ed670fa8a378d91ce46f81bf Author: Tamas Payer <35402259+pay...@users.noreply.github.com> AuthorDate: Wed Apr 28 08:28:08 2021 +0200 AMBARI-25635 Clear Cluster and METRIC_AGGREGATORS MBeans upon shutdown (#3304) (payert via dgrinenko) Refactor HelicController inner class to LiveInstanceTracker. The HelicController was derived from GeneralHelixController class. This caused problem becasue practically two Controllers were in use due to thus bad pactice. The HelicController class is not intended to be a real Controller, only a tracker of the live nodes what is basically just a LiveInstanceChangeListener implementation. --- .../availability/MetricCollectorHAController.java | 175 ++--- .../MetricCollectorHAControllerTest.java | 5 +- 2 files changed, 84 insertions(+), 96 deletions(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/availability/MetricCollectorHAController.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/availability/MetricCollectorHAController.java index adbe8e7..b4ea111 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/availability/MetricCollectorHAController.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/availability/MetricCollectorHAController.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -31,7 +31,6 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.I0Itec.zkclient.exception.ZkNoNodeException; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -42,51 +41,55 @@ import org.apache.helix.HelixException; import org.apache.helix.HelixManager; import org.apache.helix.HelixManagerFactory; import org.apache.helix.InstanceType; +import org.apache.helix.LiveInstanceChangeListener; import org.apache.helix.NotificationContext; -import org.apache.helix.controller.GenericHelixController; +import org.apache.helix.PropertyKey; import org.apache.helix.manager.zk.ZKHelixAdmin; import org.apache.helix.model.ExternalView; import org.apache.helix.model.InstanceConfig; import org.apache.helix.model.LiveInstance; import org.apache.helix.model.OnlineOfflineSMD; -import org.apache.helix.model.StateModelDefinition; -import org.apache.helix.tools.StateModelConfigGenerator; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; -; public class MetricCollectorHAController { private static final Log LOG = LogFactory.getLog(MetricCollectorHAController.class); + @VisibleForTesting static final String CLUSTER_NAME = "ambari-metrics-cluster"; + @VisibleForTesting static final String METRIC_AGGREGATORS = "METRIC_AGGREGATORS"; + @VisibleForTesting static final String DEFAULT_STATE_MODEL = OnlineOfflineSMD.name; - static final String INSTANCE_NAME_DELIMITER = "_"; + private static final String INSTANCE_NAME_DELIMITER = "_"; + private static final int PARTITION_NUMBER = 2; + private static final int REPLICATION_FACTOR = 1; + @VisibleForTesting final String zkConnectUrl; - final String instanceHostname; - final InstanceConfig instanceConfig; - final AggregationTaskRunner aggregationTaskRunner; - final TimelineMetricConfiguration configuration; + private final String instanceHostname; + private final InstanceConfig instanceConfig; + private final AggregationTaskRunner aggregationTaskRunner; // Cache list of known live instances - final List liveInstanceNames = new ArrayList<>(); + private final List liveInstanceNames = new ArrayList<>(2); + private final LiveInstanceTracker liveInstanceTracker = new LiveInstanceTracker(); // Helix Admin + @VisibleForTesting HelixAdmin admin; // Helix Manager - HelixManager manager; + private HelixManager manager; private volatile boolean isInitialized = false; public MetricCollectorHAController(TimelineMetricConfiguration configuration) { -this.configuration = configuration;
[ambari] branch branch-2.7 updated: AMBARI-25637. ConcurrentModificationException during stomp subscriptions processing. (dvitiuk via dgrinenko) (#3300)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new fae912a AMBARI-25637. ConcurrentModificationException during stomp subscriptions processing. (dvitiuk via dgrinenko) (#3300) fae912a is described below commit fae912aa4eaba83e7208ea4c78bcb6bb4a4e5709 Author: dvitiiuk AuthorDate: Mon Mar 29 15:44:34 2021 +0300 AMBARI-25637. ConcurrentModificationException during stomp subscriptions processing. (dvitiuk via dgrinenko) (#3300) --- .../agent/stomp/AmbariSubscriptionRegistry.java| 50 -- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/AmbariSubscriptionRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/AmbariSubscriptionRegistry.java index 68330c6..8cbf0af 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/AmbariSubscriptionRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/AmbariSubscriptionRegistry.java @@ -294,21 +294,23 @@ public class AmbariSubscriptionRegistry extends AbstractSubscriptionRegistry { this.accessCache.entrySet().iterator(); iterator.hasNext(); ) { Map.Entry> entry = iterator.next(); String destination = entry.getKey(); -LinkedMultiValueMap sessionMap = entry.getValue(); -List subscriptions = sessionMap.get(sessionId); -if (subscriptions != null) { - subscriptions.remove(subsId); - if (subscriptions.isEmpty()) { -sessionMap.remove(sessionId); - } - if (sessionMap.isEmpty()) { -iterator.remove(); - } - else { -this.notSubscriptionCache.invalidate(destination); -this.accessCache.put(destination, sessionMap.deepCopy()); +accessCache.computeIfPresent(destination, (key, sessionMap)-> { + List subscriptions = sessionMap.get(sessionId); + if (subscriptions != null) { +subscriptions.remove(subsId); +if (subscriptions.isEmpty()) { + sessionMap.remove(sessionId); +} +if (sessionMap.isEmpty()) { + return null; +} +else { + this.notSubscriptionCache.invalidate(destination); + return sessionMap.deepCopy(); +} } -} + return sessionMap; +}); } } @@ -317,16 +319,18 @@ public class AmbariSubscriptionRegistry extends AbstractSubscriptionRegistry { this.accessCache.entrySet().iterator(); iterator.hasNext(); ) { Map.Entry> entry = iterator.next(); String destination = entry.getKey(); -LinkedMultiValueMap sessionMap = entry.getValue(); -if (sessionMap.remove(info.getSessionId()) != null) { - if (sessionMap.isEmpty()) { -iterator.remove(); - } - else { -this.notSubscriptionCache.invalidate(destination); -this.accessCache.put(destination, sessionMap.deepCopy()); +accessCache.computeIfPresent(destination, (key, sessionMap)-> { + if (sessionMap.remove(info.getSessionId()) != null) { +if (sessionMap.isEmpty()) { + return null; +} +else { + this.notSubscriptionCache.invalidate(destination); + return sessionMap.deepCopy(); +} } -} + return sessionMap; +}); } }
[ambari] branch branch-2.7 updated: AMBARI-25639. StackOverflowError appears on MethodArgument*Exception during stomp message handling. (dvitiuk via dgrinenko) (#3302)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 1945c3b AMBARI-25639. StackOverflowError appears on MethodArgument*Exception during stomp message handling. (dvitiuk via dgrinenko) (#3302) 1945c3b is described below commit 1945c3bf722df7392befee96d04fd6a512f60d75 Author: dvitiiuk AuthorDate: Fri Mar 26 18:46:38 2021 +0200 AMBARI-25639. StackOverflowError appears on MethodArgument*Exception during stomp message handling. (dvitiuk via dgrinenko) (#3302) --- .../ambari/server/configuration/spring/RootStompConfig.java | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java index a49df55..ee2d407 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java @@ -22,6 +22,7 @@ import java.util.List; import javax.servlet.ServletContext; +import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.agent.AgentSessionManager; import org.apache.ambari.server.agent.stomp.AmbariSubscriptionRegistry; import org.apache.ambari.server.api.AmbariSendToMethodReturnValueHandler; @@ -116,12 +117,9 @@ public class RootStompConfig { @MessageExceptionHandler(Exception.class) @SendToUser("/") public ErrorMessage handle(Exception e) { - - //LOG.error("Exception caught while processing message: " + e.getMessage(), e); - return new ErrorMessage(e); + LOG.error("Exception caught while processing a message: " + e.getMessage(), e); + return new ErrorMessage(new AmbariException(e.getMessage())); } - - } }
[ambari] branch branch-2.7 updated: AMBARI-25636 FindBugs: Comparison of String parameter using == or != (#3299) (tpayer via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 66bb30c AMBARI-25636 FindBugs: Comparison of String parameter using == or != (#3299) (tpayer via dgrinenko) 66bb30c is described below commit 66bb30ce9e2f46887a7df69f72e0959e76485736 Author: Tamas Payer <35402259+pay...@users.noreply.github.com> AuthorDate: Thu Mar 25 09:55:30 2021 +0100 AMBARI-25636 FindBugs: Comparison of String parameter using == or != (#3299) (tpayer via dgrinenko) --- .../apache/ambari/server/state/host/HostImpl.java | 28 +++-- .../ambari/server/state/host/HostImplTest.java | 69 +- 2 files changed, 90 insertions(+), 7 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java index f2a9e88..e563955 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java @@ -85,6 +85,7 @@ import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.annotations.VisibleForTesting; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.google.inject.Inject; @@ -320,6 +321,12 @@ public class HostImpl implements Host { maintMap = ensureMaintMap(hostEntity.getHostStateEntity()); } + @VisibleForTesting + HostImpl(HostEntity hostEntity, Gson gson, HostDAO hostDAO, HostStateDAO hostStateDAO, AmbariEventPublisher publisher) { +this(hostEntity, gson, hostDAO, hostStateDAO); +this.ambariEventPublisher = publisher; + } + @Override public int compareTo(Object o) { if ((o != null ) && (o instanceof Host)) { @@ -957,18 +964,27 @@ public class HostImpl implements Host { } } - @Override public String getStatus() { return status; } + /** + * Sets the Host's status. + * + * @param status Host Status string representation of the Host's status + * @throws IllegalArgumentException if status is null or {@link HealthStatus} enum has no such constant name. + */ @Override public void setStatus(String status) { -if (this.status != status) { - ambariEventPublisher.publish(new HostStatusUpdateEvent(getHostName(), status)); +if (status == null) { + throw new IllegalArgumentException("Host status cannot be null"); +} +String newStatus = HealthStatus.valueOf(status).name(); +if (!newStatus.equals(this.status)) { + ambariEventPublisher.publish(new HostStatusUpdateEvent(getHostName(), newStatus)); + this.status = newStatus; } -this.status = status; } @Override @@ -1323,8 +1339,8 @@ public class HostImpl implements Host { // for every host component, if it matches the desired repo and has reported // the correct version then we're good for (HostComponentStateEntity hostComponentState : hostComponentStates) { - ServiceComponentDesiredStateEntity desiredComponmentState = hostComponentState.getServiceComponentDesiredStateEntity(); - RepositoryVersionEntity desiredRepositoryVersion = desiredComponmentState.getDesiredRepositoryVersion(); + ServiceComponentDesiredStateEntity desiredComponentState = hostComponentState.getServiceComponentDesiredStateEntity(); + RepositoryVersionEntity desiredRepositoryVersion = desiredComponentState.getDesiredRepositoryVersion(); ComponentInfo componentInfo = ambariMetaInfo.getComponent( desiredRepositoryVersion.getStackName(), desiredRepositoryVersion.getStackVersion(), diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostImplTest.java index d8195c2..c914c05 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostImplTest.java @@ -17,15 +17,24 @@ */ package org.apache.ambari.server.state.host; +import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; import static org.junit.Assert.assertEquals; import java.util.Map; + +import org.apache.ambari.server.events.HostStatusUpdateEvent; +import org.apache.ambari.server.events.publishers.AmbariEventPublisher; import org.apache.ambari.server.orm.dao.HostDAO; import org.apache.ambari.server.orm.dao.HostStateDAO; import org.apache.ambari.server.orm.entities.HostEntity; import org.apache.ambari.server.orm.entities.HostStateEntity; + +import org.apache.ambari.se
[ambari] branch branch-2.7 updated: AMBARI-25634. Code cleanup: Remove AgentResource class as it is not needed anymore. (dvitiuk via dgrinenko) (#3296)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new a87ce9b AMBARI-25634. Code cleanup: Remove AgentResource class as it is not needed anymore. (dvitiuk via dgrinenko) (#3296) a87ce9b is described below commit a87ce9b1d1437136e16ef2def5f68d350135b914 Author: dvitiiuk AuthorDate: Mon Mar 15 18:55:54 2021 +0200 AMBARI-25634. Code cleanup: Remove AgentResource class as it is not needed anymore. (dvitiuk via dgrinenko) (#3296) --- .../ambari/server/agent/rest/AgentResource.java| 177 - .../ambari/server/controller/AmbariServer.java | 4 +- .../ambari/server/agent/AgentResourceTest.java | 396 - .../ambari/server/topology/AmbariContextTest.java | 17 +- 4 files changed, 15 insertions(+), 579 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java deleted file mode 100644 index cf6d57b..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ambari.server.agent.rest; - -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; - -import org.apache.ambari.annotations.ApiIgnore; -import org.apache.ambari.server.AmbariException; -import org.apache.ambari.server.agent.ComponentsResponse; -import org.apache.ambari.server.agent.HeartBeat; -import org.apache.ambari.server.agent.HeartBeatHandler; -import org.apache.ambari.server.agent.HeartBeatResponse; -import org.apache.ambari.server.agent.Register; -import org.apache.ambari.server.agent.RegistrationResponse; -import org.apache.ambari.server.agent.RegistrationStatus; -import org.apache.ambari.server.state.fsm.InvalidStateTransitionException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.inject.Inject; - -/** - * Agent Resource represents Ambari agent controller. - * It provides API for Ambari agents to get the cluster configuration changes - * as well as report the node attributes and state of services running the on - * the cluster nodes - */ -@Path("/") -public class AgentResource { - private static HeartBeatHandler hh; - private static final Logger LOG = LoggerFactory.getLogger(AgentResource.class); - - @Inject - public static void init(HeartBeatHandler instance) { -hh = instance; -//hh.start(); - } - - /** - * Explicitly start HH - */ - public static void startHeartBeatHandler() { -hh.start(); - } - - /** - * Register information about the host (Internal API to be used for - * Ambari Agent) - * @response.representation.200.doc This API is invoked by Ambari agent running - * on a cluster to register with the server. - * @response.representation.200.mediaType application/json - * @response.representation.406.doc Error in register message format - * @response.representation.408.doc Request Timed out - * @param message Register message - * @throws InvalidStateTransitionException - * @throws AmbariException - * @throws Exception - */ - @Path("register/{hostName}") - @POST @ApiIgnore // until documented - @Consumes(MediaType.APPLICATION_JSON) - @Produces({MediaType.APPLICATION_JSON}) - public RegistrationResponse register(Register message, - @Context HttpServletRequest req) - throws WebApplicationException, InvalidStateTransitionException { -/* Call into the heartbeat handler */ - -RegistrationResponse response = null; -try { - response = hh.handleRegistration(message); - LOG.debug("Sending registration response {}", response); -
[ambari] branch branch-2.7 updated: AMBARI-25627 ORA-01795 error when querying hostcomponentdesiredstate table on large cluster (#3292) (tpayer via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 9846f6d AMBARI-25627 ORA-01795 error when querying hostcomponentdesiredstate table on large cluster (#3292) (tpayer via dgrinenko) 9846f6d is described below commit 9846f6d8be30d42a6a37b1f1dac9897ce0a87016 Author: Tamas Payer <35402259+pay...@users.noreply.github.com> AuthorDate: Wed Mar 10 09:32:01 2021 +0100 AMBARI-25627 ORA-01795 error when querying hostcomponentdesiredstate table on large cluster (#3292) (tpayer via dgrinenko) --- .../orm/dao/HostComponentDesiredStateDAO.java | 28 -- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java index 1af1e0c..1df6120 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java @@ -18,7 +18,9 @@ package org.apache.ambari.server.orm.dao; +import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import javax.persistence.EntityManager; @@ -28,7 +30,11 @@ import javax.persistence.TypedQuery; import org.apache.ambari.server.orm.RequiresSession; import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity; import org.apache.ambari.server.orm.entities.HostEntity; +import org.apache.ambari.server.orm.helpers.SQLConstants; +import org.apache.ambari.server.orm.helpers.SQLOperations; +import org.apache.commons.collections.CollectionUtils; +import com.google.common.collect.Lists; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; @@ -124,13 +130,21 @@ public class HostComponentDesiredStateDAO { @RequiresSession public List findByHostsAndCluster(Collection hostIds, Long clusterId) { -final TypedQuery query = entityManagerProvider.get() - .createNamedQuery("HostComponentDesiredStateEntity.findByHostsAndCluster", HostComponentDesiredStateEntity.class); - -query.setParameter("hostIds", hostIds); -query.setParameter("clusterId", clusterId); - -return daoUtils.selectList(query); +if (CollectionUtils.isEmpty(hostIds)) { + return Collections.emptyList(); +} +final EntityManager entityManager = entityManagerProvider.get(); +final TypedQuery query = entityManager. + createNamedQuery("HostComponentDesiredStateEntity.findByHostsAndCluster", HostComponentDesiredStateEntity.class); + +final List result = new ArrayList<>(); +SQLOperations.batch(hostIds, SQLConstants.IN_ARGUMENT_MAX_SIZE, (chunk, currentBatch, totalBatches, totalSize) -> { + query.setParameter("hostIds", chunk); + query.setParameter("clusterId", clusterId); + result.addAll(daoUtils.selectList(query)); + return 0; +}); +return Lists.newArrayList(result); } @Transactional
[ambari] branch branch-2.7 updated: AMBARI-22827. DB Cleanup scripts are using IN clauses (dgrinenko) (#3291)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0041c26 AMBARI-22827. DB Cleanup scripts are using IN clauses (dgrinenko) (#3291) 0041c26 is described below commit 0041c269cd4fb1f2f878d1838e9bfe8746caeb55 Author: Tamas Payer <35402259+pay...@users.noreply.github.com> AuthorDate: Tue Mar 9 12:56:45 2021 +0100 AMBARI-22827. DB Cleanup scripts are using IN clauses (dgrinenko) (#3291) --- .../apache/ambari/server/orm/dao/RequestDAO.java | 172 +++- .../ambari/server/orm/dao/TopologyHostTaskDAO.java | 19 ++- .../server/orm/dao/TopologyLogicalRequestDAO.java | 17 +- .../server/orm/dao/TopologyLogicalTaskDAO.java | 17 +- .../ambari/server/orm/helpers/SQLConstants.java| 28 .../ambari/server/orm/helpers/SQLOperations.java | 60 +++ .../src/main/python/ambari_server/dbCleanup.py | 177 - .../server/orm/helpers/SQLOperationsTest.java | 54 +++ 8 files changed, 336 insertions(+), 208 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java index d78c14c..24e2231 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java @@ -19,7 +19,6 @@ package org.apache.ambari.server.orm.dao; import java.text.MessageFormat; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; @@ -46,6 +45,8 @@ import org.apache.ambari.server.orm.entities.StageEntity; import org.apache.ambari.server.orm.entities.TopologyHostRequestEntity; import org.apache.ambari.server.orm.entities.TopologyHostTaskEntity; import org.apache.ambari.server.orm.entities.TopologyLogicalTaskEntity; +import org.apache.ambari.server.orm.helpers.SQLConstants; +import org.apache.ambari.server.orm.helpers.SQLOperations; import org.apache.ambari.server.state.Clusters; import org.eclipse.persistence.config.HintValues; import org.eclipse.persistence.config.QueryHints; @@ -63,9 +64,6 @@ public class RequestDAO implements Cleanable { private static final Logger LOG = LoggerFactory.getLogger(RequestDAO.class); - - private static final int BATCH_SIZE = 999; - /** * SQL template to retrieve all request IDs, sorted by the ID. */ @@ -82,8 +80,6 @@ public class RequestDAO implements Cleanable { private final static String REQUESTS_WITH_NO_CLUSTER_SQL = "SELECT request.requestId FROM RequestEntity request WHERE request.clusterId = -1 OR request.clusterId IS NULL ORDER BY request.requestId %s"; - - @Inject Provider entityManagerProvider; @@ -311,23 +307,21 @@ public class RequestDAO implements Cleanable { @Transactional protected int cleanTableByIds(Set ids, String paramName, String entityName, Long beforeDateMillis, String entityQuery, Class type) { -LOG.info(String.format("Deleting %s entities before date %s", entityName, new Date(beforeDateMillis))); -int affectedRows = 0; -if (ids != null && !ids.isEmpty()) { - EntityManager entityManager = entityManagerProvider.get(); - // Batch delete - TypedQuery query = entityManager.createNamedQuery(entityQuery, type); - for (int i = 0; i < ids.size(); i += BATCH_SIZE) { -int endRow = (i + BATCH_SIZE) > ids.size() ? ids.size() : (i + BATCH_SIZE); -List idsSubList = new ArrayList<>(ids).subList(i, endRow); -LOG.info("Deleting " + entityName + " entity batch with task ids: " + -idsSubList.get(0) + " - " + idsSubList.get(idsSubList.size() - 1)); -query.setParameter(paramName, idsSubList); -affectedRows += query.executeUpdate(); - } +LOG.info(String.format("Purging %s entity records before date %s", entityName, new Date(beforeDateMillis))); + +if (ids == null || ids.isEmpty()) { + return 0; } -return affectedRows; +final EntityManager entityManager = entityManagerProvider.get(); +final TypedQuery query = entityManager.createNamedQuery(entityQuery, type); + +// Batch delete +return SQLOperations.batch(ids, SQLConstants.IN_ARGUMENT_MAX_SIZE, (chunk, currentBatch, totalBatches, totalSize) -> { + LOG.info(String.format("Purging %s entity, batch %s/%s.", entityName, currentBatch, totalBatches)); + query.setParameter(paramName, chunk); + return query.executeUpdate(); +}); } /** @@ -346,33 +340,34 @@ public class RequestDAO implements Cleanable { @Transactional protected int c
[ambari] branch branch-2.7 updated: AMBARI-25612. Ambari stops alert notices dispatching on unhandled exception inside. (dvitiuk via dgrinenko) (#3280)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 027157d AMBARI-25612. Ambari stops alert notices dispatching on unhandled exception inside. (dvitiuk via dgrinenko) (#3280) 027157d is described below commit 027157d86a1b3b070487d90f9a797e6ffbb3ea80 Author: dvitiiuk AuthorDate: Tue Jan 26 13:57:33 2021 +0200 AMBARI-25612. Ambari stops alert notices dispatching on unhandled exception inside. (dvitiuk via dgrinenko) (#3280) --- .../state/services/AlertNoticeDispatchService.java | 176 - 1 file changed, 105 insertions(+), 71 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java b/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java index c7de5d0..60e53a5 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java @@ -271,16 +271,51 @@ public class AlertNoticeDispatchService extends AbstractScheduledService { */ @Override protected void runOneIteration() throws Exception { +Map> aggregateMap; +try { + aggregateMap = getGroupedNotices(); +} catch (Exception e) { + LOG.error("Caught exception during alert notices preparing.", e); + return; +} + +// now that all of the notices are grouped by target, dispatch them +Set targets = aggregateMap.keySet(); +for (AlertTargetEntity target : targets) { + List notices = aggregateMap.get(target); + if (null == notices || notices.size() == 0) { +continue; + } + try { +String targetType = target.getNotificationType(); +NotificationDispatcher dispatcher = m_dispatchFactory.getDispatcher(targetType); + +// create a single digest notification if supported +if (dispatcher.isDigestSupported()) { + createSingleNotice(dispatcher, target, notices); +} else { + createSeparateNotices(dispatcher, target, notices); +} + } catch (Exception e) { +LOG.error("Caught exception during Alert Notice dispatching.", e); + } +} + } + + /** + * Retrieves all pending notices to dispatch and groups them by target. + * @return grouped notices. + */ + private Map> getGroupedNotices() { List pending = m_dao.findPendingNotices(); if (pending.size() == 0) { - return; + return Collections.EMPTY_MAP; } LOG.info("There are {} pending alert notices about to be dispatched...", pending.size()); -Map> aggregateMap = - new HashMap<>(pending.size()); +Map> aggregateMap = new HashMap<>(pending.size()); // combine all histories by target for (AlertNoticeEntity notice : pending) { @@ -298,77 +333,76 @@ public class AlertNoticeDispatchService extends AbstractScheduledService { notices.add(notice); } +return aggregateMap; + } -// now that all of the notices are grouped by target, dispatch them -Set targets = aggregateMap.keySet(); -for (AlertTargetEntity target : targets) { - List notices = aggregateMap.get(target); - if (null == notices || notices.size() == 0) { -continue; - } + /** + * Creates a single digest notification. Should be used when dispatcher supports digest. + * @param dispatcher dispatches the created notifications. + * @param target where notifications will be sent. + * @param notices notices should be dispatched. + */ + private void createSingleNotice(NotificationDispatcher dispatcher, AlertTargetEntity target, + List notices) { +AlertNotification notification = buildNotificationFromTarget(target); +notification.CallbackIds = new ArrayList<>(notices.size()); +List histories = new ArrayList<>( +notices.size()); + +// add callback IDs so that the notices can be marked as DELIVERED or +// FAILED, and create a list of just the alert histories +for (AlertNoticeEntity notice : notices) { + AlertHistoryEntity history = notice.getAlertHistory(); + histories.add(history); + + notification.CallbackIds.add(notice.getUuid()); +} + + +// populate the subject and body fields; if there is a problem +// generating the content, then mark the notices as FAILED +try { + renderDigestNotificationContent(dispatcher, notification, histories, target); + + // dispatch + DispatchRunnable runnable = new DispatchRunnable(dispatcher, notification); + m_executor.execute(runnable); +} catch (Exception excep
[ambari] branch branch-2.7 updated: AMBARI-25610. No warning message at changing repo name to an invalid one (dpidhaiets via dgrinenko) (#3278)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new fe3ccab AMBARI-25610. No warning message at changing repo name to an invalid one (dpidhaiets via dgrinenko) (#3278) fe3ccab is described below commit fe3ccab860e87b5166a1397e72f2102a89694fa2 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Fri Jan 15 13:35:03 2021 +0200 AMBARI-25610. No warning message at changing repo name to an invalid one (dpidhaiets via dgrinenko) (#3278) --- .../src/main/resources/ui/admin-web/app/scripts/services/Stack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js index 714d0b9..245f16b 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js @@ -369,8 +369,8 @@ angular.module('ambariAdminConsole') ).then(function () { totalCalls--; if (totalCalls === 0) deferred.resolve(invalidUrls); - }, function (response, status, callback, params) { -invalidUrls.push(params.repo); + }, function (response) { +invalidUrls.push(response.config.repo); totalCalls--; if (totalCalls === 0) deferred.resolve(invalidUrls); });
[ambari] branch branch-2.7 updated: AMBARI-25609. sysUpTime field is populated with invalid value during SNMP trap creation. (dgrinenko via dvitiuk) (#3277)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 1cda0b0 AMBARI-25609. sysUpTime field is populated with invalid value during SNMP trap creation. (dgrinenko via dvitiuk) (#3277) 1cda0b0 is described below commit 1cda0b0746507a4c5d340195c0a5cf3ee45faa31 Author: dvitiiuk AuthorDate: Wed Jan 13 14:19:16 2021 +0200 AMBARI-25609. sysUpTime field is populated with invalid value during SNMP trap creation. (dgrinenko via dvitiuk) (#3277) --- .../server/notifications/dispatchers/AmbariSNMPDispatcher.java| 4 ++-- .../server/state/services/AlertNoticeDispatchServiceTest.java | 8 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java index 0c2489a..b8b7016 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java @@ -119,8 +119,8 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { pdu.setType(snmpVersion.getTrapType()); RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); -long uptimeInMillis = runtimeMXBean.getUptime(); -pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(uptimeInMillis))); +long uptimeInHundredthsOfSecond = runtimeMXBean.getUptime() / 10; +pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(uptimeInHundredthsOfSecond))); // Set trap oid for PDU pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(AMBARI_ALERT_TRAP_OID))); diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java index ed289b4..5ebe3cc 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java @@ -101,6 +101,10 @@ public class AlertNoticeDispatchServiceTest extends AlertNoticeDispatchService { final static String HOSTNAME = "c6401.ambari.apache.org"; final static Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + // the requirement to this test value is to be greater than 2^32-1 + final static long UPTIME_MILLIS = 8589934592L; + final static long UPTIME_HUNDREDTHS_OF_SECOND = UPTIME_MILLIS / 10; + private AmbariMetaInfo m_metaInfo = null; private DispatchFactory m_dispatchFactory = null; private AlertDispatchDAO m_dao = null; @@ -170,7 +174,7 @@ public class AlertNoticeDispatchServiceTest extends AlertNoticeDispatchService { PowerMock.mockStatic(ManagementFactory.class); expect(ManagementFactory.getRuntimeMXBean()).andReturn(m_runtimeMXBean).atLeastOnce(); PowerMock.replay(ManagementFactory.class); -expect(m_runtimeMXBean.getUptime()).andReturn(36L).atLeastOnce(); +expect(m_runtimeMXBean.getUptime()).andReturn(UPTIME_MILLIS).atLeastOnce(); replay( m_runtimeMXBean); } @@ -404,7 +408,7 @@ public class AlertNoticeDispatchServiceTest extends AlertNoticeDispatchService { List expectedTrapVectors = new LinkedList<>(); Vector firstVector = new Vector(); -firstVector.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(36L))); +firstVector.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(UPTIME_HUNDREDTHS_OF_SECOND))); firstVector.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(AmbariSNMPDispatcher.AMBARI_ALERT_TRAP_OID))); firstVector.add(new VariableBinding(new OID(AmbariSNMPDispatcher.AMBARI_ALERT_DEFINITION_ID_OID), new Integer32(new BigDecimal(1L).intValueExact(; firstVector.add(new VariableBinding(new OID(AmbariSNMPDispatcher.AMBARI_ALERT_DEFINITION_NAME_OID), new OctetString("alert-definition-1")));
[ambari] branch branch-2.7 updated: AMBARI-25608. Timezone data is outdated (dgrinenko via dpidhaiets) (#3276)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 84a7a23 AMBARI-25608. Timezone data is outdated (dgrinenko via dpidhaiets) (#3276) 84a7a23 is described below commit 84a7a233d294a905be0ff731a2d94b2ac3b171d5 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Wed Jan 13 11:14:44 2021 +0200 AMBARI-25608. Timezone data is outdated (dgrinenko via dpidhaiets) (#3276) --- ambari-web/brunch-config.js|2 +- ambari-web/karma.conf.js |2 +- ambari-web/test/utils/date/timezone_test.js|2 +- .../scripts/moment-timezone-with-data-2010-2020.js | 1002 -- .../scripts/moment-timezone-with-data-2020-2030.js | 1433 5 files changed, 1436 insertions(+), 1005 deletions(-) diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js index 702137e..23db7b6 100644 --- a/ambari-web/brunch-config.js +++ b/ambari-web/brunch-config.js @@ -77,7 +77,7 @@ module.exports.config = { 'vendor/scripts/diffview.js', 'vendor/scripts/visualsearch.js', 'vendor/scripts/moment.min.js', - 'vendor/scripts/moment-timezone-with-data-2010-2020.js', + 'vendor/scripts/moment-timezone-with-data-2020-2030.js', 'vendor/scripts/workflow_visualization.js', 'vendor/scripts/rickshaw.js', 'vendor/scripts/spin.js', diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js index a595850..b19287f 100644 --- a/ambari-web/karma.conf.js +++ b/ambari-web/karma.conf.js @@ -82,7 +82,7 @@ module.exports = function(config) { 'vendor/scripts/FileSaver.js', 'vendor/scripts/Blob.js', 'vendor/scripts/moment.min.js', - 'vendor/scripts/moment-timezone-with-data-2010-2020.js', + 'vendor/scripts/moment-timezone-with-data-2020-2030.js', 'vendor/**/*.js', 'app/templates/**/*.hbs', 'app!(assets)/**/!(karma_setup|tests).js', diff --git a/ambari-web/test/utils/date/timezone_test.js b/ambari-web/test/utils/date/timezone_test.js index ebf5e68..37a8c8c 100644 --- a/ambari-web/test/utils/date/timezone_test.js +++ b/ambari-web/test/utils/date/timezone_test.js @@ -139,7 +139,7 @@ describe('timezoneUtils', function () { it('Detect UTC+1', function () { mockTimezoneOffset(0, 60); var tz = timezoneUtils.detectUserTimezone(); - expect(tz).to.contain('0-60|Africa'); + expect(tz).to.contain('0-60|Atlantic'); }); it('Detect UTC+1 for Europe', function () { diff --git a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js deleted file mode 100644 index 7ce0fe0..000 --- a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js +++ /dev/null @@ -1,1002 +0,0 @@ -//! moment-timezone.js -//! version : 0.5.0 -//! author : Tim Wood -//! license : MIT -//! github.com/moment/moment-timezone - -(function (root, factory) { - "use strict"; - - /*global define*/ - if (typeof define === 'function' && define.amd) { - define(['moment'], factory); // AMD - } else if (typeof module === 'object' && module.exports) { - module.exports = factory(require('moment')); // Node - } else { - factory(root.moment);// Browser - } -}(this, function (moment) { - "use strict"; - - // Do not load moment-timezone a second time. - if (moment.tz !== undefined) { - logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); - return moment; - } - - var VERSION = "0.5.0", - zones = {}, - links = {}, - names = {}, - guesses = {}, - cachedGuess, - - momentVersion = moment.version.split('.'), - major = +momentVersion[0], - minor = +momentVersion[1]; - - // Moment.js version check - if (major < 2 || (major === 2 && minor < 6)) { - logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); - } - - / -Unpacking -/ - - function charCodeToInt(charCode) { - if (charCode > 96) { - return charCode - 87; - } else if (charCode > 64) { - return charCode - 29; - } -
[ambari] branch branch-2.7 updated: AMBARI-25606. Sometimes request aborting doesn't abort IN_PROGRESS task. (dvitiuk via dgrinenko) (#3275)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ebde46f AMBARI-25606. Sometimes request aborting doesn't abort IN_PROGRESS task. (dvitiuk via dgrinenko) (#3275) ebde46f is described below commit ebde46f27f0a2f38c176d6a2c66524d0078873d5 Author: dvitiiuk AuthorDate: Tue Dec 22 17:20:42 2020 +0200 AMBARI-25606. Sometimes request aborting doesn't abort IN_PROGRESS task. (dvitiuk via dgrinenko) (#3275) --- .../server/actionmanager/ActionDBAccessor.java | 4 +-- .../server/actionmanager/ActionDBAccessorImpl.java | 2 +- .../server/actionmanager/ActionScheduler.java | 12 ++-- .../server/actionmanager/HostRoleStatus.java | 4 +++ .../actionmanager/TestActionDBAccessorImpl.java| 12 ++-- .../server/actionmanager/TestActionScheduler.java | 35 -- 6 files changed, 20 insertions(+), 49 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index b095a70..d876e74 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -57,8 +57,8 @@ public interface ActionDBAccessor { /** * Abort all outstanding operations associated with the given request. This - * method uses the {@link HostRoleStatus#SCHEDULED_STATES} to determine which - * {@link HostRoleCommand} instances to abort. + * method uses the {@link HostRoleStatus#SCHEDULED_STATES} and {@link HostRoleStatus#HOLDING_STATES} + * to determine which {@link HostRoleCommand} instances to abort. * * Returns the list of the aborted operations. */ diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 329ecba..485e763 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -219,7 +219,7 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { // only request commands which actually need to be aborted; requesting all // commands here can cause OOM problems during large requests like upgrades List commands = hostRoleCommandDAO.findByRequestIdAndStatuses(requestId, -HostRoleStatus.SCHEDULED_STATES); +HostRoleStatus.STATES_TO_ABORT); for (HostRoleCommandEntity command : commands) { command.setStatus(HostRoleStatus.ABORTED); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index 735a774..6267553 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -1234,9 +1234,9 @@ class ActionScheduler implements Runnable { cancelHostRoleCommands(tasksToDequeue, reason); } -// abort any stages in progress that belong to this request; don't execute this for all stages since -// that could lead to OOM errors on large requests, like those for -// upgrades +// abort any stages in progress and holding states that belong to this request; +// don't execute this for all stages since that could lead to OOM errors on large requests, +// like those for upgrades List stagesInProgress = db.getStagesInProgressForRequest(requestId); for (Stage stageInProgress : stagesInProgress) { abortOperationsForStage(stageInProgress); @@ -1270,12 +1270,6 @@ class ActionScheduler implements Runnable { } } - if (hostRoleCommand.getStatus().isHoldingState()) { -db.abortHostRole(hostRoleCommand.getHostName(), -hostRoleCommand.getRequestId(), -hostRoleCommand.getStageId(), hostRoleCommand.getRole().name()); - } - // If host role is an Action, we have to send an event if (hostRoleCommand.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) { String clusterName = hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getClusterName(); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleStatus.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleStatus.java index 9685f83..ff716df 100644 --- a/ambari-server/src/main/java/org/apache
[ambari] branch branch-2.7 updated: AMBARI-25601. Ambari with AMS HA unable to change metrics collector for metrics providing on collector fail. (dvitiuk via dgrinenko) (#3274)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 1b1ad08 AMBARI-25601. Ambari with AMS HA unable to change metrics collector for metrics providing on collector fail. (dvitiuk via dgrinenko) (#3274) 1b1ad08 is described below commit 1b1ad08b8621ff737ed61e0cfecba9929e8ccfac Author: dvitiiuk AuthorDate: Wed Dec 16 12:18:43 2020 +0200 AMBARI-25601. Ambari with AMS HA unable to change metrics collector for metrics providing on collector fail. (dvitiuk via dgrinenko) (#3274) --- .../server/controller/metrics/CollectorHostDownRefreshCounter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/CollectorHostDownRefreshCounter.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/CollectorHostDownRefreshCounter.java index a025918..eb6b4bc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/CollectorHostDownRefreshCounter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/CollectorHostDownRefreshCounter.java @@ -23,7 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger; public class CollectorHostDownRefreshCounter { private int collectorDownRefreshCounterLimit = 5; - private AtomicInteger collectorDownRefreshCounter; + private AtomicInteger collectorDownRefreshCounter = new AtomicInteger(0); CollectorHostDownRefreshCounter(int counter) { this.collectorDownRefreshCounterLimit = counter;
[ambari] branch branch-2.7 updated: [AMBARI-25587] Metrics cannot be stored and the exception message is null when metric value is NaN (#3262) (akiyamaneko via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b10d71d [AMBARI-25587] Metrics cannot be stored and the exception message is null when metric value is NaN (#3262) (akiyamaneko via dgrinenko) b10d71d is described below commit b10d71deecb8b94e77f3f34da7072306a70ef30e Author: neko AuthorDate: Wed Nov 25 00:18:35 2020 +0800 [AMBARI-25587] Metrics cannot be stored and the exception message is null when metric value is NaN (#3262) (akiyamaneko via dgrinenko) --- .../ambari/metrics/core/timeline/aggregators/AggregatorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/aggregators/AggregatorUtils.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/aggregators/AggregatorUtils.java index 9848e6b..a1fab37 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/aggregators/AggregatorUtils.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/aggregators/AggregatorUtils.java @@ -49,7 +49,7 @@ public class AggregatorUtils { if (metricValues != null && !metricValues.isEmpty()) { for (Double value : metricValues.values()) { // TODO: Some nulls in data - need to investigate null values from host -if (value != null) { +if (value != null && !value.isNaN()) { if (value > max) { max = value; }
[ambari] branch branch-2.7 updated: [AMBARI-25586] File/Directory Permission can't be auto refreshed after modified (#3261) (akiyamaneko via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new d98b537 [AMBARI-25586] File/Directory Permission can't be auto refreshed after modified (#3261) (akiyamaneko via dgrinenko) d98b537 is described below commit d98b5375bf324345a708df06bbd39620eca7aba1 Author: neko AuthorDate: Tue Nov 24 23:15:00 2020 +0800 [AMBARI-25586] File/Directory Permission can't be auto refreshed after modified (#3261) (akiyamaneko via dgrinenko) --- .../files/src/main/resources/ui/app/components/permission-modal.js| 1 + .../main/resources/ui/app/templates/components/context-row-menu.hbs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/views/files/src/main/resources/ui/app/components/permission-modal.js b/contrib/views/files/src/main/resources/ui/app/components/permission-modal.js index 706e839..7bcd6ef 100644 --- a/contrib/views/files/src/main/resources/ui/app/components/permission-modal.js +++ b/contrib/views/files/src/main/resources/ui/app/components/permission-modal.js @@ -101,6 +101,7 @@ export default Ember.Component.extend(OperationModal, { this.get('selected').set('permission', response.permission); this.set('isUpdating', false); this.send('close'); +this.sendAction('refreshAction'); }, (error) => { this.set('isUpdating', false); this.send('close'); diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/context-row-menu.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/context-row-menu.hbs index 6a52f33..1bab53d 100644 --- a/contrib/views/files/src/main/resources/ui/app/templates/components/context-row-menu.hbs +++ b/contrib/views/files/src/main/resources/ui/app/templates/components/context-row-menu.hbs @@ -34,6 +34,6 @@ {{open-preview-modal closeModalAction="modalClosed" name="ctx-open"}} {{rename-modal closeModalAction="modalClosed" refreshAction="refreshCurrentRoute" name="ctx-rename"}} {{delete-modal closeModalAction="modalClosed" refreshAction="refreshCurrentRoute" name="ctx-delete" currentPathIsTrash=currentPathIsTrash}} - {{permission-modal closeModalAction="modalClosed" name="ctx-permission"}} + {{permission-modal closeModalAction="modalClosed" refreshAction="refreshCurrentRoute" name="ctx-permission"}} -{{/if}} \ No newline at end of file +{{/if}}
[ambari] branch branch-2.7 updated (f1e50f6 -> 27149a7)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from f1e50f6 [AMBARI-25543] fix hdfs Disk I/O Utilization result. (akiyamaneko via dgrinenko) (#3237) add 27149a7 AMBARI-25582. Change the way AMS Grafana datasource discovers the Kafka topics (#3263) (dvitiuk via dgrinenko) No new revisions were added by this update. Summary of changes: .../ambari-metrics/datasource.js | 29 -- 1 file changed, 21 insertions(+), 8 deletions(-)
[ambari] branch branch-2.7 updated (f1e50f6 -> 27149a7)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from f1e50f6 [AMBARI-25543] fix hdfs Disk I/O Utilization result. (akiyamaneko via dgrinenko) (#3237) add 27149a7 AMBARI-25582. Change the way AMS Grafana datasource discovers the Kafka topics (#3263) (dvitiuk via dgrinenko) No new revisions were added by this update. Summary of changes: .../ambari-metrics/datasource.js | 29 -- 1 file changed, 21 insertions(+), 8 deletions(-)
[ambari] branch branch-2.7 updated (e04a19c -> f1e50f6)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from e04a19c AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name fixed. (akiyamaneko & dpidhaiets via dgrinenko) (#3257) add f1e50f6 [AMBARI-25543] fix hdfs Disk I/O Utilization result. (akiyamaneko via dgrinenko) (#3237) No new revisions were added by this update. Summary of changes: .../main/resources/stacks/HDP/2.3/services/HDFS/widgets.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)
[ambari] branch branch-2.7 updated (e04a19c -> f1e50f6)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from e04a19c AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name fixed. (akiyamaneko & dpidhaiets via dgrinenko) (#3257) add f1e50f6 [AMBARI-25543] fix hdfs Disk I/O Utilization result. (akiyamaneko via dgrinenko) (#3237) No new revisions were added by this update. Summary of changes: .../main/resources/stacks/HDP/2.3/services/HDFS/widgets.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)
[ambari] branch branch-2.7 updated (b3cdb14 -> e04a19c)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b3cdb14 AMBARI-25581. Prototype pollution issue in JQuery (dpidhaiets via dgrinenko) (#3258) add e04a19c AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name fixed. (akiyamaneko & dpidhaiets via dgrinenko) (#3257) No new revisions were added by this update. Summary of changes: .../mixins/common/widgets/export_metrics_mixin.js | 9 +++-- .../app/views/common/widget/graph_widget_view.js | 39 +- 2 files changed, 30 insertions(+), 18 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-25581. Prototype pollution issue in JQuery (dpidhaiets via dgrinenko) (#3258)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b3cdb14 AMBARI-25581. Prototype pollution issue in JQuery (dpidhaiets via dgrinenko) (#3258) b3cdb14 is described below commit b3cdb14b0078f7271d411d2ee631a60dafaea4a4 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Tue Nov 10 14:03:31 2020 +0200 AMBARI-25581. Prototype pollution issue in JQuery (dpidhaiets via dgrinenko) (#3258) --- ambari-web/vendor/scripts/jquery-1.9.1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-web/vendor/scripts/jquery-1.9.1.js b/ambari-web/vendor/scripts/jquery-1.9.1.js index bed4ee0..6cb1424 100644 --- a/ambari-web/vendor/scripts/jquery-1.9.1.js +++ b/ambari-web/vendor/scripts/jquery-1.9.1.js @@ -350,7 +350,7 @@ copy = options[ name ]; // Prevent never-ending loop - if ( target === copy ) { + if ( name === "__proto__" || target === copy ) { continue; }
[ambari] branch branch-2.7 updated: AMBARI-25563. Storm dashboards are not showing metrics. (#3255) (dvitiuk via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 5fd2325 AMBARI-25563. Storm dashboards are not showing metrics. (#3255) (dvitiuk via dgrinenko) 5fd2325 is described below commit 5fd23256c7e0cbba78cee8d8883c00c34e70ff56 Author: dvitiiuk AuthorDate: Mon Nov 9 13:13:45 2020 +0200 AMBARI-25563. Storm dashboards are not showing metrics. (#3255) (dvitiuk via dgrinenko) --- .../ambari-metrics/datasource.js | 86 +- .../core/timeline/PhoenixHBaseAccessor.java| 19 - .../timeline/query/TransientMetricCondition.java | 20 +++-- .../timeline/uuid/HashBasedUuidGenStrategy.java| 6 +- .../core/timeline/uuid/MD5UuidGenStrategy.java | 6 +- .../uuid/MetricUuidGenNullRestrictedStrategy.java | 71 ++ .../timeline/uuid/Murmur3HashUuidGenStrategy.java | 6 +- .../timeline/uuid/MetricUuidGenStrategyTest.java | 14 8 files changed, 174 insertions(+), 54 deletions(-) diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js index 9e87bb1..4d6f4c4 100644 --- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js +++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js @@ -564,35 +564,47 @@ define([ //Templatized Dashboards for Storm Components if (templateSrv.variables[0].query === "topologies" && templateSrv.variables[1] && templateSrv.variables[1].name === "component") { - if (templateSrv._values) { -var selectedTopology = templateSrv._values.topologies; -var selectedComponent = templateSrv._values.component; -metricsPromises.push(_.map(options.targets, function(target) { - target.sTopology = selectedTopology; - target.sComponent = selectedComponent; - target.sTopoMetric = target.metric.replace('*', target.sTopology).replace('*', target.sComponent); + var allTopologies = templateSrv.variables.filter(function(variable) { +return variable.name === "topologies"; + }); + var allComponents = templateSrv.variables.filter(function(variable) { +return variable.name === "component"; + }); + + var selectedTopology = (_.isEmpty(allTopologies)) ? "" : allTopologies[0].current.text; + var selectedComponent = (_.isEmpty(allComponents)) ? "" : allComponents[0].current.text; + + metricsPromises.push(_.map(options.targets, function(target) { +target.sTopology = selectedTopology; +target.sComponent = selectedComponent; +target.sTopoMetric = target.metric.replace('*', target.sTopology).replace('*', target.sComponent); return getStormData(target); -})); - } + })); } //Templatized Dashboard for Storm Kafka Offset if (templateSrv.variables[0].query === "topologies" && templateSrv.variables[1] && templateSrv.variables[1].name === "topic") { - if (templateSrv._values) { -var selectedTopology = templateSrv._values.topologies; -var selectedTopic = templateSrv._values.topic; -metricsPromises.push(_.map(options.targets, function(target) { - target.sTopology = selectedTopology; - target.sTopic = selectedTopic; - target.sPartition = options.scopedVars.partition.value; - target.sTopoMetric = target.metric.replace('*', target.sTopology).replace('*', target.sTopic) - .replace('*', target.sPartition); - return getStormData(target); -})); - } + var allTopologies = templateSrv.variables.filter(function(variable) { +return variable.name === "topologies"; + }); + var allTopics = templateSrv.variables.filter(function(variable) { +return variable.name === "topic"; + }); + + var selectedTopology = (_.isEmpty(allTopologies)) ? "" : allTopologies[0].current.text; + var selectedTopic = (_.isEmpty(allTopics)) ? "" : allTopics[0].current.text; + + metricsPromises.push(_.map(options.targets, function(target) { +target.sTopology = selectedTopology; +target.sTopic = selectedTopic; +
[ambari] branch branch-2.7 updated: AMBARI-25576. Primary key duplication error during flushing alerts from alerts cache. (#3251) (dvitiuk via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 3e46d76 AMBARI-25576. Primary key duplication error during flushing alerts from alerts cache. (#3251) (dvitiuk via dgrinenko) 3e46d76 is described below commit 3e46d76beafd9a9ff5e05f774d39f2d296069a37 Author: dvitiiuk AuthorDate: Thu Nov 5 18:22:11 2020 +0200 AMBARI-25576. Primary key duplication error during flushing alerts from alerts cache. (#3251) (dvitiuk via dgrinenko) --- .../listeners/alerts/AlertReceivedListener.java| 29 +--- .../apache/ambari/server/orm/dao/AlertsDAO.java| 77 -- .../ambari/server/utils/EventBusSynchronizer.java | 49 ++ .../ambari/server/orm/dao/AlertsDAOTest.java | 29 +++- .../state/alerts/AggregateAlertListenerTest.java | 2 + 5 files changed, 152 insertions(+), 34 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java index db80e8c..57972ec 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java @@ -66,7 +66,6 @@ import com.google.common.util.concurrent.Striped; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; -import com.google.inject.persist.Transactional; /** * The {@link AlertReceivedListener} class handles {@link AlertReceivedEvent} @@ -385,7 +384,7 @@ public class AlertReceivedListener { // invokes the EntityManager create/merge on various entities in a single // transaction -saveEntities(toMerge, toCreateHistoryAndMerge); +m_alertsDao.saveEntities(toMerge, toCreateHistoryAndMerge); // broadcast events for (AlertEvent eventToFire : alertEvents) { @@ -446,32 +445,6 @@ public class AlertReceivedListener { } /** - * Saves alert and alert history entities in single transaction - * @param toMerge - merge alert only - * @param toCreateHistoryAndMerge - create new history, merge alert - */ - @Transactional - void saveEntities(List toMerge, - List toCreateHistoryAndMerge) { -for (AlertCurrentEntity entity : toMerge) { - m_alertsDao.merge(entity, m_configuration.isAlertCacheEnabled()); -} - -for (AlertCurrentEntity entity : toCreateHistoryAndMerge) { - m_alertsDao.create(entity.getAlertHistory()); - m_alertsDao.merge(entity); - - if (LOG.isDebugEnabled()) { -LOG.debug( -"Alert State Merged: CurrentId {}, CurrentTimestamp {}, HistoryId {}, HistoryState {}", -entity.getAlertId(), entity.getLatestTimestamp(), -entity.getAlertHistory().getAlertId(), -entity.getAlertHistory().getAlertState()); - } -} - } - - /** * Gets whether the specified alert is valid for its reported cluster, * service, component, and host. This method is necessary for the following * cases diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java index dceafcb..374e127 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java @@ -985,8 +985,18 @@ public class AlertsDAO implements Cleanable { * the alert to merge (not {@code null}). * @return the updated alert with merged content (never {@code null}). */ - @Transactional public AlertHistoryEntity merge(AlertHistoryEntity alert) { +if (m_configuration.isAlertCacheEnabled()) { + synchronized (this) { +return mergeTransactional(alert); + } +} else { + return mergeTransactional(alert); +} + } + + @Transactional + protected AlertHistoryEntity mergeTransactional(AlertHistoryEntity alert) { return m_entityManagerProvider.get().merge(alert); } @@ -1033,8 +1043,18 @@ public class AlertsDAO implements Cleanable { * the current alert to merge (not {@code null}). * @return the updated current alert with merged content (never {@code null}). */ - @Transactional public AlertCurrentEntity merge(AlertCurrentEntity alert) { +if (m_configuration.isAlertCacheEnabled()) { + synchronized (this) { +return mergeTransactional(alert); + } +} else { + return mergeTransactional(alert); +} + } + + @Transactional + protected AlertCurrentEntity mergeTransactional(AlertCurrentEntity alert) { // perform the JPA merge
[ambari] branch branch-2.7 updated: Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" (#3253)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b08d513 Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" (#3253) b08d513 is described below commit b08d5131de4872379847c8f3c1c25fb5be06e1f6 Author: hapylestat AuthorDate: Mon Nov 2 13:19:10 2020 +0200 Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" (#3253) This reverts commit 0475c203c1c5b16dfe5b1de4d2715af121c479d2. --- .../mixins/common/widgets/export_metrics_mixin.js | 10 ++ .../app/views/common/widget/graph_widget_view.js | 39 +- .../views/common/widget/graph_widget_view_test.js | 2 +- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js index 00ba552..aa4f77c 100644 --- a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js +++ b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js @@ -63,20 +63,14 @@ App.ExportMetricsMixin = Em.Mixin.create({ }); }, - getCustomFileName: function () { -return this.get('targetView').title.replace(/\s+/g, '_').toLowerCase(); - }, - exportGraphDataSuccessCallback: function (response, request, params) { var seriesData = this.get('targetView').getData(response); if (!seriesData.length) { App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); } else { var fileType = params.isCSV ? 'csv' : 'json', - fileName = (Em.isEmpty(this.get('targetView') || Em.isEmpty(this.get('targetView').title)) ? - 'data' : this.getCustomFileName()) + '.' + fileType, - data = params.isCSV ? this.prepareCSV(seriesData) : JSON.stringify(seriesData, this.jsonReplacer(), 4); - +fileName = 'data.' + fileType, +data = params.isCSV ? this.prepareCSV(seriesData) : JSON.stringify(seriesData, this.jsonReplacer(), 4); fileUtils.downloadTextFile(data, fileType, fileName); } }, diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index c1b7020..324358e 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -364,28 +364,21 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { }.observes('parentView.data') }), -getCustomFileName: function () { -// get current service name if it exists. -var currentServiceName = Em.isEmpty(this.get('controller.content.serviceName')) ? "" : this.get('controller.content.serviceName') + '_'; -// serviceName_widgetName_metricName -return (currentServiceName + this.get('content.widgetName').replace(/\s+/g, '_')).toLowerCase(); -}, - -exportGraphData: function (event) { -this.set('isExportMenuHidden', true); -var data, -isCSV = !!event.context, -fileType = isCSV ? 'csv' : 'json', -fileName = (Em.isEmpty(this.get('content.widgetName')) ? 'data' : this.getCustomFileName()) + '.' + fileType, -metrics = this.get('data'), -hasData = Em.isArray(metrics) && metrics.some(function (item) { -return Em.isArray(item.data); -}); -if (hasData) { -data = isCSV ? this.prepareCSV(metrics) : JSON.stringify(metrics, this.jsonReplacer(), 4); -fileUtils.downloadTextFile(data, fileType, fileName); -} else { -App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); -} + exportGraphData: function (event) { +this.set('isExportMenuHidden', true); +var data, + isCSV = !!event.context, + fileType = isCSV ? 'csv' : 'json', + fileName = 'data.' + fileType, + metrics = this.get('data'), + hasData = Em.isArray(metrics) && metrics.some(function (item) { +return Em.isArray(item.data); + }); +if (hasData) { + data = isCSV ? this.prepareCSV(metrics) : JSON.stringify(metrics, this.jsonReplacer(), 4); + fileUtils.downloadTextFile(data, fileType, fileName); +} else { + App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); } + } }); diff --git a/ambari-web/test/views/common/widget/graph_widget_view_test.js b/ambari-web/test/views/common/widget/graph_widget_view_test.js index 5a12cd1..3a35fd8 100644 --- a/ambari-web/test/views/common/widget/graph_widget_view_test.js +++ b/ambari-web/test/views/com
[ambari] 01/01: Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)"
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch revert-3247-custom_metrics_download_file_name in repository https://gitbox.apache.org/repos/asf/ambari.git commit c9293df52b3120a1036d64f6567259be22efcaa7 Author: hapylestat AuthorDate: Mon Nov 2 12:41:23 2020 +0200 Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" This reverts commit 0475c203c1c5b16dfe5b1de4d2715af121c479d2. --- .../mixins/common/widgets/export_metrics_mixin.js | 10 ++ .../app/views/common/widget/graph_widget_view.js | 39 +- .../views/common/widget/graph_widget_view_test.js | 2 +- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js index 00ba552..aa4f77c 100644 --- a/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js +++ b/ambari-web/app/mixins/common/widgets/export_metrics_mixin.js @@ -63,20 +63,14 @@ App.ExportMetricsMixin = Em.Mixin.create({ }); }, - getCustomFileName: function () { -return this.get('targetView').title.replace(/\s+/g, '_').toLowerCase(); - }, - exportGraphDataSuccessCallback: function (response, request, params) { var seriesData = this.get('targetView').getData(response); if (!seriesData.length) { App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); } else { var fileType = params.isCSV ? 'csv' : 'json', - fileName = (Em.isEmpty(this.get('targetView') || Em.isEmpty(this.get('targetView').title)) ? - 'data' : this.getCustomFileName()) + '.' + fileType, - data = params.isCSV ? this.prepareCSV(seriesData) : JSON.stringify(seriesData, this.jsonReplacer(), 4); - +fileName = 'data.' + fileType, +data = params.isCSV ? this.prepareCSV(seriesData) : JSON.stringify(seriesData, this.jsonReplacer(), 4); fileUtils.downloadTextFile(data, fileType, fileName); } }, diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js b/ambari-web/app/views/common/widget/graph_widget_view.js index c1b7020..324358e 100644 --- a/ambari-web/app/views/common/widget/graph_widget_view.js +++ b/ambari-web/app/views/common/widget/graph_widget_view.js @@ -364,28 +364,21 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, { }.observes('parentView.data') }), -getCustomFileName: function () { -// get current service name if it exists. -var currentServiceName = Em.isEmpty(this.get('controller.content.serviceName')) ? "" : this.get('controller.content.serviceName') + '_'; -// serviceName_widgetName_metricName -return (currentServiceName + this.get('content.widgetName').replace(/\s+/g, '_')).toLowerCase(); -}, - -exportGraphData: function (event) { -this.set('isExportMenuHidden', true); -var data, -isCSV = !!event.context, -fileType = isCSV ? 'csv' : 'json', -fileName = (Em.isEmpty(this.get('content.widgetName')) ? 'data' : this.getCustomFileName()) + '.' + fileType, -metrics = this.get('data'), -hasData = Em.isArray(metrics) && metrics.some(function (item) { -return Em.isArray(item.data); -}); -if (hasData) { -data = isCSV ? this.prepareCSV(metrics) : JSON.stringify(metrics, this.jsonReplacer(), 4); -fileUtils.downloadTextFile(data, fileType, fileName); -} else { -App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); -} + exportGraphData: function (event) { +this.set('isExportMenuHidden', true); +var data, + isCSV = !!event.context, + fileType = isCSV ? 'csv' : 'json', + fileName = 'data.' + fileType, + metrics = this.get('data'), + hasData = Em.isArray(metrics) && metrics.some(function (item) { +return Em.isArray(item.data); + }); +if (hasData) { + data = isCSV ? this.prepareCSV(metrics) : JSON.stringify(metrics, this.jsonReplacer(), 4); + fileUtils.downloadTextFile(data, fileType, fileName); +} else { + App.showAlertPopup(Em.I18n.t('graphs.noData.title'), Em.I18n.t('graphs.noData.tooltip.title')); } + } }); diff --git a/ambari-web/test/views/common/widget/graph_widget_view_test.js b/ambari-web/test/views/common/widget/graph_widget_view_test.js index 5a12cd1..3a35fd8 100644 --- a/ambari-web/test/views/common/widget/graph_widget_view_test.js +++ b/ambari-web/test/views/common/widget/graph_widget_view_test.js @@ -815,4 +815,4 @@ describe('App.GraphWidgetView', function () { // }); //}); }); -}); +}); \ No newline at end of file
[ambari] branch revert-3247-custom_metrics_download_file_name created (now c9293df)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch revert-3247-custom_metrics_download_file_name in repository https://gitbox.apache.org/repos/asf/ambari.git. at c9293df Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" This branch includes the following new commits: new c9293df Revert "AMBARI-25573 Ambari Metrics save as JSON/CSV use custom fileName instead of default name. (#3247)" The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[ambari] branch branch-2.7 updated: [AMBARI-25398] Textareas in configuration page can be resized beyond its container border limit (paul8263 via dgrinenko) (#3105)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0a7571a [AMBARI-25398] Textareas in configuration page can be resized beyond its container border limit (paul8263 via dgrinenko) (#3105) 0a7571a is described below commit 0a7571a4955d264e05bff3faf72929c38ad0b523 Author: paul8263 AuthorDate: Mon Oct 5 21:46:09 2020 +0800 [AMBARI-25398] Textareas in configuration page can be resized beyond its container border limit (paul8263 via dgrinenko) (#3105) --- ambari-web/app/styles/service_configurations.less | 4 1 file changed, 4 insertions(+) diff --git a/ambari-web/app/styles/service_configurations.less b/ambari-web/app/styles/service_configurations.less index ea5d53b..2caa33f 100644 --- a/ambari-web/app/styles/service_configurations.less +++ b/ambari-web/app/styles/service_configurations.less @@ -106,6 +106,10 @@ } } } + .ember-text-area { +min-width: 450px; +max-width: 100%; + } } .entry-row.indent-1 { margin-left: 2em;
[ambari] branch branch-2.7 updated: AMBARI-25561 Python Test for zeppelin failing (santal via dgrinenko) (#3236)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 7c87edc AMBARI-25561 Python Test for zeppelin failing (santal via dgrinenko) (#3236) 7c87edc is described below commit 7c87edc03e7a69060a7743dceb98d5c6e034574e Author: Szilárd Antal AuthorDate: Mon Oct 5 10:48:17 2020 +0200 AMBARI-25561 Python Test for zeppelin failing (santal via dgrinenko) (#3236) --- ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py b/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py index b0eae64..e335f25 100644 --- a/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py +++ b/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py @@ -205,7 +205,6 @@ class TestZeppelin070(RMFTestCase): ) @patch('os.path.exists', return_value=True) - @unittest.skip("Disabled for stabilization, check AMBARI-25561") def test_start_secured(self, os_path_exists_mock): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/master.py", classname="Master",
[ambari] branch branch-2.7 updated: AMBARI-25562 Nightly test is failing due to Ambari Metrics Host Aggregator (santal via dgrinenko) (#3234)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0e435df AMBARI-25562 Nightly test is failing due to Ambari Metrics Host Aggregator (santal via dgrinenko) (#3234) 0e435df is described below commit 0e435df572cf0b974d27e21c7c3722a6f46b5252 Author: Szilárd Antal AuthorDate: Mon Oct 5 10:44:50 2020 +0200 AMBARI-25562 Nightly test is failing due to Ambari Metrics Host Aggregator (santal via dgrinenko) (#3234) --- ambari-metrics/ambari-metrics-host-aggregator/pom.xml | 19 +-- .../host/aggregator/AggregatorWebServiceTest.java | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ambari-metrics/ambari-metrics-host-aggregator/pom.xml b/ambari-metrics/ambari-metrics-host-aggregator/pom.xml index df8bfdc..afd19f6 100644 --- a/ambari-metrics/ambari-metrics-host-aggregator/pom.xml +++ b/ambari-metrics/ambari-metrics-host-aggregator/pom.xml @@ -32,6 +32,7 @@ Ambari Metrics Host Aggregator +1.19.4 UTF-8 @@ -54,12 +55,18 @@ com.sun.jersey jersey-json -1.11 +${jersey.version} com.sun.jersey jersey-server -1.11 +${jersey.version} + + +asm +asm + + javax.xml.bind @@ -69,7 +76,7 @@ com.sun.jersey jersey-core -1.11 +${jersey.version} org.apache.hadoop @@ -79,13 +86,13 @@ com.sun.jersey.jersey-test-framework jersey-test-framework-core -1.11 +${jersey.version} test com.sun.jersey.jersey-test-framework jersey-test-framework-grizzly2 -1.11 +${jersey.version} test @@ -97,7 +104,7 @@ junit junit -4.2 +4.13 test diff --git a/ambari-metrics/ambari-metrics-host-aggregator/src/test/java/org/apache/hadoop/metrics2/host/aggregator/AggregatorWebServiceTest.java b/ambari-metrics/ambari-metrics-host-aggregator/src/test/java/org/apache/hadoop/metrics2/host/aggregator/AggregatorWebServiceTest.java index 736fd06..0f15c20 100644 --- a/ambari-metrics/ambari-metrics-host-aggregator/src/test/java/org/apache/hadoop/metrics2/host/aggregator/AggregatorWebServiceTest.java +++ b/ambari-metrics/ambari-metrics-host-aggregator/src/test/java/org/apache/hadoop/metrics2/host/aggregator/AggregatorWebServiceTest.java @@ -85,6 +85,7 @@ public class AggregatorWebServiceTest extends JerseyTest { TimelineMetrics timelineMetrics = TimelineMetricsHolderTest.getTimelineMetricsWithAppID("appid"); WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("timeline").path("metrics") +.type(MediaType.APPLICATION_JSON) .accept(MediaType.TEXT_PLAIN) .post(ClientResponse.class, timelineMetrics); assertEquals(200, response.getStatus());
[ambari] branch branch-2.7 updated: AMBARI-25523. Ambari UI keeps loading at step3 while adding the new namespace for HDFS for the second time (dpidhaiets via dgrinenko) (#3235)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 3007339 AMBARI-25523. Ambari UI keeps loading at step3 while adding the new namespace for HDFS for the second time (dpidhaiets via dgrinenko) (#3235) 3007339 is described below commit 3007339c4677958df2564fa5572781637c337ba0 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Wed Sep 30 15:29:17 2020 +0300 AMBARI-25523. Ambari UI keeps loading at step3 while adding the new namespace for HDFS for the second time (dpidhaiets via dgrinenko) (#3235) --- ambari-web/app/controllers/main/admin/federation/step3_controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ambari-web/app/controllers/main/admin/federation/step3_controller.js b/ambari-web/app/controllers/main/admin/federation/step3_controller.js index c4e0775..0e2c7ec 100644 --- a/ambari-web/app/controllers/main/admin/federation/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/federation/step3_controller.js @@ -105,7 +105,9 @@ App.NameNodeFederationWizardStep3Controller = Em.Controller.extend(App.Blueprint var hdfsSiteConfigs = configsFromServer.findProperty('type', 'hdfs-site').properties; var nameServices = App.HDFSService.find().objectAt(0).get('masterComponentGroups').mapProperty('name'); ret.nameServicesList = nameServices.join(','); -ret.nameservice1 = nameServices[0]; +ret.nameservice1 = nameServices.find(function (ns){ + return hdfsSiteConfigs['dfs.namenode.rpc-address.' + ns + '.nn1']; +}); ret.newNameservice = this.get('content.nameServiceId'); ret.namenode1 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + ret.nameservice1 + '.nn1'].split(':')[0]; ret.namenode2 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + ret.nameservice1 + '.nn2'].split(':')[0];
[ambari] branch branch-2.7 updated: AMBARI-25546 Prevent negative float and NaN value in heatmap metrics page (akiyamaneko via dgrinenko) (#3223)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 93f1824 AMBARI-25546 Prevent negative float and NaN value in heatmap metrics page (akiyamaneko via dgrinenko) (#3223) 93f1824 is described below commit 93f1824179dc164377eb5f4dca4a8b7e7381f0d7 Author: neko <52202080+akiyaman...@users.noreply.github.com> AuthorDate: Tue Sep 29 19:04:31 2020 +0800 AMBARI-25546 Prevent negative float and NaN value in heatmap metrics page (akiyamaneko via dgrinenko) (#3223) --- .../controllers/main/charts/heatmap_metrics/heatmap_metric.js | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js b/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js index 499920c..3e9af5c 100644 --- a/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js +++ b/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js @@ -93,7 +93,7 @@ App.MainChartHeatmapMetric = Em.Object.extend({ * */ slotDefinitions: function () { -var max = this.get('maximumValue') ? parseFloat(this.get('maximumValue')) : 0; +var max = this.getMaximumValue(); var slotCount = this.get('numberOfSlots'); var units = this.get('units'); var delta = (max - this.get('minimumValue')) / slotCount; @@ -175,6 +175,15 @@ App.MainChartHeatmapMetric = Em.Object.extend({ }, /** + * compatible with special input value, such as negative float number or string + * @return {float} + */ + getMaximumValue: function getMaximumValue() { +var max = this.get('maximumValue') ? parseFloat(this.get('maximumValue')) : 0; +return isNaN(max) ? 0 : Math.max(0, max); + }, + + /** * In slot definitions this value is used to construct the label by appending * it to slot min-max values. For example giving '%' here would result in slot * definition label being '0% - 10%'.
[ambari] branch branch-2.7 updated: AMBARI-25545 Downloaded zip-file name shows empty in the fileview (#3220) (akiyamaneko via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new c0bef35 AMBARI-25545 Downloaded zip-file name shows empty in the fileview (#3220) (akiyamaneko via dgrinenko) c0bef35 is described below commit c0bef351b416d0b0cbdd0ceffa8d8cea7372a8c9 Author: neko <52202080+akiyaman...@users.noreply.github.com> AuthorDate: Tue Sep 29 18:55:54 2020 +0800 AMBARI-25545 Downloaded zip-file name shows empty in the fileview (#3220) (akiyamaneko via dgrinenko) --- .../java/org/apache/ambari/view/filebrowser/DownloadService.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java index 81ac40d..e7ea16b 100644 --- a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java +++ b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java @@ -62,6 +62,7 @@ import java.util.Queue; import java.util.UUID; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; +import java.net.URLEncoder; /** * Service for download and aggregate files @@ -113,12 +114,12 @@ public class DownloadService extends HdfsService { ResponseBuilder result = Response.ok(fs); if (download) { result.header("Content-Disposition", - "attachment; filename=\"" + status.getPath().getName() + "\"").type(MediaType.APPLICATION_OCTET_STREAM); + "attachment; filename=\"" + URLEncoder.encode(status.getPath().getName(), "UTF-8") + "\"").type(MediaType.APPLICATION_OCTET_STREAM); } else { FileNameMap fileNameMap = URLConnection.getFileNameMap(); String mimeType = fileNameMap.getContentTypeFor(status.getPath().getName()); result.header("Content-Disposition", - "filename=\"" + status.getPath().getName() + "\"").type(mimeType); + "filename=\"" + URLEncoder.encode(status.getPath().getName(), "UTF-8") + "\"").type(mimeType); } return result.build(); } catch (WebApplicationException ex) { @@ -228,7 +229,7 @@ public class DownloadService extends HdfsService { } }; return Response.ok(result) - .header("Content-Disposition", "inline; filename=\"" + name +"\"").build(); + .header("Content-Disposition", "inline; filename=\"" + URLEncoder.encode(name, "UTF-8") +"\"").build(); } catch (WebApplicationException ex) { LOG.error("Error occurred : ",ex); throw ex;
[ambari] branch branch-2.7 updated (b5818d4 -> 3b4fba6)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b5818d4 AMBARI-25537. Fix AMS ambari-database and hbase dashboards. (dvitiuk via dgrinenko) (#3214) add 3b4fba6 AMBARI-25539. Unit tests coverage improvement for highAvailability controllers (dpidhaiets via dgrinenko) (#3215) No new revisions were added by this update. Summary of changes: ambari-web/app/assets/test/tests.js| 8 + .../admin/federation/wizard_controller_test.js | 4 +- .../hawq/activateStandby/wizard_controller_test.js | 20 +- .../hawq/addStandby/wizard_controller_test.js | 4 +- .../hawq/removeStandby/wizard_controller_test.js | 4 +- .../journalNode/step3_controller_test.js | 132 +++ .../journalNode/step4_controller_test.js | 14 + .../step5_controller_test.js} | 26 +- .../journalNode/wizard_controller_test.js | 149 .../rollbackHA/rollback_wizard_controller_test.js | 282 +++ .../step2_controller_test.js} | 38 +- .../nameNode/rollback_controller_test.js | 898 + .../nameNode/step3_controller_test.js | 74 +- .../nameNode/step9_controller_test.js | 100 +++ .../nameNode/wizard_controller_test.js | 147 .../step1_controller_test.js} | 29 +- .../rangerAdmin/step4_controller_test.js | 182 + .../wizard_controller_test.js | 143 +--- .../resourceManager/step3_controller_test.js | 2 +- .../test/controllers/main/service/item_test.js | 2 +- 20 files changed, 2060 insertions(+), 198 deletions(-) create mode 100644 ambari-web/test/controllers/main/admin/highAvailability/journalNode/step3_controller_test.js copy ambari-web/test/controllers/main/admin/highAvailability/{nameNode/step8_controller_test.js => journalNode/step5_controller_test.js} (72%) create mode 100644 ambari-web/test/controllers/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_controller_test.js copy ambari-web/test/controllers/main/admin/highAvailability/nameNode/{step8_controller_test.js => rollbackHA/step2_controller_test.js} (56%) create mode 100644 ambari-web/test/controllers/main/admin/highAvailability/nameNode/rollback_controller_test.js copy ambari-web/test/controllers/main/admin/highAvailability/{journalNode/step7_controller_test.js => rangerAdmin/step1_controller_test.js} (55%) create mode 100644 ambari-web/test/controllers/main/admin/highAvailability/rangerAdmin/step4_controller_test.js copy ambari-web/test/controllers/main/admin/highAvailability/{hawq/removeStandby => rangerAdmin}/wizard_controller_test.js (61%)
[ambari] branch branch-2.7 updated: AMBARI-25534. DB purge fails removing topology requests. (dvitiuk via dgrinenko) (#3211)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 12e232f AMBARI-25534. DB purge fails removing topology requests. (dvitiuk via dgrinenko) (#3211) 12e232f is described below commit 12e232ff7435ee703e04b47e1f8a2a011d0b2cb3 Author: dvitiiuk AuthorDate: Tue Sep 29 13:51:35 2020 +0300 AMBARI-25534. DB purge fails removing topology requests. (dvitiuk via dgrinenko) (#3211) --- .../src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java index 3c3d7bf..d78c14c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java @@ -487,7 +487,7 @@ public class RequestDAO implements Cleanable { }); if (!partialHostRequestIds.isEmpty()) { - topologyRequestIds.addAll(topologyHostTaskDAO.findHostRequestIdsByHostTaskIds(partialHostRequestIds)); + topologyRequestIds.addAll(topologyLogicalRequestDAO.findRequestIdsByIds(partialHostRequestIds)); } return topologyRequestIds; }
[ambari] branch branch-2.7 updated (12e232f -> b5818d4)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 12e232f AMBARI-25534. DB purge fails removing topology requests. (dvitiuk via dgrinenko) (#3211) add b5818d4 AMBARI-25537. Fix AMS ambari-database and hbase dashboards. (dvitiuk via dgrinenko) (#3214) No new revisions were added by this update. Summary of changes: .../files/grafana-dashboards/default/grafana-ambari-server-database.json | 1 + 1 file changed, 1 insertion(+)
[ambari] branch branch-2.7 updated: AMBARI-25560 UT failing due to tar download error (dgrinenko) (#3233)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 8a12ee4 AMBARI-25560 UT failing due to tar download error (dgrinenko) (#3233) 8a12ee4 is described below commit 8a12ee45b32df6afb1b83db3847d8ebd9b4ce20a Author: Dmytro Grinenko AuthorDate: Tue Sep 29 00:49:11 2020 +0300 AMBARI-25560 UT failing due to tar download error (dgrinenko) (#3233) --- ambari-metrics/pom.xml | 6 +++--- .../main/resources/stacks/HDP/2.0.6/properties/stack_features.json | 2 +- .../src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py| 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index 5f7e604..5fa9c3d 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -40,13 +40,13 @@ python = 2.6 python (= 2.6) - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/hbase/hbase-2.0.2.3.1.4.1-1-bin.tar.gz + https://private-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.1-1/tars/hbase/hbase-2.0.2.3.1.4.1-1-bin.tar.gz hbase-2.0.2.3.1.4.1-1 - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/hadoop/hadoop-3.1.1.3.1.4.1-1.tar.gz + https://private-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.1-1/tars/hadoop/hadoop-3.1.1.3.1.4.1-1.tar.gz hadoop-3.1.1.3.1.4.1-1 grafana-6.4.2 https://dl.grafana.com/oss/release/grafana-6.4.2.linux-amd64.tar.gz - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/phoenix/phoenix-5.0.0.3.1.4.1-1.tar.gz + https://private-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.1-1/tars/phoenix/phoenix-5.0.0.3.1.4.1-1.tar.gz phoenix-5.0.0.3.1.4.1-1 /usr/lib/python2.6/site-packages/resource_monitoring 1.6.2 diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json index d4b9644..3fd957d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json @@ -197,7 +197,7 @@ { "name": "hive_server2_kerberized_env", "description": "Hive server2 working on kerberized environment (AMBARI-13749)", -"min_version": "2.2.3.0", +"min_version": "2.2.3.0" }, { "name": "hive_env_heapsize", diff --git a/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py b/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py index ae446bd..b0eae64 100644 --- a/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py +++ b/ambari-server/src/test/python/stacks/2.6/ZEPPELIN/test_zeppelin_070.py @@ -20,6 +20,7 @@ from ambari_commons import OSCheck ''' import glob +import unittest from mock.mock import MagicMock, patch from resource_management.core import sudo @@ -204,6 +205,7 @@ class TestZeppelin070(RMFTestCase): ) @patch('os.path.exists', return_value=True) + @unittest.skip("Disabled for stabilization, check AMBARI-25561") def test_start_secured(self, os_path_exists_mock): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/master.py", classname="Master",
[ambari] branch branch-2.7 updated: AMBARI-25353 Seeing an error stack when running an API call against Ambari server (santal via dgrinenko) (#3208)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 5ea6ec2 AMBARI-25353 Seeing an error stack when running an API call against Ambari server (santal via dgrinenko) (#3208) 5ea6ec2 is described below commit 5ea6ec295d040a4b7db19e3f889b073329dcb3fa Author: Szilárd Antal AuthorDate: Mon Aug 10 05:25:54 2020 +0200 AMBARI-25353 Seeing an error stack when running an API call against Ambari server (santal via dgrinenko) (#3208) --- .../ambari/server/configuration/Configuration.java | 16 + .../server/controller/AmbariHandlerList.java | 8 +++ .../server/configuration/ConfigurationTest.java| 27 ++ .../server/controller/AmbariHandlerListTest.java | 19 --- 4 files changed, 67 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 7c76180..1949dc3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2644,6 +2644,13 @@ public class Configuration { public static final ConfigurationProperty KERBEROS_SERVER_ACTION_THREADPOOL_SIZE = new ConfigurationProperty<>( "server.kerberos.action.threadpool.size", 1); + /** + * A flag to determine whether error stacks appear on the error page + */ + @Markdown(description = "Show or hide the error stacks on the error page") + public static final ConfigurationProperty SERVER_SHOW_ERROR_STACKS = new ConfigurationProperty<>( +"server.show.error.stacks", "false"); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -6152,4 +6159,13 @@ public class Configuration { public int getAlertServiceCorePoolSize() { return Integer.parseInt(getProperty(SERVER_SIDE_ALERTS_CORE_POOL_SIZE)); } + + /** + * Determines whether error stacks appear on the error page + * + * @return true if error stacks appear on the error page (defaults to {@code false}) + */ + public boolean isServerShowErrorStacks() { +return Boolean.parseBoolean(getProperty(SERVER_SHOW_ERROR_STACKS)); + } } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java index e3ebc77..663592e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java @@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.ambari.server.api.AmbariPersistFilter; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.orm.entities.ViewEntity; import org.apache.ambari.server.orm.entities.ViewInstanceEntity; import org.apache.ambari.server.security.AmbariViewsSecurityHeaderFilter; @@ -104,6 +105,9 @@ public class AmbariHandlerList extends HandlerCollection implements ViewInstance @Inject SessionHandlerConfigurer sessionHandlerConfigurer; + @Inject + Configuration configuration; + /** * Mapping of view instance entities to handlers. */ @@ -251,6 +255,10 @@ public class AmbariHandlerList extends HandlerCollection implements ViewInstance webAppContext.addFilter(new FilterHolder(springSecurityFilter), "/*", AmbariServer.DISPATCHER_TYPES); webAppContext.setAllowNullPathInfo(true); +if (webAppContext.getErrorHandler() != null) { + webAppContext.getErrorHandler().setShowStacks(configuration.isServerShowErrorStacks()); +} + return webAppContext; } diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 315a02b..123e441 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -967,4 +967,31 @@ public class ConfigurationTest { // This is expected } } + + @Test + public void testServerShowErrorStacksEnabled() throws Exception { +// given +final Properties ambariProperties = new Properties(); + ambariProperties.setProperty(Configuration.SERVER_SHOW_ERROR_STACKS.getKey(), "true"); +final Configuration configuration = new Configuration(ambariProperties); +
[ambari] branch branch-2.7 updated: AMBARI-25506 Upgrade Apache Solr version to 7.7.3 in Ambari Infra (santal via dgrinenko) (#3218)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 2663eea AMBARI-25506 Upgrade Apache Solr version to 7.7.3 in Ambari Infra (santal via dgrinenko) (#3218) 2663eea is described below commit 2663eea229d3124e557e60691cde49df15775447 Author: Szilárd Antal AuthorDate: Thu Aug 6 11:42:29 2020 +0200 AMBARI-25506 Upgrade Apache Solr version to 7.7.3 in Ambari Infra (santal via dgrinenko) (#3218) --- ambari-infra/ambari-infra-manager/docker/docker-compose.yml | 2 +- .../ambari-infra-manager/docker/infra-manager-docker-compose.sh | 2 +- ambari-infra/ambari-infra-solr-client/README.md | 4 ++-- .../ambari-infra-solr-client/src/main/python/migrationHelper.py | 2 +- .../src/main/resources/solrIndexHelper.sh | 8 .../ambari-infra-solr-plugin/docker/infra-solr-docker-compose.sh | 2 +- ambari-infra/pom.xml | 2 +- .../src/main/configsets/audit_logs/conf/solrconfig.xml| 2 +- .../src/main/configsets/hadoop_logs/conf/solrconfig.xml | 2 +- .../src/main/configsets/history/conf/solrconfig.xml | 2 +- ambari-logsearch/docker/Dockerfile| 2 +- ambari-logsearch/docker/docker-compose.yml| 2 +- ambari-logsearch/docker/logsearch-docker.sh | 2 +- ambari-logsearch/docker/solr.yml | 2 +- ambari-logsearch/docker/sso.yml | 2 +- ambari-logsearch/pom.xml | 2 +- .../AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py| 2 +- .../LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 | 2 +- 18 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ambari-infra/ambari-infra-manager/docker/docker-compose.yml b/ambari-infra/ambari-infra-manager/docker/docker-compose.yml index 8983886..085012b 100644 --- a/ambari-infra/ambari-infra-manager/docker/docker-compose.yml +++ b/ambari-infra/ambari-infra-manager/docker/docker-compose.yml @@ -28,7 +28,7 @@ services: ZOO_SERVERS: server.1=zookeeper:2888:3888 solr: # TODO: use infra-solr -image: solr:${SOLR_VERSION:-7.7.0} +image: solr:${SOLR_VERSION:-7.7.3} container_name: solr restart: always hostname: solr diff --git a/ambari-infra/ambari-infra-manager/docker/infra-manager-docker-compose.sh b/ambari-infra/ambari-infra-manager/docker/infra-manager-docker-compose.sh index 094a3d4..540483a 100755 --- a/ambari-infra/ambari-infra-manager/docker/infra-manager-docker-compose.sh +++ b/ambari-infra/ambari-infra-manager/docker/infra-manager-docker-compose.sh @@ -72,7 +72,7 @@ AMBARI_INFRA_LOCATION=$AMBARI_INFRA_LOCATION ZOOKEEPER_VERSION=3.4.10 ZOOKEEPER_CONNECTION_STRING=zookeeper:2181 -SOLR_VERSION=7.7.0 +SOLR_VERSION=7.7.3 HADOOP_VERSION=3.0.0 EOF diff --git a/ambari-infra/ambari-infra-solr-client/README.md b/ambari-infra/ambari-infra-solr-client/README.md index a3eb6c2..037d491 100644 --- a/ambari-infra/ambari-infra-solr-client/README.md +++ b/ambari-infra/ambari-infra-solr-client/README.md @@ -472,7 +472,7 @@ If the script finished successfully and everything looks green on Ambari UI as w Migration for `ranger_audits` collection (cores): ```bash -# by default, you will migrate to Lucene 6.6.2, if you want to migrate again to Solr 7 (not requred), you can use --version 7.7.0 flag +# by default, you will migrate to Lucene 6.6.2, if you want to migrate again to Solr 7 (not requred), you can use --version 7.7.3 flag /usr/lib/ambari-infra-solr-client/migrationHelper.py --ini-file $CONFIG_INI_LOCATION --action migrate -s RANGER ``` @@ -852,7 +852,7 @@ Options: location of the index backups (for ranger). required only if no backup path in the ini file --version=INDEX_VERSION -lucene index version for migration (6.6.2 or 7.7.0) +lucene index version for migration (6.6.2 or 7.7.3) --solr-async-request-tries=SOLR_ASYNC_REQUEST_TRIES number of max tries for async Solr requests (e.g.: delete operation) diff --git a/ambari-infra/ambari-infra-solr-client/src/main/python/migrationHelper.py b/ambari-infra/ambari-infra-solr-client/src/main/python/migrationHelper.py index bf664dc..7914f36 100755 --- a/ambari-infra/ambari-infra-solr-client/src/main/python/migrationHelper.py +++ b/ambari-infra/ambari-infra-solr-client/src/main/python/migrationHelper.py @@ -1919,7 +1919,7 @@ if __name__=="__main__": parser.add_option("--atlas-index-location", dest="atlas_index_location", type="string", help=&
[ambari] branch branch-2.7 updated: AMBARI-25536. Failed to execute goal on project ambari-metrics-timelineservice (PrivateLi via dgrinenko) (#3213)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 7aefb5e AMBARI-25536. Failed to execute goal on project ambari-metrics-timelineservice (PrivateLi via dgrinenko) (#3213) 7aefb5e is described below commit 7aefb5ee835ae2dd79f6756d82ab32ba9ac2b878 Author: Private AuthorDate: Tue Jul 28 18:28:35 2020 +0800 AMBARI-25536. Failed to execute goal on project ambari-metrics-timelineservice (PrivateLi via dgrinenko) (#3213) --- ambari-metrics/ambari-metrics-timelineservice/pom.xml | 6 +++--- ambari-metrics/pom.xml| 12 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml b/ambari-metrics/ambari-metrics-timelineservice/pom.xml index f8423b3..e3bbf4e 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml +++ b/ambari-metrics/ambari-metrics-timelineservice/pom.xml @@ -34,9 +34,9 @@ 2.5.0 -3.1.1.3.1.4.0-315 -5.0.0.3.1.4.0-315 -2.0.2.3.1.4.0-315 +3.1.1.3.1.4.1-1 +5.0.0.3.1.4.1-1 +2.0.2.3.1.4.1-1 diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index a0a11b8..5f7e604 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -40,14 +40,14 @@ python = 2.6 python (= 2.6) - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hbase/hbase-2.0.2.3.1.4.0-315-bin.tar.gz -hbase-2.0.2.3.1.4.0-315 - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hadoop/hadoop-3.1.1.3.1.4.0-315.tar.gz -hadoop-3.1.1.3.1.4.0-315 + https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/hbase/hbase-2.0.2.3.1.4.1-1-bin.tar.gz +hbase-2.0.2.3.1.4.1-1 + https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/hadoop/hadoop-3.1.1.3.1.4.1-1.tar.gz +hadoop-3.1.1.3.1.4.1-1 grafana-6.4.2 https://dl.grafana.com/oss/release/grafana-6.4.2.linux-amd64.tar.gz - https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/phoenix/phoenix-5.0.0.3.1.4.0-315.tar.gz -phoenix-5.0.0.3.1.4.0-315 + https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.1-1/tars/phoenix/phoenix-5.0.0.3.1.4.1-1.tar.gz +phoenix-5.0.0.3.1.4.1-1 /usr/lib/python2.6/site-packages/resource_monitoring 1.6.2 apache.snapshots.https
[ambari] branch branch-2.6 updated: AMBARI-25535. PIG views download of History Logs and Results is failing (dpidhaiets via dgrinenko) (#3212)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new 2ad51fa AMBARI-25535. PIG views download of History Logs and Results is failing (dpidhaiets via dgrinenko) (#3212) 2ad51fa is described below commit 2ad51fa244f4072c5b6d5f8ddbd0747c1cc95f87 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Tue Jul 28 07:18:11 2020 +0300 AMBARI-25535. PIG views download of History Logs and Results is failing (dpidhaiets via dgrinenko) (#3212) --- contrib/views/pig/src/main/resources/ui/pig-web/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/bower.json b/contrib/views/pig/src/main/resources/ui/pig-web/bower.json index ec4beeb..8f5dd7d 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/bower.json +++ b/contrib/views/pig/src/main/resources/ui/pig-web/bower.json @@ -36,7 +36,7 @@ "main": "plurals.js" }, "file-saver": { - "main": "FileSaver.js" + "main": "./dist/FileSaver.js" } } }
[ambari] branch branch-2.7 updated: AMBARI-25533. Delete redundant phantomjs dependency (dpidhaiets via dgrinenko) (#3209)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new e5766b3 AMBARI-25533. Delete redundant phantomjs dependency (dpidhaiets via dgrinenko) (#3209) e5766b3 is described below commit e5766b37a35af00efb72fcc06fc51922f2feb0aa Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Fri Jul 17 11:33:16 2020 +0300 AMBARI-25533. Delete redundant phantomjs dependency (dpidhaiets via dgrinenko) (#3209) --- ambari-web/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ambari-web/package.json b/ambari-web/package.json index 7fcc59d..afc3215 100644 --- a/ambari-web/package.json +++ b/ambari-web/package.json @@ -36,7 +36,6 @@ "karma-mocha": "0.1.1", "karma-sinon": "~1.0.2", "mocha": "2.5.3", -"phantomjs": "~2.1.0", "sinon": "=1.7.3", "sinon-chai": "~2.8.0" },
[ambari] branch branch-2.7 updated: AMBARI-25532. Unit tests coverage improvement for hawq wizard controllers (dpidhaiets via dgrinenko) (#3207)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new c7250ab AMBARI-25532. Unit tests coverage improvement for hawq wizard controllers (dpidhaiets via dgrinenko) (#3207) c7250ab is described below commit c7250abce4ae12ba6f21eeab3f4a7bb3da601054 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Wed Jul 15 16:21:00 2020 +0300 AMBARI-25532. Unit tests coverage improvement for hawq wizard controllers (dpidhaiets via dgrinenko) (#3207) --- ambari-web/app/assets/test/tests.js| 6 + .../hawq/activateStandby/step2_controller_test.js | 185 +++-- .../hawq/activateStandby/step3_controller_test.js | 247 + .../hawq/activateStandby/wizard_controller_test.js | 290 .../hawq/addStandby/step3_controller_test.js | 111 .../hawq/addStandby/step4_controller_test.js | 187 + .../hawq/addStandby/wizard_controller_test.js | 298 + .../hawq/removeStandby/step2_controller_test.js| 70 +++-- .../hawq/removeStandby/step3_controller_test.js| 188 + .../hawq/removeStandby/wizard_controller_test.js | 290 10 files changed, 1831 insertions(+), 41 deletions(-) diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 381c144..ee54082 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -86,8 +86,14 @@ var files = [ 'test/controllers/main/admin/highAvailability/resourceManager/step4_controller_test', 'test/controllers/main/admin/highAvailability/resourceManager/wizard_controller_test', 'test/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/addStandby/step4_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/addStandby/wizard_controller_test', 'test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller_test', 'test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/activateStandby/step3_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/activateStandby/wizard_controller_test', 'test/controllers/main/admin/highAvailability/journalNode/progress_controller_test', 'test/controllers/main/admin/highAvailability/journalNode/step1_controller_test', 'test/controllers/main/admin/highAvailability/journalNode/step2_controller_test', diff --git a/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js index 845c932..f7af2a1 100644 --- a/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js +++ b/ambari-web/test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test.js @@ -19,28 +19,37 @@ var App = require('app'); require('controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller'); +function getController() { + return App.ActivateHawqStandbyWizardStep2Controller.create({}); +} + describe('App.ActivateHawqStandbyWizardStep2Controller', function () { + var controller; + + beforeEach(function () { +controller = getController(); + }); describe('#isSubmitDisabled', function () { -var controller = App.ActivateHawqStandbyWizardStep2Controller.create({ -content: Em.Object.create({}) - }), - cases = [ -{ - isLoaded: false, - isSubmitDisabled: true, - title: 'wizard step content not loaded' -}, -{ - isLoaded: true, - isSubmitDisabled: false, - title: 'wizard step content loaded' -} - ]; +var cases = [ + { +isLoaded: false, +isSubmitDisabled: true, +title: 'wizard step content not loaded' + }, + { +isLoaded: true, +isSubmitDisabled: false, +title: 'wizard step content loaded' + } +]; cases.forEach(function (item) { it(item.title, function () { +controller.reopen({ + content: Em.Object.create({}) +}); controller.set('isLoaded', item.isLoaded); expect(controller.get('isSubmitDisabled')).to.equal(item.isSubmitDisabled); }); @@ -48,10 +57,18 @@ describe('App.ActivateHawqStandbyWizardStep2Controller', fu
[ambari] branch branch-2.7 updated: AMBARI-25526. Typo in the "NameNode" turn off maintenance mode dialog box (dpidhaiets) (#3205) (pidhaietsdp via dgrienko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new c11c020 AMBARI-25526. Typo in the "NameNode" turn off maintenance mode dialog box (dpidhaiets) (#3205) (pidhaietsdp via dgrienko) c11c020 is described below commit c11c020f2f9b3327b9ee6e236726bb11e220bc45 Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Tue Jun 30 19:06:12 2020 +0300 AMBARI-25526. Typo in the "NameNode" turn off maintenance mode dialog box (dpidhaiets) (#3205) (pidhaietsdp via dgrienko) --- ambari-web/app/controllers/main/host/details.js | 2 +- ambari-web/app/messages.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 4682dc4b..0a31e59 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -2913,7 +2913,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow message = Em.I18n.t('passiveState.turn' + state.toCapital() + 'For').format(event.context.get('displayName')); return App.showConfirmationPopup(function () { self.updateComponentPassiveState(event.context, state, message); -}, Em.I18n.t('question.sure.maintenance').format(event.context.get('displayName')) ); +}, Em.I18n.t('question.sure.maintenance').format(state.toLowerCase(), event.context.get('displayName')) ); }, downloadClientConfigs: function (event) { diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 652b7c5..d43a0ee 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -441,7 +441,7 @@ Em.I18n.translations = { 'question.sure.stop':'Are you sure you want to stop {0}?', 'question.sure.move':'Are you sure you want to move {0}?', 'question.sure.refresh':'Are you sure you want to restart {0} on {1}?', - 'question.sure.maintenance':'Are you sure you want to turn on maintenance mode for {0}?', + 'question.sure.maintenance':'Are you sure you want to turn {0} maintenance mode for {1}?', 'question.sure.upgrade':'Are you sure you want to upgrade {0}?', 'question.sure.decommission':'Are you sure you want to decommission {0}?', 'question.sure.recommission':'Are you sure you want to recommission {0}?',
[ambari] branch branch-2.7 updated: AMBARI-25485. Change authentication method from get to post. (#3182) (dvitiiuk via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new d8eed41 AMBARI-25485. Change authentication method from get to post. (#3182) (dvitiiuk via dgrinenko) d8eed41 is described below commit d8eed413d7329aba624cc6b5d35f3c677d68964a Author: dvitiiuk AuthorDate: Tue Jun 30 19:00:58 2020 +0300 AMBARI-25485. Change authentication method from get to post. (#3182) (dvitiiuk via dgrinenko) --- .../api/resources/AuthResourceDefinition.java | 49 + .../api/resources/ResourceInstanceFactoryImpl.java | 4 + .../server/api/services/users/AuthService.java | 85 ++ .../controller/AuthRequestCreateAuthSwagger.java | 27 +++ .../ambari/server/controller/ControllerModule.java | 2 + .../server/controller/ResourceProviderFactory.java | 3 + .../AbstractControllerResourceProvider.java| 2 + .../controller/internal/AuthResourceProvider.java | 80 .../ambari/server/controller/spi/Resource.java | 4 +- .../authorization/AmbariAuthorizationFilter.java | 5 ++ 10 files changed, 260 insertions(+), 1 deletion(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AuthResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AuthResourceDefinition.java new file mode 100644 index 000..387b2d1 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AuthResourceDefinition.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.resources; + +import java.util.Collections; +import java.util.Set; + +import org.apache.ambari.server.controller.spi.Resource; + +/** + * Auth Resource Definition + */ +public class AuthResourceDefinition extends BaseResourceDefinition { + + public AuthResourceDefinition() { +super(Resource.Type.Auth); + } + + @Override + public String getPluralName() { +return "auths"; + } + + @Override + public String getSingularName() { +return "auth"; + } + + @Override + public Set getSubResourceDefinitions() { +return Collections.emptySet(); + } + +} diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java index 4133383..ed905a0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java @@ -481,6 +481,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new RemoteClusterResourceDefinition(); break; + case Auth: +resourceDefinition = new AuthResourceDefinition(); +break; + default: throw new IllegalArgumentException("Unsupported resource type: " + type); } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/AuthService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/AuthService.java new file mode 100644 index 000..f46cfd2 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/AuthService.java @@ -0,0 +1,85 @@ +/* + * 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
[ambari] branch branch-2.7 updated: AMBARI-25487.Change authentication method from get to post (#3185) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new dbb1c8c AMBARI-25487.Change authentication method from get to post (#3185) (hiveww via dgrinenko) dbb1c8c is described below commit dbb1c8c435849aed27f4d94d139281acf630a490 Author: Alexander Antonenko AuthorDate: Tue Jun 30 19:01:28 2020 +0300 AMBARI-25487.Change authentication method from get to post (#3185) (hiveww via dgrinenko) --- ambari-web/app/router.js | 17 +++-- ambari-web/app/utils/ajax/ajax.js | 14 ++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index c3a843e..c0a754a 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -294,13 +294,13 @@ App.Router = Em.Router.extend({ } else if (xhr.getResponseHeader('User')) { var user = xhr.getResponseHeader('User'); App.ajax.send({ -name: 'router.login', +name: 'router.afterLogin', sender: self, data: { usr: user, loginName: encodeURIComponent(user) }, -success: 'loginSuccessCallback', +success: 'afterLoginSuccessCallback', error: 'loginErrorCallback' }).then(function() { dfd.resolve(true); @@ -438,6 +438,19 @@ App.Router = Em.Router.extend({ }, loginSuccessCallback: function(data, opt, params) { +App.ajax.send({ + name: 'router.afterLogin', + sender: this, + data: { +usr: params.usr, +loginName: params.loginName + }, + success: 'afterLoginSuccessCallback', + error: 'loginErrorCallback' +}); + }, + + afterLoginSuccessCallback: function(data, opt, params) { var self = this; App.usersMapper.map({"items": [data]}); this.setUserLoggedIn(data.Users.user_name); diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 9ebbfee..698d203 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2401,6 +2401,20 @@ var urls = { } }, 'router.login': { +'real': '/auth', +'mock': '/data/users/user_{usr}.json', +'type': 'POST', +'format': function (data) { + var statusCode = jQuery.extend({}, require('data/statusCodes')); + statusCode['403'] = function () { +console.log("Error code 403: Forbidden."); + }; + return { +statusCode: statusCode + }; +} + }, + 'router.afterLogin': { 'real': '/users/{loginName}?fields=*,privileges/PrivilegeInfo/cluster_name,privileges/PrivilegeInfo/permission_name', 'mock': '/data/users/user_{usr}.json', 'format': function (data) {
[ambari] branch branch-2.7 updated: AMBARI-25517. Should not use '!=' to compare 'Long hostId' in HostStateEntity, which could lead to unforeseen problems (#3201) (rickyma via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ed7bc49 AMBARI-25517. Should not use '!=' to compare 'Long hostId' in HostStateEntity, which could lead to unforeseen problems (#3201) (rickyma via dgrinenko) ed7bc49 is described below commit ed7bc49b657f7f9cb7f420c4a5f242e3dbe1c092 Author: RickyMa AuthorDate: Tue Jun 30 23:57:47 2020 +0800 AMBARI-25517. Should not use '!=' to compare 'Long hostId' in HostStateEntity, which could lead to unforeseen problems (#3201) (rickyma via dgrinenko) --- .../ambari/server/orm/entities/HostStateEntity.java | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostStateEntity.java index bcfffa6..41dd848 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostStateEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostStateEntity.java @@ -20,6 +20,8 @@ package org.apache.ambari.server.orm.entities; import static org.apache.commons.lang.StringUtils.defaultString; +import java.util.Objects; + import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; @@ -137,23 +139,16 @@ public class HostStateEntity { HostStateEntity that = (HostStateEntity) o; -if (hostId != null ? hostId != that.hostId : that.hostId != null) return false; -if (availableMem != null ? !availableMem.equals(that.availableMem) : that.availableMem != null) return false; -if (timeInState != null ? !timeInState.equals(that.timeInState) : that.timeInState!= null) return false; -if (agentVersion != null ? !agentVersion.equals(that.agentVersion) : that.agentVersion != null) return false; -if (currentState != null ? !currentState.equals(that.currentState) : that.currentState != null) return false; - -return true; +return Objects.equals(hostId, that.hostId) && +Objects.equals(availableMem, that.availableMem) && +Objects.equals(timeInState, that.timeInState) && +Objects.equals(agentVersion, that.agentVersion) && +currentState == that.currentState; } @Override public int hashCode() { -int result = hostId != null ? hostId.intValue() : 0; -result = 31 * result + (availableMem != null ? availableMem.intValue() : 0); -result = 31 * result + (timeInState != null ? timeInState.intValue() : 0); -result = 31 * result + (agentVersion != null ? agentVersion.hashCode() : 0); -result = 31 * result + (currentState != null ? currentState.hashCode() : 0); -return result; +return Objects.hash(hostId, availableMem, timeInState, agentVersion, currentState); } public HostEntity getHostEntity() {
[ambari] branch branch-2.7 updated: AMBARI-25516. Missing @Override on methods (#3200) (rickyma via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 7723770 AMBARI-25516. Missing @Override on methods (#3200) (rickyma via dgrinenko) 7723770 is described below commit 7723770f0118f6fb996553a60d389615b4780f0b Author: RickyMa AuthorDate: Tue Jun 30 23:56:08 2020 +0800 AMBARI-25516. Missing @Override on methods (#3200) (rickyma via dgrinenko) --- .../org/apache/ambari/tools/zk/ZkConnection.java | 8 +- .../metrics2/sink/timeline/AppCookieManager.java | 2 + .../sink/timeline/HadoopTimelineMetricsSink.java | 10 +-- .../host/aggregator/AggregatorApplication.java | 6 +- .../sink/kafka/KafkaTimelineMetricsReporter.java | 9 +- .../core/timeline/HBaseTimelineMetricsService.java | 1 + .../core/timeline/TimelineMetricStoreWatcher.java | 16 ++-- .../aggregators/AbstractTimelineAggregator.java| 3 + .../core/timeline/query/DefaultCondition.java | 21 + .../timeline/query/DefaultPhoenixDataSource.java | 2 + .../timeline/query/MetadataQueryCondition.java | 1 + .../upgrade/core/AbstractPhoenixMetricsCopier.java | 1 + .../upgrade/core/MetricsDataMigrationLauncher.java | 14 ++-- .../ServiceComponentHostEventWrapper.java | 1 + .../org/apache/ambari/server/agent/HostInfo.java | 1 + .../ambari/server/api/services/ResultImpl.java | 2 + .../ambari/server/bootstrap/FifoLinkedHashMap.java | 1 + .../server/checks/AtlasMigrationPropertyCheck.java | 9 +- .../ambari/server/cleanup/CleanupServiceImpl.java | 1 + .../server/configuration/SingleFileWatch.java | 1 + .../controller/AmbariManagementControllerImpl.java | 1 + .../ambari/server/controller/HostRequest.java | 1 + .../ambari/server/controller/ShortTaskStatus.java | 1 + .../server/controller/ViewPrivilegeRequest.java| 5 ++ .../controller/internal/AppCookieManager.java | 2 + .../internal/ExtensionLinkResourceProvider.java| 1 + .../controller/internal/URLStreamProvider.java | 8 +- .../logging/LoggingRequestHelperImpl.java | 2 + .../server/events/AgentConfigsUpdateEvent.java | 1 + .../ambari/server/events/TopologyUpdateEvent.java | 2 + .../dispatchers/AmbariSNMPDispatcher.java | 1 + .../apache/ambari/server/orm/DBAccessorImpl.java | 4 + .../server/orm/cache/HostConfigMappingImpl.java| 2 + .../server/orm/dao/AmbariConfigurationDAO.java | 1 + .../server/orm/entities/BlueprintConfigEntity.java | 8 ++ .../server/orm/entities/HostGroupConfigEntity.java | 8 ++ .../ambari/server/orm/entities/SettingEntity.java | 1 + .../server/scheduler/ExecutionScheduleManager.java | 1 + .../server/security/InternalSSLSocketFactory.java | 3 + .../authorization/AmbariLdapBindAuthenticator.java | 7 +- .../server/security/authorization/Users.java | 98 ++ .../security/credential/GenericKeyCredential.java | 1 + .../credential/PrincipalKeyCredential.java | 1 + .../org/apache/ambari/server/stack/BaseModule.java | 1 + .../ambari/server/state/action/ActionId.java | 1 + .../ambari/server/state/cluster/ClusterImpl.java | 2 + .../apache/ambari/server/state/host/HostImpl.java | 2 + .../state/host/HostStatusUpdatesReceivedEvent.java | 1 + .../AbstractKerberosDescriptorContainer.java | 1 + .../DefaultQuickLinkVisibilityController.java | 1 + .../server/state/stack/MetricDefinition.java | 1 + .../ambari/server/topology/BlueprintImpl.java | 5 ++ .../ambari/server/topology/HostGroupImpl.java | 3 + .../ambari/server/topology/RepositorySetting.java | 1 + .../server/topology/tasks/TopologyHostTask.java| 1 + .../validators/RequiredPasswordValidator.java | 1 + .../server/upgrade/AbstractUpgradeCatalog.java | 1 + .../server/utils/ManagedThreadPoolExecutor.java| 1 + .../utils/ScheduledExecutorCompletionService.java | 5 +- .../ambari/server/view/ViewDirectoryWatcher.java | 1 + .../ambari/server/view/events/EventImpl.java | 4 + .../apache/ambari/swagger/AmbariSwaggerReader.java | 1 + 62 files changed, 202 insertions(+), 102 deletions(-) diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java index 6bac892..4c316c7 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java @@ -40,11 +40,9 @@ public class ZkConnection { throws IOException, InterruptedException, IllegalStateException { final CountDownLatch connSignal = new CountDownLatch(1); -ZooKeeper zooKeeper = new ZooKeeper(serverAddress, sessionTimeoutMillis, new Watcher() { - public void process(WatchedEvent event
[ambari] branch trunk updated: AMBARI-25516. Missing @Override on 91 methods (#3198) (rickyma via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 24dbed2 AMBARI-25516. Missing @Override on 91 methods (#3198) (rickyma via dgrinenko) 24dbed2 is described below commit 24dbed27b97f4c82835273758f0bceb3334b4ef2 Author: RickyMa AuthorDate: Tue Jun 30 23:55:00 2020 +0800 AMBARI-25516. Missing @Override on 91 methods (#3198) (rickyma via dgrinenko) --- .../org/apache/ambari/tools/zk/ZkConnection.java | 1 + .../ServiceComponentHostEventWrapper.java | 1 + .../org/apache/ambari/server/agent/HostInfo.java | 1 + .../ambari/server/api/services/ResultImpl.java | 2 + .../ambari/server/bootstrap/FifoLinkedHashMap.java | 1 + .../ambari/server/cleanup/CleanupServiceImpl.java | 1 + .../server/configuration/SingleFileWatch.java | 1 + .../controller/AmbariManagementControllerImpl.java | 1 + .../ambari/server/controller/HostRequest.java | 1 + .../ambari/server/controller/ShortTaskStatus.java | 1 + .../server/controller/ViewPrivilegeRequest.java| 5 ++ .../controller/internal/AppCookieManager.java | 2 + .../internal/ExtensionLinkResourceProvider.java| 1 + .../logging/LoggingRequestHelperImpl.java | 2 + .../server/events/AgentConfigsUpdateEvent.java | 1 + .../ambari/server/events/TopologyUpdateEvent.java | 2 + .../ldap/domain/AmbariLdapConfiguration.java | 1 + .../metrics/system/impl/AmbariMetricSinkImpl.java | 2 + .../dispatchers/AmbariSNMPDispatcher.java | 1 + .../apache/ambari/server/orm/DBAccessorImpl.java | 4 + .../server/orm/cache/HostConfigMappingImpl.java| 1 + .../server/orm/dao/AmbariConfigurationDAO.java | 1 + .../server/orm/entities/BlueprintConfigEntity.java | 8 ++ .../server/orm/entities/HostGroupConfigEntity.java | 8 ++ .../ambari/server/orm/entities/SettingEntity.java | 1 + .../server/scheduler/ExecutionScheduleManager.java | 1 + .../server/security/InternalSSLSocketFactory.java | 3 + .../authorization/AmbariLdapBindAuthenticator.java | 7 +- .../server/security/authorization/Users.java | 98 ++ .../security/credential/GenericKeyCredential.java | 1 + .../credential/PrincipalKeyCredential.java | 1 + .../org/apache/ambari/server/stack/BaseModule.java | 1 + .../ambari/server/state/action/ActionId.java | 1 + .../apache/ambari/server/state/host/HostImpl.java | 2 + .../state/host/HostStatusUpdatesReceivedEvent.java | 1 + .../AbstractKerberosDescriptorContainer.java | 1 + .../DefaultQuickLinkVisibilityController.java | 1 + .../server/state/stack/MetricDefinition.java | 1 + .../ambari/server/topology/BlueprintImpl.java | 5 ++ .../ambari/server/topology/HostGroupImpl.java | 2 + .../ambari/server/topology/RepositorySetting.java | 1 + .../server/topology/tasks/TopologyHostTask.java| 1 + .../validators/RequiredPasswordValidator.java | 1 + .../server/upgrade/AbstractUpgradeCatalog.java | 1 + .../server/utils/ManagedThreadPoolExecutor.java| 1 + .../utils/ScheduledExecutorCompletionService.java | 5 +- .../ambari/server/view/ViewDirectoryWatcher.java | 1 + .../ambari/server/view/events/EventImpl.java | 4 + .../apache/ambari/swagger/AmbariSwaggerReader.java | 1 + 49 files changed, 132 insertions(+), 61 deletions(-) diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java index 6bac892..ae74b4b 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkConnection.java @@ -41,6 +41,7 @@ public class ZkConnection { { final CountDownLatch connSignal = new CountDownLatch(1); ZooKeeper zooKeeper = new ZooKeeper(serverAddress, sessionTimeoutMillis, new Watcher() { + @Override public void process(WatchedEvent event) { if (event.getState() == SyncConnected) { connSignal.countDown(); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ServiceComponentHostEventWrapper.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ServiceComponentHostEventWrapper.java index 7bce6b8..f21cfba 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ServiceComponentHostEventWrapper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ServiceComponentHostEventWrapper.java @@ -66,6 +66,7 @@ public class ServiceComponentHostEventWrapper { } } + @Override public String toString() { if (event != null) { return event.toString(); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HostInfo.java b
[ambari] branch branch-2.7 updated: AMBARI-25494. Ambari - Unsafe third-party link (target="_blank") (#3191) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b3a49c8 AMBARI-25494. Ambari - Unsafe third-party link (target="_blank") (#3191) (hiveww via dgrinenko) b3a49c8 is described below commit b3a49c8a42892c1a9274aa02395e2ec01555b607 Author: Alexander Antonenko AuthorDate: Tue Jun 30 18:51:26 2020 +0300 AMBARI-25494. Ambari - Unsafe third-party link (target="_blank") (#3191) (hiveww via dgrinenko) --- ambari-web/app/assets/index.html | 4 ++-- ambari-web/app/templates/common/about.hbs | 6 +++--- ambari-web/app/templates/main/service/services/hive.hbs| 4 ++-- ambari-web/app/templates/main/service/widgets/create/step1.hbs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ambari-web/app/assets/index.html b/ambari-web/app/assets/index.html index 539a3e2..99f1fe0 100644 --- a/ambari-web/app/assets/index.html +++ b/ambari-web/app/assets/index.html @@ -45,8 +45,8 @@ -http://www.apache.org/licenses/LICENSE-2.0; target="_blank">Licensed under the Apache License, Version 2.0. -See third-party tools/resources that Ambari uses and their respective authors +http://www.apache.org/licenses/LICENSE-2.0; target="_blank" rel="noopener noreferrer">Licensed under the Apache License, Version 2.0. +See third-party tools/resources that Ambari uses and their respective authors diff --git a/ambari-web/app/templates/common/about.hbs b/ambari-web/app/templates/common/about.hbs index 00388c8..3042765 100644 --- a/ambari-web/app/templates/common/about.hbs +++ b/ambari-web/app/templates/common/about.hbs @@ -27,8 +27,8 @@ {{view.ambariVersion}} - http://ambari.apache.org/; target="_blank">{{t app.aboutAmbari.getInvolved}} + http://ambari.apache.org/; target="_blank" rel="noopener noreferrer">{{t app.aboutAmbari.getInvolved}} - http://www.apache.org/licenses/LICENSE-2.0; target="_blank">{{t app.aboutAmbari.licensed}} + http://www.apache.org/licenses/LICENSE-2.0; target="_blank" rel="noopener noreferrer">{{t app.aboutAmbari.licensed}} - \ No newline at end of file + diff --git a/ambari-web/app/templates/main/service/services/hive.hbs b/ambari-web/app/templates/main/service/services/hive.hbs index ebd1e28..41126b1 100644 --- a/ambari-web/app/templates/main/service/services/hive.hbs +++ b/ambari-web/app/templates/main/service/services/hive.hbs @@ -51,9 +51,9 @@ {{link.label}} - {{t app.goToView}} + {{t app.goToView}} {{/each}} - \ No newline at end of file + diff --git a/ambari-web/app/templates/main/service/widgets/create/step1.hbs b/ambari-web/app/templates/main/service/widgets/create/step1.hbs index 80fd23f..c3d9fc3 100644 --- a/ambari-web/app/templates/main/service/widgets/create/step1.hbs +++ b/ambari-web/app/templates/main/service/widgets/create/step1.hbs @@ -31,7 +31,7 @@ - + @@ -45,4 +45,4 @@ - \ No newline at end of file +
[ambari] branch branch-2.7 updated: AMBARI-25486. Configs page not loading after Ambari upgrade (#3184) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new f81465c AMBARI-25486. Configs page not loading after Ambari upgrade (#3184) (hiveww via dgrinenko) f81465c is described below commit f81465cb7e32077e96f5e3c1a6821f707c1f45b7 Author: Alexander Antonenko AuthorDate: Tue Jun 30 18:27:27 2020 +0300 AMBARI-25486. Configs page not loading after Ambari upgrade (#3184) (hiveww via dgrinenko) --- ambari-web/app/mappers/configs/config_groups_mapper.js | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ambari-web/app/mappers/configs/config_groups_mapper.js b/ambari-web/app/mappers/configs/config_groups_mapper.js index e735d84..d53b307 100644 --- a/ambari-web/app/mappers/configs/config_groups_mapper.js +++ b/ambari-web/app/mappers/configs/config_groups_mapper.js @@ -120,7 +120,13 @@ App.configGroupsMapper = App.QuickDataMapper.create({ * @private */ _getAllHosts: function() { -return App.get('allHostNames.length') ? App.get('allHostNames') : Object.keys(App.get('router.installerController.content.hosts')); +var hosts; +try { + hosts = App.get('allHostNames.length') ? App.get('allHostNames') : Object.keys(App.get('router.installerController.content.hosts')); +} catch (e){ + hosts = []; +} +return hosts; }, /**
[ambari] branch branch-2.7 updated: AMBARI-25472. Disable autocomplete on login screen (#3177) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ecf6ef7 AMBARI-25472. Disable autocomplete on login screen (#3177) (hiveww via dgrinenko) ecf6ef7 is described below commit ecf6ef7a1fc9a0b6e62840cc4d54283910e5c05c Author: Alexander Antonenko AuthorDate: Tue Jun 30 15:34:36 2020 +0300 AMBARI-25472. Disable autocomplete on login screen (#3177) (hiveww via dgrinenko) --- ambari-web/app/templates/common/configs/addPropertyWindow.hbs | 2 +- .../app/templates/common/configs/notifications_configs.hbs| 2 +- ambari-web/app/templates/common/configs/overrideWindow.hbs| 2 +- ambari-web/app/templates/common/configs/queuePopup_body.hbs | 2 +- .../app/templates/common/configs/service_config_category.hbs | 2 +- .../app/templates/common/form/manage_credentilas_form.hbs | 2 +- .../app/templates/common/modal_popups/invalid_KDC_popup.hbs | 2 +- .../app/templates/common/modal_popups/select_groups_popup.hbs | 2 +- ambari-web/app/templates/login.hbs| 2 +- .../main/admin/highAvailability/rangerAdmin/step1.hbs | 2 +- .../alerts/add_custom_config_to_alert_notification_popup.hbs | 2 +- .../templates/main/alerts/add_definition_to_group_popup.hbs | 2 +- ambari-web/app/templates/main/alerts/configs.hbs | 4 ++-- .../app/templates/main/alerts/create_alert_notification.hbs | 2 +- .../app/templates/main/alerts/create_new_alert_group.hbs | 2 +- ambari-web/app/templates/main/dashboard/edit_widget_popup.hbs | 4 ++-- .../main/dashboard/edit_widget_popup_single_threshold.hbs | 2 +- ambari-web/app/templates/main/service/new_config_group.hbs| 2 +- .../app/templates/main/service/widgets/create/step2.hbs | 4 ++-- .../app/templates/main/service/widgets/create/step3.hbs | 2 +- ambari-web/app/templates/wizard/step1.hbs | 2 +- ambari-web/app/templates/wizard/step1_addLocalRepository.hbs | 4 ++-- .../app/templates/wizard/step3/step3_host_warnings_popup.hbs | 2 +- ambari-web/app/views/login.js | 11 ++- 24 files changed, 37 insertions(+), 28 deletions(-) diff --git a/ambari-web/app/templates/common/configs/addPropertyWindow.hbs b/ambari-web/app/templates/common/configs/addPropertyWindow.hbs index 6614de6..af341a8 100644 --- a/ambari-web/app/templates/common/configs/addPropertyWindow.hbs +++ b/ambari-web/app/templates/common/configs/addPropertyWindow.hbs @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. }} - + {{t common.type}} diff --git a/ambari-web/app/templates/common/configs/notifications_configs.hbs b/ambari-web/app/templates/common/configs/notifications_configs.hbs index 6f546e9..8a1d3fb 100644 --- a/ambari-web/app/templates/common/configs/notifications_configs.hbs +++ b/ambari-web/app/templates/common/configs/notifications_configs.hbs @@ -26,7 +26,7 @@ - + {{view App.RadioButtonView name="createNotification" diff --git a/ambari-web/app/templates/common/configs/overrideWindow.hbs b/ambari-web/app/templates/common/configs/overrideWindow.hbs index 2aa955c..7e0d5a1 100644 --- a/ambari-web/app/templates/common/configs/overrideWindow.hbs +++ b/ambari-web/app/templates/common/configs/overrideWindow.hbs @@ -17,7 +17,7 @@ }} {{! #with view.categoryConfigProperty}} - + {{view.parentView.dialogMessage}} {{#if view.parentView.warningMessage}} diff --git a/ambari-web/app/templates/common/configs/queuePopup_body.hbs b/ambari-web/app/templates/common/configs/queuePopup_body.hbs index 3959b3d..561cd09 100644 --- a/ambari-web/app/templates/common/configs/queuePopup_body.hbs +++ b/ambari-web/app/templates/common/configs/queuePopup_body.hbs @@ -16,7 +16,7 @@ * limitations under the License. }} - + {{#each view.parentView.content.configs}} {{#if isVisible}} diff --git a/ambari-web/app/templates/common/configs/service_config_category.hbs b/ambari-web/app/templates/common/configs/service_config_category.hbs index 5f8de30..aeb2a5f 100644 --- a/ambari-web/app/templates/common/configs/service_config_category.hbs +++ b/ambari-web/app/templates/common/configs/service_config_category.hbs @@ -30,7 +30,7 @@ - + {{#each configData in view.categoryConfigs}} {{#unless configData.isInDefaultTheme}} {{! configs related to default themes should not be shown on the Advanced tab }} {{#if configData.isComparison}} diff --git a/ambari-web/app/templates/common/form/manage_credentilas_form.hbs b/ambari-web/app/templates/common/form/manage_credentilas_form.hbs index 88cdfb9..f025394 100644 --- a/ambari-web/app/templates/c
[ambari] branch branch-2.7 updated: AMBARI-25489. On adding new VDF the Base URLs are not auto populated (#3187) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0deced6 AMBARI-25489. On adding new VDF the Base URLs are not auto populated (#3187) (hiveww via dgrinenko) 0deced6 is described below commit 0deced60bf5d15fb524098cb8a833a4057bfeb07 Author: Alexander Antonenko AuthorDate: Tue Jun 30 14:23:47 2020 +0300 AMBARI-25489. On adding new VDF the Base URLs are not auto populated (#3187) (hiveww via dgrinenko) --- .../app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js | 4 1 file changed, 4 deletions(-) diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 39a8d3a..149bcba 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -220,10 +220,6 @@ angular.module('ambariAdminConsole') $scope.osList.push(stackOs); } }); -if ($scope.selectedOption.index == $scope.localOption.index) { - $scope.clearRepoVersions(); - $scope.validateRepoUrl(); -} }) .catch(function (data) { Alert.error($t('versions.alerts.osListError'), data.message);
[ambari] branch branch-2.7 updated: AMBARI-25493. Ambari - Application Test Script Detected (#3190) (hiveww via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new e1bee59 AMBARI-25493. Ambari - Application Test Script Detected (#3190) (hiveww via dgrinenko) e1bee59 is described below commit e1bee59760c227b5af34af74813b04c9726c65ba Author: Alexander Antonenko AuthorDate: Tue Jun 30 13:43:47 2020 +0300 AMBARI-25493. Ambari - Application Test Script Detected (#3190) (hiveww via dgrinenko) --- ambari-web/app/assets/test/test.html | 8 +- ambari-web/brunch-config.js| 7 +- ambari-web/karma.conf.js | 5 +- ambari-web/package.json| 8 +- ambari-web/test/controllers/main_test.js | 4 +- ambari-web/test/router_test.js | 2 +- ambari-web/test/utils/credentials_test.js | 6 +- ambari-web/test/utils/stomp_client_test.js | 2 +- ambari-web/test/utils/ui_effects_test.js | 2 +- ambari-web/yarn.lock | 716 - 10 files changed, 306 insertions(+), 454 deletions(-) diff --git a/ambari-web/app/assets/test/test.html b/ambari-web/app/assets/test/test.html index 7b01f57..0ee66af 100644 --- a/ambari-web/app/assets/test/test.html +++ b/ambari-web/app/assets/test/test.html @@ -41,7 +41,6 @@ $.mocho = true; $.hostName = 'localhost:'; -window.initMochaPhantomJS && window.initMochaPhantomJS(); mocha.ui('bdd'); mocha.reporter('html'); expect = chai.expect; @@ -49,9 +48,6 @@ - -if (window.mochaPhantomJS) { mochaPhantomJS.run(); } -else { mocha.run(); } - +mocha.run(); - \ No newline at end of file + diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js index 94ffefc..702137e 100644 --- a/ambari-web/brunch-config.js +++ b/ambari-web/brunch-config.js @@ -33,13 +33,14 @@ module.exports.config = { } } }, + conventions: { +ignored: [/^(app\/assets\/test|test)/] + }, files: { javascripts: { joinTo: { 'javascripts/app.js': /^app/, -'javascripts/vendor.js': /^vendor/, -'test/javascripts/test.js': /^test(\/|\\)(?!vendor)/, -'test/javascripts/test-vendor.js': /^test(\/|\\)(?=vendor)/ +'javascripts/vendor.js': /^vendor/ }, order: { before: [ diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js index 63403a9..a595850 100644 --- a/ambari-web/karma.conf.js +++ b/ambari-web/karma.conf.js @@ -23,10 +23,10 @@ module.exports = function(config) { basePath: '', plugins: [ + 'karma-phantomjs-launcher', 'karma-mocha', 'karma-chai', 'karma-sinon', - 'karma-phantomjs-launcher', 'karma-coverage', 'karma-ember-precompiler-brunch', 'karma-commonjs-require', @@ -46,7 +46,7 @@ module.exports = function(config) { // 'public/test/javascripts/test.js', // 'public/test/tests.js' - 'node_modules/karma-commonjs-require/node_modules/commonjs-require-definition/require.js', + 'node_modules/commonjs-require-definition/require.js', 'vendor/scripts/console-helper.js', 'vendor/scripts/jquery-1.9.1.js', 'vendor/scripts/handlebars-1.0.0.beta.6.js', @@ -166,7 +166,6 @@ module.exports = function(config) { // - Firefox // - Opera (has to be installed with `npm install karma-opera-launcher`) // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) -// - PhantomJS // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) browsers: ['PhantomJS'], diff --git a/ambari-web/package.json b/ambari-web/package.json index 785925e..7fcc59d 100644 --- a/ambari-web/package.json +++ b/ambari-web/package.json @@ -27,24 +27,22 @@ "chai": "~3.5.0", "express": "2.5.8", "karma": ">=0.11.14", +"karma-phantomjs-launcher": "1.0.2", "karma-babel-preprocessor": "^6.0.1", "karma-chai": "~0.1.0", -"karma-commonjs-require": "~0.0.1", +"karma-commonjs-require": "~0.0.3", "karma-coverage": "~0.2.0", "karma-ember-precompiler-brunch": "^1.0.0", "karma-mocha": "0.1.1", -"karma-phantomjs-launcher": "1.0.2", "karma-sinon": "~1.0.2", "mocha": "2.5.3", -"mocha-phantomjs": "~4.1.0", -"mocha-phantomjs-core": "~2.1.0", "phantomjs": "~2.1.0", "sinon": "=1.7.3", "sinon-chai": "~2.8.0" }, "scripts": { "
[ambari] branch branch-2.7 updated: AMBARI-25520. Insecure Transport : Weak SSL Cipher and weak protocol. (#3204) (dvitiuk via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new a10880a AMBARI-25520. Insecure Transport : Weak SSL Cipher and weak protocol. (#3204) (dvitiuk via dgrinenko) a10880a is described below commit a10880a63e6fbef44662ba9f37e87082e9985c64 Author: dvitiiuk AuthorDate: Wed Jun 24 11:17:25 2020 +0300 AMBARI-25520. Insecure Transport : Weak SSL Cipher and weak protocol. (#3204) (dvitiuk via dgrinenko) --- .../java/org/apache/ambari/server/controller/AmbariServer.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index b8f440a..ee858bf 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -200,6 +200,7 @@ public class AmbariServer { */ public static final EnumSet DISPATCHER_TYPES = EnumSet.of(DispatcherType.REQUEST); private static final int DEFAULT_ACCEPTORS_COUNT = 1; + private static final String[] DEPRECATED_SSL_PROTOCOLS = new String[] {"TLSv1"}; static { Velocity.setProperty("runtime.log.logsystem.log4j.logger", VELOCITY_LOG_CATEGORY); @@ -802,9 +803,9 @@ public class AmbariServer { * at server properties) */ private void disableInsecureProtocols(SslContextFactory factory) { -// by default all protocols should be available -factory.setExcludeProtocols(); -factory.setIncludeProtocols(new String[] {"SSLv2Hello","SSLv3","TLSv1","TLSv1.1","TLSv1.2"}); +// by default all protocols should be available, excluding TLSv1.0 +factory.setExcludeProtocols(DEPRECATED_SSL_PROTOCOLS); +factory.setIncludeProtocols(new String[] {"SSLv2Hello","SSLv3","TLSv1.1","TLSv1.2"}); if (!configs.getSrvrDisabledCiphers().isEmpty()) { String[] masks = configs.getSrvrDisabledCiphers().split(DISABLED_ENTRIES_SPLITTER);
[ambari] branch branch-2.7 updated: [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (with common-service changes for branch-2.7) (#3013) (virajjasani via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 7a801d3 [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (with common-service changes for branch-2.7) (#3013) (virajjasani via dgrinenko) 7a801d3 is described below commit 7a801d3cdd5a7ac47d9984d39a1328772764a4a9 Author: Viraj Jasani AuthorDate: Fri Jun 19 21:51:56 2020 +0530 [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (with common-service changes for branch-2.7) (#3013) (virajjasani via dgrinenko) --- .../common-services/HBASE/0.96.0.2.0/metainfo.xml | 16 ++ .../0.96.0.2.0/package/files/hbase_replication.rb | 257 + .../0.96.0.2.0/package/scripts/hbase_master.py | 42 .../0.96.0.2.0/package/scripts/params_linux.py | 6 + .../0.96.0.2.0/package/scripts/params_windows.py | 1 + .../BackgroundCustomCommandExecutionTest.java | 95 +++- .../stacks/HDP/2.0.5/services/HBASE/metainfo.xml | 16 ++ ambari-web/app/controllers/main/service/item.js| 140 +++ ambari-web/app/messages.js | 15 ++ ambari-web/app/models/host_component.js| 16 ++ ambari-web/app/styles/alerts.less | 20 ++ ambari-web/app/styles/application.less | 3 + .../modal_popups/update_replication_popup.hbs | 61 + ambari-web/app/utils/ajax/ajax.js | 51 ambari-web/app/views/main/service/item.js | 14 +- 15 files changed, 748 insertions(+), 5 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml index 49c26b9..18a3e11 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml @@ -70,6 +70,22 @@ 600 + + UPDATE_REPLICATION + +scripts/hbase_master.py +PYTHON +600 + + + + STOP_REPLICATION + +scripts/hbase_master.py +PYTHON +600 + + diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/files/hbase_replication.rb b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/files/hbase_replication.rb new file mode 100644 index 000..39db86e --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/files/hbase_replication.rb @@ -0,0 +1,257 @@ +# +# 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. +# + +# Add or remove replication peers + +require 'optparse' +include Java + +java_import org.apache.hadoop.hbase.HBaseConfiguration +java_import org.apache.hadoop.hbase.HConstants +java_import org.apache.hadoop.hbase.client.replication.ReplicationAdmin +java_import org.apache.hadoop.hbase.replication.ReplicationPeerConfig +java_import org.apache.commons.logging.Log +java_import org.apache.commons.logging.LogFactory +java_import org.apache.hadoop.hbase.util.VersionInfo + +# Name of this script +NAME = "hbase_replication" + +# Do command-line parsing +options = {} +optparse = OptionParser.new do |opts| + opts.banner = "Usage: ./hbase org.jruby.Main #{NAME}.rb [options] add|remove|update|list " + opts.separator 'Add remote a single Slave cluster for replication. List Slave Clusters. Or Update Slave clusters to given hash delimited new slave clusters.' + opts.on('-h', '--help', 'Display usage information') do +puts opts +exit + end + options[:debug] = false + opts.on('-d', '--debug', 'Display extra debug logging') do +options[:debug] = true + end +end +optparse.parse! + +def getConfiguration() + hbase_twenty = VersionInfo.getVersion().match('0
[ambari] branch trunk updated: [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (without common-service changes for trunk) (#3014) (virajjasani via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new a42d52f [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (without common-service changes for trunk) (#3014) (virajjasani via dgrinenko) a42d52f is described below commit a42d52f7999592c96f67ad114d27f7b8a2a92e66 Author: Viraj Jasani AuthorDate: Fri Jun 19 19:30:42 2020 +0530 [AMBARI-25208] : Enable/Disable HBase Cross Cluster Replication (without common-service changes for trunk) (#3014) (virajjasani via dgrinenko) --- .../BackgroundCustomCommandExecutionTest.java | 102 ++- .../stacks/HDP/2.0.5/services/HBASE/metainfo.xml | 16 +++ ambari-web/app/controllers/main/service/item.js| 140 + ambari-web/app/messages.js | 15 +++ ambari-web/app/models/host_component.js| 16 +++ ambari-web/app/styles/alerts.less | 20 +++ ambari-web/app/styles/application.less | 3 + .../modal_popups/update_replication_popup.hbs | 61 + ambari-web/app/utils/ajax/ajax.js | 51 ambari-web/app/views/main/service/item.js | 14 ++- 10 files changed, 433 insertions(+), 5 deletions(-) diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java index 89d0630..c979984 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java @@ -77,6 +77,13 @@ public class BackgroundCustomCommandExecutionTest { private Clusters clusters; private static final String REQUEST_CONTEXT_PROPERTY = "context"; + private static final String UPDATE_REPLICATION_PARAMS = "{\n" + + " \"replication_cluster_keys\": c7007.ambari.apache.org,c7008.ambari.apache.org,c7009.ambari.apache.org:2181:/hbase,\n" + + " \"replication_peers\": 1\n" + + "}"; + private static final String STOP_REPLICATION_PARAMS = "{\n" + + " \"replication_peers\": 1\n" + + "}"; @Captor ArgumentCaptor requestCapture; @Mock ActionManager am; @@ -180,15 +187,18 @@ public class BackgroundCustomCommandExecutionTest { createCluster("c1"); addHost("c6401","c1"); addHost("c6402","c1"); +addHost("c7007", "c1"); clusters.updateHostMappings(clusters.getHost("c6401")); clusters.updateHostMappings(clusters.getHost("c6402")); +clusters.updateHostMappings(clusters.getHost("c7007")); clusters.getCluster("c1"); createService("c1", "HDFS", null); - -createServiceComponent("c1","HDFS","NAMENODE", State.INIT); - -createServiceComponentHost("c1","HDFS","NAMENODE","c6401", null); +createService("c1", "HBASE", null); +createServiceComponent("c1", "HDFS", "NAMENODE", State.INIT); +createServiceComponent("c1", "HBASE", "HBASE_MASTER", State.INIT); +createServiceComponentHost("c1", "HDFS", "NAMENODE", "c6401", null); +createServiceComponentHost("c1", "HBASE", "HBASE_MASTER", "c7007", null); } private void addHost(String hostname, String clusterName) throws AmbariException { clusters.addHost(hostname); @@ -206,6 +216,90 @@ public class BackgroundCustomCommandExecutionTest { host.setHostAttributes(hostAttributes); } + + @SuppressWarnings("serial") + @Test + public void testUpdateHBaseReplicationCustomCommand() + throws AuthorizationException, AmbariException, IllegalAccessException, + NoSuchFieldException { +createClusterFixture(); +Map requestProperties = new HashMap() { + { +put(REQUEST_CONTEXT_PROPERTY, "Enable Cross Cluster HBase Replication"); +put("command", "UPDATE_REPLICATION"); +put("parameters", UPDATE_REPLICATION_PARAMS); + } +}; +ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", +"UPDATE_REPLICATION", new HashMap<>(), false); +actionRequest.getResourceFilters().add(n
[ambari] branch branch-2.7 updated (0a06a93 -> 0259085)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 0a06a93 AMBARI-25518. DB connection details in API call. (#3202) (dvitiiuk via dgrinenko) add 0259085 AMBARI-25495. Extend the set of headers from server's response. (#3192) (dvitiiuk via dgrinenko) No new revisions were added by this update. Summary of changes: .../ambari/server/configuration/Configuration.java | 37 .../security/AbstractSecurityHeaderFilter.java | 14 +++ .../security/AmbariServerSecurityHeaderFilter.java | 1 + .../security/AmbariViewsSecurityHeaderFilter.java | 1 + .../ambari/server/agent/TestHeartbeatHandler.java | 3 +- .../AmbariServerSecurityHeaderFilterTest.java | 2 + ambari-server/src/test/python/TestAmbariServer.py | 99 +++--- ambari-server/src/test/python/TestMpacks.py| 15 ++-- ambari-server/src/test/python/TestOSCheck.py | 11 +-- .../src/test/python/TestSetupTrustedProxy.py | 13 +-- 10 files changed, 128 insertions(+), 68 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-25518. DB connection details in API call. (#3202) (dvitiiuk via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 0a06a93 AMBARI-25518. DB connection details in API call. (#3202) (dvitiiuk via dgrinenko) 0a06a93 is described below commit 0a06a9348cdefe01bc50895e81d6e713b5bd4da5 Author: dvitiiuk AuthorDate: Thu Jun 11 19:08:27 2020 +0300 AMBARI-25518. DB connection details in API call. (#3202) (dvitiiuk via dgrinenko) --- ambari-agent/src/main/python/ambari_agent/HostInfo.py | 1 - .../apache/ambari/server/agent/AgentResourceTest.java | 5 ++--- ambari-server/src/test/python/TestSetupSso.py | 17 + .../app/mixins/main/host/details/actions/check_host.js | 16 ++-- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py index 8307b23..6879c62 100644 --- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py +++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py @@ -257,7 +257,6 @@ class HostInfoLinux(HostInfo): for filter in self.PROC_FILTER: if filter in cmd: metrics['hadoop'] = True -metrics['command'] = unicode(cmd.strip(), errors='ignore') for line in open(os.path.join('/proc', pid, 'status')): if line.startswith('Uid:'): uid = int(line.split()[1]) diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java index 684605e..cfcedaa 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java @@ -228,8 +228,8 @@ public class AgentResourceTest extends RandomPortJerseyTest { String PackageDetailJSON = "[{name:'abc', version:'2.3', repoName:'HDP'},{name:'abc', version:'3.3', repoName:'HDP-epel'}]"; String ExistingUserJSON = "[{name:'hdfs', homeDir:'/var/lib/hadoop', status:''}, " + "{name:'ambari_qa', homeDir:'/var/home/ambari_qa',status:'None'}]"; -String JavaProcJSON = "[{user:'root', pid:'355', hadoop:'True', command:'cmd'}, " + -"{user:'hdfs', pid:'325', hadoop:'False', command:'cmd = 2'}]"; +String JavaProcJSON = "[{user:'root', pid:'355', hadoop:'True'}, " + +"{user:'hdfs', pid:'325', hadoop:'False'}]"; String AlternativeJSON = "[{name:'/etc/alternatives/hdfs-conf', target:'/etc/hadoop/conf.dist'}, " + "{name:'abc', target:'def'}]"; String AgentEnvJSON = "{\"alternatives\": " + AlternativeJSON + @@ -258,7 +258,6 @@ public class AgentResourceTest extends RandomPortJerseyTest { JavaProcJSON, AgentEnv.JavaProc[].class); Assert.assertEquals("root", procs[0].getUser()); Assert.assertEquals(355, procs[0].getPid()); -Assert.assertEquals("cmd = 2", procs[1].getCommand()); Assert.assertEquals(false, procs[1].isHadoop()); AgentEnv.Alternative[] alternatives = getJsonFormString( diff --git a/ambari-server/src/test/python/TestSetupSso.py b/ambari-server/src/test/python/TestSetupSso.py index 802c058..ce19032 100644 --- a/ambari-server/src/test/python/TestSetupSso.py +++ b/ambari-server/src/test/python/TestSetupSso.py @@ -64,14 +64,15 @@ with patch.object(platform, "linux_distribution", return_value = MagicMock(retur with patch.object(os_utils, "parse_log4j_file", return_value={'ambari.log.dir': '/var/log/ambari-server'}): with patch("platform.linux_distribution", return_value = os_distro_value): with patch("os.symlink"): -with patch("glob.glob", return_value = ['/etc/init.d/postgresql-9.3']): - _ambari_server_ = __import__('ambari-server') - with patch("__builtin__.open"): -from ambari_commons.exceptions import FatalException, NonFatalException -from ambari_server.properties import Properties -from ambari_server.setupSso import setup_sso, AMBARI_SSO_AUTH_ENABLED, \ - SSO_PROVIDER_URL, SSO_CERTIFICATE, JWT_COOKIE_NAME, JWT_AUDIENCES, \ - SSO_ENABLED_SERVICES, SSO_MANAGE_SERVICES +with patch.object(os_utils, "is_service_exist", return_value = True): + with patch("glob.glob", return_value = ['/etc/init.d/postgresql-9.3']): +_ambari_server_ = __import__('ambari-server') +with patch("__builtin__.open"): +
[ambari] branch branch-2.7 updated: AMBARI-25519. Ambari builds are failing with a bower error (dpidhaiets) (#3203) (pidhaietsdp via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new d7d2a67 AMBARI-25519. Ambari builds are failing with a bower error (dpidhaiets) (#3203) (pidhaietsdp via dgrinenko) d7d2a67 is described below commit d7d2a67b41170ea9f8a250777842166013dd4ebc Author: pidhaietsdp <62650175+pidhaiet...@users.noreply.github.com> AuthorDate: Thu Jun 11 13:33:56 2020 +0300 AMBARI-25519. Ambari builds are failing with a bower error (dpidhaiets) (#3203) (pidhaietsdp via dgrinenko) --- ambari-admin/src/main/resources/ui/admin-web/bower.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json b/ambari-admin/src/main/resources/ui/admin-web/bower.json index 7420309..6585f9a 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/bower.json +++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json @@ -19,5 +19,8 @@ "chai": "1.8.0", "mocha": "1.14.0", "sinon": "1.10.3" + }, + "resolutions": { +"angular": "1.8.0" } }
[ambari] branch branch-2.7 updated: AMBARI-25500. Hive Service Check Fails if the trustStorePassword has Special character $ (#3193) (asnaik via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 284ed88 AMBARI-25500. Hive Service Check Fails if the trustStorePassword has Special character $ (#3193) (asnaik via dgrinenko) 284ed88 is described below commit 284ed88f50c09dfdac073cc74f463da738d50a81 Author: Asnaik HWX AuthorDate: Tue Jun 9 16:00:10 2020 +0530 AMBARI-25500. Hive Service Check Fails if the trustStorePassword has Special character $ (#3193) (asnaik via dgrinenko) --- .../main/python/resource_management/libraries/functions/hive_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py index 398a932..173e87c 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py @@ -68,7 +68,7 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd # append url according to ssl configuration if ssl and ssl_keystore is not None and ssl_password is not None: -beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', 'trustStorePassword={ssl_password!p}']) +beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', "trustStorePassword='{ssl_password!p}'"]) # append url according to principal and execute kinit if kinitcmd and hive_auth != "LDAP":
[ambari] branch trunk updated (c575567 -> 77b5af4)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from c575567 [AMBARI-25499] Outdated bower version causes Ambari build to fail (#3196) (csaltos via dgrinenko) add 77b5af4 AMBARI-25517. Should not use '!=' to compare 'Long hostId' in HostStateEntity, which could lead to unforeseen problems (#3199) (rickyma via dgrinenko) No new revisions were added by this update. Summary of changes: .../server/orm/entities/HostStateEntity.java | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-25344. Provide graceful start/stop option for RegionServer (#3059) (virajjasani via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 9d53b5e AMBARI-25344. Provide graceful start/stop option for RegionServer (#3059) (virajjasani via dgrinenko) 9d53b5e is described below commit 9d53b5e84bee3894086720cdca6b53fc9dd08c3d Author: Viraj Jasani AuthorDate: Tue May 26 14:41:09 2020 +0530 AMBARI-25344. Provide graceful start/stop option for RegionServer (#3059) (virajjasani via dgrinenko) --- .../common-services/HBASE/0.96.0.2.0/metainfo.xml | 18 +++ .../package/scripts/hbase_decommission.py | 6 +-- .../package/scripts/hbase_regionserver.py | 55 -- .../0.96.0.2.0/package/scripts/params_linux.py | 2 + .../python/stacks/2.0.6/HBASE/test_hbase_master.py | 14 +++--- 5 files changed, 81 insertions(+), 14 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml index 463ae31..49c26b9 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml @@ -96,6 +96,24 @@ true + + + GRACEFUL_STOP + +scripts/hbase_regionserver.py +PYTHON +600 + + + + GRACEFUL_START + +scripts/hbase_regionserver.py +PYTHON +600 + + + diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py index 5853f75..1ce0b8c 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py @@ -64,7 +64,7 @@ def hbase_decommission(env): for host in hosts: if host: regiondrainer_cmd = format( - "{kinit_cmd} HBASE_OPTS=\"$HBASE_OPTS {master_security_config}\" {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_drainer} remove {host}") + "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} {client_security_config} org.jruby.Main {region_drainer} remove {host}") Execute(regiondrainer_cmd, user=params.hbase_user, logoutput=True @@ -76,9 +76,9 @@ def hbase_decommission(env): for host in hosts: if host: regiondrainer_cmd = format( - "{kinit_cmd} HBASE_OPTS=\"$HBASE_OPTS {master_security_config}\" {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_drainer} add {host}") + "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} {client_security_config} org.jruby.Main {region_drainer} add {host}") regionmover_cmd = format( - "{kinit_cmd} HBASE_OPTS=\"$HBASE_OPTS {master_security_config}\" {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_mover} unload {host}") + "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} {client_security_config} org.jruby.Main {region_mover} unload {host}") Execute(regiondrainer_cmd, user=params.hbase_user, diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py index 04f0e22..75083ac 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py @@ -21,6 +21,7 @@ limitations under the License. import sys from resource_management.core import shell +from resource_management.core.resources.system import Execute from resource_management.libraries.script.script import Script from resource_management.libraries.functions.format import format from resource_management.libraries.functions.check_process_status import check_process_status @@ -29,12 +30,14 @@ from resource_management.libraries.functions.security_commons import build_expec FILE_TYPE_XML from ambari_commons import OSCheck, OSConst +from ambari_commons.constants import UPGRADE_TYPE_ROLLING from ambari_commons.os_family_impl import OsFamilyImpl from hbase import hbase from hbase_service imp
[ambari] branch branch-2.7 updated: AMBARI-25499 Outdated bower version causes Ambari build to fail (dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 2ed7ca2 AMBARI-25499 Outdated bower version causes Ambari build to fail (dgrinenko) 2ed7ca2 is described below commit 2ed7ca2c0d3786d2451839ef8f9aa2de9921217b Author: Dmitry Grinenko AuthorDate: Mon May 25 10:02:59 2020 +0300 AMBARI-25499 Outdated bower version causes Ambari build to fail (dgrinenko) --- ambari-admin/src/main/resources/ui/admin-web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json b/ambari-admin/src/main/resources/ui/admin-web/package.json index 24cb68a..4311edf 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/package.json +++ b/ambari-admin/src/main/resources/ui/admin-web/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "dependencies": {}, "devDependencies": { -"bower": "1.3.8", +"bower": "1.8.8", "gulp": "^3.8.8", "gulp-add-src": "^0.2.0", "gulp-autoprefixer": "0.0.7",
[ambari] branch trunk updated (2cf36ba -> c575567)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from 2cf36ba AMBARI-25449. Fix bulk delete api, response code 400 - Bulk DELETE API is broken (#3163) (praveenkjvs via dgrinenko) add c575567 [AMBARI-25499] Outdated bower version causes Ambari build to fail (#3196) (csaltos via dgrinenko) No new revisions were added by this update. Summary of changes: ambari-admin/src/main/resources/ui/admin-web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[ambari] branch branch-2.7 updated: AMBARI-25465 Postgresql service naming convention changed on SUSE 12 SP2 (#3174) (aszilárd via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ce57c77 AMBARI-25465 Postgresql service naming convention changed on SUSE 12 SP2 (#3174) (aszilárd via dgrinenko) ce57c77 is described below commit ce57c775c5891e0e95496cf05d6441011d41f40a Author: Szilárd Antal AuthorDate: Tue Feb 4 14:53:09 2020 +0100 AMBARI-25465 Postgresql service naming convention changed on SUSE 12 SP2 (#3174) (aszilárd via dgrinenko) --- .../src/main/python/ambari_commons/os_linux.py | 7 +++ .../src/main/python/ambari_commons/os_utils.py | 7 +-- .../src/main/python/ambari_commons/os_windows.py | 10 ++ .../python/ambari_server/dbConfiguration_linux.py | 23 ++ 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/ambari-common/src/main/python/ambari_commons/os_linux.py b/ambari-common/src/main/python/ambari_commons/os_linux.py index 053051b..4480183 100644 --- a/ambari-common/src/main/python/ambari_commons/os_linux.py +++ b/ambari-common/src/main/python/ambari_commons/os_linux.py @@ -84,3 +84,10 @@ def os_set_open_files_limit(maxOpenFiles): def os_getpass(prompt): return getpass.unix_getpass(prompt) + +def os_is_service_exist(serviceName): + if os.path.exists('/run/systemd/system/'): +return os.popen('systemctl list-units --full -all | grep "%s.service"' % serviceName).read().strip() != '' + + status = os.system("service %s status >/dev/null 2>&1" % serviceName) + return status != 256 \ No newline at end of file diff --git a/ambari-common/src/main/python/ambari_commons/os_utils.py b/ambari-common/src/main/python/ambari_commons/os_utils.py index 620bd0e..0757acb 100644 --- a/ambari-common/src/main/python/ambari_commons/os_utils.py +++ b/ambari-common/src/main/python/ambari_commons/os_utils.py @@ -33,11 +33,11 @@ else: if OSCheck.is_windows_family(): from ambari_commons.os_windows import os_change_owner, os_getpass, os_is_root, os_run_os_command, \ -os_set_open_files_limit, os_set_file_permissions +os_set_open_files_limit, os_set_file_permissions, os_is_service_exist else: # MacOS not supported from ambari_commons.os_linux import os_change_owner, os_getpass, os_is_root, os_run_os_command, \ -os_set_open_files_limit, os_set_file_permissions +os_set_open_files_limit, os_set_file_permissions, os_is_service_exist pass from ambari_commons.exceptions import FatalException @@ -131,6 +131,9 @@ def set_open_files_limit(maxOpenFiles): def get_password(prompt): return os_getpass(prompt) +def is_service_exist(serviceName): + return os_is_service_exist(serviceName) + def find_in_path(file): full_path = _search_file(file, os.environ["PATH"], os.pathsep) if full_path is None: diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py index 4c22384..f674894 100644 --- a/ambari-common/src/main/python/ambari_commons/os_windows.py +++ b/ambari-common/src/main/python/ambari_commons/os_windows.py @@ -471,6 +471,16 @@ def wait_for_pid_wmi(processName, parentPid, pattern, timeout): return 0 +def os_is_service_exist(serviceName): + try: +win32serviceutil.QueryServiceStatus(serviceName) + except: +# "Windows service NOT installed" +return False + else: +# "Windows service installed" +return True + #need this for redirecting output form python process to file class SyncStreamWriter(object): def __init__(self, stream, hMutexWrite): diff --git a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py index e95bbbd..4790f5d 100644 --- a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py +++ b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py @@ -31,7 +31,7 @@ import pwd from ambari_commons import OSCheck, OSConst from ambari_commons.logging_utils import get_silent, get_verbose, print_error_msg, print_info_msg, print_warning_msg from ambari_commons.exceptions import NonFatalException, FatalException -from ambari_commons.os_utils import copy_files, find_in_path, is_root, remove_file, run_os_command +from ambari_commons.os_utils import copy_files, find_in_path, is_root, remove_file, run_os_command, is_service_exist from ambari_server.dbConfiguration import DBMSConfig, USERNAME_PATTERN, SETUP_DB_CONNECT_ATTEMPTS, \ SETUP_DB_CONNECT_TIMEOUT, STORAGE_TYPE_LOCAL, DEFAULT_USERNAME, DEFAULT_PASSWORD from ambari_server.serverConfiguration import encrypt_password, store_password_file, \ @@ -385,11 +385,25 @@ class PGConfig(LinuxDBMSConfig): PG_HBA_RELOAD_CMD = AMBARI_SUDO_BINARY + " %s reload %s" % (SERVICE_CM
[ambari] branch branch-2.7 updated: AMBARI-25469. Bad UTF encoding on Alert listener receiver. (dvitiiuk via dgrinenko) (#3175)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ae5fe7a AMBARI-25469. Bad UTF encoding on Alert listener receiver. (dvitiiuk via dgrinenko) (#3175) ae5fe7a is described below commit ae5fe7aad56e6ba0a65a2ffacf15e7e32906 Author: dvitiiuk AuthorDate: Thu Jan 30 14:33:21 2020 +0200 AMBARI-25469. Bad UTF encoding on Alert listener receiver. (dvitiiuk via dgrinenko) (#3175) --- ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index 1acad26..b3e454a 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -185,6 +185,7 @@ class BaseAlert(object): data['text'] = "There is a problem with the alert definition: {0}".format(str(exception)) finally: # put the alert into the collector so it can be collected on the next run + data['text'] = data['text'].replace('\x00', '') self.collector.put(self.cluster_name, data)
[ambari] branch branch-2.7 updated: AMBARI-25454 API exception on trying to assign permission to user group with custom Ambari Views (dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new bdb06b1 AMBARI-25454 API exception on trying to assign permission to user group with custom Ambari Views (dgrinenko) bdb06b1 is described below commit bdb06b1299be0a5fafaf9c3f8eece70b002a6920 Author: Dmitry Grinenko AuthorDate: Thu Jan 23 08:35:32 2020 +0200 AMBARI-25454 API exception on trying to assign permission to user group with custom Ambari Views (dgrinenko) --- .../server/controller/internal/AmbariPrivilegeResourceProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java index 93c69bf..087615e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java @@ -23,7 +23,7 @@ import static org.apache.ambari.server.controller.internal.ViewPrivilegeResource import static org.apache.ambari.server.controller.internal.ViewPrivilegeResourceProvider.VIEW_NAME; import java.util.EnumSet; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -121,7 +121,7 @@ public class AmbariPrivilegeResourceProvider extends PrivilegeResourceProvider getResourceEntities(Map properties) { -Map resourceEntities = new HashMap<>(); +Map resourceEntities = new LinkedHashMap<>(); resourceEntities.put(ResourceEntity.AMBARI_RESOURCE_ID, null); // add cluster entities
[ambari] branch branch-2.7 updated: AMBARI-25457 Hive 3 Grafana dashboards showing outdated metrics (#3168)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new aba871e AMBARI-25457 Hive 3 Grafana dashboards showing outdated metrics (#3168) aba871e is described below commit aba871ed111c1131bde75226470b21c16df99fd9 Author: payert <35402259+pay...@users.noreply.github.com> AuthorDate: Fri Jan 17 08:16:14 2020 +0100 AMBARI-25457 Hive 3 Grafana dashboards showing outdated metrics (#3168) Some of the metrics' name has been changed in Hive 3. Due to this change many graphs shows no data on Hive Home, HiveServer2 and HiveMetastore dashboards. --- .../conf/unix/metrics_whitelist| 17 +- .../conf/windows/metrics_whitelist | 17 +- .../main/resources/metrics_def/HIVEMETASTORE.dat | 35 ++-- .../src/main/resources/metrics_def/HIVESERVER2.dat | 6 +- .../test/resources/test_data/full_whitelist.dat| 27 +++- .../HDP/grafana-hive-hivemetastore.json| 20 +-- .../HDP/grafana-hive-hiverserver2.json | 178 + .../grafana-dashboards/HDP/grafana-hive-home.json | 30 ++-- .../0.1.0/package/files/service-metrics/HIVE.txt | 13 +- 9 files changed, 103 insertions(+), 240 deletions(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/metrics_whitelist b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/metrics_whitelist index 8fcb485..3209164 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/metrics_whitelist +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/metrics_whitelist @@ -63,8 +63,9 @@ default.General.active_calls_api_hs2_operation_INITIALIZED default.General.active_calls_api_hs2_operation_PENDING default.General.active_calls_api_hs2_operation_RUNNING default.General.api_create_table_count -default.General.api_get_all_databases_75thpercentile -default.General.api_get_all_databases_999thpercentile +default.General.api_create_table_req_count +default.General.api_get_databases_75thpercentile +default.General.api_get_databases_999thpercentile default.General.api_get_partitions_by_names_75thpercentile default.General.api_get_partitions_by_names_999thpercentile default.General.api_hs2_operation_INITIALIZED_count @@ -72,16 +73,22 @@ default.General.create_total_count_partitions default.General.hs2_completed_operation_CLOSED default.General.hs2_completed_operation_ERROR default.General.hs2_completed_operation_FINISHED -default.General.init_total_count_dbs -default.General.init_total_count_partitions -default.General.init_total_count_tables +default.General.total_count_dbs +default.General.total_count_partitions +default.General.total_count_tables default.General.jvm.pause.extraSleepTime default.General.memory.heap.committed +default.General.heap.committed default.General.memory.heap.max +default.General.heap.max default.General.memory.heap.used +default.General.heap.used default.General.memory.non-heap.committed +default.General.non-heap.committed default.General.memory.non-heap.max +default.General.non-heap.max default.General.memory.non-heap.used +default.General.non-heap.used dfs.FSNamesystem.CapacityTotalGB dfs.FSNamesystem.CapacityUsedGB dfs.FSNamesystem.ExpiredHeartbeats diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/windows/metrics_whitelist b/ambari-metrics/ambari-metrics-timelineservice/conf/windows/metrics_whitelist index 689fd0d..da783e0 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/windows/metrics_whitelist +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/windows/metrics_whitelist @@ -63,8 +63,9 @@ default.General.active_calls_api_hs2_operation_INITIALIZED default.General.active_calls_api_hs2_operation_PENDING default.General.active_calls_api_hs2_operation_RUNNING default.General.api_create_table_count -default.General.api_get_all_databases_75thpercentile -default.General.api_get_all_databases_999thpercentile +default.General.api_create_table_req_count +default.General.api_get_databases_75thpercentile +default.General.api_get_databases_999thpercentile default.General.api_get_partitions_by_names_75thpercentile default.General.api_get_partitions_by_names_999thpercentile default.General.api_hs2_operation_INITIALIZED_count @@ -72,16 +73,22 @@ default.General.create_total_count_partitions default.General.hs2_completed_operation_CLOSED default.General.hs2_completed_operation_ERROR default.General.hs2_completed_operation_FINISHED -default.General.init_total_count_dbs -default.General.init_total_count_partitions -default.General.init_total_count_tables +default.General.total_count_dbs +default.General.total_count_partitions +default.General.total_count_tables default.General.jvm.pause.extraSleepTime default.General.memory.heap.committed +default.General.heap.com
[ambari] branch trunk updated: AMBARI-25449. Fix bulk delete api, response code 400 - Bulk DELETE API is broken (#3163) (praveenkjvs via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 2cf36ba AMBARI-25449. Fix bulk delete api, response code 400 - Bulk DELETE API is broken (#3163) (praveenkjvs via dgrinenko) 2cf36ba is described below commit 2cf36ba9605c9302f04e63848b609249d036fbe3 Author: praveenkjvs AuthorDate: Tue Dec 17 08:08:49 2019 -0800 AMBARI-25449. Fix bulk delete api, response code 400 - Bulk DELETE API is broken (#3163) (praveenkjvs via dgrinenko) --- ambari-admin/src/main/resources/ui/admin-web/bower.json| 5 + .../java/org/apache/ambari/server/api/handlers/DeleteHandler.java | 6 -- .../ambari/server/controller/AmbariManagementControllerImpl.java | 5 +++-- .../controller/internal/DeleteHostComponentStatusMetaData.java | 2 +- .../java/org/apache/ambari/server/state/ServiceComponentImpl.java | 7 --- .../ambari/server/controller/AmbariManagementControllerTest.java | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json b/ambari-admin/src/main/resources/ui/admin-web/bower.json index 739eb3f..b814b9f 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/bower.json +++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json @@ -19,8 +19,5 @@ "chai": "1.8.0", "mocha": "1.14.0", "sinon": "1.10.3" - }, - "resolutions": { -"angular": "1.7.5" } -} \ No newline at end of file +} diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/DeleteHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/DeleteHandler.java index f0314e1..f8b0a29 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/DeleteHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/DeleteHandler.java @@ -83,8 +83,10 @@ public class DeleteHandler extends BaseManagementHandler implements RequestHandl return null; } -if (requestStatusMetaData.getClass() != DeleteStatusMetaData.class) { - throw new IllegalArgumentException("RequestStatusDetails is not of type DeleteStatusDetails"); +if (!(requestStatusMetaData instanceof DeleteStatusMetaData)) { + throw new IllegalArgumentException( + String.format("Wrong status details class received - expecting: %s; actual: %s", + DeleteStatusMetaData.class, requestStatusMetaData.getClass())); } DeleteStatusMetaData statusDetails = (DeleteStatusMetaData) requestStatusMetaData; 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 cc82a2d..c6794f8 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 @@ -3605,12 +3605,13 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle ServiceComponentHost componentHost = component.getServiceComponentHost(request.getHostname()); if (!componentHost.canBeRemoved()) { - throw new AmbariException("Host Component cannot be removed" + throw new AmbariException("Current host component state prohibiting component removal." + ", clusterName=" + request.getClusterName() + ", serviceName=" + request.getServiceName() + ", componentName=" + request.getComponentName() + ", hostname=" + request.getHostname() - + ", request=" + request); + + ", request=" + request + + ", state=" + componentHost.getState()); } } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DeleteHostComponentStatusMetaData.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DeleteHostComponentStatusMetaData.java index 7237f5b..79bc26b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DeleteHostComponentStatusMetaData.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DeleteHostComponentStatusMetaData.java @@ -37,7 +37,7 @@ public class DeleteHostComponentStatusMetaData extends DeleteStatusMetaData { String clusterId, String version, State lastComponentState) { removedHostComponents.add(new HostComponent(componentName, service
[ambari] branch branch-2.6 updated: AMBARI-25443. Create principal/keytab operation with multi threaded (dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new 2616503 AMBARI-25443. Create principal/keytab operation with multi threaded (dgrinenko) 2616503 is described below commit 26165032d50ff1059229424bbe3c16b36b77ce4e Author: Dmitry Grinenko AuthorDate: Mon Dec 9 09:18:29 2019 +0200 AMBARI-25443. Create principal/keytab operation with multi threaded (dgrinenko) --- .../ambari/server/configuration/Configuration.java | 34 .../server/controller/KerberosHelperImpl.java | 3 +- .../HostKerberosIdentityResourceProvider.java | 8 +- .../ConfigureAmbariIdentitiesServerAction.java | 41 +++-- .../kerberos/CreateKeytabFilesServerAction.java| 203 +++-- .../kerberos/CreatePrincipalsServerAction.java | 35 +++- .../kerberos/DestroyPrincipalsServerAction.java| 98 +- .../kerberos/FinalizeKerberosServerAction.java | 18 +- .../kerberos/KerberosServerAction.java | 81 ++-- .../HostKerberosIdentityResourceProviderTest.java | 18 +- .../AbstractPrepareKerberosServerActionTest.java | 25 +-- .../ConfigureAmbariIdentitiesServerActionTest.java | 2 + .../kerberos/FinalizeKerberosServerActionTest.java | 2 + .../server/view/HttpImpersonatorImplTest.java | 1 - 14 files changed, 380 insertions(+), 189 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index f553905..67c6967 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2736,6 +2736,20 @@ public class Configuration { public static final ConfigurationProperty TLS_EPHEMERAL_DH_KEY_SIZE = new ConfigurationProperty<>( "security.server.tls.ephemeral_dh_key_size", 2048); + /** + * The number of threads to use when executing server-side Kerberos commands, such as generate keytabs. + */ + @Markdown(description = "The number of threads to use when executing server-side Kerberos commands, such as generate keytabs.") + public static final ConfigurationProperty KERBEROS_SERVER_ACTION_THREADPOOL_SIZE = new ConfigurationProperty<>( +"server.kerberos.action.threadpool.size", 1); + + /** + * The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands. + */ + @Markdown(description = "The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands.") + public static final ConfigurationProperty KERBEROS_SERVER_ACTION_FINALIZE_SECONDS = new ConfigurationProperty<>( +"server.kerberos.finalize.timeout", 600); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -5619,6 +5633,26 @@ public class Configuration { } /** + * Gets the number of threads to use when executing server-side Kerberos + * commands, such as generate keytabs. + * + * @return the threadpool size, defaulting to 1 + */ + public int getKerberosServerActionThreadpoolSize() { +return Integer.parseInt(getProperty(KERBEROS_SERVER_ACTION_THREADPOOL_SIZE)); + } + + /** + * Get the timeout, in seconds, when finalizing Kerberos + * enable/disable/regenerate commands. + * + * @return the timeout, in seconds, defaulting to 600. + */ + public int getKerberosServerActionFinalizeTimeout() { +return Integer.parseInt(getProperty(KERBEROS_SERVER_ACTION_FINALIZE_SECONDS)); + } + + /** * Generates a markdown table which includes: * * Property key name diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java index 4402d4e..0e3560b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java @@ -3637,6 +3637,7 @@ public class KerberosHelperImpl implements KerberosHelper { commandParameters.put(KerberosServerAction.DATA_DIRECTORY, dataDirectory.getAbsolutePath()); } + int timeout = configuration.getKerberosServerActionFinalizeTimeout(); Stage stage = createServerActionStage(requestStageContainer.getLastStageId(), cluster, requestStageContainer.getId(), @@ -3646,7 +3647,7 @@ public class KerberosHelperImpl implements KerberosHelper { FinalizeKerberosServerAction.class, event, commandParameters, - "Finalize Operations",
[ambari] branch branch-2.6 updated (c763113 -> ccf2d22)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git. from c763113 [AMBARI-25362] Hive View throws TimeoutException deadline passed for few queries randomly.( Sreenath Somarajapuram) (#3072) add ccf2d22 AMBARI-25218 Updating com.google.guava:guava version No new revisions were added by this update. Summary of changes: ambari-admin/pom.xml | 2 +- ambari-agent/pom.xml | 28 +- .../org/apache/ambari/tools/zk/ZkMigratorTest.java | 2 +- ambari-logsearch/ambari-infra-solr-plugin/pom.xml | 4 ++-- .../ambari-logsearch-logfeeder/pom.xml | 7 +++--- ambari-logsearch/ambari-logsearch-portal/pom.xml | 24 +-- ambari-logsearch/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-common/pom.xml | 9 ++- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 7 +- ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 2 +- .../ambari-metrics-host-monitoring/pom.xml | 2 +- ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 2 +- .../ambari-metrics-storm-sink-legacy/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-storm-sink/pom.xml | 4 ++-- .../ambari-metrics-timelineservice/pom.xml | 9 --- .../loadsimulator/net/RestMetricsSender.java | 2 +- .../TestApplicationHistoryServer.java | 2 +- ambari-metrics/pom.xml | 25 ++- ambari-project/pom.xml | 4 ++-- .../server/orm/entities/ClusterConfigEntity.java | 4 +++- .../entities/HostComponentDesiredStateEntity.java | 3 ++- .../orm/entities/HostComponentStateEntity.java | 3 ++- .../orm/entities/RepositoryVersionEntity.java | 3 ++- .../server/orm/entities/UpgradeHistoryEntity.java | 3 ++- .../upgrades/FinalizeUpgradeAction.java| 3 ++- .../apache/ambari/server/state/UpgradeContext.java | 3 ++- .../state/stack/upgrade/ClusterGrouping.java | 3 ++- .../upgrade/ConfigUpgradeChangeDefinition.java | 11 + .../stack/upgrade/ConfigurationCondition.java | 3 ++- .../server/state/stack/upgrade/Grouping.java | 3 ++- .../server/state/stack/upgrade/HostOrderItem.java | 3 ++- .../state/stack/upgrade/SecurityCondition.java | 3 ++- .../server/state/stack/upgrade/StageWrapper.java | 3 ++- .../server/state/stack/upgrade/TaskWrapper.java| 3 ++- .../internal/ClientConfigResourceProviderTest.java | 2 +- .../internal/StackDefinedPropertyProviderTest.java | 2 +- .../metrics/JMXPropertyProviderTest.java | 2 +- .../metrics/RestMetricsPropertyProviderTest.java | 2 +- .../server/view/persistence/DataStoreImplTest.java | 5 ++-- ambari-views/pom.xml | 2 +- ambari-web/package.json| 10 ambari-web/pom.xml | 2 +- .../fast-hdfs-resource/dependency-reduced-pom.xml | 2 +- contrib/fast-hdfs-resource/pom.xml | 2 +- contrib/views/hive-next/pom.xml| 6 ++--- contrib/views/hive20/pom.xml | 6 ++--- .../view/hive20/resources/browser/DDLProxy.java| 1 + contrib/views/jobs/pom.xml | 2 +- contrib/views/pig/pom.xml | 2 +- contrib/views/slider/pom.xml | 2 +- contrib/views/storm/pom.xml| 2 +- contrib/views/wfmanager/pom.xml| 2 +- .../views/wfmanager/src/main/resources/ui/pom.xml | 2 +- pom.xml| 17 +++-- utility/pom.xml| 5 ++-- 55 files changed, 150 insertions(+), 125 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-14526 Special deployment for SLES12 containing systemD specific configuration This is a fix for copying data to the directory where custom scrypts a located.
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new e460fb1 AMBARI-14526 Special deployment for SLES12 containing systemD specific configuration This is a fix for copying data to the directory where custom scrypts a located. e460fb1 is described below commit e460fb1a3a4f18d10105cd579d65720e5a1f4505 Author: eberhardtp AuthorDate: Thu Nov 21 11:44:13 2019 +0100 AMBARI-14526 Special deployment for SLES12 containing systemD specific configuration This is a fix for copying data to the directory where custom scrypts a located. --- ambari-agent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 1d0b914..9ee0ef5 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -726,14 +726,14 @@ Development - /var/lib/${project.artifactId}/tmp + /etc/${project.artifactId}/conf/custom root root 644 false - ${project.build.directory}${dirsep}${project.artifactId}-${project.version}${dirsep}etc${dirsep}ambari-agent${dirsep}conf${dirsep}custom${dirsep}sles12.sh + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}${dirsep}var${dirsep}lib${dirsep}ambari-agent${dirsep}tmp${dirsep}sles12.sh
[ambari] branch branch-2.7 updated (da6150c -> dd6ef5f)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from da6150c Merge pull request #3137 from hiveww/AMBARI-25421-branch-2.7 add dd6ef5f AMBARI-25379 Upgrade AMS Grafana version to 6.4.2 No new revisions were added by this update. Summary of changes: .../ambari-metrics/datasource.js | 58 -- 1 file changed, 21 insertions(+), 37 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-25379 Upgrade AMS Grafana version to 6.4.2
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git View the commit online: https://github.com/apache/ambari/commit/ff21bd18c447eb64bc76b0b53dcf3ac85a13c527 The following commit(s) were added to refs/heads/branch-2.7 by this push: new ff21bd1 AMBARI-25379 Upgrade AMS Grafana version to 6.4.2 ff21bd1 is described below commit ff21bd18c447eb64bc76b0b53dcf3ac85a13c527 Author: Tamas Payer AuthorDate: Wed Nov 20 10:10:40 2019 +0100 AMBARI-25379 Upgrade AMS Grafana version to 6.4.2 Fix minor datasource related issues. Change-Id: I26a81da667cb264814828373c087bb5ad39ad945 --- .../ambari-metrics/datasource.js | 197 - 1 file changed, 110 insertions(+), 87 deletions(-) diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js index e6be3fc..4a97f3b 100644 --- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js +++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js @@ -394,31 +394,24 @@ define([ if (!_.isEmpty(templateSrv.variables)) { // YARN Queues Dashboard if (templateSrv.variables[0].query === "yarnqueues") { - var allQueues = templateSrv.variables.filter(function(variable) { return variable.query === "yarnqueues";}); - var selectedQs = (_.isEmpty(allQueues)) ? "" : allQueues[0].options.filter(function(q) - { return q.selected; }).map(function(qName) { return qName.value; }); - // All Queues - if (!_.isEmpty(_.find(selectedQs, function (wildcard) { return wildcard === "*"; }))) { -var allQueue = allQueues[0].options.filter(function(q) { - return q.text !== "All"; }).map(function(queue) { return queue.value; }); -_.forEach(allQueue, function(processQueue) { - metricsPromises.push(_.map(options.targets, function(target) { -target.qmetric = processQueue; -target.queue = target.metric.replace('root', target.qmetric); -return getYarnAppIdData(target); - })); -}); - } else { -// All selected queues. -_.forEach(selectedQs, function(processQueue) { - metricsPromises.push(_.map(options.targets, function(target) { -target.qmetric = processQueue; -target.queue = target.metric.replace('root', target.qmetric); -return getYarnAppIdData(target); - })); + var allQueues = templateSrv.variables.filter(function(variable) { +return variable.query === "yarnqueues"; + }); + var selectedQs = (_.isEmpty(allQueues)) ? "" : allQueues[0].options +.filter(getSelectedItems) +.map(function(qName) { + return qName.value; }); - } + + _.forEach(selectedQs, function(processQueue) { +metricsPromises.push(_.map(options.targets, function(target) { + target.qmetric = processQueue; + target.queue = target.metric.replace('root', target.qmetric); + return getYarnAppIdData(target); +})); + }); } + // Templatized Dashboard for per-user metrics in HBase. if (templateSrv.variables[0].query === "hbase-users") { var allUsers = templateSrv.variables.filter(function(variable) { @@ -453,8 +446,8 @@ define([ } } - while (allTable.length > 0) { -splitTables.push(allTable.splice(0, 20)); + while (allTables.length > 0) { +splitTables.push(allTables.splice(0, 20)); } _.forEach(splitTables, function(table) { metricsPromises.push(_.map(options.targets, function(target) { @@ -499,7 +492,7 @@ define([ selectedCallers.push(caller.text); } } - _.forEach(selectedCaller, function(processCaller) { + _.forEach(selectedCallers, function(processCaller) { metricsPromises.push(_.map(options.targets, function(target) { target.nnCaller = processCaller; target.nnMetric = target.metric.replace('*', target.nnCaller); @@ -571,29 +564,35 @@ define([ //Templatized Dashboards for Storm Components if (templateSrv.variables[0].query === "topologies" && template
[ambari] branch branch-2.7 updated: AMBARI-14526 Proper SystemD configuration(TasksMax) on SLES12 without any bad impact on other linux distributions.
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new a4529ad AMBARI-14526 Proper SystemD configuration(TasksMax) on SLES12 without any bad impact on other linux distributions. a4529ad is described below commit a4529ad5b42cbadeec06213968e7a15cf7db Author: eberhardtp AuthorDate: Thu Nov 14 14:14:19 2019 +0100 AMBARI-14526 Proper SystemD configuration(TasksMax) on SLES12 without any bad impact on other linux distributions. --- .../{ambari-agent.service => custom/sles12.sh} | 32 +- ambari-agent/conf/unix/install-helper.sh | 11 ambari-agent/pom.xml | 4 +-- ambari-agent/src/packages/tarball/all.xml | 11 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/ambari-agent/conf/unix/ambari-agent.service b/ambari-agent/conf/unix/custom/sles12.sh similarity index 50% rename from ambari-agent/conf/unix/ambari-agent.service rename to ambari-agent/conf/unix/custom/sles12.sh index adc22de..02b3601 100644 --- a/ambari-agent/conf/unix/ambari-agent.service +++ b/ambari-agent/conf/unix/custom/sles12.sh @@ -10,30 +10,12 @@ # 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 +# See the License for the specific language governing permissions and +# limitations under the License -# This service unit file is tuned for SLES 12.x. It is not suitable for RHEL like distributions due to different -# paths for ExecStart/ExecStop. +# This is a custom SLES12 dependent script which contains postinstall steps +# to execute. Please note executing this might cause unexpected errors on +# other linux distributions. -[Unit] -Description=Ambari Agent Service for SLES -Before=runlevel3.target -Before=runlevel5.target -Before=shutdown.target -After=remote-fs.target -After=network-online.target -Wants=network-online.target -Conflicts=shutdown.target - -[Service] -Type=forking -PIDFile=/run/ambari-agent/ambari-agent.pid -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=no -TasksMax=infinity -ExecStart=/etc/init.d/ambari-agent start -ExecStop=/etc/init.d/ambari-agent stop +systemctl enable ambari-agent +systemctl set-property ambari-agent TasksMax=infinity diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh index d31..ed01d24 100644 --- a/ambari-agent/conf/unix/install-helper.sh +++ b/ambari-agent/conf/unix/install-helper.sh @@ -118,6 +118,15 @@ install_autostart(){ fi } +install_custom(){ + if [ -d "/etc/ambari-agent/conf/custom" ]; then + for f in /etc/ambari-agent/conf/custom/*.sh; do + echo "${f}" + bash "$f" -H + done + fi +} + locate_python(){ local python_binaries="/usr/bin/python;/usr/bin/python2;/usr/bin/python2.7" @@ -154,6 +163,8 @@ do_install(){ install_autostart 1>>${LOG_FILE} 2>&1 + install_custom 1>>${LOG_FILE} 2>&1 + # remove old python wrapper rm -f "${PYTHON_WRAPER_TARGET}" diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 07b9b99..1d0b914 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -726,14 +726,14 @@ Development - /usr/lib/systemd/system/ + /var/lib/${project.artifactId}/tmp root root 644 false - ${project.build.directory}${dirsep}${project.artifactId}-${project.version}${dirsep}usr${dirsep}lib${dirsep}systemd${dirsep}system${dirsep}ambari-agent.service + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}${dirsep}etc${dirsep}ambari-agent${dirsep}conf${dirsep}custom${dirsep}sles12.sh diff --git a/ambari-agent/src/packages/tarball/all.xml b/ambari-agent/src/packages/tarball/all.xml index 5f8c273..1cf7f17 100644 --- a/ambari-agent/src/packages/tarball/all.xml +++ b/ambari-agent/src/packages/tarball/all.xml @@ -146,6 +146,12 @@ ${pluggableStackDefinitionOutput}/custom_actions /var/lib/ambari-agent/cache/custom_actions + + 755 + 755 + conf/unix/custom + /var/lib/${project.artifactId}/tmp +
[ambari] branch branch-2.7 updated (1376c77 -> f13a81a)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 1376c77 AMBARI-25411. Cannot use HTTPS repourl and VDF url. (mpapirkovskyy) (#3122) add f13a81a AMBARI-25379 Upgrade AMS Grafana version to 6.3.5 No new revisions were added by this update. Summary of changes: ambari-metrics/ambari-metrics-assembly/pom.xml | 10 ++ 1 file changed, 10 insertions(+)
[ambari] branch branch-2.7 updated: AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 4fe67cc AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120) 4fe67cc is described below commit 4fe67ccc50eab290b182b3034c3c016e7e4c0386 Author: Dmytro Grinenko AuthorDate: Fri Nov 8 14:14:22 2019 +0200 AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120) Removed unused imports to pass StyleCheck --- .../ambari/server/serveraction/kerberos/KerberosServerAction.java | 4 1 file changed, 4 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java index 468121e..9a6ecb9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java @@ -24,7 +24,6 @@ import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -34,7 +33,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.actionmanager.HostRoleStatus; @@ -53,8 +51,6 @@ import org.apache.ambari.server.serveraction.kerberos.stageutils.ResolvedKerbero import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; -import org.apache.ambari.server.state.Host; -import org.apache.ambari.server.state.kerberos.KerberosDescriptor; import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; import org.apache.ambari.server.utils.StageUtils; import org.apache.commons.io.FileUtils;
[ambari] branch branch-2.7 updated: AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new 17dc5fd AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120) 17dc5fd is described below commit 17dc5fd5610e0037e197934ceb27b61e087c8d57 Author: Dmytro Grinenko AuthorDate: Fri Nov 8 12:54:42 2019 +0200 AMBARI-25332. Kerberos keytab regeneration working slow (dgrinenko) (#3120) --- .../ambari/server/configuration/Configuration.java | 19 ++- .../ambari/server/controller/KerberosHelper.java | 60 --- .../server/controller/KerberosHelperImpl.java | 83 +++-- .../HostKerberosIdentityResourceProvider.java | 11 +- .../ambari/server/orm/dao/KerberosKeytabDAO.java | 14 +- .../server/orm/dao/KerberosKeytabPrincipalDAO.java | 22 ++- .../server/orm/dao/KerberosPrincipalDAO.java | 6 +- .../server/orm/entities/KerberosKeytabEntity.java | 7 +- .../entities/KerberosKeytabPrincipalEntity.java| 30 +++- .../ConfigureAmbariIdentitiesServerAction.java | 37 ++-- .../kerberos/CreateKeytabFilesServerAction.java| 190 +++-- .../kerberos/CreatePrincipalsServerAction.java | 63 --- .../kerberos/FinalizeKerberosServerAction.java | 17 +- .../kerberos/KerberosServerAction.java | 69 +++- .../stageutils/KerberosKeytabController.java | 40 - .../server/controller/KerberosHelperTest.java | 18 +- .../HostKerberosIdentityResourceProviderTest.java | 18 +- .../ConfigureAmbariIdentitiesServerActionTest.java | 13 +- 18 files changed, 530 insertions(+), 187 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 6b0e383..87549a8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2616,6 +2616,13 @@ public class Configuration { public static final ConfigurationProperty KERBEROS_SERVER_ACTION_FINALIZE_SECONDS = new ConfigurationProperty<>( "server.kerberos.finalize.timeout", 600); + /** + * The number of threads to use when executing server-side Kerberos commands, such as generate keytabs. + */ + @Markdown(description = "The number of threads to use when executing server-side Kerberos commands, such as generate keytabs.") + public static final ConfigurationProperty KERBEROS_SERVER_ACTION_THREADPOOL_SIZE = new ConfigurationProperty<>( +"server.kerberos.action.threadpool.size", 1); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -3041,7 +3048,7 @@ public class Configuration { writeConfigFile(existingProperties, false); // reloading properties -this.properties = readConfigFile(); +properties = readConfigFile(); } /** @@ -5569,6 +5576,16 @@ public class Configuration { } /** + * Gets the number of threads to use when executing server-side Kerberos + * commands, such as generate keytabs. + * + * @return the threadpool size, defaulting to 1 + */ + public int getKerberosServerActionThreadpoolSize() { +return Integer.parseInt(getProperty(KERBEROS_SERVER_ACTION_THREADPOOL_SIZE)); + } + + /** * Get the timeout, in seconds, when finalizing Kerberos * enable/disable/regenerate commands. * diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java index 3c4d6b2..5f84968 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java @@ -704,32 +704,52 @@ public interface KerberosHelper { Map> getIdentityConfigurations(List identityDescriptors); /** - * Returns the active identities for the named cluster. Results are filtered by host, service, - * and/or component; and grouped by host. + * Returns the active identities for the named cluster. Results are filtered + * by host, service, and/or component; and grouped by host. * - * The cluster name is mandatory; however the active identities may be filtered by one or more of - * host, service, or component. A null value for any of these filters indicates no - * filter for that parameter. + * The cluster name is mandatory; however the active identities may be + * filtered by one or more of host, service, or component. A null + * value for any of these filters indicates no filter for that parameter. * - * The return va
[ambari] branch branch-2.7 updated: AMBARI-25402 Please provide jvm metrics for kafka components in Ambari (santal) (#3110)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b13ed67 AMBARI-25402 Please provide jvm metrics for kafka components in Ambari (santal) (#3110) b13ed67 is described below commit b13ed674486e7eeb70cc6f529904b93dbd85dd55 Author: Szilárd Antal AuthorDate: Wed Nov 6 13:39:54 2019 +0100 AMBARI-25402 Please provide jvm metrics for kafka components in Ambari (santal) (#3110) AMBARI-25402 Please provide jvm metrics for kafka components in Ambari (santal via dgrinenko) - renamed mxbean variables, removed unused constant - simplified the getThreadMetricNameByState method, created unit test - added license --- .../hadoop/metrics2/sink/kafka/JvmMetricSet.java | 180 .../sink/kafka/KafkaTimelineMetricsReporter.java | 40 ++-- .../metrics2/sink/kafka/MetricNameBuilder.java | 85 .../metrics2/sink/kafka/JvmMetricSetTest.java | 48 + .../common-services/KAFKA/1.0.1/metainfo.xml | 28 +++ .../common-services/KAFKA/1.0.1/metrics.json | 239 + 6 files changed, 602 insertions(+), 18 deletions(-) diff --git a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/JvmMetricSet.java b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/JvmMetricSet.java new file mode 100644 index 000..72ba380 --- /dev/null +++ b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/JvmMetricSet.java @@ -0,0 +1,180 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.metrics2.sink.kafka; + +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryMXBean; +import java.lang.management.RuntimeMXBean; +import java.lang.management.ThreadMXBean; +import java.util.AbstractMap; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import javax.annotation.Nonnull; +import com.yammer.metrics.core.Gauge; +import com.yammer.metrics.core.MetricName; +import com.yammer.metrics.util.RatioGauge; + +public class JvmMetricSet { + + private static final String MEMORY = "memory"; + private static final String THREADS = "threads"; + private static final String RUNTIME = "runtime"; + + private static final JvmMetricSet INSTANCE = new JvmMetricSet(); + + + public static JvmMetricSet getInstance() { +return INSTANCE; + } + + private final MemoryMXBean memoryMXBean; + private final ThreadMXBean threadMXBean; + private final RuntimeMXBean runtimeMXBean; + + private static class JvmMetric { +private final MetricName metricName; +private final Gauge metric; + +JvmMetric(MetricName metricName, Gauge metric) { + this.metricName = metricName; + this.metric = metric; +} + +MetricName getMetricName() { + return metricName; +} + +Gauge getMetric() { + return metric; +} + } + + + private JvmMetricSet() { +this(ManagementFactory.getMemoryMXBean(), ManagementFactory.getThreadMXBean(), + ManagementFactory.getRuntimeMXBean()); + + } + + private JvmMetricSet(MemoryMXBean memoryMXBean, ThreadMXBean threadMXBean, RuntimeMXBean runtimeMXBean) { +this.memoryMXBean = memoryMXBean; +this.threadMXBean = threadMXBean; +this.runtimeMXBean = runtimeMXBean; + } + + public Map> getJvmMetrics() { +return Stream.concat( + getMemoryUsageMetrics().stream(), + Stream.concat( +getThreadMetrics().stream(), +Stream.of(getRuntimeMetrics()) + )) + .collect(Collectors.toMap(JvmMetric::getMetricName, JvmMetric::getMetric)); + } + + private List getMemoryUsageMetrics() { + +return Stream.of( + new AbstractMap.SimpleEntry<>("heap_usage", memoryMXBean.getHeapMemoryUsage()), + new AbstractMap.SimpleEntry<>("non_heap_usage"
[ambari] branch branch-2.7 updated: AMBARI-25407 Remove dependency on org.springframework.batch:spring-batch-core:4.1.0 in Ambari ambari-infra - pom.xml upgrade
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new e662032 AMBARI-25407 Remove dependency on org.springframework.batch:spring-batch-core:4.1.0 in Ambari ambari-infra - pom.xml upgrade e662032 is described below commit e662032c33fe3d46f50234d1942abbca96d3ac1a Author: eberhardtp AuthorDate: Wed Oct 30 10:58:51 2019 +0100 AMBARI-25407 Remove dependency on org.springframework.batch:spring-batch-core:4.1.0 in Ambari ambari-infra - pom.xml upgrade --- ambari-infra/ambari-infra-manager/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-infra/ambari-infra-manager/pom.xml b/ambari-infra/ambari-infra-manager/pom.xml index 185dd13..22a2953 100644 --- a/ambari-infra/ambari-infra-manager/pom.xml +++ b/ambari-infra/ambari-infra-manager/pom.xml @@ -33,7 +33,7 @@ 5.1.5.RELEASE 2.3.2.RELEASE 2.27 -4.1.0.RELEASE +4.1.1.RELEASE 3.8.11.2 3.0.10.RELEASE 2.1.5.RELEASE
[ambari] branch branch-2.7 updated (a71d9ff -> 08d7a3a)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from a71d9ff AMBARI-25405 Remove dependency on com.fasterxml.jackson.core:jackson-databind:2.9.6-2.9.9.1 in Ambari pom.xml upgrades add 08d7a3a AMBARI-25406 Remove dependency on org.quartz-scheduler:quartz:2.2.1 in Ambari pom.xml update in ambari-server No new revisions were added by this update. Summary of changes: ambari-server/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[ambari] branch branch-2.7 updated (8540ac6 -> b059be1)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 8540ac6 [AMBARI-25333] Regenerate keytab generates empty keytab file if no file present in cache Tabs have been replaced by 4 spaces. add b059be1 [AMBARI-25404] Remove dependency on commons-beanutils:commons-beanutils:jar:1.9.3 in Ambari commons-beanutils version upgrade 1.9.3 -> 1.9.4 No new revisions were added by this update. Summary of changes: ambari-project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[ambari] branch branch-2.7 updated (b059be1 -> a71d9ff)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b059be1 [AMBARI-25404] Remove dependency on commons-beanutils:commons-beanutils:jar:1.9.3 in Ambari commons-beanutils version upgrade 1.9.3 -> 1.9.4 add a71d9ff AMBARI-25405 Remove dependency on com.fasterxml.jackson.core:jackson-databind:2.9.6-2.9.9.1 in Ambari pom.xml upgrades No new revisions were added by this update. Summary of changes: ambari-infra/pom.xml | 2 +- .../ambari-logsearch-logfeeder-container-registry/pom.xml | 2 +- ambari-logsearch/pom.xml | 2 +- ambari-metrics/pom.xml| 4 ++-- ambari-project/pom.xml| 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
[ambari] branch branch-2.7 updated (9e1a538 -> 8540ac6)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 9e1a538 [AMBARI-25400] Issue while determining live collector in case of HA (#3108) add 8540ac6 [AMBARI-25333] Regenerate keytab generates empty keytab file if no file present in cache Tabs have been replaced by 4 spaces. No new revisions were added by this update. Summary of changes: .../server/serveraction/kerberos/CreatePrincipalsServerAction.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[ambari] branch branch-2.7 updated (b1ddba6 -> 9e1a538)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b1ddba6 AMBARI-25403 Ambari Management Pack: Ambari throws 500 error while downloading OneFS client configuration (santal) add 9e1a538 [AMBARI-25400] Issue while determining live collector in case of HA (#3108) No new revisions were added by this update. Summary of changes: .../sink/timeline/AbstractTimelineMetricsSink.java | 31 ++ .../timeline/AbstractTimelineMetricSinkTest.java | 18 + 2 files changed, 38 insertions(+), 11 deletions(-)
[ambari] branch branch-2.7 updated (2dbaddb -> 447b5e3)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 2dbaddb AMBARI-25399 Add hive PAM support for service check and alerts (ihorlukianov) add 447b5e3 AMBARI-25349 Move Ambari metrics to guava 28.0-jre (dgrinenko) (#3096) No new revisions were added by this update. Summary of changes: ambari-admin/pom.xml | 3 +- ambari-agent/pom.xml | 24 +- .../org/apache/ambari/tools/zk/ZkMigratorTest.java | 2 +- ambari-funtest/pom.xml | 1 - ambari-infra/ambari-infra-assembly/pom.xml | 3 +- ambari-infra/pom.xml | 4 +- ambari-logsearch/ambari-logsearch-assembly/pom.xml | 3 +- .../ambari-logsearch-logfeeder/pom.xml | 3 +- ambari-logsearch/ambari-logsearch-server/pom.xml | 4 +- ambari-logsearch/pom.xml | 13 +- ambari-metrics/ambari-metrics-assembly/pom.xml | 1 - ambari-metrics/ambari-metrics-common/pom.xml | 7 +- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 3 +- ambari-metrics/ambari-metrics-grafana/pom.xml | 1 - ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 3 +- .../ambari-metrics-host-aggregator/pom.xml | 1 - .../ambari-metrics-host-monitoring/pom.xml | 3 +- ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 3 +- .../ambari-metrics-storm-sink-legacy/pom.xml | 5 +- ambari-metrics/ambari-metrics-storm-sink/pom.xml | 5 +- .../ambari-metrics-timelineservice/pom.xml | 3 +- ambari-metrics/pom.xml | 365 +++-- ambari-project/pom.xml | 24 +- ambari-server/pom.xml | 3 +- .../server/orm/entities/ClusterConfigEntity.java | 4 +- .../entities/HostComponentDesiredStateEntity.java | 3 +- .../orm/entities/HostComponentStateEntity.java | 4 +- .../server/orm/entities/UpgradeHistoryEntity.java | 3 +- .../upgrades/FinalizeUpgradeAction.java| 3 +- .../stack/upgrade/ConfigurationCondition.java | 4 +- .../server/state/stack/upgrade/Grouping.java | 4 +- .../server/state/stack/upgrade/HostOrderItem.java | 4 +- .../ambari/server/upgrade/UpgradeCatalog270.java | 2 +- ambari-serviceadvisor/pom.xml | 1 - ambari-utility/pom.xml | 3 +- .../UndocumentedRestApiOperationCheckTest.java | 2 + ambari-views/pom.xml | 3 +- ambari-web/pom.xml | 3 +- .../fast-hdfs-resource/dependency-reduced-pom.xml | 2 +- contrib/fast-hdfs-resource/pom.xml | 2 +- contrib/management-packs/pom.xml | 1 - contrib/views/ambari-views-package/pom.xml | 1 - contrib/views/capacity-scheduler/pom.xml | 1 - contrib/views/files/pom.xml| 1 - contrib/views/pig/pom.xml | 7 +- contrib/views/pom.xml | 5 +- contrib/views/wfmanager/pom.xml| 2 +- .../views/wfmanager/src/main/resources/ui/pom.xml | 2 +- pom.xml| 24 +- 49 files changed, 305 insertions(+), 273 deletions(-)
[ambari] branch branch-2.7 updated: AMBARI-25360 Disable Kerberos failed at hive with CNF exception (dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new c9a69ef AMBARI-25360 Disable Kerberos failed at hive with CNF exception (dgrinenko) c9a69ef is described below commit c9a69ef578ff16cca548e527efa23a3bd74aa6f9 Author: Dmitry Grinenko AuthorDate: Wed Aug 14 15:17:23 2019 +0300 AMBARI-25360 Disable Kerberos failed at hive with CNF exception (dgrinenko) --- ambari-agent/pom.xml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 0e9978f..4f9645c 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -118,6 +118,11 @@ + org.apache.zookeeper + zookeeper-jute + 3.5.5 + + org.apache.curator curator-test 2.9.0 @@ -273,7 +278,7 @@ - 2012, Apache Software Foundation + 2012, Apache Software Foundation Development Maven Recipe: RPM Package. @@ -429,6 +434,7 @@ org.apache.zookeeper:zookeeper + org.apache.zookeeper:zookeeper-jute commons-cli:commons-cli org.slf4j:* log4j:*
[ambari] branch branch-2.7 updated: AMBARI-25348 Change apache-hadoop repository from private nexus to public in AMS (ihorlukianov)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new bca762e AMBARI-25348 Change apache-hadoop repository from private nexus to public in AMS (ihorlukianov) bca762e is described below commit bca762eeb578054dc219120a54984a4ad58a9fbb Author: Ihor Lukianov AuthorDate: Tue Aug 6 11:29:43 2019 +0300 AMBARI-25348 Change apache-hadoop repository from private nexus to public in AMS (ihorlukianov) --- ambari-metrics/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index 5f9d87d..06920f6 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -74,7 +74,7 @@ apache-hadoop hdp - https://nexus-private.hortonworks.com/nexus/content/groups/public + https://repo.hortonworks.com/content/groups/public/ apache-snapshots
[ambari] branch branch-2.7 updated: AMBARI-25328 When spark_transport_mode is set to 'http' then STS server fails to start in Ambari 2.7 (#3051) (ihorlukianov via dgrinenko)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new b6bc0a1 AMBARI-25328 When spark_transport_mode is set to 'http' then STS server fails to start in Ambari 2.7 (#3051) (ihorlukianov via dgrinenko) b6bc0a1 is described below commit b6bc0a133b03e1658d47a4b015bb61a435487fd4 Author: Ihor Lukianov AuthorDate: Wed Jul 17 15:52:01 2019 +0300 AMBARI-25328 When spark_transport_mode is set to 'http' then STS server fails to start in Ambari 2.7 (#3051) (ihorlukianov via dgrinenko) --- .../ZEPPELIN/0.7.0/package/scripts/master.py| 12 .../ZEPPELIN/0.7.0/package/scripts/params.py| 17 - 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py index c85a0e4..fe74b2c 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py @@ -575,10 +575,14 @@ class Master(Script): interpreter['properties']['spark2.proxy.user.property'] = 'hive.server2.proxy.user' interpreter['properties']['spark2.url'] = 'jdbc:hive2://' + \ params.spark2_thrift_server_hosts + ':' + params.spark2_hive_thrift_port + '/' - if params.hive_principal: -interpreter['properties']['spark2.url'] += ';principal=' + params.hive_principal - if params.hive_transport_mode: -interpreter['properties']['spark2.url'] += ';transportMode=' + params.hive_transport_mode + if params.spark2_hive_principal: +interpreter['properties']['spark2.url'] += ';principal=' + params.spark2_hive_principal + if params.spark2_transport_mode: +interpreter['properties']['spark2.url'] += ';transportMode=' + params.spark2_transport_mode + if params.spark2_http_path: +interpreter['properties']['spark2.url'] += ';httpPath=' + params.spark2_http_path + if params.spark2_ssl: +interpreter['properties']['spark2.url'] += ';ssl=true' if 'spark2.splitQueries' not in interpreter['properties']: interpreter['properties']['spark2.splitQueries'] = "true" diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py index 529a1f6..1664e4a 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py @@ -177,12 +177,27 @@ if 'spark_thriftserver_hosts' in master_configs and len(master_configs['spark_th spark2_thrift_server_hosts = None spark2_hive_thrift_port = None -spark2_hive_principal = None +spark2_hive_principal = hive_principal +spark2_transport_mode = hive_transport_mode +spark2_http_path = None +spark2_ssl = False if 'spark2_thriftserver_hosts' in master_configs and len(master_configs['spark2_thriftserver_hosts']) != 0: spark2_thrift_server_hosts = str(master_configs['spark2_thriftserver_hosts'][0]) if config['configurations']['spark2-hive-site-override']: spark2_hive_thrift_port = config['configurations']['spark2-hive-site-override']['hive.server2.thrift.port'] +if 'hive.server2.authentication.kerberos.principal' in config['configurations']['spark2-hive-site-override']: + spark2_hive_principal = config['configurations']['spark2-hive-site-override']['hive.server2.authentication.kerberos.principal'] + +if 'hive.server2.transport.mode' in config['configurations']['spark2-hive-site-override']: + spark2_transport_mode = config['configurations']['spark2-hive-site-override']['hive.server2.transport.mode'] + +if 'hive.server2.http.endpoint' in config['configurations']['spark2-hive-site-override']: + spark2_http_path = config['configurations']['spark2-hive-site-override']['hive.server2.http.endpoint'] + +if 'hive.server2.use.SSL' in config['configurations']['spark2-hive-site-override']: + spark2_ssl = default("configurations/spark2-hive-site-override/hive.server2.use.SSL", False) + # detect hbase details if installed zookeeper_znode_parent = None
[ambari] branch trunk updated: [AMBARI-25166] Modifying the value of node memory in the YARN service will affect the maximum value of container memory, but the modification cannot be saved. (#2833) (n
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 72d203f [AMBARI-25166] Modifying the value of node memory in the YARN service will affect the maximum value of container memory, but the modification cannot be saved. (#2833) (newyyshan via dgrinenko) 72d203f is described below commit 72d203f26bfeecde9b4bb9ce81dbe95b6111e0f2 Author: Yingying Shan AuthorDate: Wed Jul 17 17:12:16 2019 +0800 [AMBARI-25166] Modifying the value of node memory in the YARN service will affect the maximum value of container memory, but the modification cannot be saved. (#2833) (newyyshan via dgrinenko) --- ambari-server/src/main/resources/stacks/stack_advisor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index 9fa05ed..7c2cf18 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -1240,8 +1240,8 @@ class DefaultStackAdvisor(StackAdvisor): nodeManagerHost = self.getHostWithComponent("YARN", "NODEMANAGER", services, hosts) if (nodeManagerHost is not None): if "yarn-site" in services["configurations"] and "yarn.nodemanager.resource.percentage-physical-cpu-limit" in services["configurations"]["yarn-site"]["properties"]: -putYarnPropertyAttribute('yarn.scheduler.minimum-allocation-mb', 'maximum', configurations["yarn-site"]["properties"]["yarn.nodemanager.resource.memory-mb"]) -putYarnPropertyAttribute('yarn.scheduler.maximum-allocation-mb', 'maximum', configurations["yarn-site"]["properties"]["yarn.nodemanager.resource.memory-mb"]) +putYarnPropertyAttribute('yarn.scheduler.minimum-allocation-mb', 'maximum', services["configurations"]["yarn-site"]["properties"]["yarn.nodemanager.resource.memory-mb"]) +putYarnPropertyAttribute('yarn.scheduler.maximum-allocation-mb', 'maximum', services["configurations"]["yarn-site"]["properties"]["yarn.nodemanager.resource.memory-mb"])
[ambari] branch revert-3041-AMBARI-25311-branch-2.7 created (now 04a63db)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a change to branch revert-3041-AMBARI-25311-branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. at 04a63db Revert "[AMBARI-25311] FinalizeKerberosServerAction timeout has to be configu…" This branch includes the following new commits: new 04a63db Revert "[AMBARI-25311] FinalizeKerberosServerAction timeout has to be configu…" The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[ambari] 01/01: Revert "[AMBARI-25311] FinalizeKerberosServerAction timeout has to be configu…"
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch revert-3041-AMBARI-25311-branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 04a63dbf75089db019e148ec2f1ad64deda00d7c Author: Dmytro Grinenko AuthorDate: Mon Jul 15 12:10:20 2019 +0300 Revert "[AMBARI-25311] FinalizeKerberosServerAction timeout has to be configu…" --- ambari-metrics/pom.xml | 2 +- ambari-server/docs/configuration/index.md | 12 +--- .../ambari/server/configuration/Configuration.java | 17 - .../ambari/server/controller/KerberosHelperImpl.java| 4 ++-- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index 25bca70..38da76a 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -74,7 +74,7 @@ apache-hadoop hdp - https://repository.apache.org/content/repositories/releases/ + https://nexus-private.hortonworks.com/nexus/content/groups/public apache-snapshots diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md index 86e8ecd..a0c2d04 100644 --- a/ambari-server/docs/configuration/index.md +++ b/ambari-server/docs/configuration/index.md @@ -225,19 +225,18 @@ The following are the properties which can be used to configure Ambari. | server.jdbc.rca.user.passwd | The password for the user when connecting to the database which stores RCA information. |`mapred` | | server.jdbc.user.name | The user name used to login to the database. |`ambari` | | server.jdbc.user.passwd | The password for the user when logging into the database. |`bigdata` | -| server.kerberos.finalize.timeout | The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands. |`600` | | server.locks.profiling | Enable the profiling of internal locks. |`false` | | server.metrics.retrieval-service.thread.priority | The priority of threads used by the service which retrieves JMX and REST metrics directly from their respective endpoints. |`5` | -| server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`4` | -| server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`8` | -| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`80` | +| server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`16` | +| server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`32` | +| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`320` | | server.operations.retry-attempts | The number of retry attempts for failed API and blueprint operations. |`0` | | server.os_family | The operating system family for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.The following are examples of valid values:`redhat``ubuntu` | | | server.os_type | The operating system version for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.The following are examples of valid values:`6``7` | | | server.persistence.type | The type of database connection being used. Unless using an embedded PostgresSQL server, then this should be `remote`.The following are examples of valid values:`local``remote` |`local` | | server.property-provider.threadpool.completion.timeout | The maximum time, in milliseconds, that federated requests for data can execute before being terminated. Increasing this value could result in degraded performanc from the REST APIs. |`5000` | -| server.property-provider.threadpool.size.core | The core number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`4` | -| server.property-provider.threadpool.size.max | The maximum number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`8` | +| server.property-provider.threadpool.size.core | The core number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`16` | +| server.property-provider.threadpool.size.max | The maximum number of threads that will be used to retrieve data from federated d
[ambari] branch branch-2.7 updated: [AMBARI-25315][AMBARI-25211] Fix the logic on constucting JDBC URL for Spark2 thrift server alert (#3021)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new ad5abae [AMBARI-25315][AMBARI-25211] Fix the logic on constucting JDBC URL for Spark2 thrift server alert (#3021) ad5abae is described below commit ad5abae4392822736b130a9577037d2714a829cd Author: Jungtaek Lim AuthorDate: Mon Jun 24 17:15:13 2019 +0900 [AMBARI-25315][AMBARI-25211] Fix the logic on constucting JDBC URL for Spark2 thrift server alert (#3021) [AMBARI-25315] Fix the logic on constucting JDBC URL for Spark2 thrift server alert (Jungtaek Lim via dgrinenko) --- .../scripts/alerts/alert_spark2_thrift_port.py| 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py index dbbbabf..92d5ef3 100644 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py @@ -147,22 +147,19 @@ def execute(configurations={}, parameters={}, host_name=None): if host_name is None: host_name = socket.getfqdn() +beeline_url = ["jdbc:hive2://{host_name}:{port}/default", "transportMode={transport_mode}"] if security_enabled: +beeline_url.append("principal={hive_principal}") +if transport_mode == "http": +beeline_url.append("httpPath=cliservice") if spark_ssl_enabled: -beeline_url = ['"jdbc:hive2://{host_name}:{port}/default;principal={hive_principal};transportMode={transport_mode};ssl=true;sslTrustStore={spark_truststore_path};trustStorePassword={spark_truststore_pass!p};httpPath=cliservice"'] -else: -beeline_url = ["jdbc:hive2://{host_name}:{port}/default;principal={hive_principal}","transportMode={transport_mode}"] -else: -if spark_ssl_enabled: -beeline_url = ['"jdbc:hive2://{host_name}:{port}/default;transportMode={transport_mode};ssl=true;sslTrustStore={spark_truststore_path};trustStorePassword={spark_truststore_pass!p};httpPath=cliservice"'] -else: -beeline_url = ["jdbc:hive2://{host_name}:{port}/default","transportMode={transport_mode}"] - +beeline_url.extend(["ssl=true", "sslTrustStore={spark_truststore_path}", "trustStorePassword={spark_truststore_pass!p}"]) + # append url according to used transport beeline_cmd = os.path.join(spark_home, "bin", "beeline") -cmd = "! beeline -u %s -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ - (format(" ".join(beeline_url))) +cmd = "! beeline -u '%s' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \ + (format(";".join(beeline_url))) start_time = time.time() try:
[ambari] branch branch-2.7 updated: AMBARI-24992. Ambari Upgrade from 2.6.2.2 to 2.7.1.0 fails in Schema upgrade phase due to long certificate (dgrinenko) (#3019)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new e467117 AMBARI-24992. Ambari Upgrade from 2.6.2.2 to 2.7.1.0 fails in Schema upgrade phase due to long certificate (dgrinenko) (#3019) e467117 is described below commit e46711740859232679bd3e8a48fe6c27c31e8f19 Author: Dmytro Grinenko AuthorDate: Wed Jun 19 09:54:26 2019 +0300 AMBARI-24992. Ambari Upgrade from 2.6.2.2 to 2.7.1.0 fails in Schema upgrade phase due to long certificate (dgrinenko) (#3019) AMBARI-24992. Ambari Upgrade from 2.6.2.2 to 2.7.1.0 fails in Schema upgrade phase due to long certificate (dgrinenko) --- .../org/apache/ambari/server/orm/DBAccessor.java | 10 ++ .../apache/ambari/server/orm/DBAccessorImpl.java | 77 +++ .../server/upgrade/AbstractUpgradeCatalog.java | 10 ++ .../ambari/server/upgrade/SchemaUpgradeHelper.java | 4 +- .../ambari/server/upgrade/UpgradeCatalog274.java | 107 + .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 2 +- .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 2 +- .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 2 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 2 +- .../ambari/server/orm/DBAccessorImplTest.java | 14 +++ .../server/upgrade/UpgradeCatalog274Test.java | 77 +++ 12 files changed, 302 insertions(+), 7 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 731cf00..b31aac1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -663,6 +663,16 @@ public interface DBAccessor { */ void changeColumnType(String tableName, String columnName, Class fromType, Class toType) throws SQLException; + + /** + * Obtain column metadata information by given table and column name + * @param tableName name of the table + * @param columnName name of the column + * @return column information + * @throws SQLException + */ + DBColumnInfo getColumnInfo(String tableName, String columnName) throws SQLException; + /** * Queries the database to determine the name of the primary key constraint on * the specified table. Currently, this is only implemented for diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index b52c3b8..8219cbb 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; +import java.math.BigDecimal; import java.nio.charset.Charset; import java.sql.Blob; import java.sql.Connection; @@ -149,6 +150,49 @@ public class DBAccessorImpl implements DBAccessor { } } + /** + * Map SQL datatype to Java Class type + * + * @param type SQL datatype + * @return Java class or null if no mapping found + */ + private static Class fromSqlTypeToClass(int type) { +switch (type) { + case Types.VARCHAR: + case Types.CHAR: + case Types.LONGVARCHAR: +return String.class; + case Types.NUMERIC: + case Types.DECIMAL: +return BigDecimal.class; + case Types.BIT: +return Boolean.class; + case Types.TINYINT: +return Byte.class; + case Types.SMALLINT: +return Short.class; + case Types.INTEGER: +return Integer.class; + case Types.BIGINT: +return Long.class; + case Types.FLOAT: + case Types.REAL: +return Float.class; + case Types.DOUBLE: +return Double.class; + case Types.BINARY: + case Types.VARBINARY: + case Types.LONGVARBINARY: +return Byte[].class; + case Types.DATE: +return java.sql.Date.class; + case Types.TIME: +return java.sql.Timestamp.class; + default: +return null; +} + } + @Override public Connection getConnection() { return connection; @@ -1229,6 +1273,39 @@ public class DBAccessorImpl implements DBAccessor { alterColumn(tableName, new DBColumnInfo(columnName, toType, null)); } + /** + * Obtain column metadata information by given table and column name. + * + * Not able to return column default value. + * + * @param tableName Name of the table + * @param columnName Name of the column + * @return Column information or null
[ambari] branch branch-2.7 updated: AMBARI-25296 alert_ldap_password for Hive service check does not allow single-quotes (ihorlukianov) (#3002)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.7 by this push: new f7b740c AMBARI-25296 alert_ldap_password for Hive service check does not allow single-quotes (ihorlukianov) (#3002) f7b740c is described below commit f7b740c43e46eb0354418f721661d8436d490db1 Author: Ihor Lukianov AuthorDate: Fri Jun 14 12:20:00 2019 +0300 AMBARI-25296 alert_ldap_password for Hive service check does not allow single-quotes (ihorlukianov) (#3002) AMBARI-25296 alert_ldap_password for Hive service check does not allow single-quotes (ihorlukianov) --- .../resource_management/libraries/functions/hive_check.py| 12 .../test/python/stacks/2.0.6/HIVE/test_hive_service_check.py | 10 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py index da9b417..fa3eb7e 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py @@ -22,6 +22,7 @@ from resource_management.core import global_lock from resource_management.core.resources import Execute from resource_management.libraries.functions import format from resource_management.core.signal_utils import TerminateStrategy +from resource_management.core.shell import quote_bash_args def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd=None, smokeuser='ambari-qa', @@ -51,10 +52,13 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd if hive_auth == "NOSASL": beeline_url.append('auth=noSasl') - credential_str = "" + credential_str = "-n {hive_user}" + # append username and password for LDAP if hive_auth == "LDAP": -credential_str = "-n '{ldap_username}' -p '{ldap_password!p}'" +# password might contain special characters that need to be escaped +quoted_ldap_password = quote_bash_args(ldap_password) +credential_str = "-n {ldap_username} -p {quoted_ldap_password!p}" # append url according to ssl configuration if ssl and ssl_keystore is not None and ssl_password is not None: @@ -74,9 +78,9 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd # -n the user to connect as (ignored when using the hive principal in the URL, can be different from the user running the beeline command) # -e ';' executes a SQL commmand of NOOP - cmd = ("beeline -n %s -u '%s' %s -e ';' 2>&1 | awk '{print}' | grep -i " + \ + cmd = ("beeline -u '%s' %s -e ';' 2>&1 | awk '{print}' | grep -i " + \ "-e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery'") % \ -(format(hive_user), format(";".join(beeline_url)), format(credential_str)) +(format(";".join(beeline_url)), format(credential_str)) Execute(cmd, user=smokeuser, diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py index 39a58ed..4dc57c2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py @@ -46,7 +46,7 @@ class TestServiceCheck(RMFTestCase): stack_version = self.STACK_VERSION, target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Execute', "beeline -n hive -u 'jdbc:hive2://c6402.ambari.apache.org:1/;transportMode=binary;auth=noSasl' -e ';' 2>&1 | awk '{print}' | grep -i -e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery'", +self.assertResourceCalled('Execute', "beeline -u 'jdbc:hive2://c6402.ambari.apache.org:1/;transportMode=binary;auth=noSasl' -n hive -e ';' 2>&1 | awk '{print}' | grep -i -e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery'", path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'], user = 'ambari-qa', timeout = 30, @@ -165,7 +165,7 @@ class TestServiceCheck(RMFTestCase): self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com; ', user = 'ambari-qa',
[ambari] branch branch-2.6 updated: AMBARI-25287 Persistent Cross Site Scripting (XSS) in Ambari
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new 0a99046 AMBARI-25287 Persistent Cross Site Scripting (XSS) in Ambari 0a99046 is described below commit 0a990465fbd76f529e3b85039b7a853005988956 Author: Andrii Tkach AuthorDate: Mon May 27 11:06:22 2019 +0300 AMBARI-25287 Persistent Cross Site Scripting (XSS) in Ambari --- ambari-web/app/mappers/configs/service_config_version_mapper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ambari-web/app/mappers/configs/service_config_version_mapper.js b/ambari-web/app/mappers/configs/service_config_version_mapper.js index e95c925..4b8c226 100644 --- a/ambari-web/app/mappers/configs/service_config_version_mapper.js +++ b/ambari-web/app/mappers/configs/service_config_version_mapper.js @@ -56,6 +56,7 @@ App.serviceConfigVersionsMapper = App.QuickDataMapper.create({ parsedItem.group_id = parsedItem.group_id === -1 ? parsedItem.service_name + '_default' : parsedItem.group_id; parsedItem.is_requested = true; parsedItem.create_time = App.dateTimeWithTimeZone(parsedItem.create_time); +parsedItem.notes = _.escape(parsedItem.notes); itemIds[parsedItem.id] = true; parsedItem.index = index; if (serviceToHostMap[item.service_name]) {
[ambari] branch branch-2.6 updated: AMBARI-21001 Hive 1.5.0 view does not load in Internet Explorer 11 (dgrinenko) (#2947)
This is an automated email from the ASF dual-hosted git repository. hapylestat pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new e188f9a AMBARI-21001 Hive 1.5.0 view does not load in Internet Explorer 11 (dgrinenko) (#2947) e188f9a is described below commit e188f9a72034be61cadf9f1086f7d7d3399093fd Author: Dmytro Grinenko AuthorDate: Tue Apr 23 12:02:32 2019 +0300 AMBARI-21001 Hive 1.5.0 view does not load in Internet Explorer 11 (dgrinenko) (#2947) --- .../views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js index 087bab3..34379d2 100644 --- a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js @@ -98,7 +98,7 @@ export default Ember.Route.extend({ } this.fetchServiceCheckPolicy() - .then((data) => { + .then (function(data) { var numberOfChecks = 0; var serviceCheckPolicy = data.serviceCheckPolicy; for (var serviceCheck in serviceCheckPolicy) {