ambari git commit: AMBARI-22209. HdpCoreMpack: Quick Links should show NN web UI links.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-14714 8d8c1a551 -> cbaa88d2b AMBARI-22209. HdpCoreMpack: Quick Links should show NN web UI links.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbaa88d2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbaa88d2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbaa88d2 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: cbaa88d2bdcc3ee3c3f043098f2b7a98f3563746 Parents: 8d8c1a5 Author: Vitaly BrodetskyiAuthored: Thu Oct 12 23:48:20 2017 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 12 23:48:20 2017 +0300 -- .../apache/ambari/server/state/ServiceInfo.java | 28 +--- 1 file changed, 24 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbaa88d2/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java index 1cad4df..0e6e3c3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java @@ -468,9 +468,11 @@ public class ServiceInfo implements Validable, Cloneable { clone.serviceOsSpecifics = serviceOsSpecifics; clone.configDir = configDir; clone.themesDir = themesDir; -clone.setThemes(themes); +clone.setThemes(getThemes()); +clone.setThemesMap(themesMap); clone.setQuickLinksConfigurationsDir(quickLinksConfigurationsDir); -clone.setQuickLinksConfigurations(quickLinksConfigurations); +clone.setQuickLinksConfigurations(getQuickLinksConfigurations()); +clone.setQuickLinksConfigurationsMap(quickLinksConfigurationsMap); clone.setCommandScript(commandScript); clone.setRequiredServices(requiredServices); return clone; @@ -1029,8 +1031,17 @@ public class ServiceInfo implements Validable, Cloneable { this.themesDir = themesDir; } + /* + * This method will return data from themesMap if themes are not available. + * ThemesMap contain merged themes from all previous stacks. + * TODO we should think and fix it for HDP 3.0 because there we don't need merged data. + * */ public List getThemes() { -return themes; +List themeList = themes; +if (themes == null & themesMap != null) { + themeList = new ArrayList<>(themesMap.values()); +} +return themeList; } public void setThemes(List themes) { @@ -1063,8 +1074,17 @@ public class ServiceInfo implements Validable, Cloneable { this.quickLinksConfigurationsDir = quickLinksConfigurationsDir; } + /* + * This method will return data from quickLinksConfigurationsMap if quickLinksConfigurations are not available. + * quickLinksConfigurationsMap contain merged quickLinksConfigurations from all previous stacks. + * TODO we should think and fix it for HDP 3.0 because there we don't need merged data. + * */ public List getQuickLinksConfigurations() { -return quickLinksConfigurations; +List quickLinksConigurationList = quickLinksConfigurations; +if (quickLinksConfigurations == null && quickLinksConfigurationsMap != null) { + quickLinksConigurationList = new ArrayList<>(quickLinksConfigurationsMap.values()); +} +return quickLinksConigurationList; } public void setQuickLinksConfigurations(List quickLinksConfigurations) {
ambari git commit: AMBARI-22224. host and hostname built-in variables are not populated when performing Kerberos-related operations (rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.6 a837d6191 -> f41d8359c AMBARI-4. host and hostname built-in variables are not populated when performing Kerberos-related operations (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f41d8359 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f41d8359 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f41d8359 Branch: refs/heads/branch-2.6 Commit: f41d8359c9df9b78d004b8b14e9e834b2fc5c76b Parents: a837d61 Author: Robert LevasAuthored: Thu Oct 12 16:24:47 2017 -0400 Committer: Robert Levas Committed: Thu Oct 12 16:24:47 2017 -0400 -- .../server/controller/KerberosHelperImpl.java| 2 +- .../AbstractPrepareKerberosServerAction.java | 14 ++ .../upgrades/PreconfigureKerberosAction.java | 13 + .../AbstractPrepareKerberosServerActionTest.java | 19 --- 4 files changed, 40 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f41d8359/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java -- 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 7627d59..86d3ee0 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 @@ -1611,7 +1611,7 @@ public class KerberosHelperImpl implements KerberosHelper { // Calculate the current host-specific configurations. These will be used to replace // variables within the Kerberos descriptor data Map > configurations = calculateConfigurations(cluster, -hostname.equals(ambariServerHostname) ? null : hostname, +hostname, kerberosDescriptor, false, false); http://git-wip-us.apache.org/repos/asf/ambari/blob/f41d8359/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java index d1b442c..a932da4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java @@ -39,6 +39,7 @@ import org.apache.ambari.server.state.kerberos.KerberosDescriptor; import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor; import org.apache.ambari.server.utils.StageUtils; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -125,6 +126,19 @@ public abstract class AbstractPrepareKerberosServerAction extends KerberosServer if (serviceDescriptor != null) { List serviceIdentities = serviceDescriptor.getIdentities(true, filterContext); +if (!StringUtils.isEmpty(hostName)) { + // Update the configurations with the relevant hostname + Map generalProperties = currentConfigurations.get(""); + if (generalProperties == null) { +generalProperties = new HashMap<>(); +currentConfigurations.put("", generalProperties); + } + + // Add the current hostname under "host" and "hostname" + generalProperties.put("host", hostName); + generalProperties.put("hostname", hostName); +} + // Add service-level principals (and keytabs) kerberosHelper.addIdentities(kerberosIdentityDataFileWriter, serviceIdentities, identityFilter, hostName, serviceName, componentName, kerberosConfigurations, currentConfigurations, excludeHeadless); http://git-wip-us.apache.org/repos/asf/ambari/blob/f41d8359/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java -- diff --git
ambari git commit: AMBARI-22224. host and hostname built-in variables are not populated when performing Kerberos-related operations (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk d88d3cc06 -> 0f76c7f9d AMBARI-4. host and hostname built-in variables are not populated when performing Kerberos-related operations (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f76c7f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f76c7f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f76c7f9 Branch: refs/heads/trunk Commit: 0f76c7f9d642bced5c89e0a25986c12c89213912 Parents: d88d3cc Author: Robert LevasAuthored: Thu Oct 12 15:49:57 2017 -0400 Committer: Robert Levas Committed: Thu Oct 12 15:49:57 2017 -0400 -- .../ambari/server/controller/KerberosHelperImpl.java | 2 +- .../kerberos/AbstractPrepareKerberosServerAction.java | 14 ++ .../upgrades/PreconfigureKerberosAction.java | 13 + .../AbstractPrepareKerberosServerActionTest.java | 5 + 4 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f76c7f9/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java -- 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 f8fe31a..4f14614 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 @@ -1644,7 +1644,7 @@ public class KerberosHelperImpl implements KerberosHelper { // Calculate the current host-specific configurations. These will be used to replace // variables within the Kerberos descriptor data Map > configurations = calculateConfigurations(cluster, -hostname.equals(ambariServerHostname) ? null : hostname, +hostname, kerberosDescriptor, false, false); http://git-wip-us.apache.org/repos/asf/ambari/blob/0f76c7f9/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java index 3db844a..7948a60 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/AbstractPrepareKerberosServerAction.java @@ -40,6 +40,7 @@ import org.apache.ambari.server.state.kerberos.KerberosDescriptor; import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor; import org.apache.ambari.server.utils.StageUtils; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -141,6 +142,19 @@ public abstract class AbstractPrepareKerberosServerAction extends KerberosServer if (serviceDescriptor != null) { List serviceIdentities = serviceDescriptor.getIdentities(true, filterContext); +if (!StringUtils.isEmpty(hostName)) { + // Update the configurations with the relevant hostname + Map generalProperties = currentConfigurations.get(""); + if (generalProperties == null) { +generalProperties = new HashMap<>(); +currentConfigurations.put("", generalProperties); + } + + // Add the current hostname under "host" and "hostname" + generalProperties.put("host", hostName); + generalProperties.put("hostname", hostName); +} + // Add service-level principals (and keytabs) kerberosHelper.addIdentities(kerberosIdentityDataFileWriter, serviceIdentities, identityFilter, hostName, serviceName, componentName, kerberosConfigurations, currentConfigurations, excludeHeadless); http://git-wip-us.apache.org/repos/asf/ambari/blob/0f76c7f9/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java -- diff --git
ambari git commit: AMBARI-22192. Setup an application server for hosting the AD System Manager.
Repository: ambari Updated Branches: refs/heads/branch-3.0-ams e196358ca -> 67524d399 AMBARI-22192. Setup an application server for hosting the AD System Manager. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67524d39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67524d39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67524d39 Branch: refs/heads/branch-3.0-ams Commit: 67524d399a375508e8d537af5a34e455834b6952 Parents: e196358 Author: Siddharth WagleAuthored: Thu Oct 12 12:09:49 2017 -0700 Committer: Siddharth Wagle Committed: Thu Oct 12 12:09:49 2017 -0700 -- .../pom.xml | 569 --- .../src/main/resources/config.yml | 12 + .../adservice/app/AnomalyDetectionApp.scala | 69 +++ .../app/AnomalyDetectionAppConfig.scala | 24 + .../app/AnomalyDetectionAppModule.scala | 38 ++ .../adservice/app/DefaultHealthCheck.scala | 25 + .../metrics/adservice/app/GuiceInjector.scala | 56 ++ .../common/PhoenixQueryConstants.scala | 2 +- .../adservice/resource/AnomalyResource.scala| 35 ++ .../adservice/resource/RootResource.scala | 35 ++ .../adservice/service/ADQueryService.scala | 22 + .../adservice/service/ADQueryServiceImpl.scala | 22 + .../app/DefaultADResourceSpecTest.scala | 54 ++ .../adservice/app/DropwizardAppRuleHelper.scala | 39 ++ .../app/DropwizardResourceTestRuleHelper.scala | 33 ++ .../common/ADManagerConfigurationTest.scala | 17 + ambari-metrics/ambari-metrics-common/pom.xml| 12 +- ambari-metrics/pom.xml | 1 + ambari-utility/pom.xml | 4 +- 19 files changed, 857 insertions(+), 212 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/67524d39/ambari-metrics/ambari-metrics-anomaly-detection-service/pom.xml -- diff --git a/ambari-metrics/ambari-metrics-anomaly-detection-service/pom.xml b/ambari-metrics/ambari-metrics-anomaly-detection-service/pom.xml index 6f8f8c1..c9bb7b7 100644 --- a/ambari-metrics/ambari-metrics-anomaly-detection-service/pom.xml +++ b/ambari-metrics/ambari-metrics-anomaly-detection-service/pom.xml @@ -20,217 +20,370 @@ http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> - -ambari-metrics -org.apache.ambari -2.0.0.0-SNAPSHOT - -4.0.0 -ambari-metrics-anomaly-detection-service + +ambari-metrics +org.apache.ambari 2.0.0.0-SNAPSHOT - -2.11.1 -2.11 -2.7.3.2.6.0.3-8 - + + 4.0.0 + ambari-metrics-anomaly-detection-service + 2.0.0.0-SNAPSHOT + Ambari Metrics Anomaly Detection Service + jar - - -scala-tools.org -Scala-Tools Maven2 Repository -http://scala-tools.org/repo-releases - - + +2.12.3 +2.11 +2.7.3.2.6.0.3-8 +2.8.9 +1.2.0 +2.2.0 + + + + + scala-tools.org + Scala-Tools Maven2 Repository + http://scala-tools.org/repo-releases + + - - -scala-tools.org -Scala-Tools Maven2 Repository -http://scala-tools.org/repo-releases - - + + + scala-tools.org + Scala-Tools Maven2 Repository + http://scala-tools.org/repo-releases + + - - - -maven-compiler-plugin - -1.8 -1.8 - - - -org.scala-tools -maven-scala-plugin - - - -compile -testCompile - - - - -${scala.version} - --target:jvm-1.5 - - - - - -Ambari Metrics Anomaly Detection Service -jar + +${project.artifactId} + + +true +src/main/resources + + **/*.yml + **/*.txt + + + + + +maven-compiler-plugin + + 1.8 + 1.8 + + + +net.alchim31.maven +scala-maven-plugin +3.3.1 + + +scala-compile-first +process-resources + +
[2/2] ambari git commit: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.
AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d8c1a55 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d8c1a55 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d8c1a55 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: 8d8c1a551579b696d1730afcde9c49594a1dc77b Parents: 5ddb07c Author: Swapan ShridharAuthored: Fri Oct 6 01:19:13 2017 -0700 Committer: Swapan Shridhar Committed: Thu Oct 12 00:43:25 2017 -0700 -- .../server/PropertyNotFoundException.java | 27 ++ .../server/ResourcesPathNotFoundException.java | 25 ++ .../resources/ResourceInstanceFactoryImpl.java | 4 + .../RootClusterSettingsResourceDefinition.java | 52 +++ .../server/api/services/AmbariMetaInfo.java | 49 +++ .../api/services/RootClusterSettingService.java | 135 .../server/api/services/StacksService.java | 10 +- .../controller/AmbariManagementController.java | 12 +- .../AmbariManagementControllerImpl.java | 54 +++- .../server/controller/ControllerModule.java | 2 + .../ReadOnlyConfigurationResponse.java | 272 .../controller/RootClusterSettingRequest.java | 39 +++ .../controller/StackConfigurationResponse.java | 266 --- .../StackLevelConfigurationRequest.java | 2 +- .../StackLevelConfigurationResponse.java| 20 +- .../ambari/server/controller/StackV2.java | 12 +- .../AbstractControllerResourceProvider.java | 2 + .../RootClusterSettingsResourceProvider.java| 167 ++ .../server/controller/internal/Stack.java | 14 +- .../StackConfigurationResourceProvider.java | 8 +- ...StackLevelConfigurationResourceProvider.java | 8 +- .../ambari/server/controller/spi/Resource.java | 2 + .../ResourceLevelClusterSettingManager.java | 168 ++ ...sourceLevelClusterSettingManagerFactory.java | 34 ++ .../ambari/server/state/ConfigHelper.java | 1 + .../ambari/server/state/PropertyInfo.java | 6 +- .../src/main/resources/cluster-settings.xml | 322 +++ 27 files changed, 1393 insertions(+), 320 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8c1a55/ambari-server/src/main/java/org/apache/ambari/server/PropertyNotFoundException.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/PropertyNotFoundException.java b/ambari-server/src/main/java/org/apache/ambari/server/PropertyNotFoundException.java new file mode 100644 index 000..b036c20 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/PropertyNotFoundException.java @@ -0,0 +1,27 @@ +/* + * 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; + +@SuppressWarnings("serial") +public class PropertyNotFoundException extends ObjectNotFoundException { + + public PropertyNotFoundException(String message) { +super(message); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8c1a55/ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java b/ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java new file mode 100644 index 000..fdc1971 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java @@ -0,0 +1,25 @@ +/** + * 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,
[1/2] ambari git commit: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-14714 5ddb07cdb -> 8d8c1a551 http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8c1a55/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java index 31fcb9d..afd4b46 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java @@ -35,7 +35,7 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlList; -import org.apache.ambari.server.controller.StackConfigurationResponse; +import org.apache.ambari.server.controller.ReadOnlyConfigurationResponse; import org.w3c.dom.Element; @XmlAccessorType(XmlAccessType.FIELD) @@ -167,8 +167,8 @@ public class PropertyInfo { this.propertyAmbariUpgradeBehavior = propertyAmbariUpgradeBehavior; } - public StackConfigurationResponse convertToResponse() { -return new StackConfigurationResponse(getName(), getValue(), + public ReadOnlyConfigurationResponse convertToResponse() { +return new ReadOnlyConfigurationResponse(getName(), getValue(), getDescription(), getDisplayName() , getFilename(), isRequireInput(), getPropertyTypes(), getAttributesMap(), getPropertyValueAttributes(), getDependsOnProperties()); http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8c1a55/ambari-server/src/main/resources/cluster-settings.xml -- diff --git a/ambari-server/src/main/resources/cluster-settings.xml b/ambari-server/src/main/resources/cluster-settings.xml new file mode 100644 index 000..70b100a --- /dev/null +++ b/ambari-server/src/main/resources/cluster-settings.xml @@ -0,0 +1,322 @@ + + + + + +recovery_enabled +true +Auto start enabled or not for this cluster. + + + +recovery_type +AUTO_START +Auto start type. + + + +recovery_lifetime_max_count +1024 +Auto start lifetime maximum count of recovery attempt allowed per host component. This is reset +when agent is restarted. + + + + +recovery_max_count +6 +Auto start maximum count of recovery attempt allowed per host component in a window. This is reset +when agent is restarted. + + + + +recovery_window_in_minutes +60 +Auto start recovery window size in minutes. + + + +recovery_retry_interval +5 +Auto start recovery retry gap between tries per host component. + + + +security_enabled +false +Hadoop Security + + + +kerberos_domain +EXAMPLE.COM +Kerberos realm. + + + +ignore_groupsusers_create +Skip group modifications during install +false +ADDITIONAL_USER_PROPERTY +Whether to ignore failures on users and group creation + +false +boolean + + + + +sysprep_skip_create_users_and_groups +Whether to skip creating users and groups in a sysprepped cluster +false +ADDITIONAL_USER_PROPERTY +Whether to skip creating users and groups in a sysprepped cluster + +true +boolean + + + + +sysprep_skip_copy_fast_jar_hdfs +Whether to skip copying the tarballs to HDFS on a sysprepped cluster +false +Whether to skip copying the tarballs to HDFS on a sysprepped cluster, during both fresh install and +stack upgrade + + +true +boolean + + + + +sysprep_skip_copy_tarballs_hdfs +Whether to skip copying the tarballs to HDFS on a sysprepped cluster +false +Whether to skip copying the tarballs to HDFS on a sysprepped cluster, during both fresh install and +stack upgrade + + +true +boolean + + + + +sysprep_skip_copy_oozie_share_lib_to_hdfs +Whether to skip copying the Oozie share lib to HDFS on sysprepped cluster +false +Whether to skip copying the Oozie share lib to HDFS on sysprepped cluster, during both fresh +install and stack upgrade + + +true +boolean + + + + +sysprep_skip_setup_jce +Whether to skip setting up the unlimited key JCE policy
ambari git commit: AMBARI-22180. [Modular Deployment][MVP] Download Configuration. (Ishan via Jaimin)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-14714-ui 5ddb07cdb -> fe57de61f AMBARI-22180. [Modular Deployment][MVP] Download Configuration. (Ishan via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fe57de61 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fe57de61 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fe57de61 Branch: refs/heads/branch-feature-AMBARI-14714-ui Commit: fe57de61fd35ad2e06bca22bcecaeb718afe2941 Parents: 5ddb07c Author: Jaimin JetlyAuthored: Thu Oct 12 10:58:32 2017 -0700 Committer: Jaimin Jetly Committed: Thu Oct 12 10:58:32 2017 -0700 -- ambari-web/app/controllers.js | 1 + ambari-web/app/controllers/installer.js | 44 +++ ambari-web/app/controllers/wizard.js| 6 +- .../wizard/configureDownload_controller.js | 129 +++ ambari-web/app/messages.js | 8 ++ .../app/mixins/wizard/wizard_menu_view.js | 46 +++ ambari-web/app/router.js| 2 + ambari-web/app/routes/installer.js | 64 - ambari-web/app/styles/wizard.less | 66 ++ ambari-web/app/templates/installer.hbs | 21 +-- .../app/templates/wizard/configureDownload.hbs | 77 +++ ambari-web/app/views.js | 1 + .../app/views/wizard/configureDownload_view.js | 51 13 files changed, 481 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fe57de61/ambari-web/app/controllers.js -- diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index f7d77be..8e7e267 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -149,6 +149,7 @@ require('controllers/wizard/step0_controller'); require('controllers/wizard/step1_controller'); require('controllers/wizard/step2_controller'); require('controllers/wizard/step3_controller'); +require('controllers/wizard/configureDownload_controller'); require('controllers/wizard/step4_controller'); require('controllers/wizard/step5_controller'); require('controllers/wizard/step6_controller'); http://git-wip-us.apache.org/repos/asf/ambari/blob/fe57de61/ambari-web/app/controllers/installer.js -- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 8aea887..7afaf87 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -41,6 +41,7 @@ App.InstallerController = App.WizardController.extend(App.Persist, { "step0", "step2", "step3", +"configureDownload", "step1", "step4", "step5", @@ -987,6 +988,40 @@ App.InstallerController = App.WizardController.extend(App.Persist, { } } ], +'configureDownload': [ + { +type: 'async', +callback: function () { + var dfd = $.Deferred(); + + this.loadStacks().always(function() { + App.router.get('clusterController').loadAmbariProperties().always(function() { + dfd.resolve(); +}); + }); + + return dfd.promise(); +} + }, + { +type: 'async', +callback: function (stacksLoaded) { + var dfd = $.Deferred(); + + if (!stacksLoaded) { +$.when.apply(this, this.loadStacksVersions()).done(function () { + Em.run.later('sync', function() { +dfd.resolve(stacksLoaded); + }, 1000); +}); + } else { +dfd.resolve(stacksLoaded); + } + + return dfd.promise(); +} + } +], 'step3': [ { type: 'sync', @@ -995,6 +1030,7 @@ App.InstallerController = App.WizardController.extend(App.Persist, { } } ], + 'step4': [ { type: 'async', @@ -1105,6 +1141,10 @@ App.InstallerController = App.WizardController.extend(App.Persist, { this.gotoStep('step10'); }, + gotoConfigureDownload: function () { +this.gotoStep('configureDownload'); + }, + isStep0: function () { return this.get('currentStep') == this.getStepIndex('step0'); }.property('currentStep'), @@ -1149,6 +1189,10 @@ App.InstallerController = App.WizardController.extend(App.Persist, { return this.get('currentStep') == this.getStepIndex('step10'); }.property('currentStep'), + isConfigureDownload: function () { +return this.get('currentStep') == this.getStepIndex('configureDownload'); +
[21/50] [abbrv] ambari git commit: AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between (alexantonenko)
AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68df85d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68df85d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68df85d4 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 68df85d402b047c54f9d0324e7f94b970c5282ee Parents: be605cb Author: Alex AntonenkoAuthored: Thu Oct 12 15:53:00 2017 +0300 Committer: Alex Antonenko Committed: Thu Oct 12 15:53:00 2017 +0300 -- .../main/service/reassign/step3_controller.js | 18 ++ .../app/mixins/wizard/assign_master_components.js | 2 +- .../app/templates/main/service/reassign/step3.hbs | 6 +++--- .../wizard/assign_master_components_test.js | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/controllers/main/service/reassign/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step3_controller.js b/ambari-web/app/controllers/main/service/reassign/step3_controller.js index c44c4f3..4898b75 100644 --- a/ambari-web/app/controllers/main/service/reassign/step3_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step3_controller.js @@ -268,9 +268,16 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ propertiesToChange: {}, - isSubmitDisabled: Em.computed.and('wizardController.isComponentWithReconfiguration', '!isLoaded'), + isSubmitDisabled: Em.computed.or('!isLoaded', 'submitButtonClicked'), + + /** + * Is Submit-click processing now + * @type {bool} + */ + submitButtonClicked: false, loadStep: function () { +this.set('submitButtonClicked', false); if (this.get('wizardController.isComponentWithReconfiguration')) { this.set('isLoaded', false); App.ajax.send({ @@ -695,8 +702,11 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ }, submit: function() { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { - App.router.send("next"); -}); +if (!this.get('submitButtonClicked')) { + this.set('submitButtonClicked', true); + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +} } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 84a56f1..c9577f8 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1195,7 +1195,7 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A } }, - nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress'), + nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress', '!isLoaded'), /** * Submit button click handler http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/templates/main/service/reassign/step3.hbs -- diff --git a/ambari-web/app/templates/main/service/reassign/step3.hbs b/ambari-web/app/templates/main/service/reassign/step3.hbs index 1f6a393..a6e42af 100644 --- a/ambari-web/app/templates/main/service/reassign/step3.hbs +++ b/ambari-web/app/templates/main/service/reassign/step3.hbs @@ -64,8 +64,8 @@ - {{t common.back}} -{{t common.deploy}} + {{t common.back}} + {{t common.deploy}} http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/test/mixins/wizard/assign_master_components_test.js -- diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js index 635143c..20efb8e 100644 --- a/ambari-web/test/mixins/wizard/assign_master_components_test.js +++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js @@ -211,6 +211,6 @@ describe('App.AssignMasterComponents', function () { }); App.TestAliases.testAsComputedOr(baseObject.create(), -'nextButtonDisabled', ['App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress']); +
[07/50] [abbrv] ambari git commit: AMBARI-22194 - Prevent Patch Upgrades With Known Service Incompatibilities (part2) (jonathanhurley)
AMBARI-22194 - Prevent Patch Upgrades With Known Service Incompatibilities (part2) (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08bdd803 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08bdd803 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08bdd803 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 08bdd803c51b6a1c7c16d7aa04b6207538f2fd9c Parents: c19f363 Author: Jonathan HurleyAuthored: Wed Oct 11 10:24:53 2017 -0400 Committer: Jonathan Hurley Committed: Wed Oct 11 10:25:25 2017 -0400 -- .../ambari/server/checks/RequiredServicesInRepositoryCheckTest.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08bdd803/ambari-server/src/test/java/org/apache/ambari/server/checks/RequiredServicesInRepositoryCheckTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/RequiredServicesInRepositoryCheckTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/RequiredServicesInRepositoryCheckTest.java index 0285c0a..5984871 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/checks/RequiredServicesInRepositoryCheckTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/RequiredServicesInRepositoryCheckTest.java @@ -39,7 +39,6 @@ import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.google.common.collect.Sets; -import com.google.gson.Gson; import com.google.inject.Provider; /**
[22/50] [abbrv] ambari git commit: AMBARI-22218 Log Search UI generated by maven build uses mock data instead of real API. (ababiichuk)
AMBARI-22218 Log Search UI generated by maven build uses mock data instead of real API. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/527e45d5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/527e45d5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/527e45d5 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 527e45d50f2a6faebd7cf842297aa37ef53f8b16 Parents: 68df85d Author: ababiichukAuthored: Thu Oct 12 15:54:31 2017 +0300 Committer: ababiichuk Committed: Thu Oct 12 17:15:32 2017 +0300 -- ambari-logsearch/ambari-logsearch-web/package.json | 2 +- ambari-logsearch/ambari-logsearch-web/pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/527e45d5/ambari-logsearch/ambari-logsearch-web/package.json -- diff --git a/ambari-logsearch/ambari-logsearch-web/package.json b/ambari-logsearch/ambari-logsearch-web/package.json index f8525c4..2c6aa8d 100644 --- a/ambari-logsearch/ambari-logsearch-web/package.json +++ b/ambari-logsearch/ambari-logsearch-web/package.json @@ -6,7 +6,7 @@ "ng": "ng", "start": "webpack-dev-server --port=4200", "build": "webpack", -"build-prod": "NODE_ENV='production' webpack -p", +"build-prod": "NODE_ENV=production webpack -p", "test": "karma start ./karma.conf.js", "lint": "ng lint", "e2e": "protractor ./protractor.conf.js", http://git-wip-us.apache.org/repos/asf/ambari/blob/527e45d5/ambari-logsearch/ambari-logsearch-web/pom.xml -- diff --git a/ambari-logsearch/ambari-logsearch-web/pom.xml b/ambari-logsearch/ambari-logsearch-web/pom.xml index a0621d9..953f0df 100644 --- a/ambari-logsearch/ambari-logsearch-web/pom.xml +++ b/ambari-logsearch/ambari-logsearch-web/pom.xml @@ -76,6 +76,9 @@ generate-resources + +production + -p
[23/50] [abbrv] ambari git commit: AMBARI-22221. Fix initialization of Druid Script object. (nishantmonu51)
AMBARI-1. Fix initialization of Druid Script object. (nishantmonu51) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d88d3cc0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d88d3cc0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d88d3cc0 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: d88d3cc06f5355802a95db35c26e383502b658c7 Parents: 527e45d Author: NishantAuthored: Thu Oct 12 21:20:11 2017 +0530 Committer: Nishant Committed: Thu Oct 12 22:37:26 2017 +0530 -- .../common-services/DRUID/0.10.1/package/scripts/druid_node.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d88d3cc0/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py index 8053dcb..8e1a44f 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py +++ b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py @@ -32,6 +32,7 @@ from druid import druid, get_daemon_cmd, getPid class DruidBase(Script): def __init__(self, nodeType=None): +Script.__init__(self) self.nodeType = nodeType def install(self, env):
[03/50] [abbrv] ambari git commit: AMBARI-22199.Zeppelin start fails due to permission denied error during kinit(Venkata Sairam)
AMBARI-22199.Zeppelin start fails due to permission denied error during kinit(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/33d67f3e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/33d67f3e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/33d67f3e Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 33d67f3ead24fcda4fcdb7d5920ccc76d1743657 Parents: 7e885a3 Author: Venkata SairamAuthored: Wed Oct 11 14:46:39 2017 +0530 Committer: Venkata Sairam Committed: Wed Oct 11 14:46:39 2017 +0530 -- .../ZEPPELIN/0.7.0/package/scripts/master.py| 48 --- .../stacks/2.6/ZEPPELIN/test_zeppelin_070.py| 140 --- 2 files changed, 147 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/33d67f3e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 d615d06..09944bd 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 @@ -192,8 +192,7 @@ class Master(Script): notebook_directory = "/user/" + format("{zeppelin_user}") + "/" + \ params.config['configurations']['zeppelin-config']['zeppelin.notebook.dir'] - -if self.is_path_exists_in_HDFS(notebook_directory, params.zeppelin_user): +if not self.is_path_exists_in_HDFS(notebook_directory, params.zeppelin_user): # hdfs dfs -mkdir {notebook_directory} params.HdfsResource(format("{notebook_directory}"), type="directory", @@ -231,14 +230,14 @@ class Master(Script): Execute(("chown", "-R", format("{zeppelin_user}") + ":" + format("{zeppelin_group}"), os.path.join(params.zeppelin_dir, "notebook")), sudo=True) +if params.security_enabled: + zeppelin_kinit_cmd = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal}; ") + Execute(zeppelin_kinit_cmd, user=params.zeppelin_user) + if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ and params.config['configurations']['zeppelin-config']['zeppelin.notebook.storage'] == 'org.apache.zeppelin.notebook.repo.FileSystemNotebookRepo': self.check_and_copy_notebook_in_hdfs(params) -if params.security_enabled: -zeppelin_kinit_cmd = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal}; ") -Execute(zeppelin_kinit_cmd, user=params.zeppelin_user) - zeppelin_spark_dependencies = self.get_zeppelin_spark_dependencies() if zeppelin_spark_dependencies and os.path.exists(zeppelin_spark_dependencies[0]): self.create_zeppelin_dir(params) @@ -292,14 +291,17 @@ class Master(Script): if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)): stack_select.select_packages(params.version) - def getZeppelinConfFS(self, params): -hdfs_interpreter_config = params.config['configurations']['zeppelin-config']['zeppelin.config.fs.dir'] + "/interpreter.json" + def get_zeppelin_conf_FS_directory(self, params): +hdfs_interpreter_config = params.config['configurations']['zeppelin-config']['zeppelin.config.fs.dir'] if not hdfs_interpreter_config.startswith("/"): hdfs_interpreter_config = "/user/" + format("{zeppelin_user}") + "/" + hdfs_interpreter_config return hdfs_interpreter_config + def get_zeppelin_conf_FS(self, params): +return self.get_zeppelin_conf_FS_directory(params) + "/interpreter.json" + def is_path_exists_in_HDFS(self, path, as_user): kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") @@ -325,17 +327,15 @@ class Master(Script): and params.config['configurations']['zeppelin-config']['zeppelin.notebook.storage'] == 'org.apache.zeppelin.notebook.repo.FileSystemNotebookRepo': if 'zeppelin.config.fs.dir' in params.config['configurations']['zeppelin-config']: -zeppelin_conf_fs = self.getZeppelinConfFS(params) +zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user):
[42/50] [abbrv] ambari git commit: AMBARI-21307 organized code, fixed build failures
AMBARI-21307 organized code, fixed build failures Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/307f6259 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/307f6259 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/307f6259 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 307f6259f63069a47017f7c3959925776fc8ee1a Parents: 086826e Author: lpuskasAuthored: Thu Sep 14 17:58:59 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:51 2017 +0200 -- .../ldap/domain/AmbariLdapConfigKeys.java | 72 .../ldap/domain/AmbariLdapConfiguration.java| 3 - .../ldap/domain/LdapConfigurationFactory.java | 2 +- .../ldap/service/AmbariLdapConfigKeys.java | 72 .../DefaultLdapAttributeDetectionService.java | 2 +- .../domain/AmbariLdapConfigurationTest.java | 19 ++ .../TestAmbariLdapConfigurationFactory.java | 29 ...efaultLdapAttributeDetectionServiceTest.java | 9 ++- .../DefaultLdapConfigurationServiceTest.java| 19 +- 9 files changed, 144 insertions(+), 83 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/307f6259/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfigKeys.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfigKeys.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfigKeys.java new file mode 100644 index 000..b7b41a3 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfigKeys.java @@ -0,0 +1,72 @@ +/* + * Licensed 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.ldap.domain; + +/** + * Constants representing supported LDAP related property names + * // todo extend this with validation information, description, defaults maybe + */ +public enum AmbariLdapConfigKeys { + + LDAP_ENABLED("ambari.ldap.authentication.enabled"), + SERVER_HOST("ambari.ldap.connectivity.server.host"), + SERVER_PORT("ambari.ldap.connectivity.server.port"), + USE_SSL("ambari.ldap.connectivity.use_ssl"), + + TRUST_STORE("ambari.ldap.connectivity.trust_store"), + TRUST_STORE_TYPE("ambari.ldap.connectivity.trust_store.type"), + TRUST_STORE_PATH("ambari.ldap.connectivity.trust_store.path"), + TRUST_STORE_PASSWORD("ambari.ldap.connectivity.trust_store.password"), + ANONYMOUS_BIND("ambari.ldap.connectivity.anonymous_bind"), + + BIND_DN("ambari.ldap.connectivity.bind_dn"), + BIND_PASSWORD("ambari.ldap.connectivity.bind_password"), + + ATTR_DETECTION("ambari.ldap.attributes.detection"), // manual | auto + + DN_ATTRIBUTE("ambari.ldap.attributes.dn_attr"), + + USER_OBJECT_CLASS("ambari.ldap.attributes.user.object_class"), + USER_NAME_ATTRIBUTE("ambari.ldap.attributes.user.name_attr"), + USER_GROUP_MEMBER_ATTRIBUTE("ambari.ldap.attributes.user.group_member_attr"), + USER_SEARCH_BASE("ambari.ldap.attributes.user.search_base"), + + GROUP_OBJECT_CLASS("ambari.ldap.attributes.group.object_class"), + GROUP_NAME_ATTRIBUTE("ambari.ldap.attributes.group.name_attr"), + GROUP_MEMBER_ATTRIBUTE("ambari.ldap.attributes.group.member_attr"), + GROUP_SEARCH_BASE("ambari.ldap.attributes.group.search_base"), + + USER_SEARCH_FILTER("ambari.ldap.advanced.user_search_filter"), + USER_MEMBER_REPLACE_PATTERN("ambari.ldap.advanced.user_member_replace_pattern"), + USER_MEMBER_FILTER("ambari.ldap.advanced.user_member_filter"), + + GROUP_SEARCH_FILTER("ambari.ldap.advanced.group_search_filter"), + GROUP_MEMBER_REPLACE_PATTERN("ambari.ldap.advanced.group_member_replace_pattern"), + GROUP_MEMBER_FILTER("ambari.ldap.advanced.group_member_filter"), + + FORCE_LOWERCASE_USERNAMES("ambari.ldap.advanced.force_lowercase_usernames"), + REFERRAL_HANDLING("ambari.ldap.advanced.referrals"), // folow + PAGINATION_ENABLED("ambari.ldap.advanced.pagination_enabled"); // true | false + + private String propertyName; + + AmbariLdapConfigKeys(String propName) { +this.propertyName = propName; + } + + public String key() { +return this.propertyName; + } +}
[48/50] [abbrv] ambari git commit: AMBARI-21307 cleand apache ditectory related dependencies
AMBARI-21307 cleand apache ditectory related dependencies Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/748302f6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/748302f6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/748302f6 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 748302f629d1c83ec8a134a85014a583492480f9 Parents: 4bde7f6 Author: lpuskasAuthored: Wed Oct 11 17:54:57 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:52 2017 +0200 -- ambari-funtest/pom.xml | 67 ambari-project/pom.xml | 51 --- ambari-server/pom.xml | 84 - 3 files changed, 14 insertions(+), 188 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/748302f6/ambari-funtest/pom.xml -- diff --git a/ambari-funtest/pom.xml b/ambari-funtest/pom.xml index bb2068d..6466af3 100644 --- a/ambari-funtest/pom.xml +++ b/ambari-funtest/pom.xml @@ -197,73 +197,6 @@ spring-ldap-core - org.apache.directory.server - apacheds-server-annotations - test - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-core-integ - test - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-server-integ - test - - - org.apache.directory.server - apacheds-jdbm - test - - - org.apache.directory.server - apacheds-kerberos-codec - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-core - test - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-protocol-ldap - test - - - org.apache.directory.server - kerberos-client - - - org.apache.directory.shared - shared-ldap - test - - org.slf4j slf4j-api 1.7.20 http://git-wip-us.apache.org/repos/asf/ambari/blob/748302f6/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index e4d4423..f6e3bc7 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -162,57 +162,6 @@ 2.0.4.RELEASE -org.apache.directory.server -apacheds-server-annotations -2.0.0-M19 - - -org.apache.directory.server -apacheds-core-integ -2.0.0-M19 - - -org.apache.directory.server -apacheds-server-integ -2.0.0-M19 - - -org.apache.directory.server -apacheds-jdbm -2.0.0-M5 - - -org.apache.directory.server -apacheds-kerberos-codec -2.0.0-M19 - - -org.apache.directory.server -apacheds-core -2.0.0-M19 - - -org.apache.directory.server -kerberos-client -2.0.0-M19 - - -org.apache.directory.server -apacheds-protocol-ldap -2.0.0-M19 - - -org.apache.directory.jdbm -apacheds-jdbm1 - - - - -org.apache.directory.shared -shared-ldap -0.9.17 - - org.slf4j slf4j-api ${slf4j.version} http://git-wip-us.apache.org/repos/asf/ambari/blob/748302f6/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 8d52821..a86acf5 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1225,73 +1225,6 @@ spring-ldap-core - org.apache.directory.server - apacheds-server-annotations - test - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-core-integ - test - - - net.sf.ehcache - ehcache-core - - - - - org.apache.directory.server - apacheds-server-integ - test - - - org.apache.directory.server - apacheds-jdbm - test - - - org.apache.directory.server - apacheds-kerberos-codec - - - net.sf.ehcache - ehcache-core - - - - -
[46/50] [abbrv] ambari git commit: AMBARI-21307 Ldapconnection template optimization, basic support for custom trust store
AMBARI-21307 Ldapconnection template optimization, basic support for custom trust store Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4bde7f62 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4bde7f62 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4bde7f62 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 4bde7f6204da89e0b91118f6838e4889e2f4947a Parents: d501944 Author: lpuskasAuthored: Mon Oct 9 17:20:38 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:51 2017 +0200 -- .../apache/ambari/server/ldap/LdapModule.java | 8 +- .../service/LdapAttributeDetectionService.java | 4 +- .../service/LdapConnectionConfigService.java| 34 ++ .../service/LdapConnectionTemplateProvider.java | 56 - .../DefaultLdapAttributeDetectionService.java | 4 +- .../ads/DefaultLdapConfigurationService.java| 11 +- .../ads/LdapConnectionTemplateFactory.java | 56 + .../DefaultLdapConnectionConfigService.java | 116 +++ .../server/ldap/LdapModuleFunctionalTest.java | 28 + 9 files changed, 224 insertions(+), 93 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4bde7f62/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapModule.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapModule.java index d59264a..4abf4e7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapModule.java @@ -21,11 +21,11 @@ import org.apache.ambari.server.ldap.service.AmbariLdapConfigurationProvider; import org.apache.ambari.server.ldap.service.AmbariLdapFacade; import org.apache.ambari.server.ldap.service.LdapAttributeDetectionService; import org.apache.ambari.server.ldap.service.LdapConfigurationService; -import org.apache.ambari.server.ldap.service.LdapConnectionTemplateProvider; +import org.apache.ambari.server.ldap.service.LdapConnectionConfigService; import org.apache.ambari.server.ldap.service.LdapFacade; import org.apache.ambari.server.ldap.service.ads.DefaultLdapAttributeDetectionService; import org.apache.ambari.server.ldap.service.ads.DefaultLdapConfigurationService; -import org.apache.directory.ldap.client.template.LdapConnectionTemplate; +import org.apache.ambari.server.ldap.service.ads.detectors.DefaultLdapConnectionConfigService; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; @@ -40,13 +40,11 @@ public class LdapModule extends AbstractModule { bind(LdapFacade.class).to(AmbariLdapFacade.class); bind(LdapConfigurationService.class).to(DefaultLdapConfigurationService.class); bind(LdapAttributeDetectionService.class).to(DefaultLdapAttributeDetectionService.class); + bind(LdapConnectionConfigService.class).to(DefaultLdapConnectionConfigService.class); // this binding requires the JPA module! bind(AmbariLdapConfiguration.class).toProvider(AmbariLdapConfigurationProvider.class); -// bind to the provider implementation (let GUICE deal with instantiating 3rd party instances) - bind(LdapConnectionTemplate.class).toProvider(LdapConnectionTemplateProvider.class); - install(new FactoryModuleBuilder().build(AmbariLdapConfigurationFactory.class)); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/4bde7f62/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/LdapAttributeDetectionService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/LdapAttributeDetectionService.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/LdapAttributeDetectionService.java index 6cd369b..c08a2e0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/LdapAttributeDetectionService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/LdapAttributeDetectionService.java @@ -27,7 +27,7 @@ public interface LdapAttributeDetectionService { * @param ambariLdapConfiguration configuration instance holding connection details * @return the configuration decorated with user related attributes */ - AmbariLdapConfiguration detectLdapUserAttributes(AmbariLdapConfiguration ambariLdapConfiguration); + AmbariLdapConfiguration detectLdapUserAttributes(AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException; /** * Decorates the passed in configuration with the detected ldap group
[18/50] [abbrv] ambari git commit: AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko)
AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b86f53fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b86f53fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b86f53fb Branch: refs/heads/feature-branch-AMBARI-21307 Commit: b86f53fbe1c940811c3e49d658aad870d1dd53da Parents: a8caac3 Author: Lisnichenko DmitroAuthored: Thu Oct 12 13:57:24 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Oct 12 13:58:23 2017 +0300 -- .../apache/ambari/server/orm/DBAccessorImpl.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b86f53fb/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- 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 26670fc..faa58f2 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 @@ -1551,8 +1551,12 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTable(String tableName) throws SQLException { -String sqlQuery = "DELETE FROM " + convertObjectName(tableName); -executeQuery(sqlQuery); +if (tableExists(tableName)){ + String sqlQuery = "DELETE FROM " + convertObjectName(tableName); + executeQuery(sqlQuery); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } /** @@ -1564,7 +1568,11 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTableColumn(String tableName, String columnName, Object value) throws SQLException { -String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); -executePreparedUpdate(sqlQuery, value); +if (tableExists(tableName)){ + String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); + executePreparedUpdate(sqlQuery, value); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } }
[14/50] [abbrv] ambari git commit: AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore)
AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5de82da3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5de82da3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5de82da3 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 5de82da3b293a0306d796d79960af45bc7c88372 Parents: 85fb356 Author: Nitiraj Singh RathoreAuthored: Thu Oct 12 12:45:56 2017 +0530 Committer: Nitiraj Singh Rathore Committed: Thu Oct 12 12:47:12 2017 +0530 -- .../view/hive20/resources/browser/DDLProxy.java | 154 +-- .../hive20/resources/uploads/UploadService.java | 12 +- .../uploads/query/InsertFromQueryInput.java | 13 +- .../databases/database/tables/upload-table.js | 12 ++ 4 files changed, 140 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5de82da3/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java index 77857f9..6d793d3 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java @@ -19,6 +19,7 @@ package org.apache.ambari.view.hive20.resources.browser; import com.google.common.base.Function; +import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.base.Strings; @@ -54,6 +55,8 @@ import org.apache.ambari.view.hive20.resources.jobs.viewJobs.Job; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobController; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobImpl; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobResourceManager; +import org.apache.ambari.view.hive20.resources.settings.Setting; +import org.apache.ambari.view.hive20.resources.settings.SettingsResourceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,11 +76,13 @@ public class DDLProxy { private final ViewContext context; private final TableMetaParserImpl tableMetaParser; + private SettingsResourceManager settingsResourceManager; @Inject - public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser) { + public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser, SettingsResourceManager settingsResourceManager) { this.context = context; this.tableMetaParser = tableMetaParser; +this.settingsResourceManager = settingsResourceManager; LOG.info("Creating DDLProxy"); } @@ -130,15 +135,19 @@ public class DDLProxy { } public Job getColumnStatsJob(final String databaseName, final String tableName, final String columnName, - JobResourceManager resourceManager) throws ServiceException { + JobResourceManager resourceManager) throws ServiceException { FetchColumnStatsQueryGenerator queryGenerator = new FetchColumnStatsQueryGenerator(databaseName, tableName, - columnName); +columnName); Optional q = queryGenerator.getQuery(); String jobTitle = "Fetch column stats for " + databaseName + "." + tableName + "." + columnName; -if(q.isPresent()) { +if (q.isPresent()) { String query = q.get(); + Optional settingsString = generateSettingsString(); + if (settingsString.isPresent()) { +query = settingsString.get() + query; + } return createJob(databaseName, query, jobTitle, resourceManager); -}else{ +} else { throw new ServiceException("Failed to generate job for {}" + jobTitle); } } @@ -228,32 +237,56 @@ public class DDLProxy { tableMeta.setDatabase(databaseName); } Optional createTableQuery = new CreateTableQueryGenerator(tableMeta).getQuery(); -if(createTableQuery.isPresent()) { +if (createTableQuery.isPresent()) { LOG.info("generated create table query : {}", createTableQuery); return createTableQuery.get(); -}else { +} else { throw new ServiceException("could not generate create table query for database : " + databaseName + " table : " + tableMeta.getTable()); } } public Job createTable(String databaseName, TableMeta tableMeta, JobResourceManager resourceManager)
[35/50] [abbrv] ambari git commit: AMBARI-21307 refactoring - renamed, moved classes, variables
AMBARI-21307 refactoring - renamed, moved classes, variables Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/11bc659c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11bc659c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11bc659c Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 11bc659cc9668014d5640b171a7ec2fe1b744030 Parents: 4d6ec89 Author: lpuskasAuthored: Tue Aug 22 10:03:24 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:49 2017 +0200 -- .../api/services/ldap/AmbariConfiguration.java | 87 +++ .../services/ldap/AmbariConfigurationDTO.java | 67 - .../ldap/LdapCheckConfigurationRequest.java | 47 .../api/services/ldap/LdapConfigOperation.java | 43 .../services/ldap/LdapConfigurationRequest.java | 49 .../services/ldap/LdapConfigurationService.java | 53 +--- .../api/services/ldap/LdapOperationRequest.java | 18 -- .../server/ldap/LdapConfigurationService.java | 60 + .../ldap/LdapConfigurationValidatorService.java | 60 - .../apache/ambari/server/ldap/LdapModule.java | 4 +- .../server/ldap/service/AmbariLdapFacade.java | 10 +- .../ads/DefaultLdapConfigurationService.java| 243 +++ ...efaultLdapConfigurationValidatorService.java | 243 --- .../api/services/ldap/LDAPServiceTest.java | 6 +- .../DefaultLdapConfigurationServiceTest.java| 113 + ...ltLdapConfigurationValidatorServiceTest.java | 113 - 16 files changed, 618 insertions(+), 598 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/11bc659c/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java new file mode 100644 index 000..b5cc921 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java @@ -0,0 +1,87 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services.ldap; + +import java.util.Collections; +import java.util.Map; +import java.util.Set; + +/** + * Domain POJO representing generic ambari configuration data. + */ +public class AmbariConfiguration { + + /** + * The type of the configuration, eg.: ldap-configuration + */ + private String type; + + /** + * Version tag + */ + private String versionTag; + + /** + * Version number + */ + private Integer version; + + /** + * Created timestamp + */ + private long createdTs; + + private Set
[17/50] [abbrv] ambari git commit: AMBARI-22131 Move resources/stacks/HDP/3.0/widgets.json to resources/widgets.json (additional patch) (dsen)
AMBARI-22131 Move resources/stacks/HDP/3.0/widgets.json to resources/widgets.json (additional patch) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8caac37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8caac37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8caac37 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: a8caac375a66911ffb13f38093731158238177ec Parents: c3f6ba7 Author: Dmytro SenAuthored: Thu Oct 12 13:54:07 2017 +0300 Committer: Dmytro Sen Committed: Thu Oct 12 13:54:07 2017 +0300 -- ambari-server/src/main/assemblies/server.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a8caac37/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 37283fa..cbf11c5 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -397,6 +397,11 @@ /var/lib/ambari-server/resources + 755 + src/main/resources/widgets.json + /var/lib/ambari-server/resources + + 644 src/main/resources/slider_resources/README.txt /var/lib/ambari-server/resources/apps
[41/50] [abbrv] ambari git commit: AMBARI-2130 ldap connections handled in thefacade. Code cleanup
AMBARI-2130 ldap connections handled in thefacade. Code cleanup Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c3c6e91 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c3c6e91 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c3c6e91 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 5c3c6e913051219ef42679a5376ccd38c44b5abf Parents: 19827f8 Author: lpuskasAuthored: Tue Sep 12 15:38:25 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:50 2017 +0200 -- .../server/ldap/service/AmbariLdapFacade.java | 51 + .../ldap/service/LdapConnectionService.java | 12 ++- .../ambari/server/ldap/service/LdapFacade.java | 2 +- .../ads/DefaultLdapConfigurationService.java| 77 .../ads/DefaultLdapConnectionService.java | 41 ++- .../OccurranceAndWeightBasedDetector.java | 2 +- 6 files changed, 103 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c3c6e91/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java index f159418..d2bdef3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java @@ -19,7 +19,6 @@ import java.util.Map; import java.util.Set; import javax.inject.Inject; -import javax.inject.Provider; import javax.inject.Singleton; import org.apache.ambari.server.ldap.AmbariLdapConfiguration; @@ -58,35 +57,59 @@ public class AmbariLdapFacade implements LdapFacade { @Inject private LdapAttributeDetectionService ldapAttributeDetectionService; - //todo remove this, added for testing purposes only - @Inject - private Provider ambariLdapConfigurationProvider; - @Inject public AmbariLdapFacade() { } @Override public void checkConnection(AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException { +LdapConnection connection = null; try { + LOGGER.info("Validating LDAP connection related configuration based on: {}", ambariLdapConfiguration); - LdapConnection connection = ldapConnectionService.createLdapConnection(ambariLdapConfiguration); + connection = ldapConnectionService.getBoundLdapConnection(ambariLdapConfiguration); ldapConfigurationService.checkConnection(connection, ambariLdapConfiguration); -} catch (AmbariLdapException e) { + LOGGER.info("Validating LDAP connection related configuration: SUCCESS"); + +} catch (Exception e) { + LOGGER.error("Validating LDAP connection configuration failed", e); - throw e; + throw new AmbariLdapException(e); + +} finally { + try { +connection.unBind(); +connection.close(); + } catch (Exception e) { +throw new AmbariLdapException(e); + } } -LOGGER.info("Validating LDAP connection related configuration: SUCCESS"); + } @Override - public AmbariLdapConfiguration detectAttributes(AmbariLdapConfiguration ambariLdapConfiguration) { + public AmbariLdapConfiguration detectAttributes(AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException { LOGGER.info("Detecting LDAP configuration attributes ..."); -LdapConnection connection = ldapConnectionService.createLdapConnection(ambariLdapConfiguration); -ambariLdapConfiguration = ldapAttributeDetectionService.detectLdapUserAttributes(connection, ambariLdapConfiguration); -return ambariLdapConfiguration; +LdapConnection connection = ldapConnectionService.getBoundLdapConnection(ambariLdapConfiguration); +try { + + ambariLdapConfiguration = ldapAttributeDetectionService.detectLdapUserAttributes(connection, ambariLdapConfiguration); + ambariLdapConfiguration = ldapAttributeDetectionService.detectLdapGroupAttributes(connection, ambariLdapConfiguration); + return ambariLdapConfiguration; + +} catch (Exception e) { + LOGGER.error("Error during LDAP attribute detection", e); + throw new AmbariLdapException(e); +} finally { + try { +connection.unBind(); +connection.close(); + } catch (Exception e) { +throw new AmbariLdapException(e); + } +} } @Override @@ -98,7 +121,7 @@ public class AmbariLdapFacade implements LdapFacade { throw new IllegalArgumentException("No test user available for testing LDAP attributes"); }
[12/50] [abbrv] ambari git commit: AMBARI-22211. RU was not started on Oracle due to missing table (ncole)
AMBARI-22211. RU was not started on Oracle due to missing table (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c1001973 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c1001973 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c1001973 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: c10019736972825c8b60a82c42cfe5713ddbe073 Parents: 323974e Author: Nate ColeAuthored: Wed Oct 11 15:44:03 2017 -0400 Committer: Nate Cole Committed: Wed Oct 11 15:44:03 2017 -0400 -- .../src/main/resources/Ambari-DDL-Oracle-CREATE.sql | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c1001973/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql index 02f6e3e..ebe5f12 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql @@ -846,12 +846,12 @@ CREATE TABLE upgrade_item ( ); CREATE TABLE upgrade_history( - id BIGINT NOT NULL, - upgrade_id BIGINT NOT NULL, + id NUMBER(19) NOT NULL, + upgrade_id NUMBER(19) NOT NULL, service_name VARCHAR2(255) NOT NULL, component_name VARCHAR2(255) NOT NULL, - from_repo_version_id BIGINT NOT NULL, - target_repo_version_id BIGINT NOT NULL, + from_repo_version_id NUMBER(19) NOT NULL, + target_repo_version_id NUMBER(19) NOT NULL, CONSTRAINT PK_upgrade_hist PRIMARY KEY (id), CONSTRAINT FK_upgrade_hist_upgrade_id FOREIGN KEY (upgrade_id) REFERENCES upgrade (upgrade_id), CONSTRAINT FK_upgrade_hist_from_repo FOREIGN KEY (from_repo_version_id) REFERENCES repo_version (repo_version_id),
[28/50] [abbrv] ambari git commit: AMBARI-21307 Draft skimplementation for the user related ldap config attribute validation
AMBARI-21307 Draft skimplementation for the user related ldap config attribute validation Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e01dc8c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e01dc8c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e01dc8c Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 5e01dc8c6983b3e3fb138e5dfd1d774f7d385515 Parents: a1c9adb Author: lpuskasAuthored: Tue Jul 18 17:48:07 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:48 2017 +0200 -- ambari-project/pom.xml | 1 + ambari-server/pom.xml | 5 + .../AmbariConfigurationRequestSwagger.java | 1 - .../services/ldap/AmbariConfigurationDTO.java | 67 +++ .../ldap/LdapCheckConfigurationRequest.java | 47 + .../api/services/ldap/LdapOperationRequest.java | 18 ++ .../api/services/ldap/LdapRequestInfo.java | 61 +++ .../api/services/ldap/LdapRestService.java | 132 ++ .../ambari/server/controller/AmbariServer.java | 3 +- .../server/controller/ControllerModule.java | 1 + .../server/ldap/AmbariLdapConfiguration.java| 129 ++ .../server/ldap/LdapConfigurationFactory.java | 21 +++ .../ldap/LdapConfigurationValidatorService.java | 52 ++ .../apache/ambari/server/ldap/LdapModule.java | 37 .../ldap/service/AmbariLdapException.java | 33 .../server/ldap/service/AmbariLdapFacade.java | 107 +++ .../ambari/server/ldap/service/LdapFacade.java | 52 ++ .../server/ldap/service/LdapSearchService.java | 18 ++ .../ad/AdLdapConfigurationValidatorService.java | 177 +++ .../service/ad/LdapConfigurationConverter.java | 50 ++ .../api/services/ldap/LDAPServiceTest.java | 85 + ...AdLdapConfigurationValidatorServiceTest.java | 129 ++ 22 files changed, 1224 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5e01dc8c/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index 00ba1bc..e4d4423 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -31,6 +31,7 @@ ${project.parent.basedir} 1.6.3 8.1.19.v20160209 +1.0.0 6.19 1.5.10 3.1.4 http://git-wip-us.apache.org/repos/asf/ambari/blob/5e01dc8c/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index e250da7..8d52821 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1689,6 +1689,11 @@ 4.2.2 + org.apache.directory.api + api-all + ${ldap-api.version} + + com.networknt json-schema-validator 0.1.10 http://git-wip-us.apache.org/repos/asf/ambari/blob/5e01dc8c/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java index d6714f9..5e8094e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java @@ -16,7 +16,6 @@ package org.apache.ambari.server.api.services; import java.util.Map; import org.apache.ambari.server.controller.ApiModel; -import org.apache.ambari.server.orm.entities.ConfigurationBaseEntity; import io.swagger.annotations.ApiModelProperty; http://git-wip-us.apache.org/repos/asf/ambari/blob/5e01dc8c/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java new file mode 100644 index 000..1b134fe --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java @@ -0,0 +1,67 @@ +/* + * Licensed 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
[39/50] [abbrv] ambari git commit: AMBARI-21307 Added the supported ldap properties to the code. Refactored existing code relying on these properties
AMBARI-21307 Added the supported ldap properties to the code. Refactored existing code relying on these properties Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/467f5327 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/467f5327 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/467f5327 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 467f5327099f80a166407e4fcdd5a4b3df9cf0f0 Parents: 81ff7b4 Author: lpuskasAuthored: Fri Sep 8 13:57:25 2017 +0300 Committer: lpuskas Committed: Thu Oct 12 19:25:50 2017 +0200 -- .../server/ldap/AmbariLdapConfiguration.java| 189 --- .../AmbariLdapConfigurationProvider.java| 6 +- .../server/ldap/service/AmbariLdapFacade.java | 10 +- .../service/LdapAttributeDetectionService.java | 43 + .../ambari/server/ldap/service/LdapFacade.java | 2 +- .../ads/DefaultAttributeDetectionService.java | 47 + .../ads/DefaultLdapConfigurationService.java| 4 +- .../ads/DefaultLdapConnectionService.java | 4 +- .../DefaultAttributeDetectionServiceTest.java | 102 ++ .../DefaultLdapConfigurationServiceTest.java| 30 ++- 10 files changed, 348 insertions(+), 89 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/467f5327/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index e913e77..76faeed 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java @@ -34,63 +34,67 @@ public class AmbariLdapConfiguration { /** * Constants representing supported LDAP related property names */ - public enum LdapConfigProperty { -LDAP_CONFIGURED("ambari.ldap.configured"), -AUTOMATIC_ATTRIBUTE_DETECTION("ambari.ldap.automatic.attribute.detection"), -USE_SSL("ambari.ldap.usessl"), -LDAP_SERVER_HOST("ambari.ldap.server.host"), -LDAP_SERVER_PORT("ambari.ldap.server.port"), -LDAP_TRUSTSTORE("ambari.ldap.truststore"), -LDAP_TRUSTSTORE_TYPE("ambari.ldap.truststore.type"), -LDAP_TRUSTSTORE_PATH("ambari.ldap.truststore.path"), -LDAP_TRUSTSTORE_PASSWORD("ambari.ldap.truststore.password"), -BASE_DN("ambari.ldap.bind.dn"), -REFERRAL("ambari.ldap.referral"), -PAGINATION_ENABLED("ambari.ldap.pagination.enabled"), - -BIND_ANONIMOUSLY("ambari.ldap.bindanonymously"), -MANAGER_DN("ambari.ldap.managerdn"), -MANAGER_PASSWORD("ambari.ldap.managerpassword"), -USER_OBJECT_CLASS("ambari.ldap.user.object.class"), -USER_NAME_ATTRIBUTE("ambari.ldap.user.name.attribute"), -USER_NAME_FORCE_LOWERCASE("ambari.ldap.username.force.lowercase"), -USER_SEARCH_BASE("ambari.ldap.user.search.base"), - SYNC_USER_MEMBER_REPLACE_PATTERN("ambari.ldap.sync.user.member.replacepattern"), -SYNC_USER_MEMBER_FILTER("ambari.ldap.sync.user.member_filter"), - -ADMIN_GROUP_MAPPING_RULES ("ambari.ldap.admin.group.mappingrules"), -GROUP_OBJECT_CLASS("ambari.ldap.group.object.class"), -GROUP_NAME_ATTRIBUTE("ambari.ldap.group.name.attribute"), -GROUP_MEMBER_ATTRIBUTE("ambari.ldap.group.member.attribute"), -GROUP_SEARCH_BASE("ambari.ldap.group.search.base"), - SYNC_GROUP_MEMBER_REPLACE_PATTERN("ambari.ldap.sync.group.member.replacepattern"), -SYNC_GROUP_MEMBER_FILTER("ambari.ldap.sync.group.member_filter"), -DN_ATTRIBUTE("authentication.ldap.dnAttribute"), - -TEST_USER_NAME("ambari.ldap.test.user.name"), -TEST_USER_PASSWORD("ambari.ldap.test.user.password"); + public enum AmbariLdapConfig { + +LDAP_ENABLED("ambari.ldap.authentication.enabled"), +SERVER_HOST("ambari.ldap.connectivity.server.host"), +SERVER_PORT("ambari.ldap.connectivity.server.port"), +USE_SSL("ambari.ldap.connectivity.use_ssl"), + +TRUST_STORE("ambari.ldap.connectivity.trust_store"), +TRUST_STORE_TYPE("ambari.ldap.connectivity.trust_store.type"), +TRUST_STORE_PATH("ambari.ldap.connectivity.trust_store.path"), +TRUST_STORE_PASSWORD("ambari.ldap.connectivity.trust_store.password"), +ANONYMOUS_BIND("ambari.ldap.connectivity.anonymous_bind"), + +BIND_DN("ambari.ldap.connectivity.bind_dn"), +BIND_PASSWORD("ambari.ldap.connectivity.bind_password"), + +ATTR_DETECTION("ambari.ldap.attributes.detection"), // manual | auto + +DN_ATTRIBUTE("ambari.ldap.attributes.dn_attr"), + +
[26/50] [abbrv] ambari git commit: AMBARI-21307 Rest resource for supporting ambari configurations
AMBARI-21307 Rest resource for supporting ambari configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ef38500d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ef38500d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ef38500d Branch: refs/heads/feature-branch-AMBARI-21307 Commit: ef38500d01792f2eb1672edb30a617edd29e2d52 Parents: d88d3cc Author: lpuskasAuthored: Wed Jul 5 14:20:18 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:47 2017 +0200 -- .../resources/ResourceInstanceFactoryImpl.java | 4 + .../services/AmbariConfigurationService.java| 146 +++ .../internal/AbstractProviderModule.java| 2 +- .../AmbariConfigurationResourceProvider.java| 247 +++ .../internal/DefaultProviderModule.java | 26 +- .../ambari/server/controller/spi/Resource.java | 5 +- .../server/orm/dao/AmbariConfigurationDAO.java | 92 +++ .../orm/entities/AmbariConfigurationEntity.java | 70 ++ .../orm/entities/ConfigurationBaseEntity.java | 159 .../authorization/RoleAuthorization.java| 95 +++ .../resources/Ambari-DDL-Postgres-CREATE.sql| 25 +- .../src/main/resources/META-INF/persistence.xml | 2 + 12 files changed, 809 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ef38500d/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java -- 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 d0d115d..f5fb6e9 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 @@ -471,6 +471,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { case RemoteCluster: resourceDefinition = new RemoteClusterResourceDefinition(); break; + case AmbariConfiguration: +resourceDefinition = new SimpleResourceDefinition(Resource.Type.AmbariConfiguration, "ambariconfiguration", "ambariconfigurations"); + +break; default: throw new IllegalArgumentException("Unsupported resource type: " + type); http://git-wip-us.apache.org/repos/asf/ambari/blob/ef38500d/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java new file mode 100644 index 000..0fa6e44 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java @@ -0,0 +1,146 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services; + +import java.util.Collections; + +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +import org.apache.ambari.server.controller.spi.Resource; +import org.apache.http.HttpStatus; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +/** + * Rest endpoint for managing ambari configurations. Supports CRUD operations. + * Ambari configurations are resources that relate to the ambari server instance even before a cluster is provisioned. + * + * Ambari
[16/50] [abbrv] ambari git commit: AMBARI-22147 Move stacks/HDP/3.0/kerberos.json to stacks/kerberos.json (dsen)
AMBARI-22147 Move stacks/HDP/3.0/kerberos.json to stacks/kerberos.json (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c3f6ba76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3f6ba76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3f6ba76 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: c3f6ba7621963b1086b7d9754d49b8663c7892b5 Parents: 3acfa5c Author: Dmytro SenAuthored: Thu Oct 12 13:52:31 2017 +0300 Committer: Dmytro Sen Committed: Thu Oct 12 13:52:31 2017 +0300 -- ambari-server/src/main/assemblies/server.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f6ba76/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 3079d1b..37283fa 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -392,6 +392,11 @@ /var/lib/ambari-server/resources + 755 + src/main/resources/kerberos.json + /var/lib/ambari-server/resources + + 644 src/main/resources/slider_resources/README.txt /var/lib/ambari-server/resources/apps
[06/50] [abbrv] ambari git commit: AMBARI-22194 - Prevent Patch Upgrades With Known Service Incompatibilities (jonathanhurley)
AMBARI-22194 - Prevent Patch Upgrades With Known Service Incompatibilities (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c19f363c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c19f363c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c19f363c Branch: refs/heads/feature-branch-AMBARI-21307 Commit: c19f363c86623fd42d285717e6e95b9036ad Parents: 8ec33db Author: Jonathan HurleyAuthored: Tue Oct 10 15:42:30 2017 -0400 Committer: Jonathan Hurley Committed: Wed Oct 11 09:08:27 2017 -0400 -- .../server/checks/AbstractCheckDescriptor.java | 81 +++-- .../ambari/server/checks/CheckDescription.java | 8 ++ .../RequiredServicesInRepositoryCheck.java | 91 +++ .../ambari/server/checks/UpgradeCheck.java | 11 ++ .../ClusterStackVersionResourceProvider.java| 26 + .../ambari/server/state/RepositoryType.java | 18 +++ .../server/state/repository/StackPackage.java | 69 +++ .../state/repository/VersionDefinitionXml.java | 87 ++ .../HDP/2.0.6/properties/stack_packages.json| 6 +- .../checks/AbstractCheckDescriptorTest.java | 3 + .../checks/AutoStartDisabledCheckTest.java | 12 +- .../checks/ClientRetryPropertyCheckTest.java| 2 + .../checks/ComponentExistsInRepoCheckTest.java | 2 + .../checks/ComponentsInstallationCheckTest.java | 3 + .../checks/ConfigurationMergeCheckTest.java | 2 + .../checks/DruidHighAvailabilityCheckTest.java | 2 + .../checks/HiveMultipleMetastoreCheckTest.java | 3 + .../checks/HiveNotRollingWarningTest.java | 3 + .../server/checks/HostsHeartbeatCheckTest.java | 2 + .../checks/HostsMasterMaintenanceCheckTest.java | 5 +- .../checks/HostsRepositoryVersionCheckTest.java | 2 + .../server/checks/InstallPackagesCheckTest.java | 2 + .../server/checks/KafkaKerberosCheckTest.java | 2 + ...duce2JobHistoryStatePreservingCheckTest.java | 2 + .../server/checks/RangerAuditDbCheckTest.java | 3 + .../server/checks/RangerPasswordCheckTest.java | 3 + .../server/checks/RangerSSLConfigCheckTest.java | 3 + .../RequiredServicesInRepositoryCheckTest.java | 116 +++ .../SecondaryNamenodeDeletedCheckTest.java | 3 + .../ServicesMaintenanceModeCheckTest.java | 2 + ...vicesMapReduceDistributedCacheCheckTest.java | 3 + ...rvicesNamenodeHighAvailabilityCheckTest.java | 3 + .../ServicesNamenodeTruncateCheckTest.java | 2 + .../ServicesTezDistributedCacheCheckTest.java | 3 + .../server/checks/ServicesUpCheckTest.java | 2 + .../ServicesYarnWorkPreservingCheckTest.java| 2 + .../server/checks/StormShutdownWarningTest.java | 3 + .../ambari/server/state/CheckHelperTest.java| 7 ++ 38 files changed, 588 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c19f363c/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java index 6726d30..478489d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java @@ -35,6 +35,7 @@ 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.DesiredConfig; +import org.apache.ambari.server.state.RepositoryType; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.repository.ClusterVersionSummary; import org.apache.ambari.server.state.repository.VersionDefinitionXml; @@ -44,11 +45,11 @@ import org.apache.ambari.server.state.stack.PrerequisiteCheck; import org.apache.ambari.server.state.stack.UpgradePack; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; import org.apache.ambari.server.state.stack.upgrade.UpgradeType; +import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import com.google.common.collect.Lists; +import com.google.gson.Gson; import com.google.inject.Inject; import com.google.inject.Provider; @@ -57,8 +58,6 @@ import com.google.inject.Provider; */ public abstract class AbstractCheckDescriptor { - private static final Logger LOG = LoggerFactory.getLogger(AbstractCheckDescriptor.class); -
[30/50] [abbrv] ambari git commit: AMBARI-21545 Stack Advisor support for LDAP configuration (benyoka)
AMBARI-21545 Stack Advisor support for LDAP configuration (benyoka) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc26d127 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc26d127 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc26d127 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: fc26d1277d1dbd3c6877219fb3019f33a8560b34 Parents: ea687f3 Author: Balazs Bence SariAuthored: Tue Aug 8 20:17:14 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:48 2017 +0200 -- .../services/AmbariConfigurationService.java| 4 +- .../stackadvisor/StackAdvisorRequest.java | 12 ++ .../commands/StackAdvisorCommand.java | 54 + .../commands/StackAdvisorCommandTest.java | 212 +++ .../StackAdvisorResourceProviderTest.java | 97 - 5 files changed, 324 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc26d127/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java index 0632361..927e518 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java @@ -56,9 +56,9 @@ import io.swagger.annotations.ApiResponses; *"data": [ *{ * "authentication.ldap.primaryUrl": "localhost:33389" - "authentication.ldap.secondaryUrl": "localhost:333" + * "authentication.ldap.secondaryUrl": "localhost:333" * "authentication.ldap.baseDn": "dc=ambari,dc=apache,dc=org" - * // .. + * // .. * ] * } * http://git-wip-us.apache.org/repos/asf/ambari/blob/fc26d127/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java index 3a2b488..cd26c56 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java @@ -31,6 +31,8 @@ import org.apache.ambari.server.api.services.stackadvisor.recommendations.Recomm import org.apache.ambari.server.state.ChangedConfigInfo; import org.apache.commons.lang.StringUtils; +import com.google.common.base.Preconditions; + /** * Stack advisor request. */ @@ -48,6 +50,7 @@ public class StackAdvisorRequest { private List changedConfigurations = new LinkedList<>(); private Set configGroups; private Map userContext = new HashMap<>(); + private Map ldapConfig = new HashMap<>(); public String getStackName() { return stackName; @@ -93,6 +96,8 @@ public class StackAdvisorRequest { return configurations; } + public Map getLdapConfig() { return ldapConfig; } + public List getChangedConfigurations() { return changedConfigurations; } @@ -189,6 +194,13 @@ public class StackAdvisorRequest { return this; } +public StackAdvisorRequestBuilder withLdapConfig(Map ldapConfig) { + Preconditions.checkNotNull(ldapConfig); + this.instance.ldapConfig = ldapConfig; + return this; +} + + public StackAdvisorRequest build() { return this.instance; } http://git-wip-us.apache.org/repos/asf/ambari/blob/fc26d127/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java index 356754d..2dc45de 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java +++
[29/50] [abbrv] ambari git commit: AMBARI-21307 Groups for the test user returned to the caller
AMBARI-21307 Groups for the test user returned to the caller Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea687f3b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea687f3b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea687f3b Branch: refs/heads/feature-branch-AMBARI-21307 Commit: ea687f3bbb44f236dd1205125cbb0e7dd7592370 Parents: 79cf10d Author: lpuskasAuthored: Tue Aug 8 15:50:29 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:48 2017 +0200 -- .../api/services/ldap/LdapRestService.java | 16 +- .../server/ldap/AmbariLdapConfiguration.java| 2 +- .../apache/ambari/server/ldap/LdapModule.java | 3 + .../server/ldap/service/AmbariLdapFacade.java | 3 +- .../ambari/server/ldap/service/LdapFacade.java | 3 +- ...efaultLdapConfigurationValidatorService.java | 25 ++--- .../ad/DefaultLdapConnectionService.java| 2 +- ...ltLdapConfigurationValidatorServiceTest.java | 59 +++- 8 files changed, 49 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea687f3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java index 33b10fa..8578204 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java @@ -28,6 +28,8 @@ package org.apache.ambari.server.api.services.ldap; +import java.util.Set; + import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.POST; @@ -41,12 +43,16 @@ import org.apache.ambari.server.api.services.BaseService; import org.apache.ambari.server.api.services.Result; import org.apache.ambari.server.api.services.ResultImpl; import org.apache.ambari.server.api.services.ResultStatus; +import org.apache.ambari.server.controller.internal.ResourceImpl; +import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.ldap.AmbariLdapConfiguration; import org.apache.ambari.server.ldap.LdapConfigurationFactory; import org.apache.ambari.server.ldap.service.LdapFacade; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.collect.Sets; + /** * Endpoint designated to LDAP specific operations. */ @@ -68,6 +74,8 @@ public class LdapRestService extends BaseService { @Consumes(MediaType.APPLICATION_JSON) public Response validateConfiguration(LdapCheckConfigurationRequest ldapCheckConfigurationRequest) { +Set groups = Sets.newHashSet(); + Result result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.OK)); try { @@ -86,7 +94,11 @@ public class LdapRestService extends BaseService { case "test-attributes": LOGGER.info("Testing LDAP attributes "); - ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); + groups = ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); + // todo factor out the resource creation, design better the structure in the response + Resource resource = new ResourceImpl(Resource.Type.AmbariConfiguration); + resource.setProperty("groups", groups); + result.getResultTree().addChild(resource, "payload"); break; case "detect-attributes": @@ -101,7 +113,7 @@ public class LdapRestService extends BaseService { } } catch (Exception e) { - result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, e)); + result.setResultStatus(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, e)); } return Response.status(result.getStatus().getStatusCode()).entity(getResultSerializer().serialize(result)).build(); http://git-wip-us.apache.org/repos/asf/ambari/blob/ea687f3b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index a6ff80b..8ab587b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++
[38/50] [abbrv] ambari git commit: AMBARI-21307 Testing the attribute detection - fixing bugs, cleanup
AMBARI-21307 Testing the attribute detection - fixing bugs, cleanup Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/953a98fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/953a98fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/953a98fc Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 953a98fc8e12ed9d7dc90296f52087e52bb58311 Parents: 5c3c6e9 Author: lpuskasAuthored: Tue Sep 12 18:58:44 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:50 2017 +0200 -- .../api/services/ldap/LdapConfigurationService.java | 11 +++ .../ambari/server/ldap/AmbariLdapConfiguration.java | 2 +- .../org/apache/ambari/server/ldap/LdapModule.java| 3 +++ .../ambari/server/ldap/service/AmbariLdapFacade.java | 6 ++ .../ads/DefaultAttributeDetectionService.java| 15 +++ .../service/ads/DefaultLdapConfigurationService.java | 3 --- .../ads/detectors/GroupMemberAttrDetector.java | 3 +++ .../service/ads/detectors/GroupNameAttrDetector.java | 3 +++ .../ads/detectors/GroupObjectClassDetector.java | 3 +++ .../ads/detectors/UserGroupMemberAttrDetector.java | 3 +++ .../service/ads/detectors/UserNameAttrDetector.java | 3 +++ .../ads/DefaultAttributeDetectionServiceTest.java| 3 +-- .../ads/DefaultLdapConfigurationServiceTest.java | 4 ++-- 13 files changed, 42 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/953a98fc/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java index 66809c3..ae47a87 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -86,6 +86,7 @@ public class LdapConfigurationService extends AmbariConfigurationService { authorize(); Set groups = Sets.newHashSet(); +Object responseEntity = null; Result result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.OK)); try { @@ -108,13 +109,14 @@ public class LdapConfigurationService extends AmbariConfigurationService { LOGGER.info("Testing LDAP attributes "); groups = ldapFacade.checkLdapAttributes(ldapConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); - setResult(groups, result); + responseEntity = groups; break; case DETECT_ATTRIBUTES: LOGGER.info("Detecting LDAP attributes ..."); - ldapFacade.detectAttributes(ambariLdapConfiguration); + ambariLdapConfiguration = ldapFacade.detectAttributes(ambariLdapConfiguration); + responseEntity = ambariLdapConfiguration; break; default: @@ -123,10 +125,11 @@ public class LdapConfigurationService extends AmbariConfigurationService { } } catch (Exception e) { - result.setResultStatus(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, e)); + result.setResultStatus(new ResultStatus(ResultStatus.STATUS.SERVER_ERROR, e)); + responseEntity = e.getMessage(); } -return Response.status(result.getStatus().getStatusCode()).entity(getResultSerializer().serialize(result)).build(); +return Response.status(result.getStatus().getStatusCode()).entity(responseEntity).build(); } private void setResult(Set groups, Result result) { http://git-wip-us.apache.org/repos/asf/ambari/blob/953a98fc/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index ebb567d..5bdda7a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java @@ -62,7 +62,7 @@ public class AmbariLdapConfiguration { GROUP_OBJECT_CLASS("ambari.ldap.attributes.group.object_class"), GROUP_NAME_ATTRIBUTE("ambari.ldap.attributes.group.name_attr"), GROUP_MEMBER_ATTRIBUTE("ambari.ldap.attributes.group.member_attr"), -GROUP_SEARCH_BASE("ambari.ldap.attributes.user.search_base"), +
[27/50] [abbrv] ambari git commit: Added swagger annotations to the new endpoint
Added swagger annotations to the new endpoint Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14f17ff1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14f17ff1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14f17ff1 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 14f17ff1b68f73a0bc38594cb728f9c40fbf06f0 Parents: 799f882 Author: Balázs Bence SáriAuthored: Thu Jul 6 18:36:18 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:47 2017 +0200 -- .../AmbariConfigurationRequestSwagger.java | 48 +++ .../AmbariConfigurationResponseSwagger.java | 40 + .../services/AmbariConfigurationService.java| 62 +--- 3 files changed, 143 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14f17ff1/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java new file mode 100644 index 000..d6714f9 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java @@ -0,0 +1,48 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.services; + +import java.util.Map; + +import org.apache.ambari.server.controller.ApiModel; +import org.apache.ambari.server.orm.entities.ConfigurationBaseEntity; + +import io.swagger.annotations.ApiModelProperty; + +/** + * Request data model for {@link org.apache.ambari.server.api.services.AmbariConfigurationService} + */ +public interface AmbariConfigurationRequestSwagger extends ApiModel { + + @ApiModelProperty(name = "AmbariConfiguration") + AmbariConfigurationRequestInfo getAmbariConfiguration(); + + interface AmbariConfigurationRequestInfo { +@ApiModelProperty +Long getId(); + +@ApiModelProperty +Map getData(); + +@ApiModelProperty +String getType(); + +@ApiModelProperty +Long getVersion(); + +@ApiModelProperty(name = "version_tag") +String getVersionTag(); + } + +} http://git-wip-us.apache.org/repos/asf/ambari/blob/14f17ff1/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java new file mode 100644 index 000..c55ac1d --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java @@ -0,0 +1,40 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.services; + +import java.util.Map; + +import org.apache.ambari.server.controller.ApiModel; + +import io.swagger.annotations.ApiModelProperty; + +/** + * Response data model for {@link org.apache.ambari.server.api.services.AmbariConfigurationService} + */ +public interface AmbariConfigurationResponseSwagger extends ApiModel { + + @ApiModelProperty(name = "AmbariConfiguration") + AmbariConfigurationResponseInfo getAmbariConfigurationResponse(); + + interface AmbariConfigurationResponseInfo { +@ApiModelProperty +Long getId(); + +@ApiModelProperty +Map getData(); + +
[32/50] [abbrv] ambari git commit: AMBARI-21307 renamed package, minor corrections. Changed endpoint name
AMBARI-21307 renamed package, minor corrections. Changed endpoint name Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d97c6500 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d97c6500 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d97c6500 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: d97c6500e56ebd18c44dfda216951a09c0d455c0 Parents: fc26d12 Author: lpuskasAuthored: Mon Aug 14 13:21:07 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:48 2017 +0200 -- .../services/AmbariConfigurationService.java| 2 +- .../api/services/ldap/LdapRestService.java | 15 +- .../server/ldap/AmbariLdapConfiguration.java| 5 +- .../apache/ambari/server/ldap/LdapModule.java | 4 +- ...efaultLdapConfigurationValidatorService.java | 243 --- .../ad/DefaultLdapConnectionService.java| 63 - ...efaultLdapConfigurationValidatorService.java | 243 +++ .../ads/DefaultLdapConnectionService.java | 63 + ...ltLdapConfigurationValidatorServiceTest.java | 113 - ...ltLdapConfigurationValidatorServiceTest.java | 113 + 10 files changed, 435 insertions(+), 429 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d97c6500/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java index 927e518..492509f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java @@ -63,7 +63,7 @@ import io.swagger.annotations.ApiResponses; * } * */ -@Path("/configurations/") +@Path("/ambariconfigs/") @Api(value = "Ambari Configurations", description = "Endpoint for Ambari configuration related operations") public class AmbariConfigurationService extends BaseService { http://git-wip-us.apache.org/repos/asf/ambari/blob/d97c6500/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java index 8578204..4e654dc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java @@ -34,6 +34,7 @@ import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -70,8 +71,9 @@ public class LdapRestService extends BaseService { @POST @ApiIgnore // until documented - @Path("/action") // todo this needs to be moved under the resource + @Path("/validate") // todo this needs to be moved under the resource @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) public Response validateConfiguration(LdapCheckConfigurationRequest ldapCheckConfigurationRequest) { Set groups = Sets.newHashSet(); @@ -95,10 +97,7 @@ public class LdapRestService extends BaseService { LOGGER.info("Testing LDAP attributes "); groups = ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); - // todo factor out the resource creation, design better the structure in the response - Resource resource = new ResourceImpl(Resource.Type.AmbariConfiguration); - resource.setProperty("groups", groups); - result.getResultTree().addChild(resource, "payload"); + setResult(groups, result); break; case "detect-attributes": @@ -119,6 +118,12 @@ public class LdapRestService extends BaseService { return Response.status(result.getStatus().getStatusCode()).entity(getResultSerializer().serialize(result)).build(); } + private void setResult(Set groups, Result result) { +Resource resource = new ResourceImpl(Resource.Type.AmbariConfiguration); +resource.setProperty("groups", groups); +result.getResultTree().addChild(resource, "payload"); + } + private void validateRequest(LdapCheckConfigurationRequest
[31/50] [abbrv] ambari git commit: AMBARI-21307 Draft implementation of the group related attributes
AMBARI-21307 Draft implementation of the group related attributes Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/79cf10d2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/79cf10d2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/79cf10d2 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 79cf10d2b0172771334f2d730abdd36153c9c495 Parents: 5e01dc8 Author: lpuskasAuthored: Tue Aug 8 13:54:29 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:48 2017 +0200 -- .../server/ldap/AmbariLdapConfiguration.java| 22 +- .../ldap/LdapConfigurationValidatorService.java | 34 +-- .../apache/ambari/server/ldap/LdapModule.java | 4 +- .../server/ldap/service/AmbariLdapFacade.java | 25 +- .../ldap/service/LdapConnectionService.java | 35 +++ .../ambari/server/ldap/service/LdapFacade.java | 9 +- .../ad/AdLdapConfigurationValidatorService.java | 177 -- ...efaultLdapConfigurationValidatorService.java | 232 +++ .../ad/DefaultLdapConnectionService.java| 63 + .../service/ad/LdapConfigurationConverter.java | 50 ...AdLdapConfigurationValidatorServiceTest.java | 129 --- ...ltLdapConfigurationValidatorServiceTest.java | 156 + 12 files changed, 552 insertions(+), 384 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/79cf10d2/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index 519f400..a6ff80b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java @@ -53,7 +53,7 @@ public class AmbariLdapConfiguration { GROUP_OBJECT_CLASS("ambari.ldap.group.object.class"), GROUP_NAME_ATTRIBUTE("ambari.ldap.group.name.attribute"), GROUP_MEMBER_ATTRIBUTE("ambari.ldap.group.member.attribute"), -GROUP_SEARCH_BASE("ambari.ldap.group.member.attribute"), +GROUP_SEARCH_BASE("ambari.ldap.group.search.base"), DN_ATTRIBUTE("authentication.ldap.dnAttribute"); private String propertyName; @@ -126,4 +126,24 @@ public class AmbariLdapConfiguration { return (String) configurationValue(LdapConfigProperty.USER_NAME_ATTRIBUTE); } + public String userSearchBase() { +return (String) configurationValue(LdapConfigProperty.USER_SEARCH_BASE); + } + + public String groupObjectClass() { +return (String) configurationValue(LdapConfigProperty.GROUP_OBJECT_CLASS); + } + + public String groupNameAttribute() { +return (String) configurationValue(LdapConfigProperty.GROUP_NAME_ATTRIBUTE); + } + + public String groupMemberAttribute() { +return (String) configurationValue(LdapConfigProperty.GROUP_MEMBER_ATTRIBUTE); + } + + public String groupSearchBase() { +return (String) configurationValue(LdapConfigProperty.GROUP_SEARCH_BASE); + } + } http://git-wip-us.apache.org/repos/asf/ambari/blob/79cf10d2/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationValidatorService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationValidatorService.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationValidatorService.java index 4667721..7efa3b7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationValidatorService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationValidatorService.java @@ -14,8 +14,11 @@ package org.apache.ambari.server.ldap; +import java.util.Set; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ldap.service.AmbariLdapException; +import org.apache.directory.ldap.client.api.LdapConnection; /** * Collection of operations for validating ldap configuration. @@ -26,27 +29,32 @@ public interface LdapConfigurationValidatorService { /** * Tests the connection based on the provided configuration. * - * @param configuration the ambari ldap configuration instance + * @param ldapConnection connection instance + * @param configuration the ambari ldap configuration instance * @throws AmbariLdapException if the connection is not possible */ - void checkConnection(AmbariLdapConfiguration configuration) throws AmbariLdapException; + void checkConnection(LdapConnection ldapConnection,
[43/50] [abbrv] ambari git commit: AMBARI-21307 Extracted config keys into an enum. Organized code (created domain package, moved classes)
AMBARI-21307 Extracted config keys into an enum. Organized code (created domain package, moved classes) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/086826ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/086826ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/086826ee Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 086826eeb3914d233e1b8c08235041403a0a85e2 Parents: 4ad492b Author: lpuskasAuthored: Thu Sep 14 16:33:41 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:51 2017 +0200 -- .../services/ldap/LdapConfigurationService.java | 4 +- .../server/ldap/AmbariLdapConfiguration.java| 232 --- .../server/ldap/LdapConfigurationFactory.java | 34 --- .../apache/ambari/server/ldap/LdapModule.java | 2 + .../ldap/domain/AmbariLdapConfiguration.java| 180 ++ .../ldap/domain/LdapConfigurationFactory.java | 34 +++ .../ldap/service/AmbariLdapConfigKeys.java | 72 ++ .../AmbariLdapConfigurationProvider.java| 4 +- .../server/ldap/service/AmbariLdapFacade.java | 2 +- .../service/LdapAttributeDetectionService.java | 2 +- .../ldap/service/LdapConfigurationService.java | 2 +- .../ldap/service/LdapConnectionService.java | 2 +- .../ambari/server/ldap/service/LdapFacade.java | 2 +- .../DefaultLdapAttributeDetectionService.java | 15 +- .../ads/DefaultLdapConfigurationService.java| 2 +- .../ads/DefaultLdapConnectionService.java | 16 +- ...efaultLdapAttributeDetectionServiceTest.java | 21 +- .../DefaultLdapConfigurationServiceTest.java| 31 +-- 18 files changed, 334 insertions(+), 323 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/086826ee/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java index ae47a87..ff95066 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -46,8 +46,8 @@ import org.apache.ambari.server.api.services.ResultImpl; import org.apache.ambari.server.api.services.ResultStatus; import org.apache.ambari.server.controller.internal.ResourceImpl; import org.apache.ambari.server.controller.spi.Resource; -import org.apache.ambari.server.ldap.AmbariLdapConfiguration; -import org.apache.ambari.server.ldap.LdapConfigurationFactory; +import org.apache.ambari.server.ldap.domain.AmbariLdapConfiguration; +import org.apache.ambari.server.ldap.domain.LdapConfigurationFactory; import org.apache.ambari.server.ldap.service.LdapFacade; import org.apache.ambari.server.security.authorization.AuthorizationException; import org.apache.ambari.server.security.authorization.AuthorizationHelper; http://git-wip-us.apache.org/repos/asf/ambari/blob/086826ee/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java deleted file mode 100644 index 5bdda7a..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Licensed 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.ldap; - -import java.util.Map; - -import javax.inject.Inject; -import javax.inject.Singleton; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.inject.assistedinject.Assisted; - -/** - * This class is an immutable representation of all the LDAP related configurationMap entries. - */ -@Singleton -public class AmbariLdapConfiguration { - - private static final Logger LOGGER =
[45/50] [abbrv] ambari git commit: AMBARI-21307 Refactor - using the LdapConnectionTemplate for ldap operations
AMBARI-21307 Refactor - using the LdapConnectionTemplate for ldap operations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5019446 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5019446 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5019446 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: d50194462051ea2e091e178fa9187a4f5518e2fa Parents: 307f625 Author: lpuskasAuthored: Wed Oct 4 15:54:34 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:51 2017 +0200 -- .../services/ldap/LdapConfigurationService.java | 6 +- .../server/controller/ControllerModule.java | 2 +- .../apache/ambari/server/ldap/LdapModule.java | 12 +- .../domain/AmbariLdapConfigurationFactory.java | 34 + .../ldap/domain/LdapConfigurationFactory.java | 34 - .../AmbariLdapConfigurationProvider.java| 5 +- .../server/ldap/service/AmbariLdapFacade.java | 36 + .../server/ldap/service/AttributeDetector.java | 2 +- .../service/LdapAttributeDetectionService.java | 8 +- .../ldap/service/LdapConfigurationService.java | 22 +-- .../ldap/service/LdapConnectionService.java | 43 -- .../service/LdapConnectionTemplateProvider.java | 56 .../DefaultLdapAttributeDetectionService.java | 129 ++--- .../ads/DefaultLdapConfigurationService.java| 110 +++--- .../ads/DefaultLdapConnectionService.java | 86 --- .../ads/LdapConnectionTemplateFactory.java | 95 .../ads/detectors/GroupMemberAttrDetector.java | 4 +- .../ads/detectors/GroupNameAttrDetector.java| 4 +- .../ads/detectors/GroupObjectClassDetector.java | 4 +- .../OccurranceAndWeightBasedDetector.java | 103 - .../OccurrenceAndWeightBasedDetector.java | 103 + .../detectors/UserGroupMemberAttrDetector.java | 4 +- .../ads/detectors/UserNameAttrDetector.java | 4 +- .../ads/detectors/UserObjectClassDetector.java | 4 +- .../server/ldap/LdapModuleFunctionalTest.java | 143 +++ .../domain/AmbariLdapConfigurationTest.java | 19 --- ...estAmbariAmbariLdapConfigurationFactory.java | 29 .../TestAmbariLdapConfigurationFactory.java | 29 ...efaultLdapAttributeDetectionServiceTest.java | 112 --- .../DefaultLdapConfigurationServiceTest.java| 129 - 30 files changed, 601 insertions(+), 770 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d5019446/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java index ff95066..13f8835 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -47,7 +47,7 @@ import org.apache.ambari.server.api.services.ResultStatus; import org.apache.ambari.server.controller.internal.ResourceImpl; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.ldap.domain.AmbariLdapConfiguration; -import org.apache.ambari.server.ldap.domain.LdapConfigurationFactory; +import org.apache.ambari.server.ldap.domain.AmbariLdapConfigurationFactory; import org.apache.ambari.server.ldap.service.LdapFacade; import org.apache.ambari.server.security.authorization.AuthorizationException; import org.apache.ambari.server.security.authorization.AuthorizationHelper; @@ -72,7 +72,7 @@ public class LdapConfigurationService extends AmbariConfigurationService { private static LdapFacade ldapFacade; @Inject - private static LdapConfigurationFactory ldapConfigurationFactory; + private static AmbariLdapConfigurationFactory ambariLdapConfigurationFactory; @POST @@ -93,7 +93,7 @@ public class LdapConfigurationService extends AmbariConfigurationService { validateRequest(ldapConfigurationRequest); - AmbariLdapConfiguration ambariLdapConfiguration = ldapConfigurationFactory.createLdapConfiguration( + AmbariLdapConfiguration ambariLdapConfiguration = ambariLdapConfigurationFactory.createLdapConfiguration( ldapConfigurationRequest.getAmbariConfiguration().getData().iterator().next()); LdapConfigOperation action = LdapConfigOperation.fromAction(ldapConfigurationRequest.getRequestInfo().getAction());
[20/50] [abbrv] ambari git commit: AMBARI-22212.Alter logic for storing interpreter.json(Prabhjyot Singh via Venkata Sairam)
AMBARI-22212.Alter logic for storing interpreter.json(Prabhjyot Singh via Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be605cbf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be605cbf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be605cbf Branch: refs/heads/feature-branch-AMBARI-21307 Commit: be605cbfdc977ff927df89fc772b8fbb1f589fce Parents: 3c3b1b8 Author: Venkata SairamAuthored: Thu Oct 12 17:17:07 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:17:07 2017 +0530 -- .../ZEPPELIN/0.7.0/package/scripts/master.py| 69 +--- .../ZEPPELIN/0.7.0/package/scripts/params.py| 5 ++ .../stacks/2.6/ZEPPELIN/test_zeppelin_070.py| 52 +++ 3 files changed, 44 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be605cbf/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 eaa2cb9..a8b1b32 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 @@ -242,6 +242,17 @@ class Master(Script): if zeppelin_spark_dependencies and os.path.exists(zeppelin_spark_dependencies[0]): self.create_zeppelin_dir(params) +if params.conf_stored_in_hdfs: + if not self.is_path_exists_in_HDFS(self.get_zeppelin_conf_FS_directory(params), params.zeppelin_user): +# hdfs dfs -mkdir {zeppelin's conf directory} +params.HdfsResource(self.get_zeppelin_conf_FS_directory(params), +type="directory", +action="create_on_execute", +owner=params.zeppelin_user, +recursive_chown=True, +recursive_chmod=True +) + # if first_setup: if not glob.glob(params.conf_dir + "/interpreter.json") and \ not os.path.exists(params.conf_dir + "/interpreter.json"): @@ -323,21 +334,16 @@ class Master(Script): import json interpreter_config = os.path.join(params.conf_dir, "interpreter.json") -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and params.config['configurations']['zeppelin-config']['zeppelin.notebook.storage'] == 'org.apache.zeppelin.notebook.repo.FileSystemNotebookRepo': - - if 'zeppelin.config.fs.dir' in params.config['configurations']['zeppelin-config']: -zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) - -if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): - # copy from hdfs to /etc/zeppelin/conf/interpreter.json - kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) - kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") - shell.call(format("rm {interpreter_config};" -"{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), - user=params.zeppelin_user) -else: - Logger.info(format("{zeppelin_conf_fs} does not exist. Skipping upload of DFS.")) +if params.conf_stored_in_hdfs: + zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) + + if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): +# copy from hdfs to /etc/zeppelin/conf/interpreter.json +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) +kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") +shell.call(format("rm {interpreter_config};" + "{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), + user=params.zeppelin_user) config_content = sudo.read_file(interpreter_config) config_data = json.loads(config_content) @@ -353,28 +359,15 @@ class Master(Script): owner=params.zeppelin_user, content=json.dumps(config_data, indent=2)) -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and
[37/50] [abbrv] ambari git commit: AMBARI-21307 implemented user attribute detection. Organized code
AMBARI-21307 implemented user attribute detection. Organized code Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8da0065b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8da0065b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8da0065b Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 8da0065b0d7801feb0d22c0b672f4606a79ec48b Parents: 467f532 Author: lpuskasAuthored: Tue Sep 12 08:10:47 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:50 2017 +0200 -- .../services/ldap/LdapConfigurationService.java | 2 +- .../server/ldap/AmbariLdapConfiguration.java| 9 ++ .../server/ldap/service/AmbariLdapFacade.java | 2 +- .../server/ldap/service/AttributeDetector.java | 38 ++ .../service/LdapAttributeDetectionService.java | 7 +- .../ambari/server/ldap/service/LdapFacade.java | 2 +- .../server/ldap/service/LdapSearchService.java | 18 --- .../ads/DefaultAttributeDetectionService.java | 132 ++- .../ads/DefaultLdapConfigurationService.java| 2 +- .../ldap/service/ads/ObjectClassDetector.java | 81 .../ads/OccurranceAndWeightBasedDetector.java | 81 .../service/ads/UserNameAttributeDetector.java | 75 +++ .../DefaultAttributeDetectionServiceTest.java | 35 ++--- 13 files changed, 440 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8da0065b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java index 1b8427b..66809c3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -107,7 +107,7 @@ public class LdapConfigurationService extends AmbariConfigurationService { case TEST_ATTRIBUTES: LOGGER.info("Testing LDAP attributes "); - groups = ldapFacade.checkLdapAttibutes(ldapConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); + groups = ldapFacade.checkLdapAttributes(ldapConfigurationRequest.getRequestInfo().getParameters(), ambariLdapConfiguration); setResult(groups, result); break; http://git-wip-us.apache.org/repos/asf/ambari/blob/8da0065b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index 76faeed..e28c6ed 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java @@ -98,6 +98,10 @@ public class AmbariLdapConfiguration { return value; } + public void setValueFor(AmbariLdapConfig ambariLdapConfig, Object value) { +configurationMap.put(ambariLdapConfig.key(), value); + } + @Inject public AmbariLdapConfiguration(@Assisted Map configuration) { this.configurationMap = configuration; @@ -219,4 +223,9 @@ public class AmbariLdapConfiguration { return (String) configValue(AmbariLdapConfig.REFERRAL_HANDLING); } + + @Override + public String toString() { +return configurationMap.toString(); + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/8da0065b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java index 16bf6b7..f159418 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java @@ -90,7 +90,7 @@ public class AmbariLdapFacade implements LdapFacade { } @Override - public Set checkLdapAttibutes(Map parameters, AmbariLdapConfiguration ldapConfiguration) throws AmbariLdapException { + public Set checkLdapAttributes(Map parameters,
[34/50] [abbrv] ambari git commit: AMBARI-21307 LDAP config rest service implementation extends the ambari config rest implementaiton
AMBARI-21307 LDAP config rest service implementation extends the ambari config rest implementaiton Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d6ec890 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d6ec890 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d6ec890 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 4d6ec8903f15f0a2e68bd253e2b20a3d874573bd Parents: d97c650 Author: lpuskasAuthored: Mon Aug 21 15:53:45 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:49 2017 +0200 -- .../services/ldap/LdapConfigurationService.java | 208 +++ .../api/services/ldap/LdapRestService.java | 149 - 2 files changed, 208 insertions(+), 149 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6ec890/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java new file mode 100644 index 000..52244bc --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -0,0 +1,208 @@ +/* + * Licensed 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. + */ + +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.api.services.ldap; + +import java.util.Set; + +import javax.inject.Inject; +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import org.apache.ambari.annotations.ApiIgnore; +import org.apache.ambari.server.StaticallyInject; +import org.apache.ambari.server.api.services.AmbariConfigurationService; +import org.apache.ambari.server.api.services.Result; +import org.apache.ambari.server.api.services.ResultImpl; +import org.apache.ambari.server.api.services.ResultStatus; +import org.apache.ambari.server.controller.internal.ResourceImpl; +import org.apache.ambari.server.controller.spi.Resource; +import org.apache.ambari.server.ldap.AmbariLdapConfiguration; +import org.apache.ambari.server.ldap.LdapConfigurationFactory; +import org.apache.ambari.server.ldap.service.LdapFacade; +import org.apache.ambari.server.security.authorization.AuthorizationException; +import org.apache.ambari.server.security.authorization.AuthorizationHelper; +import org.apache.ambari.server.security.authorization.ResourceType; +import org.apache.ambari.server.security.authorization.RoleAuthorization; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.core.Authentication; + +import com.google.common.collect.Sets; + +/** + * Endpoint designated to LDAP specific operations. + */ +@StaticallyInject +@Path("/ldapconfigs/") +public class LdapConfigurationService extends AmbariConfigurationService { + + private static final Logger LOGGER = LoggerFactory.getLogger(LdapConfigurationService.class); + + @Inject + private static LdapFacade ldapFacade; + + @Inject + private static LdapConfigurationFactory ldapConfigurationFactory; + + /** + * Actions supported by this endpoint + */ + private enum LdapAction { +TEST_CONNECTION("test-connection"), +TEST_ATTRIBUTES("test-attributes"), +DETECT_ATTRIBUTES("detect-attributes"); + +private String actionStr; + +LdapAction(String actionStr) { + this.actionStr = actionStr; +} + +public static LdapAction fromAction(String action) { +
[13/50] [abbrv] ambari git commit: AMBARI-22191. Account for merge buffers while calculating druid processing buffer size. (nishantmonu51)
AMBARI-22191. Account for merge buffers while calculating druid processing buffer size. (nishantmonu51) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85fb356c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85fb356c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85fb356c Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 85fb356ccd13669359810e767da14d014018bac9 Parents: c100197 Author: NishantAuthored: Thu Oct 12 02:58:58 2017 +0530 Committer: Nishant Committed: Thu Oct 12 02:58:58 2017 +0530 -- .../resources/stacks/HDP/2.6/services/stack_advisor.py | 2 +- .../test/python/stacks/2.6/common/test_stack_advisor.py | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85fb356c/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py index 38af525..94f28db 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py @@ -159,7 +159,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor): putComponentProperty('druid.processing.numMergeBuffers', numMergeBuffers) totalAvailableMemInMb = self.getMinMemory(component_hosts) / 1024 maxAvailableBufferSizeInMb = totalAvailableMemInMb/(processingThreads + numMergeBuffers) - putComponentProperty('druid.processing.buffer.sizeBytes', self.getDruidProcessingBufferSizeInMb(totalAvailableMemInMb) * 1024 * 1024) + putComponentProperty('druid.processing.buffer.sizeBytes', self.getDruidProcessingBufferSizeInMb(maxAvailableBufferSizeInMb) * 1024 * 1024) # returns the recommended druid processing buffer size in Mb. http://git-wip-us.apache.org/repos/asf/ambari/blob/85fb356c/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py index 1c937b7..ade08c1 100644 --- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py @@ -985,7 +985,7 @@ class TestHDP26StackAdvisor(TestCase): "href": "/api/v1/hosts/c6402.ambari.apache.org", "Hosts": { "cpu_count": 1, -"total_mem": 1922680, +"total_mem": 622680, "disk_info": [ {"mountpoint": "/"}, {"mountpoint": "/dev/shm"}, @@ -1091,12 +1091,12 @@ class TestHDP26StackAdvisor(TestCase): 'properties': {'druid.processing.numThreads': '2', 'druid.server.http.numThreads': '40', 'druid.processing.numMergeBuffers': '2', - 'druid.processing.buffer.sizeBytes': '536870912'}}, + 'druid.processing.buffer.sizeBytes': '134217728'}}, 'druid-broker': { 'properties': {'druid.processing.numThreads': '1', 'druid.server.http.numThreads': '40', 'druid.processing.numMergeBuffers': '2', - 'druid.processing.buffer.sizeBytes': '268435456'}}, + 'druid.processing.buffer.sizeBytes': '67108864'}}, 'druid-common': {'properties': {'druid.extensions.loadList': '[]', 'druid.metadata.storage.connector.port': '1527', 'druid.metadata.storage.connector.connectURI': 'jdbc:derby://c6401.ambari.apache.org:1527/druid;create=true', @@ -1108,7 +1108,7 @@ class TestHDP26StackAdvisor(TestCase): 'druid.middlemanager.jvm.heap.memory': { 'maximum': '49152'}, 'druid.historical.jvm.heap.memory': {'maximum': '3755'}, - 'druid.broker.jvm.heap.memory': {'maximum': '1877' +
[15/50] [abbrv] ambari git commit: AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)
AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3acfa5c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3acfa5c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3acfa5c1 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 3acfa5c12708ff00c896943cd44e81b0a9ec85d1 Parents: 5de82da Author: Mugdha VaradkarAuthored: Thu Oct 12 14:26:43 2017 +0530 Committer: Mugdha Varadkar Committed: Thu Oct 12 14:35:59 2017 +0530 -- .../0.4.0/package/scripts/ranger_admin.py | 23 +++ .../0.4.0/package/scripts/ranger_tagsync.py | 23 +++ .../1.0.0.3.0/package/scripts/ranger_admin.py | 24 +++- .../1.0.0.3.0/package/scripts/ranger_tagsync.py | 23 +++ 4 files changed, 75 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py index 848b137..d0a725a 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management.core.exceptions import Fail from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.libraries.script import Script from resource_management.core.resources.system import Execute, File from resource_management.core.exceptions import ComponentIsNotRunning @@ -199,11 +200,25 @@ class RangerAdmin(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if upgrade_stack is None: - raise Fail('Unable to determine the stack and stack version') +orchestration = stack_select.PACKAGE_SCOPE_STANDARD +summary = upgrade_summary.get_upgrade_summary() -stack_select.select_packages(params.version) +if summary is not None: + orchestration = summary.orchestration + if orchestration is None: +raise Fail("The upgrade summary does not contain an orchestration type") + + if orchestration.upper() in stack_select._PARTIAL_ORCHESTRATION_SCOPES: +orchestration = stack_select.PACKAGE_SCOPE_PATCH + +stack_select_packages = stack_select.get_packages(orchestration, service_name = "RANGER", component_name = "RANGER_ADMIN") +if stack_select_packages is None: + raise Fail("Unable to get packages for stack-select") + +Logger.info("RANGER_ADMIN component will be stack-selected to version {0} using a {1} orchestration".format(params.version, orchestration.upper())) + +for stack_select_package_name in stack_select_packages: + stack_select.select(stack_select_package_name, params.version) def get_log_folder(self): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py index 3aae8ff..b1a1819 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py @@ -19,6 +19,7 @@ limitations under the License. """ from resource_management.libraries.script import Script from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.core.resources.system import Execute, File from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.core.exceptions import ComponentIsNotRunning @@ -102,11 +103,25 @@ class RangerTagsync(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if upgrade_stack is None: - raise Fail('Unable to determine
[02/50] [abbrv] ambari git commit: AMBARI-22162. Move out the druid configurations from hive-site to hive-interactive-site. (Slim Bouguerra via Swapan Shridhar).
AMBARI-22162. Move out the druid configurations from hive-site to hive-interactive-site. (Slim Bouguerra via Swapan Shridhar). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7e885a39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7e885a39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7e885a39 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 7e885a390888a5cddc4cf448af3cfd225f59cf3d Parents: 03273bd Author: Swapan ShridharAuthored: Wed Oct 11 00:57:01 2017 -0700 Committer: Swapan Shridhar Committed: Wed Oct 11 00:57:13 2017 -0700 -- .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 217 -- .../configuration/hive-interactive-site.xml | 225 +++ .../stacks/HDP/2.6/services/stack_advisor.py| 13 +- .../stacks/HDP/2.6/upgrades/config-upgrade.xml | 21 +- .../stacks/2.6/common/test_stack_advisor.py | 17 +- 5 files changed, 250 insertions(+), 243 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7e885a39/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index d66cf4c..69d1c69 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -451,223 +451,6 @@ limitations under the License. - - -hive.druid.broker.address.default -localhost:8082 -Host name of druid router if any or broker - - - -druid-router -druid.port - - - - - -hive.druid.metadata.uri -jdbc:mysql://localhost:3355/druid -URI to connect to the database (for example jdbc:mysql://hostname:port/DBName) - - - -druid-common -druid.metadata.storage.connector.connectURI - - - - - -hive.druid.coordinator.address.default -localhost:8082 -Host name of druid router if any or broker - - - -druid-coordinator -druid.port - - - - - -hive.druid.metadata.password -{{druid_metadata_password}} -PASSWORD -Druid Metadata Password -Druid meta data storage password - - password - true - - - - - -hive.druid.metadata.username -druid -Username used to connect to druid metadata storage - - - -druid-common -druid.metadata.storage.connector.user - - - - - -hive.druid.indexer.segments.granularity -Default Granularity for the Druid segments - - value-list - - - YEAR - - - MONTH - - - WEEK - - - DAY - - - HOUR - - - MINUTE - - - SECOND - - - -MINUTE -Default Granularity for the segments created by the Druid storage handler, this can be overridden per table using table property druid.segment.granularity - - - -hive.druid.indexer.partition.size.max -500 -Maximum number of records per segment partition - - - -hive.druid.indexer.memory.rownum.max -75000 -Maximum number of records in memory while storing data in Druid - - - - -hive.druid.select.distribute -true -If it is set to true, we distribute the execution of Druid Select queries - - - boolean - - - - -hive.druid.basePersistDirectory - - - Local temporary directory used to persist intermediate indexing state, - if empty (recommended) will default to JVM system property java.io.tmpdir. - - - true - - - - - -hive.druid.storage.storageDirectory -{{druid_storage_dir}} - - Druid deep storage location for segments. - - - - -hive.druid.metadata.db.type -Druid metadata storage type - - false - value-list - - - mysql - MYSQL - - - postgresql - POSTGRESQL - - - -mysql - - -druid-common -druid.metadata.storage.type - - -Druid metadata storage type - - - - -hive.druid.passiveWaitTimeMs -3 - - Wait time in ms default to 30 seconds. - - - - - -hive.druid.working.directory -
[19/50] [abbrv] ambari git commit: AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam)
AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c3b1b81 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c3b1b81 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c3b1b81 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 3c3b1b810ee05490fe2fe370de6132ba31bf8b72 Parents: b86f53f Author: Venkata SairamAuthored: Thu Oct 12 17:05:12 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:05:12 2017 +0530 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/master.py | 6 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/params.py | 6 ++ 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3c3b1b81/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 09944bd..eaa2cb9 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 @@ -530,14 +530,16 @@ class Master(Script): elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy': if params.livy_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy_livyserver_protocol + \ + "://" + params.livy_livyserver_host + \ ":" + params.livy_livyserver_port else: del interpreter_settings[setting_key] elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy2': if params.livy2_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy2_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy2_livyserver_protocol + \ + "://" + params.livy2_livyserver_host + \ ":" + params.livy2_livyserver_port else: del interpreter_settings[setting_key] http://git-wip-us.apache.org/repos/asf/ambari/blob/3c3b1b81/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py -- 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 3242f26..b7d3df0 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 @@ -219,17 +219,23 @@ livy2_hosts = default("/clusterHostInfo/livy2_server_hosts", []) livy_livyserver_host = None livy_livyserver_port = None +livy_livyserver_protocol = 'http' livy2_livyserver_host = None livy2_livyserver_port = None +livy2_livyserver_protocol = 'http' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stack_version_formatted) and \ len(livy_hosts) > 0: livy_livyserver_host = str(livy_hosts[0]) livy_livyserver_port = config['configurations']['livy-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy-conf']: +livy_livyserver_protocol = 'https' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, stack_version_formatted) and \ len(livy2_hosts) > 0: livy2_livyserver_host = str(livy2_hosts[0]) livy2_livyserver_port = config['configurations']['livy2-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy2-conf']: +livy2_livyserver_protocol = 'https' hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] security_enabled = config['configurations']['cluster-env']['security_enabled']
[24/50] [abbrv] ambari git commit: AMBARI-21307 Implemented PUT operation, added unit tests
AMBARI-21307 Implemented PUT operation, added unit tests Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1c9adb9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1c9adb9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1c9adb9 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: a1c9adb92b49995887bbf50094cce236f65ce8bb Parents: 14f17ff Author: lpuskasAuthored: Thu Jul 13 16:20:58 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:47 2017 +0200 -- .../services/AmbariConfigurationService.java| 89 --- .../server/controller/ControllerModule.java | 2 + .../controller/ResourceProviderFactory.java | 24 +- .../AbstractControllerResourceProvider.java | 2 + .../AmbariConfigurationResourceProvider.java| 88 +-- .../internal/DefaultProviderModule.java | 2 - .../server/orm/dao/AmbariConfigurationDAO.java | 4 + ...AmbariConfigurationResourceProviderTest.java | 231 +++ 8 files changed, 364 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1c9adb9/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java index 0c159b9..0632361 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java @@ -56,16 +56,10 @@ import io.swagger.annotations.ApiResponses; *"data": [ *{ * "authentication.ldap.primaryUrl": "localhost:33389" - *}, - *{ - *"authentication.ldap.secondaryUrl": "localhost:333" - * }, - * { + "authentication.ldap.secondaryUrl": "localhost:333" * "authentication.ldap.baseDn": "dc=ambari,dc=apache,dc=org" - * } - * // .. - * ] - * } + * // .. + * ] * } * */ @@ -74,7 +68,7 @@ import io.swagger.annotations.ApiResponses; public class AmbariConfigurationService extends BaseService { private static final String AMBARI_CONFIGURATION_REQUEST_TYPE = - "org.apache.ambari.server.api.services.AmbariConfigurationRequestSwagger"; +"org.apache.ambari.server.api.services.AmbariConfigurationRequestSwagger"; /** * Creates an ambari configuration resource. @@ -87,9 +81,9 @@ public class AmbariConfigurationService extends BaseService { @POST @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Creates an ambari configuration resource", - nickname = "AmbariConfigurationService#createAmbariConfiguration") +nickname = "AmbariConfigurationService#createAmbariConfiguration") @ApiImplicitParams({ - @ApiImplicitParam(dataType = AMBARI_CONFIGURATION_REQUEST_TYPE, paramType = PARAM_TYPE_BODY) +@ApiImplicitParam(dataType = AMBARI_CONFIGURATION_REQUEST_TYPE, paramType = PARAM_TYPE_BODY) }) @ApiResponses({ @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION), @@ -108,24 +102,24 @@ public class AmbariConfigurationService extends BaseService { @GET @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Retrieve all ambari configuration resources", - nickname = "AmbariConfigurationService#getAmbariConfigurations", - notes = "Returns all Ambari configurations.", - response = AmbariConfigurationResponseSwagger.class, - responseContainer = RESPONSE_CONTAINER_LIST) +nickname = "AmbariConfigurationService#getAmbariConfigurations", +notes = "Returns all Ambari configurations.", +response = AmbariConfigurationResponseSwagger.class, +responseContainer = RESPONSE_CONTAINER_LIST) @ApiImplicitParams({ - @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, - defaultValue = "AmbariConfiguration/data, AmbariConfiguration/id, AmbariConfiguration/type", - dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY), - @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, - defaultValue = "AmbariConfiguration/id", - dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY), - @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType =
[49/50] [abbrv] ambari git commit: AMBARI-21307 Fixed failing unit tests (in most cases the new guice module was needed)
AMBARI-21307 Fixed failing unit tests (in most cases the new guice module was needed) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b7f03cac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b7f03cac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b7f03cac Branch: refs/heads/feature-branch-AMBARI-21307 Commit: b7f03cac8ab944ff8f15ea225fef47d54126824d Parents: f637b52 Author: lpuskasAuthored: Thu Oct 12 19:25:24 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:52 2017 +0200 -- .../main/resources/Ambari-DDL-Derby-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 2 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 2 +- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- .../api/services/ldap/LDAPServiceTest.java | 85 .../server/checks/UpgradeCheckOrderTest.java| 3 +- ...AmbariConfigurationResourceProviderTest.java | 24 +- .../server/ldap/LdapModuleFunctionalTest.java | 4 +- .../notifications/DispatchFactoryTest.java | 3 +- .../server/orm/InMemoryDefaultTestModule.java | 2 + .../ambari/server/orm/JdbcPropertyTest.java | 5 +- ...uthenticationProviderForDNWithSpaceTest.java | 35 .../AmbariLdapAuthenticationProviderTest.java | 3 +- .../AmbariLocalUserProviderTest.java| 3 +- .../authorization/LdapServerPropertiesTest.java | 5 +- 17 files changed, 65 insertions(+), 119 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f03cac/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql index cebd33e..20d64de 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql @@ -98,7 +98,7 @@ CREATE TABLE configuration_base ( CREATE TABLE ambari_configuration ( id BIGINT NOT NULL, CONSTRAINT PK_ambari_configuration PRIMARY KEY (id), - CONSTRAINT FK_ambari_configuration_configuration_base FOREIGN KEY (id) REFERENCES configuration_base (id) + CONSTRAINT FK_ambari_conf_conf_base FOREIGN KEY (id) REFERENCES configuration_base (id) ); CREATE TABLE serviceconfig ( http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f03cac/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql index b8b506a..dc1dea9 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql @@ -118,7 +118,7 @@ CREATE TABLE configuration_base ( CREATE TABLE ambari_configuration ( id BIGINT NOT NULL, CONSTRAINT PK_ambari_configuration PRIMARY KEY (id), - CONSTRAINT FK_ambari_configuration_configuration_base FOREIGN KEY (id) REFERENCES configuration_base (id) + CONSTRAINT FK_ambari_conf_conf_base FOREIGN KEY (id) REFERENCES configuration_base (id) ); CREATE TABLE serviceconfig ( http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f03cac/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql index 1e90426..7c34304 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql @@ -98,7 +98,7 @@ CREATE TABLE configuration_base ( CREATE TABLE ambari_configuration ( id NUMBER(19) NOT NULL, CONSTRAINT PK_ambari_configuration PRIMARY KEY (id), - CONSTRAINT FK_ambari_configuration_configuration_base FOREIGN KEY (id) REFERENCES configuration_base (id) + CONSTRAINT FK_ambari_conf_conf_base FOREIGN KEY (id) REFERENCES configuration_base (id) ); CREATE TABLE serviceconfig ( http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f03cac/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql index 583a51b..9270522 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql +++
[10/50] [abbrv] ambari git commit: AMBARI-22208 Log Search UI: small fixes for top part of Service Logs page. (Istvan Tobias via ababiichuk)
AMBARI-22208 Log Search UI: small fixes for top part of Service Logs page. (Istvan Tobias via ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6f598067 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6f598067 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6f598067 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 6f598067f7f10b0543a3239884d380546fcdec56 Parents: 4a47e79 Author: Istvan TobiasAuthored: Wed Oct 11 19:27:37 2017 +0300 Committer: ababiichuk Committed: Wed Oct 11 20:07:35 2017 +0300 -- .../ambari-logsearch-web/src/app/app.module.ts | 2 + .../accordion-panel.component.less | 2 +- .../src/app/components/app.component.less | 2 +- .../collapsible-panel.component.html| 27 +++ .../collapsible-panel.component.less| 42 .../collapsible-panel.component.spec.ts | 129 .../collapsible-panel.component.ts | 89 + .../dropdown-button.component.less | 2 +- .../dropdown-list/dropdown-list.component.less | 2 +- .../filters-panel/filters-panel.component.html | 2 +- .../filters-panel/filters-panel.component.less | 6 +- .../log-file-entry.component.less | 2 +- .../logs-container.component.html | 14 +- .../logs-container.component.spec.ts| 5 + .../logs-container/logs-container.component.ts | 10 + .../logs-list/logs-list.component.less | 2 +- .../main-container.component.less | 2 +- .../src/app/components/main.less| 20 ++ .../menu-button/menu-button.component.less | 18 +- .../menu-button/menu-button.component.ts| 5 +- .../src/app/components/mixins.less | 200 +++ .../pagination-controls.component.less | 2 +- .../pagination/pagination.component.less| 4 +- .../search-box/search-box.component.less| 2 +- .../time-histogram.component.less | 2 +- .../time-range-picker.component.less| 2 +- .../components/top-menu/top-menu.component.html | 2 +- .../components/top-menu/top-menu.component.less | 2 +- .../src/app/components/variables.less | 123 +--- .../src/assets/i18n/en.json | 9 +- 30 files changed, 591 insertions(+), 140 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6f598067/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts -- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts index ff791fe..12b95a7 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts +++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts @@ -65,6 +65,7 @@ import {FilterDropdownComponent} from '@app/components/filter-dropdown/filter-dr import {DropdownListComponent} from '@app/components/dropdown-list/dropdown-list.component'; import {FilterButtonComponent} from '@app/components/filter-button/filter-button.component'; import {AccordionPanelComponent} from '@app/components/accordion-panel/accordion-panel.component'; +import {CollapsiblePanelComponent} from '@app/components/collapsible-panel/collapsible-panel.component'; import {LogsListComponent} from '@app/components/logs-list/logs-list.component'; import {DropdownButtonComponent} from '@app/components/dropdown-button/dropdown-button.component'; import {PaginationComponent} from '@app/components/pagination/pagination.component'; @@ -115,6 +116,7 @@ export function getXHRBackend(injector: Injector, browser: BrowserXhr, xsrf: XSR FilterDropdownComponent, FilterButtonComponent, AccordionPanelComponent, +CollapsiblePanelComponent, LogsListComponent, DropdownButtonComponent, PaginationComponent, http://git-wip-us.apache.org/repos/asf/ambari/blob/6f598067/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less -- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less index 8366952..3d083be 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.less @@ -15,7 +15,7 @@ * limitations under the License. */ -@import
[36/50] [abbrv] ambari git commit: AMBARI-21307 Add all known LDAP properties to AmbariConfigurationEnum (benyoka)
AMBARI-21307 Add all known LDAP properties to AmbariConfigurationEnum (benyoka) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81ff7b4f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81ff7b4f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81ff7b4f Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 81ff7b4f3770a038adc77c0bffd62c17d412096e Parents: 5022627 Author: Balazs Bence SariAuthored: Mon Sep 4 12:45:07 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:49 2017 +0200 -- .../ambari/server/ldap/AmbariLdapConfiguration.java | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81ff7b4f/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java index b1cbced..e913e77 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java @@ -40,22 +40,35 @@ public class AmbariLdapConfiguration { USE_SSL("ambari.ldap.usessl"), LDAP_SERVER_HOST("ambari.ldap.server.host"), LDAP_SERVER_PORT("ambari.ldap.server.port"), +LDAP_TRUSTSTORE("ambari.ldap.truststore"), LDAP_TRUSTSTORE_TYPE("ambari.ldap.truststore.type"), LDAP_TRUSTSTORE_PATH("ambari.ldap.truststore.path"), +LDAP_TRUSTSTORE_PASSWORD("ambari.ldap.truststore.password"), BASE_DN("ambari.ldap.bind.dn"), +REFERRAL("ambari.ldap.referral"), +PAGINATION_ENABLED("ambari.ldap.pagination.enabled"), BIND_ANONIMOUSLY("ambari.ldap.bindanonymously"), MANAGER_DN("ambari.ldap.managerdn"), MANAGER_PASSWORD("ambari.ldap.managerpassword"), USER_OBJECT_CLASS("ambari.ldap.user.object.class"), USER_NAME_ATTRIBUTE("ambari.ldap.user.name.attribute"), +USER_NAME_FORCE_LOWERCASE("ambari.ldap.username.force.lowercase"), USER_SEARCH_BASE("ambari.ldap.user.search.base"), + SYNC_USER_MEMBER_REPLACE_PATTERN("ambari.ldap.sync.user.member.replacepattern"), +SYNC_USER_MEMBER_FILTER("ambari.ldap.sync.user.member_filter"), +ADMIN_GROUP_MAPPING_RULES ("ambari.ldap.admin.group.mappingrules"), GROUP_OBJECT_CLASS("ambari.ldap.group.object.class"), GROUP_NAME_ATTRIBUTE("ambari.ldap.group.name.attribute"), GROUP_MEMBER_ATTRIBUTE("ambari.ldap.group.member.attribute"), GROUP_SEARCH_BASE("ambari.ldap.group.search.base"), -DN_ATTRIBUTE("authentication.ldap.dnAttribute"); + SYNC_GROUP_MEMBER_REPLACE_PATTERN("ambari.ldap.sync.group.member.replacepattern"), +SYNC_GROUP_MEMBER_FILTER("ambari.ldap.sync.group.member_filter"), +DN_ATTRIBUTE("authentication.ldap.dnAttribute"), + +TEST_USER_NAME("ambari.ldap.test.user.name"), +TEST_USER_PASSWORD("ambari.ldap.test.user.password"); private String propertyName;
[05/50] [abbrv] ambari git commit: AMBARI-22203. ZKFC start failed due to hadoop-hdfs-zkfc is not supported (aonishuk)
AMBARI-22203. ZKFC start failed due to hadoop-hdfs-zkfc is not supported (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ec33db0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ec33db0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ec33db0 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 8ec33db0803a7c7a7ef51b87e98bc610c9c72196 Parents: aeb1865 Author: Andrew OnishukAuthored: Wed Oct 11 15:57:51 2017 +0300 Committer: Andrew Onishuk Committed: Wed Oct 11 15:57:51 2017 +0300 -- .../resources/stacks/HDP/2.0.6/properties/stack_packages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ec33db0/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json index 2db0a74..8f685f6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json @@ -360,6 +360,7 @@ }, "ZKFC": { "STACK-SELECT-PACKAGE": "hadoop-hdfs-zkfc", + "LEGACY": "hadoop-client", "INSTALL": [ "hadoop-hdfs-zkfc" ], @@ -367,7 +368,7 @@ "hadoop-hdfs-zkfc" ], "STANDARD": [ -"hadoop-hdfs-zkfc" +"hadoop-client" ] } },
[08/50] [abbrv] ambari git commit: AMBARI-22206. Downgrade UI shown Null when on Patch revert (alexantonenko)
AMBARI-22206. Downgrade UI shown Null when on Patch revert (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/73415675 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/73415675 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/73415675 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 734156756c1f8b35f6af0a4c8d9669e61daa8042 Parents: 08bdd80 Author: Alex AntonenkoAuthored: Wed Oct 11 19:02:28 2017 +0300 Committer: Alex Antonenko Committed: Wed Oct 11 19:02:28 2017 +0300 -- .../app/controllers/main/admin/stack_and_upgrade_controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/73415675/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js index 29e0687..2f0cb68 100644 --- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js @@ -2147,9 +2147,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }); this.loadRepoVersionsToModel().done(function () { var toVersion = App.RepositoryVersion.find().findProperty('repositoryVersion', lastUpgradeData.Upgrade.associated_version); - if (!isDowngrade) { -self.setDBProperty('upgradeVersion', toVersion && toVersion.get('displayName')); - } + self.setDBProperty('upgradeVersion', toVersion && toVersion.get('displayName')); self.initDBProperties(); self.loadUpgradeData(true); });
[04/50] [abbrv] ambari git commit: AMBARI-22174. Remove unnecessary Kerberos related properties from BlueprintConfigurationProcessor (magyari_sandor)
AMBARI-22174. Remove unnecessary Kerberos related properties from BlueprintConfigurationProcessor (magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aeb1865c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aeb1865c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aeb1865c Branch: refs/heads/feature-branch-AMBARI-21307 Commit: aeb1865c95b86980ac31bc9362203f4bd84a027d Parents: 33d67f3 Author: Sandor MagyariAuthored: Mon Jan 16 14:30:28 2017 +0100 Committer: Sandor Magyari Committed: Wed Oct 11 12:59:55 2017 +0200 -- .../BlueprintConfigurationProcessor.java| 6 - .../BlueprintConfigurationProcessorTest.java| 28 2 files changed, 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aeb1865c/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 03f84a5..5a7cda0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -2556,7 +2556,6 @@ public class BlueprintConfigurationProcessor { multiCoreSiteMap.put("hadoop.proxyuser.yarn.hosts", new MultipleHostTopologyUpdater("RESOURCEMANAGER")); multiCoreSiteMap.put("hadoop.security.key.provider.path", new MultipleHostTopologyUpdater("RANGER_KMS_SERVER", ';', false, false, true)); multiWebhcatSiteMap.put("templeton.hive.properties", new TempletonHivePropertyUpdater()); -multiWebhcatSiteMap.put("templeton.kerberos.principal", new MultipleHostTopologyUpdater("WEBHCAT_SERVER")); multiHiveSiteMap.put("hive.zookeeper.quorum", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); multiHiveSiteMap.put("hive.cluster.delegation.token.store.zookeeper.connectString", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); @@ -2674,9 +2673,6 @@ public class BlueprintConfigurationProcessor { oozieStringPropertyUpdaterMap = new HashMap<>(); } oozieStringPropertyUpdaterMap.put("oozie.base.url", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.authentication.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.ha.authentication.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.service.HadoopAccessorService.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); singleHostTopologyUpdaters.put("oozie-site", oozieStringPropertyUpdaterMap); multiCoreSiteMap.put("hadoop.proxyuser.oozie.hosts", new MultipleHostTopologyUpdater("OOZIE_SERVER")); @@ -2728,8 +2724,6 @@ public class BlueprintConfigurationProcessor { // FALCON falconStartupPropertiesMap.put("*.broker.url", new SingleHostTopologyUpdater("FALCON_SERVER")); - falconStartupPropertiesMap.put("*.falcon.service.authentication.kerberos.principal", new SingleHostTopologyUpdater("FALCON_SERVER")); - falconStartupPropertiesMap.put("*.falcon.http.authentication.kerberos.principal", new SingleHostTopologyUpdater("FALCON_SERVER")); // KAFKA kafkaBrokerMap.put("kafka.ganglia.metrics.host", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); http://git-wip-us.apache.org/repos/asf/ambari/blob/aeb1865c/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index d137f2c..22b0e6b 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -897,11 +897,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("Falcon Broker URL property not properly exported", createExportedAddress(expectedPortNum, expectedHostGroupName),
[25/50] [abbrv] ambari git commit: AMBARI-21307 Added new resource related changes to the db creation ddl-s
AMBARI-21307 Added new resource related changes to the db creation ddl-s Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/799f882d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/799f882d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/799f882d Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 799f882d358a35b1eb048ba5f1e5d3fbd35ce4e1 Parents: ef38500 Author: lpuskasAuthored: Thu Jul 6 18:15:18 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:47 2017 +0200 -- .../AmbariConfigurationResourceProvider.java| 12 ++-- .../server/orm/dao/AmbariConfigurationDAO.java | 65 ++-- .../apache/ambari/server/orm/dao/DaoUtils.java | 13 +--- .../main/resources/Ambari-DDL-Derby-CREATE.sql | 21 +++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 20 ++ .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 20 ++ .../resources/Ambari-DDL-Postgres-CREATE.sql| 14 ++--- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 20 ++ .../resources/Ambari-DDL-SQLServer-CREATE.sql | 20 ++ 9 files changed, 120 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/799f882d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java index 5e5af9e..e8f186d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java @@ -97,14 +97,14 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou } } - private static Set properties = Sets.newHashSet( + private static Set PROPERTIES = Sets.newHashSet( ResourcePropertyId.ID.getPropertyId(), ResourcePropertyId.TYPE.getPropertyId(), ResourcePropertyId.VERSION.getPropertyId(), ResourcePropertyId.VERSION_TAG.getPropertyId(), ResourcePropertyId.DATA.getPropertyId()); - private static Map pkPropertyMap = Collections.unmodifiableMap( + private static Map PK_PROPERTY_MAP = Collections.unmodifiableMap( new HashMap () {{ put(Resource.Type.AmbariConfiguration, ResourcePropertyId.ID.getPropertyId()); }} @@ -117,7 +117,7 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou private Gson gson; protected AmbariConfigurationResourceProvider() { -super(properties, pkPropertyMap); +super(PROPERTIES, PK_PROPERTY_MAP); setRequiredCreateAuthorizations(EnumSet.of(RoleAuthorization.AMBARI_MANAGE_CONFIGURATION)); setRequiredDeleteAuthorizations(EnumSet.of(RoleAuthorization.AMBARI_MANAGE_CONFIGURATION)); @@ -126,7 +126,7 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou @Override protected Set getPKPropertyIds() { -return Sets.newHashSet("AmbariConfiguration/id"); +return Sets.newHashSet(ResourcePropertyId.ID.getPropertyId()); } @Override @@ -137,7 +137,7 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou AmbariConfigurationEntity ambariConfigurationEntity = getEntityFromRequest(request); LOGGER.info("Persisting new ambari configuration: {} ", ambariConfigurationEntity); -ambariConfigurationDAO.persist(ambariConfigurationEntity); +ambariConfigurationDAO.create(ambariConfigurationEntity); return getRequestStatus(null); } @@ -170,7 +170,7 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou } else { LOGGER.debug("Deleting amari configuration with id: {}", idFromRequest); try { -ambariConfigurationDAO.deleteById(idFromRequest); +ambariConfigurationDAO.removeByPK(idFromRequest); } catch (IllegalStateException e) { throw new NoSuchResourceException(e.getMessage()); } http://git-wip-us.apache.org/repos/asf/ambari/blob/799f882d/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java index
[01/50] [abbrv] ambari git commit: AMBARI-22137 - Different stack versions should be able to link to different extension versions [Forced Update!]
Repository: ambari Updated Branches: refs/heads/feature-branch-AMBARI-21307 ac71c44c5 -> b7f03cac8 (forced update) AMBARI-22137 - Different stack versions should be able to link to different extension versions Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/03273bdc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/03273bdc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/03273bdc Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 03273bdce970a1282d89056aa48dc2ffe3b7b712 Parents: a3a8afc Author: Tim ThorpeAuthored: Tue Oct 10 13:54:01 2017 -0700 Committer: Tim Thorpe Committed: Tue Oct 10 13:54:01 2017 -0700 -- .../controller/AmbariManagementHelper.java | 2 +- .../ambari/server/stack/ExtensionHelper.java| 57 ++- .../apache/ambari/server/stack/StackModule.java | 4 + .../server/stack/StackManagerExtensionTest.java | 31 +- .../resources/extensions/EXT/0.2/metainfo.xml | 2 +- .../resources/extensions/EXT/0.3/metainfo.xml | 2 +- .../stacks_with_extensions/HDP/0.4/metainfo.xml | 22 ++ .../HDP/0.4/repos/repoinfo.xml | 63 +++ .../HDP/0.4/services/HBASE/metainfo.xml | 26 ++ .../0.4/services/HDFS/configuration/global.xml | 145 +++ .../services/HDFS/configuration/hadoop-env.xml | 223 +++ .../services/HDFS/configuration/hbase-site.xml | 137 +++ .../services/HDFS/configuration/hdfs-log4j.xml | 199 ++ .../services/HDFS/configuration/hdfs-site.xml | 396 +++ .../HDP/0.4/services/HDFS/metainfo.xml | 30 ++ .../0.4/services/HDFS/package/dummy-script.py | 20 + .../HDP/0.4/services/HIVE/metainfo.xml | 26 ++ .../HDP/0.4/services/MAPREDUCE/metainfo.xml | 23 ++ .../HDP/0.4/services/ZOOKEEPER/metainfo.xml | 26 ++ 19 files changed, 1425 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/03273bdc/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementHelper.java index 2dd6f12..0c8edfe 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementHelper.java @@ -70,7 +70,7 @@ public class AmbariManagementHelper { */ public void createExtensionLink(StackManager stackManager, StackInfo stackInfo, ExtensionInfo extensionInfo) throws AmbariException { validateCreateExtensionLinkRequest(stackInfo, extensionInfo); -ExtensionHelper.validateCreateLink(stackInfo, extensionInfo); +ExtensionHelper.validateCreateLink(stackManager, stackInfo, extensionInfo); ExtensionLinkEntity linkEntity = createExtensionLinkEntity(stackInfo, extensionInfo); stackManager.linkStackToExtension(stackInfo, extensionInfo); http://git-wip-us.apache.org/repos/asf/ambari/blob/03273bdc/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionHelper.java index 86e532a..91dc870 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionHelper.java @@ -27,6 +27,8 @@ import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.stack.ExtensionMetainfoXml; import org.apache.ambari.server.utils.VersionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An extension version is like a stack version but it contains custom services. Linking an extension @@ -35,6 +37,8 @@ import org.apache.ambari.server.utils.VersionUtils; */ public class ExtensionHelper { + private final static Logger LOG = LoggerFactory.getLogger(ExtensionHelper.class); + public static void validateDeleteLink(Clusters clusters, StackInfo stack, ExtensionInfo extension) throws AmbariException { validateNotRequiredExtension(stack, extension); validateServicesNotInstalled(clusters, stack, extension); @@ -62,9 +66,9 @@ public class ExtensionHelper { } } - public static void validateCreateLink(StackInfo stack, ExtensionInfo extension) throws AmbariException { + public static void
[33/50] [abbrv] ambari git commit: AMBARI-21307 AddedLDAP configuration provider for loading and maintaining the LDAP configuration in the application
AMBARI-21307 AddedLDAP configuration provider for loading and maintaining the LDAP configuration in the application Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5022627a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5022627a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5022627a Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 5022627a83f2733d628d7eb79ec4ddbf37b0b99a Parents: 11bc659 Author: lpuskasAuthored: Tue Aug 29 14:55:09 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:49 2017 +0200 -- .../services/ldap/LdapConfigurationService.java | 1 + .../AmbariConfigurationResourceProvider.java| 35 +- .../ambari/server/events/AmbariEvent.java | 11 +- .../events/AmbariLdapConfigChangedEvent.java| 37 ++ .../server/ldap/LdapConfigurationFactory.java | 2 +- .../apache/ambari/server/ldap/LdapModule.java | 3 + .../AmbariLdapConfigurationProvider.java| 114 +++ .../server/ldap/service/AmbariLdapFacade.java | 7 +- .../server/orm/dao/AmbariConfigurationDAO.java | 48 .../orm/entities/AmbariConfigurationEntity.java | 4 +- .../DefaultLdapConfigurationServiceTest.java| 10 +- 11 files changed, 260 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5022627a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java index fc6bd41..1b8427b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java @@ -82,6 +82,7 @@ public class LdapConfigurationService extends AmbariConfigurationService { @Produces(MediaType.APPLICATION_JSON) public Response validateConfiguration(LdapConfigurationRequest ldapConfigurationRequest) { +// check if the user is authorized to perform the operation authorize(); Set groups = Sets.newHashSet(); http://git-wip-us.apache.org/repos/asf/ambari/blob/5022627a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java index 2302d8b..4f4cc70 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java @@ -35,6 +35,9 @@ import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException; import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.controller.spi.UnsupportedPropertyException; import org.apache.ambari.server.controller.utilities.PredicateHelper; +import org.apache.ambari.server.events.AmbariEvent; +import org.apache.ambari.server.events.AmbariLdapConfigChangedEvent; +import org.apache.ambari.server.events.publishers.AmbariEventPublisher; import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO; import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity; import org.apache.ambari.server.orm.entities.ConfigurationBaseEntity; @@ -113,6 +116,10 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou @Inject private AmbariConfigurationDAO ambariConfigurationDAO; + @Inject + private AmbariEventPublisher publisher; + + private Gson gson; @AssistedInject @@ -142,7 +149,18 @@ public class AmbariConfigurationResourceProvider extends AbstractAuthorizedResou } LOGGER.info("Persisting new ambari configuration: {} ", ambariConfigurationEntity); -ambariConfigurationDAO.create(ambariConfigurationEntity); + +try { + ambariConfigurationDAO.create(ambariConfigurationEntity); +} catch (Exception e) { + LOGGER.error("Failed to create resource", e); + throw new ResourceAlreadyExistsException(e.getMessage()); +} + +// todo filter by configuration type +// notify subscribers about the configuration changes +publisher.publish(new
[11/50] [abbrv] ambari git commit: AMBARI-22205 - Install Version Fails On IOP Cluster Due To Missing stack_packages Structure (jonathanhurley)
AMBARI-22205 - Install Version Fails On IOP Cluster Due To Missing stack_packages Structure (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/323974e1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/323974e1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/323974e1 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 323974e19d469313c9bafa1bda3000ea62f85bc8 Parents: 6f59806 Author: Jonathan HurleyAuthored: Wed Oct 11 10:41:38 2017 -0400 Committer: Jonathan Hurley Committed: Wed Oct 11 15:02:13 2017 -0400 -- .../internal/ClusterStackVersionResourceProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/323974e1/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java index 388551f..1a75559 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java @@ -874,10 +874,11 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou Config clusterEnv = cluster.getDesiredConfigByType(ConfigHelper.CLUSTER_ENV); Map clusterEnvProperties = clusterEnv.getProperties(); -// the 3 properties we need to check and update +// the 4 properties we need to check and update Set properties = Sets.newHashSet(ConfigHelper.CLUSTER_ENV_STACK_ROOT_PROPERTY, ConfigHelper.CLUSTER_ENV_STACK_TOOLS_PROPERTY, -ConfigHelper.CLUSTER_ENV_STACK_FEATURES_PROPERTY); +ConfigHelper.CLUSTER_ENV_STACK_FEATURES_PROPERTY, +ConfigHelper.CLUSTER_ENV_STACK_PACKAGES_PROPERTY); // any updates are stored here and merged into the existing config type Map updatedProperties = new HashMap<>();
[47/50] [abbrv] ambari git commit: AMBARI-21307 added javadocs, organized and cleaned the code
AMBARI-21307 added javadocs, organized and cleaned the code Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4ad492b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4ad492b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4ad492b4 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 4ad492b4a160e86a9e853aee9be063f8ab04619d Parents: 953a98f Author: lpuskasAuthored: Wed Sep 13 15:27:39 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:51 2017 +0200 -- .../server/ldap/LdapConfigurationFactory.java | 13 + .../server/ldap/LdapConfigurationService.java | 60 - .../apache/ambari/server/ldap/LdapModule.java | 6 +- .../server/ldap/service/AmbariLdapFacade.java | 9 +- .../server/ldap/service/AttributeDetector.java | 3 +- .../ldap/service/LdapConfigurationService.java | 60 + .../ambari/server/ldap/service/LdapFacade.java | 10 +- .../ads/DefaultAttributeDetectionService.java | 238 --- .../DefaultLdapAttributeDetectionService.java | 238 +++ .../ads/DefaultLdapConfigurationService.java| 17 +- .../detectors/UserGroupMemberAttrDetector.java | 1 - .../DefaultAttributeDetectionServiceTest.java | 108 - ...efaultLdapAttributeDetectionServiceTest.java | 108 + .../DefaultLdapConfigurationServiceTest.java| 2 +- 14 files changed, 453 insertions(+), 420 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4ad492b4/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationFactory.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationFactory.java index 57cdf6e..67ac092 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationFactory.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationFactory.java @@ -16,6 +16,19 @@ package org.apache.ambari.server.ldap; import java.util.Map; +/** + * Factory interface for AmbariLdapConfiguration instances. + * It's registered as a factory in the GUICE context ( so no implementations required) + * + * To be extended with other factory methods upon needs. + */ public interface LdapConfigurationFactory { + + /** + * Creates an AmbariLdapConfiguration instance with the provided map of configuration settings. + * + * @param configuration a map where keys are the configuration properties and values are the configuration values + * @return an AmbariLdapConfiguration instance + */ AmbariLdapConfiguration createLdapConfiguration(Map configuration); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/4ad492b4/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationService.java deleted file mode 100644 index 69a641f..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/LdapConfigurationService.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed 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.ldap; - -import java.util.Set; - -import org.apache.ambari.server.AmbariException; -import org.apache.ambari.server.ldap.service.AmbariLdapException; -import org.apache.directory.ldap.client.api.LdapConnection; - -/** - * Collection of operations for validating ldap configuration. - * It's intended to decouple implementations using different libraries. - */ -public interface LdapConfigurationService { - - /** - * Tests the connection based on the provided configuration. - * - * @param ldapConnection connection instance - * @param configuration the ambari ldap configuration instance - * @throws AmbariLdapException if the connection is not possible - */ - void checkConnection(LdapConnection ldapConnection,
[09/50] [abbrv] ambari git commit: AMBARI-22188. Make hive server create directories related to replication (echekanskiy)
AMBARI-22188. Make hive server create directories related to replication (echekanskiy) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4a47e792 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4a47e792 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4a47e792 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 4a47e792ae6e4fe4fb67ca80c96c5e2054f7a9cd Parents: 7341567 Author: Eugene ChekanskiyAuthored: Wed Oct 11 19:38:41 2017 +0300 Committer: Eugene Chekanskiy Committed: Wed Oct 11 19:38:41 2017 +0300 -- .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 47 +++ .../HIVE/0.12.0.2.0/package/scripts/hive.py | 34 +- .../0.12.0.2.0/package/scripts/params_linux.py | 4 ++ .../HIVE/2.1.0.3.0/configuration/hive-site.xml | 48 .../HIVE/2.1.0.3.0/package/scripts/hive.py | 32 + .../2.1.0.3.0/package/scripts/params_linux.py | 4 ++ 6 files changed, 168 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4a47e792/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index 69d1c69..762530b 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -471,4 +471,51 @@ limitations under the License. + + + +hive.metastore.dml.events + +If true, the metastore will be asked to fire events for DML operations + + true + + + + +hive.repl.cm.enabled + +Turn on ChangeManager, so delete files will go to cmrootdir. + + true + + + + +hive.metastore.transactional.event.listeners + +A comma separated list of Java classes that implement the org.apache.hadoop.hive.metastore.MetaStoreEventListener interface. Both the metastore event and corresponding listener method will be invoked in the same JDO transaction. + + true + + + + +hive.repl.cmrootdir + +Root dir for ChangeManager, used for deleted files. + + true + + + + +hive.repl.rootdir + +HDFS root dir for all replication dumps. + + true + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/4a47e792/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py index 8e176b6..c4b34a5 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py @@ -245,7 +245,22 @@ def setup_hiveserver2(): owner=params.hive_user, group=params.hdfs_user, mode=0777) # Hive expects this dir to be writeable by everyone as it is used as a temp dir - + + if params.hive_repl_cmrootdir is not None: +params.HdfsResource(params.hive_repl_cmrootdir, +type = "directory", +action = "create_on_execute", +owner = params.hive_user, +group=params.user_group, +mode = 01777) + if params.hive_repl_rootdir is not None: +params.HdfsResource(params.hive_repl_rootdir, +type = "directory", +action = "create_on_execute", +owner = params.hive_user, +group=params.user_group, +mode = 0700) + params.HdfsResource(None, action="execute") def setup_non_client(): @@ -310,6 +325,23 @@ def setup_metastore(): create_parents = True, mode=0777) + if params.hive_repl_cmrootdir is not None: +params.HdfsResource(params.hive_repl_cmrootdir, +type = "directory", +action = "create_on_execute", +owner = params.hive_user, +group=params.user_group, +mode = 01777) + if
[44/50] [abbrv] ambari git commit: AMBARI-21307 Refactor - using the LdapConnectionTemplate for ldap operations
http://git-wip-us.apache.org/repos/asf/ambari/blob/d5019446/ambari-server/src/test/java/org/apache/ambari/server/ldap/service/ads/DefaultLdapAttributeDetectionServiceTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/ldap/service/ads/DefaultLdapAttributeDetectionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/ldap/service/ads/DefaultLdapAttributeDetectionServiceTest.java deleted file mode 100644 index 878d1f0..000 --- a/ambari-server/src/test/java/org/apache/ambari/server/ldap/service/ads/DefaultLdapAttributeDetectionServiceTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed 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.ldap.service.ads; - - -import java.util.Map; - -import org.apache.ambari.server.ldap.domain.AmbariLdapConfigKeys; -import org.apache.ambari.server.ldap.domain.AmbariLdapConfiguration; -import org.apache.ambari.server.ldap.domain.TestAmbariLdapConfigurationFactory; -import org.apache.ambari.server.ldap.service.LdapConnectionService; -import org.apache.directory.api.ldap.model.constants.SchemaConstants; -import org.apache.directory.ldap.client.api.LdapConnection; -import org.easymock.EasyMockRule; -import org.easymock.TestSubject; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.collect.Maps; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public class DefaultLdapAttributeDetectionServiceTest { - - private static final Logger LOGGER = LoggerFactory.getLogger(DefaultLdapAttributeDetectionServiceTest.class); - - @Rule - public EasyMockRule mocks = new EasyMockRule(this); - - private AmbariLdapConfiguration testLdapConfiguration; - private TestAmbariLdapConfigurationFactory ldapConfigurationFactory = new TestAmbariLdapConfigurationFactory(); - - private LdapConnection connection; - - @TestSubject - private DefaultLdapAttributeDetectionService attributeDetectionService = new DefaultLdapAttributeDetectionService(); - - @Before - public void before() { - -MapinitialProps = Maps.newHashMap(); -initialProps.put(AmbariLdapConfigKeys.BIND_DN.key(), ""); -testLdapConfiguration = ldapConfigurationFactory.createLdapConfiguration(initialProps); - } - - @Test - public void testShouldUserNameAttributeBeDetectedWhenSearchReturnsValidUsers() throws Exception { -// GIVEN -// a set of entries returned from the LDAP search - -// WHEN -AmbariLdapConfiguration ambariLdapConfiguration = attributeDetectionService.detectLdapUserAttributes(connection, testLdapConfiguration); - -// THEN -Assert.assertNotNull(ambariLdapConfiguration); -Assert.assertEquals("The username attribute is not the expected", "uid", ambariLdapConfiguration.userNameAttribute()); - - } - - - @Test - public void functionalTest() throws Exception { -// GIVEN -AmbariLdapConfiguration ambariLdapConfiguration = ldapConfigurationFactory.createLdapConfiguration(getTestPropertiesMap()); -LdapConnectionService connectionService = new DefaultLdapConnectionService(); -LdapConnection ldapConnection = connectionService.createLdapConnection(ambariLdapConfiguration); - -// WHEN -AmbariLdapConfiguration config = attributeDetectionService.detectLdapUserAttributes(ldapConnection, ambariLdapConfiguration); -config = attributeDetectionService.detectLdapGroupAttributes(ldapConnection, ambariLdapConfiguration); - -Gson gson = new GsonBuilder().create(); -LOGGER.info(gson.toJson(config)); - -// THEN -ldapConnection.close(); - - } - - private Map getTestPropertiesMap() { -Map ldapPropsMap = Maps.newHashMap(); - -ldapPropsMap.put(AmbariLdapConfigKeys.ANONYMOUS_BIND.key(), "true"); -ldapPropsMap.put(AmbariLdapConfigKeys.SERVER_HOST.key(), "ldap.forumsys.com"); -ldapPropsMap.put(AmbariLdapConfigKeys.SERVER_PORT.key(), "389"); -ldapPropsMap.put(AmbariLdapConfigKeys.BIND_DN.key(), "cn=read-only-admin,dc=example,dc=com"); -ldapPropsMap.put(AmbariLdapConfigKeys.BIND_PASSWORD.key(), "password"); -ldapPropsMap.put(AmbariLdapConfigKeys.DN_ATTRIBUTE.key(), SchemaConstants.CN_AT); - -ldapPropsMap.put(AmbariLdapConfigKeys.USER_SEARCH_BASE.key(),
[50/50] [abbrv] ambari git commit: AMBARI-21307 Added unit test for the LdapFacade
AMBARI-21307 Added unit test for the LdapFacade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f637b527 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f637b527 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f637b527 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: f637b52731529407c9af10905cae72e01dc0bf86 Parents: 748302f Author: lpuskasAuthored: Thu Oct 12 16:53:31 2017 +0200 Committer: lpuskas Committed: Thu Oct 12 19:25:52 2017 +0200 -- .../services/AmbariConfigurationService.java| 2 +- .../ldap/domain/AmbariLdapConfiguration.java| 22 ++ .../server/ldap/service/AmbariLdapFacade.java | 10 +- .../ldap/service/AmbariLdapFacadeTest.java | 215 +++ 4 files changed, 245 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f637b527/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java index 492509f..38ae766 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java @@ -150,7 +150,7 @@ public class AmbariConfigurationService extends BaseService { @PUT @Path("{configurationId}") @Produces(MediaType.TEXT_PLAIN) - @ApiOperation(value = "Updates ambari configuration resources - Not implemented yet", + @ApiOperation(value = "Updates ambari configuration resources ", nickname = "AmbariConfigurationService#updateAmbariConfiguration") @ApiImplicitParams({ @ApiImplicitParam(dataType = AMBARI_CONFIGURATION_REQUEST_TYPE, paramType = PARAM_TYPE_BODY), http://git-wip-us.apache.org/repos/asf/ambari/blob/f637b527/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java index d071ebe..8b26cd3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java @@ -19,6 +19,8 @@ import java.util.Map; import javax.inject.Inject; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -174,4 +176,24 @@ public class AmbariLdapConfiguration { public String toString() { return configurationMap.toString(); } + + @Override + public boolean equals(Object o) { +if (this == o) return true; + +if (o == null || getClass() != o.getClass()) return false; + +AmbariLdapConfiguration that = (AmbariLdapConfiguration) o; + +return new EqualsBuilder() + .append(configurationMap, that.configurationMap) + .isEquals(); + } + + @Override + public int hashCode() { +return new HashCodeBuilder(17, 37) + .append(configurationMap) + .toHashCode(); + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/f637b527/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java index c75b0c4..bbfbc8e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/ldap/service/AmbariLdapFacade.java @@ -33,7 +33,7 @@ public class AmbariLdapFacade implements LdapFacade { /** * Additional parameters expected to be provided along with the configuration */ - private enum Parameters { + protected enum Parameters { TEST_USER_NAME("ambari.ldap.test.user.name"), TEST_USER_PASSWORD("ambari.ldap.test.user.password"); @@ -43,7 +43,7 @@ public class AmbariLdapFacade implements LdapFacade { this.parameterKey = parameterKey; } -private String getParameterKey() { +public String getParameterKey() { return parameterKey; } @@ -62,6 +62,7 @@ public class
ambari git commit: AMBARI-22221. Fix initialization of Druid Script object. (nishantmonu51)
Repository: ambari Updated Branches: refs/heads/branch-2.6 a1f8e9fe5 -> a837d6191 AMBARI-1. Fix initialization of Druid Script object. (nishantmonu51) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a837d619 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a837d619 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a837d619 Branch: refs/heads/branch-2.6 Commit: a837d61915d60299fb59e16372a805ec8bc6f98f Parents: a1f8e9f Author: NishantAuthored: Thu Oct 12 21:20:11 2017 +0530 Committer: Nishant Committed: Thu Oct 12 22:38:12 2017 +0530 -- .../common-services/DRUID/0.10.1/package/scripts/druid_node.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a837d619/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py index 8053dcb..8e1a44f 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py +++ b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py @@ -32,6 +32,7 @@ from druid import druid, get_daemon_cmd, getPid class DruidBase(Script): def __init__(self, nodeType=None): +Script.__init__(self) self.nodeType = nodeType def install(self, env):
ambari git commit: AMBARI-22221. Fix initialization of Druid Script object. (nishantmonu51)
Repository: ambari Updated Branches: refs/heads/trunk 527e45d50 -> d88d3cc06 AMBARI-1. Fix initialization of Druid Script object. (nishantmonu51) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d88d3cc0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d88d3cc0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d88d3cc0 Branch: refs/heads/trunk Commit: d88d3cc06f5355802a95db35c26e383502b658c7 Parents: 527e45d Author: NishantAuthored: Thu Oct 12 21:20:11 2017 +0530 Committer: Nishant Committed: Thu Oct 12 22:37:26 2017 +0530 -- .../common-services/DRUID/0.10.1/package/scripts/druid_node.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d88d3cc0/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py index 8053dcb..8e1a44f 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py +++ b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/druid_node.py @@ -32,6 +32,7 @@ from druid import druid, get_daemon_cmd, getPid class DruidBase(Script): def __init__(self, nodeType=None): +Script.__init__(self) self.nodeType = nodeType def install(self, env):
ambari git commit: AMBARI-22219 - Set current_version for Backward Compatibility (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.6 4e69090c4 -> a1f8e9fe5 AMBARI-22219 - Set current_version for Backward Compatibility (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1f8e9fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1f8e9fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1f8e9fe Branch: refs/heads/branch-2.6 Commit: a1f8e9fe59eaeaade2a508518b7abb8e3a009556 Parents: 4e69090 Author: Jonathan HurleyAuthored: Thu Oct 12 09:55:33 2017 -0400 Committer: Jonathan Hurley Committed: Thu Oct 12 10:11:01 2017 -0400 -- .../actionmanager/ExecutionCommandWrapper.java | 15 +++ .../apache/ambari/server/agent/ExecutionCommand.java | 14 -- 2 files changed, 27 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f8e9fe/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java index f37bdd5..054ab47 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java @@ -31,6 +31,7 @@ import org.apache.ambari.server.RoleCommand; import org.apache.ambari.server.ServiceNotFoundException; import org.apache.ambari.server.agent.AgentCommand.AgentCommandType; import org.apache.ambari.server.agent.ExecutionCommand; +import org.apache.ambari.server.agent.ExecutionCommand.KeyNames; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.orm.dao.HostRoleCommandDAO; import org.apache.ambari.server.orm.entities.RepositoryVersionEntity; @@ -233,6 +234,12 @@ public class ExecutionCommandWrapper { return executionCommand; } + /** + * Sets the repository version and hooks information on the execution command. + * + * @param cluster + * the cluster (not {@code null}). + */ public void setVersions(Cluster cluster) { // set the repository version for the component this command is for - // always use the current desired version @@ -255,6 +262,7 @@ public class ExecutionCommandWrapper { } Map commandParams = executionCommand.getCommandParams(); + Map hostParams = executionCommand.getHostLevelParams(); if (null != repositoryVersion) { // only set the version if it's not set and this is NOT an install @@ -264,6 +272,13 @@ public class ExecutionCommandWrapper { commandParams.put(VERSION, repositoryVersion.getVersion()); } +// !!! although not used anymore since the cluster has more than 1 version, this +// property might be needed by legacy mpacks or extension services, so +// continue to include it for backward compatibility +if (repositoryVersion.isResolved()) { + hostParams.put(KeyNames.CURRENT_VERSION, repositoryVersion.getVersion()); +} + StackId stackId = repositoryVersion.getStackId(); StackInfo stackInfo = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion()); http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f8e9fe/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java index 6ffc9c1..b3f9130 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java @@ -505,10 +505,20 @@ public class ExecutionCommand extends AgentCommand { * upgrades, this value may change depending on the progress of the upgrade * and the type/direction. */ +String VERSION = "version"; + +/** + * Previously used to represent the version of a cluster, this singular + * value is no longer valid. However, to maintain backward compatibility + * with Python code inside of management packs and extension services it + * will be still be provided. It should be set to the repository version of + * the command, if th repository has been resolved. + */ +@Deprecated @Experimental( feature =
ambari git commit: AMBARI-22218 Log Search UI generated by maven build uses mock data instead of real API. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 68df85d40 -> 527e45d50 AMBARI-22218 Log Search UI generated by maven build uses mock data instead of real API. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/527e45d5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/527e45d5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/527e45d5 Branch: refs/heads/trunk Commit: 527e45d50f2a6faebd7cf842297aa37ef53f8b16 Parents: 68df85d Author: ababiichukAuthored: Thu Oct 12 15:54:31 2017 +0300 Committer: ababiichuk Committed: Thu Oct 12 17:15:32 2017 +0300 -- ambari-logsearch/ambari-logsearch-web/package.json | 2 +- ambari-logsearch/ambari-logsearch-web/pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/527e45d5/ambari-logsearch/ambari-logsearch-web/package.json -- diff --git a/ambari-logsearch/ambari-logsearch-web/package.json b/ambari-logsearch/ambari-logsearch-web/package.json index f8525c4..2c6aa8d 100644 --- a/ambari-logsearch/ambari-logsearch-web/package.json +++ b/ambari-logsearch/ambari-logsearch-web/package.json @@ -6,7 +6,7 @@ "ng": "ng", "start": "webpack-dev-server --port=4200", "build": "webpack", -"build-prod": "NODE_ENV='production' webpack -p", +"build-prod": "NODE_ENV=production webpack -p", "test": "karma start ./karma.conf.js", "lint": "ng lint", "e2e": "protractor ./protractor.conf.js", http://git-wip-us.apache.org/repos/asf/ambari/blob/527e45d5/ambari-logsearch/ambari-logsearch-web/pom.xml -- diff --git a/ambari-logsearch/ambari-logsearch-web/pom.xml b/ambari-logsearch/ambari-logsearch-web/pom.xml index a0621d9..953f0df 100644 --- a/ambari-logsearch/ambari-logsearch-web/pom.xml +++ b/ambari-logsearch/ambari-logsearch-web/pom.xml @@ -76,6 +76,9 @@ generate-resources + +production + -p
ambari git commit: AMBARI-22115. Alerts for OneFS mpack (amagyar)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-22008 95aed902d -> c8a34e51a AMBARI-22115. Alerts for OneFS mpack (amagyar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c8a34e51 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c8a34e51 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c8a34e51 Branch: refs/heads/branch-feature-AMBARI-22008 Commit: c8a34e51ad1d9013684633937fa4246f34505ee7 Parents: 95aed90 Author: Attila MagyarAuthored: Thu Oct 12 15:21:13 2017 +0200 Committer: Attila Magyar Committed: Thu Oct 12 15:21:13 2017 +0200 -- ambari-server/docs/configuration/index.md | 1 + .../server/alerts/JmxServerSideAlert.java | 104 +++ .../apache/ambari/server/alerts/Threshold.java | 73 + .../server/configuration/Configuration.java | 11 ++ .../server/controller/ControllerModule.java | 1 + .../server/controller/jmx/JMXMetricHolder.java | 27 + .../org/apache/ambari/server/state/Alert.java | 1 + .../ambari/server/state/alert/AlertUri.java | 41 .../ambari/server/state/alert/MetricSource.java | 7 ++ .../ambari/server/state/alert/Reporting.java| 43 .../ambari/server/state/alert/ServerSource.java | 15 +++ .../services/AmbariServerAlertService.java | 7 +- .../ambari/server/alerts/ThresholdTest.java | 90 .../controller/jmx/JMXMetricHolderTest.java | 61 +++ .../ambari/server/state/alert/AlertUriTest.java | 60 +++ 15 files changed, 541 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c8a34e51/ambari-server/docs/configuration/index.md -- diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md index 9dbe9c4..8f1531b 100644 --- a/ambari-server/docs/configuration/index.md +++ b/ambari-server/docs/configuration/index.md @@ -57,6 +57,7 @@ The following are the properties which can be used to configure Ambari. | alerts.execution.scheduler.threadpool.size.core | The core number of threads used to process incoming alert events. The value should be increased as the size of the cluster increases. |`2` | | alerts.execution.scheduler.threadpool.size.max | The number of threads used to handle alerts received from the Ambari Agents. The value should be increased as the size of the cluster increases. |`2` | | alerts.execution.scheduler.threadpool.worker.size | The number of queued alerts allowed before discarding old alerts which have not been handled. The value should be increased as the size of the cluster increases. |`2000` | +| alerts.server.side.scheduler.threadpool.size.core | The core pool size of the executor service that runs server side alerts. |`4` | | alerts.snmp.dispatcher.udp.port | The UDP port to use when binding the SNMP dispatcher on Ambari Server startup. If no port is specified, then a random port will be used. | | | alerts.template.file | The full path to the XML file that describes the different alert templates. | | | ambari.display.url | The URL to use when creating messages which should include the Ambari Server URL.The following are examples of valid values:`http://ambari.apache.org:8080` | | http://git-wip-us.apache.org/repos/asf/ambari/blob/c8a34e51/ambari-server/src/main/java/org/apache/ambari/server/alerts/JmxServerSideAlert.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/alerts/JmxServerSideAlert.java b/ambari-server/src/main/java/org/apache/ambari/server/alerts/JmxServerSideAlert.java new file mode 100644 index 000..a4b86f8 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/alerts/JmxServerSideAlert.java @@ -0,0 +1,104 @@ +/* + * 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
ambari git commit: AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk be605cbfd -> 68df85d40 AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68df85d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68df85d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68df85d4 Branch: refs/heads/trunk Commit: 68df85d402b047c54f9d0324e7f94b970c5282ee Parents: be605cb Author: Alex AntonenkoAuthored: Thu Oct 12 15:53:00 2017 +0300 Committer: Alex Antonenko Committed: Thu Oct 12 15:53:00 2017 +0300 -- .../main/service/reassign/step3_controller.js | 18 ++ .../app/mixins/wizard/assign_master_components.js | 2 +- .../app/templates/main/service/reassign/step3.hbs | 6 +++--- .../wizard/assign_master_components_test.js | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/controllers/main/service/reassign/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step3_controller.js b/ambari-web/app/controllers/main/service/reassign/step3_controller.js index c44c4f3..4898b75 100644 --- a/ambari-web/app/controllers/main/service/reassign/step3_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step3_controller.js @@ -268,9 +268,16 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ propertiesToChange: {}, - isSubmitDisabled: Em.computed.and('wizardController.isComponentWithReconfiguration', '!isLoaded'), + isSubmitDisabled: Em.computed.or('!isLoaded', 'submitButtonClicked'), + + /** + * Is Submit-click processing now + * @type {bool} + */ + submitButtonClicked: false, loadStep: function () { +this.set('submitButtonClicked', false); if (this.get('wizardController.isComponentWithReconfiguration')) { this.set('isLoaded', false); App.ajax.send({ @@ -695,8 +702,11 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ }, submit: function() { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { - App.router.send("next"); -}); +if (!this.get('submitButtonClicked')) { + this.set('submitButtonClicked', true); + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +} } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 84a56f1..c9577f8 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1195,7 +1195,7 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A } }, - nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress'), + nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress', '!isLoaded'), /** * Submit button click handler http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/app/templates/main/service/reassign/step3.hbs -- diff --git a/ambari-web/app/templates/main/service/reassign/step3.hbs b/ambari-web/app/templates/main/service/reassign/step3.hbs index 1f6a393..a6e42af 100644 --- a/ambari-web/app/templates/main/service/reassign/step3.hbs +++ b/ambari-web/app/templates/main/service/reassign/step3.hbs @@ -64,8 +64,8 @@ - {{t common.back}} -{{t common.deploy}} + {{t common.back}} + {{t common.deploy}} http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/ambari-web/test/mixins/wizard/assign_master_components_test.js -- diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js index 635143c..20efb8e 100644 --- a/ambari-web/test/mixins/wizard/assign_master_components_test.js +++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js @@ -211,6 +211,6 @@ describe('App.AssignMasterComponents', function () { }); App.TestAliases.testAsComputedOr(baseObject.create(), -'nextButtonDisabled',
ambari git commit: AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Prabhjyot Singh via Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/branch-2.6 f571f9b9a -> 4e69090c4 AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Prabhjyot Singh via Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e69090c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e69090c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e69090c Branch: refs/heads/branch-2.6 Commit: 4e69090c435b2b434cd70d965c88d0e312e47ebb Parents: f571f9b Author: Venkata SairamAuthored: Thu Oct 12 17:19:54 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:19:54 2017 +0530 -- .../ZEPPELIN/0.7.0/package/scripts/master.py| 69 +--- .../ZEPPELIN/0.7.0/package/scripts/params.py| 5 ++ 2 files changed, 36 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4e69090c/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 de023c1..a8b1b32 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 @@ -242,6 +242,17 @@ class Master(Script): if zeppelin_spark_dependencies and os.path.exists(zeppelin_spark_dependencies[0]): self.create_zeppelin_dir(params) +if params.conf_stored_in_hdfs: + if not self.is_path_exists_in_HDFS(self.get_zeppelin_conf_FS_directory(params), params.zeppelin_user): +# hdfs dfs -mkdir {zeppelin's conf directory} +params.HdfsResource(self.get_zeppelin_conf_FS_directory(params), +type="directory", +action="create_on_execute", +owner=params.zeppelin_user, +recursive_chown=True, +recursive_chmod=True +) + # if first_setup: if not glob.glob(params.conf_dir + "/interpreter.json") and \ not os.path.exists(params.conf_dir + "/interpreter.json"): @@ -323,21 +334,16 @@ class Master(Script): import json interpreter_config = os.path.join(params.conf_dir, "interpreter.json") -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and params.config['configurations']['zeppelin-config']['zeppelin.notebook.storage'] == 'org.apache.zeppelin.notebook.repo.FileSystemNotebookRepo': - - if 'zeppelin.config.fs.dir' in params.config['configurations']['zeppelin-config']: -zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) - -if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): - # copy from hdfs to /etc/zeppelin/conf/interpreter.json - kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) - kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") - shell.call(format("rm {interpreter_config};" -"{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), - user=params.zeppelin_user) -else: - Logger.info(format("{zeppelin_conf_fs} does not exist. Skipping upload of DFS.")) +if params.conf_stored_in_hdfs: + zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) + + if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): +# copy from hdfs to /etc/zeppelin/conf/interpreter.json +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) +kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") +shell.call(format("rm {interpreter_config};" + "{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), + user=params.zeppelin_user) config_content = sudo.read_file(interpreter_config) config_data = json.loads(config_content) @@ -353,28 +359,15 @@ class Master(Script): owner=params.zeppelin_user, content=json.dumps(config_data, indent=2)) -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and
ambari git commit: AMBARI-22212.Alter logic for storing interpreter.json(Prabhjyot Singh via Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/trunk 3c3b1b810 -> be605cbfd AMBARI-22212.Alter logic for storing interpreter.json(Prabhjyot Singh via Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be605cbf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be605cbf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be605cbf Branch: refs/heads/trunk Commit: be605cbfdc977ff927df89fc772b8fbb1f589fce Parents: 3c3b1b8 Author: Venkata SairamAuthored: Thu Oct 12 17:17:07 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:17:07 2017 +0530 -- .../ZEPPELIN/0.7.0/package/scripts/master.py| 69 +--- .../ZEPPELIN/0.7.0/package/scripts/params.py| 5 ++ .../stacks/2.6/ZEPPELIN/test_zeppelin_070.py| 52 +++ 3 files changed, 44 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be605cbf/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 eaa2cb9..a8b1b32 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 @@ -242,6 +242,17 @@ class Master(Script): if zeppelin_spark_dependencies and os.path.exists(zeppelin_spark_dependencies[0]): self.create_zeppelin_dir(params) +if params.conf_stored_in_hdfs: + if not self.is_path_exists_in_HDFS(self.get_zeppelin_conf_FS_directory(params), params.zeppelin_user): +# hdfs dfs -mkdir {zeppelin's conf directory} +params.HdfsResource(self.get_zeppelin_conf_FS_directory(params), +type="directory", +action="create_on_execute", +owner=params.zeppelin_user, +recursive_chown=True, +recursive_chmod=True +) + # if first_setup: if not glob.glob(params.conf_dir + "/interpreter.json") and \ not os.path.exists(params.conf_dir + "/interpreter.json"): @@ -323,21 +334,16 @@ class Master(Script): import json interpreter_config = os.path.join(params.conf_dir, "interpreter.json") -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and params.config['configurations']['zeppelin-config']['zeppelin.notebook.storage'] == 'org.apache.zeppelin.notebook.repo.FileSystemNotebookRepo': - - if 'zeppelin.config.fs.dir' in params.config['configurations']['zeppelin-config']: -zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) - -if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): - # copy from hdfs to /etc/zeppelin/conf/interpreter.json - kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) - kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") - shell.call(format("rm {interpreter_config};" -"{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), - user=params.zeppelin_user) -else: - Logger.info(format("{zeppelin_conf_fs} does not exist. Skipping upload of DFS.")) +if params.conf_stored_in_hdfs: + zeppelin_conf_fs = self.get_zeppelin_conf_FS(params) + + if self.is_path_exists_in_HDFS(zeppelin_conf_fs, params.zeppelin_user): +# copy from hdfs to /etc/zeppelin/conf/interpreter.json +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',None)) +kinit_if_needed = format("{kinit_path_local} -kt {zeppelin_kerberos_keytab} {zeppelin_kerberos_principal};") +shell.call(format("rm {interpreter_config};" + "{kinit_if_needed} hdfs --config {hadoop_conf_dir} dfs -get {zeppelin_conf_fs} {interpreter_config}"), + user=params.zeppelin_user) config_content = sudo.read_file(interpreter_config) config_data = json.loads(config_content) @@ -353,28 +359,15 @@ class Master(Script): owner=params.zeppelin_user, content=json.dumps(config_data, indent=2)) -if 'zeppelin.notebook.storage' in params.config['configurations']['zeppelin-config'] \ - and
ambari git commit: AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/branch-2.6 4fbe3c763 -> f571f9b9a AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f571f9b9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f571f9b9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f571f9b9 Branch: refs/heads/branch-2.6 Commit: f571f9b9a087719ffb106cb5ec0c21d4b0a5528a Parents: 4fbe3c7 Author: Venkata SairamAuthored: Thu Oct 12 17:05:12 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:07:51 2017 +0530 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/master.py | 6 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/params.py | 6 ++ 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f571f9b9/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 10722e0..de023c1 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 @@ -530,14 +530,16 @@ class Master(Script): elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy': if params.livy_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy_livyserver_protocol + \ + "://" + params.livy_livyserver_host + \ ":" + params.livy_livyserver_port else: del interpreter_settings[setting_key] elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy2': if params.livy2_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy2_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy2_livyserver_protocol + \ + "://" + params.livy2_livyserver_host + \ ":" + params.livy2_livyserver_port else: del interpreter_settings[setting_key] http://git-wip-us.apache.org/repos/asf/ambari/blob/f571f9b9/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py -- 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 e07da18..99e184b 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 @@ -219,17 +219,23 @@ livy2_hosts = default("/clusterHostInfo/livy2_server_hosts", []) livy_livyserver_host = None livy_livyserver_port = None +livy_livyserver_protocol = 'http' livy2_livyserver_host = None livy2_livyserver_port = None +livy2_livyserver_protocol = 'http' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stack_version_formatted) and \ len(livy_hosts) > 0: livy_livyserver_host = str(livy_hosts[0]) livy_livyserver_port = config['configurations']['livy-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy-conf']: +livy_livyserver_protocol = 'https' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, stack_version_formatted) and \ len(livy2_hosts) > 0: livy2_livyserver_host = str(livy2_hosts[0]) livy2_livyserver_port = config['configurations']['livy2-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy2-conf']: +livy2_livyserver_protocol = 'https' hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] security_enabled = config['configurations']['cluster-env']['security_enabled']
ambari git commit: AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/trunk b86f53fbe -> 3c3b1b810 AMBARI-22214.Livy protocol to be set to https in Zeppelin's interpreter setting(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c3b1b81 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c3b1b81 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c3b1b81 Branch: refs/heads/trunk Commit: 3c3b1b810ee05490fe2fe370de6132ba31bf8b72 Parents: b86f53f Author: Venkata SairamAuthored: Thu Oct 12 17:05:12 2017 +0530 Committer: Venkata Sairam Committed: Thu Oct 12 17:05:12 2017 +0530 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/master.py | 6 -- .../common-services/ZEPPELIN/0.7.0/package/scripts/params.py | 6 ++ 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3c3b1b81/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py -- 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 09944bd..eaa2cb9 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 @@ -530,14 +530,16 @@ class Master(Script): elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy': if params.livy_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy_livyserver_protocol + \ + "://" + params.livy_livyserver_host + \ ":" + params.livy_livyserver_port else: del interpreter_settings[setting_key] elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy2': if params.livy2_livyserver_host: - interpreter['properties']['zeppelin.livy.url'] = "http://; + params.livy2_livyserver_host + \ + interpreter['properties']['zeppelin.livy.url'] = params.livy2_livyserver_protocol + \ + "://" + params.livy2_livyserver_host + \ ":" + params.livy2_livyserver_port else: del interpreter_settings[setting_key] http://git-wip-us.apache.org/repos/asf/ambari/blob/3c3b1b81/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py -- 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 3242f26..b7d3df0 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 @@ -219,17 +219,23 @@ livy2_hosts = default("/clusterHostInfo/livy2_server_hosts", []) livy_livyserver_host = None livy_livyserver_port = None +livy_livyserver_protocol = 'http' livy2_livyserver_host = None livy2_livyserver_port = None +livy2_livyserver_protocol = 'http' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stack_version_formatted) and \ len(livy_hosts) > 0: livy_livyserver_host = str(livy_hosts[0]) livy_livyserver_port = config['configurations']['livy-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy-conf']: +livy_livyserver_protocol = 'https' if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, stack_version_formatted) and \ len(livy2_hosts) > 0: livy2_livyserver_host = str(livy2_hosts[0]) livy2_livyserver_port = config['configurations']['livy2-conf']['livy.server.port'] + if 'livy.keystore' in config['configurations']['livy2-conf']: +livy2_livyserver_protocol = 'https' hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] security_enabled = config['configurations']['cluster-env']['security_enabled']
ambari git commit: AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk a8caac375 -> b86f53fbe AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b86f53fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b86f53fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b86f53fb Branch: refs/heads/trunk Commit: b86f53fbe1c940811c3e49d658aad870d1dd53da Parents: a8caac3 Author: Lisnichenko DmitroAuthored: Thu Oct 12 13:57:24 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Oct 12 13:58:23 2017 +0300 -- .../apache/ambari/server/orm/DBAccessorImpl.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b86f53fb/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- 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 26670fc..faa58f2 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 @@ -1551,8 +1551,12 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTable(String tableName) throws SQLException { -String sqlQuery = "DELETE FROM " + convertObjectName(tableName); -executeQuery(sqlQuery); +if (tableExists(tableName)){ + String sqlQuery = "DELETE FROM " + convertObjectName(tableName); + executeQuery(sqlQuery); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } /** @@ -1564,7 +1568,11 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTableColumn(String tableName, String columnName, Object value) throws SQLException { -String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); -executePreparedUpdate(sqlQuery, value); +if (tableExists(tableName)){ + String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); + executePreparedUpdate(sqlQuery, value); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } }
ambari git commit: AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.6 26ff188e2 -> 4fbe3c763 AMBARI-22213. "ambari-server upgrade" failed on db schema [Upgrade] (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fbe3c76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fbe3c76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fbe3c76 Branch: refs/heads/branch-2.6 Commit: 4fbe3c763bd2516b13cf32edc382f29eaedde34e Parents: 26ff188 Author: Lisnichenko DmitroAuthored: Thu Oct 12 13:52:15 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Oct 12 13:52:15 2017 +0300 -- .../apache/ambari/server/orm/DBAccessorImpl.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbe3c76/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- 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 20b991b..09316be 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 @@ -1496,8 +1496,12 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTable(String tableName) throws SQLException{ -String sqlQuery = "DELETE FROM " + convertObjectName(tableName); -executeQuery(sqlQuery); +if (tableExists(tableName)){ + String sqlQuery = "DELETE FROM " + convertObjectName(tableName); + executeQuery(sqlQuery); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } /** @@ -1509,8 +1513,12 @@ public class DBAccessorImpl implements DBAccessor { */ @Override public void clearTableColumn(String tableName, String columnName, Object value) throws SQLException { -String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); -executePreparedUpdate(sqlQuery, value); +if (tableExists(tableName)){ + String sqlQuery = String.format("UPDATE %s SET %s = ?", convertObjectName(tableName), convertObjectName(columnName)); + executePreparedUpdate(sqlQuery, value); +} else { + LOG.warn("{} table doesn't exists, skipping", tableName); +} } /**
ambari git commit: AMBARI-22131 Move resources/stacks/HDP/3.0/widgets.json to resources/widgets.json (additional patch) (dsen)
Repository: ambari Updated Branches: refs/heads/trunk c3f6ba762 -> a8caac375 AMBARI-22131 Move resources/stacks/HDP/3.0/widgets.json to resources/widgets.json (additional patch) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8caac37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8caac37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8caac37 Branch: refs/heads/trunk Commit: a8caac375a66911ffb13f38093731158238177ec Parents: c3f6ba7 Author: Dmytro SenAuthored: Thu Oct 12 13:54:07 2017 +0300 Committer: Dmytro Sen Committed: Thu Oct 12 13:54:07 2017 +0300 -- ambari-server/src/main/assemblies/server.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a8caac37/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 37283fa..cbf11c5 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -397,6 +397,11 @@ /var/lib/ambari-server/resources + 755 + src/main/resources/widgets.json + /var/lib/ambari-server/resources + + 644 src/main/resources/slider_resources/README.txt /var/lib/ambari-server/resources/apps
ambari git commit: AMBARI-22147 Move stacks/HDP/3.0/kerberos.json to stacks/kerberos.json (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 3acfa5c12 -> c3f6ba762 AMBARI-22147 Move stacks/HDP/3.0/kerberos.json to stacks/kerberos.json (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c3f6ba76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3f6ba76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3f6ba76 Branch: refs/heads/trunk Commit: c3f6ba7621963b1086b7d9754d49b8663c7892b5 Parents: 3acfa5c Author: Dmytro SenAuthored: Thu Oct 12 13:52:31 2017 +0300 Committer: Dmytro Sen Committed: Thu Oct 12 13:52:31 2017 +0300 -- ambari-server/src/main/assemblies/server.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f6ba76/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 3079d1b..37283fa 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -392,6 +392,11 @@ /var/lib/ambari-server/resources + 755 + src/main/resources/kerberos.json + /var/lib/ambari-server/resources + + 644 src/main/resources/slider_resources/README.txt /var/lib/ambari-server/resources/apps
ambari git commit: AMBARI-22215 Refine cluster second aggregator by aligning sink publish times to 1 minute boundaries. (dsen)
Repository: ambari Updated Branches: refs/heads/branch-3.0-ams a9c6054fe -> e196358ca AMBARI-22215 Refine cluster second aggregator by aligning sink publish times to 1 minute boundaries. (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e196358c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e196358c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e196358c Branch: refs/heads/branch-3.0-ams Commit: e196358caa8b4c3387645238b8c48bb009cee311 Parents: a9c6054 Author: Dmytro SenAuthored: Thu Oct 12 12:49:22 2017 +0300 Committer: Dmytro Sen Committed: Thu Oct 12 12:49:22 2017 +0300 -- .../timeline/AbstractTimelineMetricsSink.java | 95 +++- .../metrics2/sink/timeline/TimelineMetric.java | 3 + .../AbstractTimelineMetricSinkTest.java | 240 +++ .../AbstractTimelineMetricSinkTest.java | 113 - .../timeline/HadoopTimelineMetricsSink.java | 2 +- .../timeline/HadoopTimelineMetricsSinkTest.java | 4 +- .../main/python/core/application_metric_map.py | 52 +++- .../python/core/TestApplicationMetricMap.py | 38 ++- .../timeline/TimelineMetricConfiguration.java | 3 - .../timeline/TimelineMetricsIgniteCache.java| 14 +- .../timeline/aggregators/AggregatorUtils.java | 2 +- .../TimelineMetricAggregatorFactory.java| 7 +- ...cClusterAggregatorSecondWithCacheSource.java | 38 +-- .../TimelineMetricsIgniteCacheTest.java | 56 - ...sterAggregatorSecondWithCacheSourceTest.java | 65 + 15 files changed, 437 insertions(+), 295 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e196358c/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java -- diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java index 3c06032..739e9dc 100644 --- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java +++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java @@ -19,6 +19,8 @@ package org.apache.hadoop.metrics2.sink.timeline; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; @@ -58,6 +60,7 @@ import java.util.List; import java.util.Random; import java.util.Set; import java.util.SortedSet; +import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -130,6 +133,13 @@ public abstract class AbstractTimelineMetricsSink { private static final int COLLECTOR_HOST_CACHE_MAX_EXPIRATION_MINUTES = 75; private static final int COLLECTOR_HOST_CACHE_MIN_EXPIRATION_MINUTES = 60; + //10 seconds + protected int collectionPeriodMillis = 1; + + private int cacheExpireTimeMinutesDefault = 10; + + private volatile Cache metricsPostCache = CacheBuilder.newBuilder().expireAfterAccess(cacheExpireTimeMinutesDefault, TimeUnit.MINUTES).build(); + static { mapper = new ObjectMapper(); AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(); @@ -289,7 +299,21 @@ public abstract class AbstractTimelineMetricsSink { return collectorHost; } + /** + * @param metrics metrics to post, metric values will be aligned by minute mark, + *last uncompleted minute will be cached to post in future iteration + */ protected boolean emitMetrics(TimelineMetrics metrics) { +return emitMetrics(metrics, false); + } + + /** + * @param metrics metrics to post, if postAllCachedMetrics is false metric values will be aligned by minute mark, + *last uncompleted minute will be cached to post in future iteration + * @param postAllCachedMetrics if set to true all cached metrics will be posted, ignoring the minute aligning + * @return + */ + protected boolean emitMetrics(TimelineMetrics metrics, boolean postAllCachedMetrics) { String connectUrl; boolean validCollectorHost = true; @@ -307,11 +331,20 @@ public abstract class AbstractTimelineMetricsSink { connectUrl = getCollectorUri(collectorHost); } +TimelineMetrics metricsToEmit
ambari git commit: AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)
Repository: ambari Updated Branches: refs/heads/trunk 5de82da3b -> 3acfa5c12 AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3acfa5c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3acfa5c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3acfa5c1 Branch: refs/heads/trunk Commit: 3acfa5c12708ff00c896943cd44e81b0a9ec85d1 Parents: 5de82da Author: Mugdha VaradkarAuthored: Thu Oct 12 14:26:43 2017 +0530 Committer: Mugdha Varadkar Committed: Thu Oct 12 14:35:59 2017 +0530 -- .../0.4.0/package/scripts/ranger_admin.py | 23 +++ .../0.4.0/package/scripts/ranger_tagsync.py | 23 +++ .../1.0.0.3.0/package/scripts/ranger_admin.py | 24 +++- .../1.0.0.3.0/package/scripts/ranger_tagsync.py | 23 +++ 4 files changed, 75 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py index 848b137..d0a725a 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management.core.exceptions import Fail from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.libraries.script import Script from resource_management.core.resources.system import Execute, File from resource_management.core.exceptions import ComponentIsNotRunning @@ -199,11 +200,25 @@ class RangerAdmin(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if upgrade_stack is None: - raise Fail('Unable to determine the stack and stack version') +orchestration = stack_select.PACKAGE_SCOPE_STANDARD +summary = upgrade_summary.get_upgrade_summary() -stack_select.select_packages(params.version) +if summary is not None: + orchestration = summary.orchestration + if orchestration is None: +raise Fail("The upgrade summary does not contain an orchestration type") + + if orchestration.upper() in stack_select._PARTIAL_ORCHESTRATION_SCOPES: +orchestration = stack_select.PACKAGE_SCOPE_PATCH + +stack_select_packages = stack_select.get_packages(orchestration, service_name = "RANGER", component_name = "RANGER_ADMIN") +if stack_select_packages is None: + raise Fail("Unable to get packages for stack-select") + +Logger.info("RANGER_ADMIN component will be stack-selected to version {0} using a {1} orchestration".format(params.version, orchestration.upper())) + +for stack_select_package_name in stack_select_packages: + stack_select.select(stack_select_package_name, params.version) def get_log_folder(self): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py index 3aae8ff..b1a1819 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py @@ -19,6 +19,7 @@ limitations under the License. """ from resource_management.libraries.script import Script from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.core.resources.system import Execute, File from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.core.exceptions import ComponentIsNotRunning @@ -102,11 +103,25 @@ class RangerTagsync(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if
ambari git commit: AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)
Repository: ambari Updated Branches: refs/heads/branch-2.6 16ceccfa7 -> 26ff188e2 AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/26ff188e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26ff188e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26ff188e Branch: refs/heads/branch-2.6 Commit: 26ff188e2cce560fc73334c9f2d928f69b6beb2b Parents: 16ceccf Author: Mugdha VaradkarAuthored: Thu Oct 12 14:08:27 2017 +0530 Committer: Mugdha Varadkar Committed: Thu Oct 12 14:34:35 2017 +0530 -- .../0.4.0/package/scripts/ranger_admin.py | 23 ++ .../0.4.0/package/scripts/ranger_tagsync.py | 23 ++ .../RANGER/package/scripts/ranger_admin.py | 25 +++- 3 files changed, 57 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26ff188e/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py index f779c18..39dad77 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management.core.exceptions import Fail from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.libraries.functions.constants import Direction from resource_management.libraries.script import Script from resource_management.core.resources.system import Execute, File @@ -198,11 +199,25 @@ class RangerAdmin(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if upgrade_stack is None: - raise Fail('Unable to determine the stack and stack version') +orchestration = stack_select.PACKAGE_SCOPE_STANDARD +summary = upgrade_summary.get_upgrade_summary() -stack_select.select_packages(params.version) +if summary is not None: + orchestration = summary.orchestration + if orchestration is None: +raise Fail("The upgrade summary does not contain an orchestration type") + + if orchestration.upper() in stack_select._PARTIAL_ORCHESTRATION_SCOPES: +orchestration = stack_select.PACKAGE_SCOPE_PATCH + +stack_select_packages = stack_select.get_packages(orchestration, service_name = "RANGER", component_name = "RANGER_ADMIN") +if stack_select_packages is None: + raise Fail("Unable to get packages for stack-select") + +Logger.info("RANGER_ADMIN component will be stack-selected to version {0} using a {1} orchestration".format(params.version, orchestration.upper())) + +for stack_select_package_name in stack_select_packages: + stack_select.select(stack_select_package_name, params.version) def get_log_folder(self): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/26ff188e/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py index 74439bf..8875f7f 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py @@ -19,6 +19,7 @@ limitations under the License. """ from resource_management.libraries.script import Script from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary from resource_management.core.resources.system import Execute, File from resource_management.libraries.functions.check_process_status import check_process_status from resource_management.core.exceptions import ComponentIsNotRunning @@ -98,11 +99,25 @@ class RangerTagsync(Script): import params env.set_params(params) -upgrade_stack = stack_select._get_upgrade_stack() -if upgrade_stack is None: - raise Fail('Unable to determine the stack
ambari git commit: AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore)
Repository: ambari Updated Branches: refs/heads/branch-2.6 d94b468e7 -> 16ceccfa7 AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/16ceccfa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16ceccfa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16ceccfa Branch: refs/heads/branch-2.6 Commit: 16ceccfa7556aa6382dc2ea8b3cfff03a64a5dfc Parents: d94b468 Author: Nitiraj Singh RathoreAuthored: Thu Oct 12 12:45:56 2017 +0530 Committer: Nitiraj Singh Rathore Committed: Thu Oct 12 12:45:56 2017 +0530 -- .../view/hive20/resources/browser/DDLProxy.java | 154 +-- .../hive20/resources/uploads/UploadService.java | 12 +- .../uploads/query/InsertFromQueryInput.java | 13 +- .../databases/database/tables/upload-table.js | 12 ++ 4 files changed, 140 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/16ceccfa/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java index 77857f9..6d793d3 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java @@ -19,6 +19,7 @@ package org.apache.ambari.view.hive20.resources.browser; import com.google.common.base.Function; +import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.base.Strings; @@ -54,6 +55,8 @@ import org.apache.ambari.view.hive20.resources.jobs.viewJobs.Job; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobController; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobImpl; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobResourceManager; +import org.apache.ambari.view.hive20.resources.settings.Setting; +import org.apache.ambari.view.hive20.resources.settings.SettingsResourceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,11 +76,13 @@ public class DDLProxy { private final ViewContext context; private final TableMetaParserImpl tableMetaParser; + private SettingsResourceManager settingsResourceManager; @Inject - public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser) { + public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser, SettingsResourceManager settingsResourceManager) { this.context = context; this.tableMetaParser = tableMetaParser; +this.settingsResourceManager = settingsResourceManager; LOG.info("Creating DDLProxy"); } @@ -130,15 +135,19 @@ public class DDLProxy { } public Job getColumnStatsJob(final String databaseName, final String tableName, final String columnName, - JobResourceManager resourceManager) throws ServiceException { + JobResourceManager resourceManager) throws ServiceException { FetchColumnStatsQueryGenerator queryGenerator = new FetchColumnStatsQueryGenerator(databaseName, tableName, - columnName); +columnName); Optional q = queryGenerator.getQuery(); String jobTitle = "Fetch column stats for " + databaseName + "." + tableName + "." + columnName; -if(q.isPresent()) { +if (q.isPresent()) { String query = q.get(); + Optional settingsString = generateSettingsString(); + if (settingsString.isPresent()) { +query = settingsString.get() + query; + } return createJob(databaseName, query, jobTitle, resourceManager); -}else{ +} else { throw new ServiceException("Failed to generate job for {}" + jobTitle); } } @@ -228,32 +237,56 @@ public class DDLProxy { tableMeta.setDatabase(databaseName); } Optional createTableQuery = new CreateTableQueryGenerator(tableMeta).getQuery(); -if(createTableQuery.isPresent()) { +if (createTableQuery.isPresent()) { LOG.info("generated create table query : {}", createTableQuery); return createTableQuery.get(); -}else { +} else { throw new ServiceException("could not generate create table query for database : " + databaseName + " table : " + tableMeta.getTable()); } } public Job createTable(String
ambari git commit: AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore)
Repository: ambari Updated Branches: refs/heads/trunk 85fb356cc -> 5de82da3b AMBARI-22202 : Hive View 2.0 in Ambari 2.5.1 does not use the specified YARN queue when using the "Upload Table" feature. (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5de82da3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5de82da3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5de82da3 Branch: refs/heads/trunk Commit: 5de82da3b293a0306d796d79960af45bc7c88372 Parents: 85fb356 Author: Nitiraj Singh RathoreAuthored: Thu Oct 12 12:45:56 2017 +0530 Committer: Nitiraj Singh Rathore Committed: Thu Oct 12 12:47:12 2017 +0530 -- .../view/hive20/resources/browser/DDLProxy.java | 154 +-- .../hive20/resources/uploads/UploadService.java | 12 +- .../uploads/query/InsertFromQueryInput.java | 13 +- .../databases/database/tables/upload-table.js | 12 ++ 4 files changed, 140 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5de82da3/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java index 77857f9..6d793d3 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/browser/DDLProxy.java @@ -19,6 +19,7 @@ package org.apache.ambari.view.hive20.resources.browser; import com.google.common.base.Function; +import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.base.Strings; @@ -54,6 +55,8 @@ import org.apache.ambari.view.hive20.resources.jobs.viewJobs.Job; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobController; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobImpl; import org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobResourceManager; +import org.apache.ambari.view.hive20.resources.settings.Setting; +import org.apache.ambari.view.hive20.resources.settings.SettingsResourceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,11 +76,13 @@ public class DDLProxy { private final ViewContext context; private final TableMetaParserImpl tableMetaParser; + private SettingsResourceManager settingsResourceManager; @Inject - public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser) { + public DDLProxy(ViewContext context, TableMetaParserImpl tableMetaParser, SettingsResourceManager settingsResourceManager) { this.context = context; this.tableMetaParser = tableMetaParser; +this.settingsResourceManager = settingsResourceManager; LOG.info("Creating DDLProxy"); } @@ -130,15 +135,19 @@ public class DDLProxy { } public Job getColumnStatsJob(final String databaseName, final String tableName, final String columnName, - JobResourceManager resourceManager) throws ServiceException { + JobResourceManager resourceManager) throws ServiceException { FetchColumnStatsQueryGenerator queryGenerator = new FetchColumnStatsQueryGenerator(databaseName, tableName, - columnName); +columnName); Optional q = queryGenerator.getQuery(); String jobTitle = "Fetch column stats for " + databaseName + "." + tableName + "." + columnName; -if(q.isPresent()) { +if (q.isPresent()) { String query = q.get(); + Optional settingsString = generateSettingsString(); + if (settingsString.isPresent()) { +query = settingsString.get() + query; + } return createJob(databaseName, query, jobTitle, resourceManager); -}else{ +} else { throw new ServiceException("Failed to generate job for {}" + jobTitle); } } @@ -228,32 +237,56 @@ public class DDLProxy { tableMeta.setDatabase(databaseName); } Optional createTableQuery = new CreateTableQueryGenerator(tableMeta).getQuery(); -if(createTableQuery.isPresent()) { +if (createTableQuery.isPresent()) { LOG.info("generated create table query : {}", createTableQuery); return createTableQuery.get(); -}else { +} else { throw new ServiceException("could not generate create table query for database : " + databaseName + " table : " + tableMeta.getTable()); } } public Job createTable(String databaseName,