ambari git commit: AMBARI-13405. Improve update repo custom action.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk b23069409 -> 80c1c9c30 AMBARI-13405. Improve update repo custom action.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80c1c9c3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80c1c9c3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80c1c9c3 Branch: refs/heads/trunk Commit: 80c1c9c308a7c2d9c45169f146be4a9f9b6a142a Parents: b230694 Author: Vitaly BrodetskyiAuthored: Thu Oct 15 14:06:48 2015 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 15 14:06:48 2015 +0300 -- .../java/org/apache/ambari/server/Role.java | 1 + .../controller/AmbariActionExecutionHelper.java | 35 ++-- .../AmbariManagementControllerTest.java | 14 3 files changed, 48 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/80c1c9c3/ambari-server/src/main/java/org/apache/ambari/server/Role.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/Role.java b/ambari-server/src/main/java/org/apache/ambari/server/Role.java index c684981..df60988 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/Role.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/Role.java @@ -114,6 +114,7 @@ public class Role { public static final Role AMS_SERVICE_CHECK = valueOf("AMBARI_METRICS_SERVICE_CHECK"); public static final Role ACCUMULO_CLIENT = valueOf("ACCUMULO_CLIENT"); public static final Role INSTALL_PACKAGES = valueOf("install_packages"); + public static final Role UPDATE_REPO = valueOf("update_repo"); private String name = null; http://git-wip-us.apache.org/repos/asf/ambari/blob/80c1c9c3/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java index 564a288..d834731 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java @@ -71,6 +71,10 @@ public class AmbariActionExecutionHelper { private final static Logger LOG = LoggerFactory.getLogger(AmbariActionExecutionHelper.class); private static final String TYPE_PYTHON = "PYTHON"; + private static final String ACTION_UPDATE_REPO = "update_repo"; + private static final String SUCCESS_FACTOR_PARAMETER = "success_factor"; + + private static final float UPDATE_REPO_SUCCESS_FACTOR_DEFAULT = 0f; @Inject private Clusters clusters; @@ -224,8 +228,6 @@ public class AmbariActionExecutionHelper { * * @param actionContext the context associated with the action * @param stage stage into which tasks must be inserted - * @param retryAllowed indicates whether retry is allowed on failure - * * @throws AmbariException if the task can not be added */ public void addExecutionCommandsToStage(final ActionExecutionContext actionContext, Stage stage) @@ -346,6 +348,8 @@ public class AmbariActionExecutionHelper { } } +setAdditionalParametersForStageAccordingToAction(stage, actionContext); + // create tasks for each host for (String hostName : targetHosts) { stage.addHostRoleExecutionCommand(hostName, Role.valueOf(actionContext.getActionName()), @@ -429,6 +433,33 @@ public class AmbariActionExecutionHelper { } } + /* + * This method adds additional properties + * to action params. For example: success factor. + * + * */ + + private void setAdditionalParametersForStageAccordingToAction(Stage stage, ActionExecutionContext actionExecutionContext) throws AmbariException { +if (actionExecutionContext.getActionName().equals(ACTION_UPDATE_REPO)) { + Map params = actionExecutionContext.getParameters(); + float successFactor = UPDATE_REPO_SUCCESS_FACTOR_DEFAULT; + if (params != null && params.containsKey(SUCCESS_FACTOR_PARAMETER)) { +try{ + successFactor = Float.valueOf(params.get(SUCCESS_FACTOR_PARAMETER)); +} catch (Exception ex) { + throw new AmbariException("Failed to cast success_factor value to float!", ex.getCause()); +} + } + stage.getSuccessFactors().put(Role.UPDATE_REPO, successFactor); +} + } + + /* + * This method builds and adds repo info + * to hostLevelParams of action + * + * */ +
ambari git commit: AMBARI-13405. Improve update repo custom action.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b8a8a1be0 -> b9985a0d3 AMBARI-13405. Improve update repo custom action.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b9985a0d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9985a0d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9985a0d Branch: refs/heads/branch-2.1 Commit: b9985a0d3e765dd35c43b73c8b90ab97d6cb70e7 Parents: b8a8a1b Author: Vitaly BrodetskyiAuthored: Thu Oct 15 14:04:39 2015 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 15 14:04:39 2015 +0300 -- .../java/org/apache/ambari/server/Role.java | 1 + .../controller/AmbariActionExecutionHelper.java | 35 ++-- .../AmbariManagementControllerTest.java | 14 3 files changed, 48 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b9985a0d/ambari-server/src/main/java/org/apache/ambari/server/Role.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/Role.java b/ambari-server/src/main/java/org/apache/ambari/server/Role.java index c684981..df60988 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/Role.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/Role.java @@ -114,6 +114,7 @@ public class Role { public static final Role AMS_SERVICE_CHECK = valueOf("AMBARI_METRICS_SERVICE_CHECK"); public static final Role ACCUMULO_CLIENT = valueOf("ACCUMULO_CLIENT"); public static final Role INSTALL_PACKAGES = valueOf("install_packages"); + public static final Role UPDATE_REPO = valueOf("update_repo"); private String name = null; http://git-wip-us.apache.org/repos/asf/ambari/blob/b9985a0d/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java index 564a288..d834731 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java @@ -71,6 +71,10 @@ public class AmbariActionExecutionHelper { private final static Logger LOG = LoggerFactory.getLogger(AmbariActionExecutionHelper.class); private static final String TYPE_PYTHON = "PYTHON"; + private static final String ACTION_UPDATE_REPO = "update_repo"; + private static final String SUCCESS_FACTOR_PARAMETER = "success_factor"; + + private static final float UPDATE_REPO_SUCCESS_FACTOR_DEFAULT = 0f; @Inject private Clusters clusters; @@ -224,8 +228,6 @@ public class AmbariActionExecutionHelper { * * @param actionContext the context associated with the action * @param stage stage into which tasks must be inserted - * @param retryAllowed indicates whether retry is allowed on failure - * * @throws AmbariException if the task can not be added */ public void addExecutionCommandsToStage(final ActionExecutionContext actionContext, Stage stage) @@ -346,6 +348,8 @@ public class AmbariActionExecutionHelper { } } +setAdditionalParametersForStageAccordingToAction(stage, actionContext); + // create tasks for each host for (String hostName : targetHosts) { stage.addHostRoleExecutionCommand(hostName, Role.valueOf(actionContext.getActionName()), @@ -429,6 +433,33 @@ public class AmbariActionExecutionHelper { } } + /* + * This method adds additional properties + * to action params. For example: success factor. + * + * */ + + private void setAdditionalParametersForStageAccordingToAction(Stage stage, ActionExecutionContext actionExecutionContext) throws AmbariException { +if (actionExecutionContext.getActionName().equals(ACTION_UPDATE_REPO)) { + Map params = actionExecutionContext.getParameters(); + float successFactor = UPDATE_REPO_SUCCESS_FACTOR_DEFAULT; + if (params != null && params.containsKey(SUCCESS_FACTOR_PARAMETER)) { +try{ + successFactor = Float.valueOf(params.get(SUCCESS_FACTOR_PARAMETER)); +} catch (Exception ex) { + throw new AmbariException("Failed to cast success_factor value to float!", ex.getCause()); +} + } + stage.getSuccessFactors().put(Role.UPDATE_REPO, successFactor); +} + } + + /* + * This method builds and adds repo info + * to hostLevelParams of action + * + *
ambari git commit: AMBARI-13430 Incorrect error count on Ranger userInfo tab. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 25e535e0d -> b8a8a1be0 AMBARI-13430 Incorrect error count on Ranger userInfo tab. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b8a8a1be Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b8a8a1be Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b8a8a1be Branch: refs/heads/branch-2.1 Commit: b8a8a1be0bb5ca293660bee52a96119000d4425d Parents: 25e535e Author: aBabiichukAuthored: Thu Oct 15 10:50:51 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 10:54:42 2015 +0300 -- ambari-web/app/models/configs/theme/sub_section.js | 10 ++ ambari-web/app/models/configs/theme/sub_section_tab.js | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b8a8a1be/ambari-web/app/models/configs/theme/sub_section.js -- diff --git a/ambari-web/app/models/configs/theme/sub_section.js b/ambari-web/app/models/configs/theme/sub_section.js index 937e5ba..261d3b8 100644 --- a/ambari-web/app/models/configs/theme/sub_section.js +++ b/ambari-web/app/models/configs/theme/sub_section.js @@ -101,10 +101,12 @@ App.SubSection = DS.Model.extend({ * @type {number} */ errorsCount: function () { -return this.get('configs').filter(function(config) { - return !config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false); -}).filterProperty('isVisible').length; - }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configs.@each.overrideErrorTrigger'), +var visibleTabs = this.get('subSectionTabs').filterProperty('isVisible'); +var subSectionTabsErrors = visibleTabs.length ? visibleTabs.mapProperty('errorsCount').reduce(function(p, c) { return p + c; }) : 0; +return subSectionTabsErrors + this.get('configs').filter(function(config) { + return config.get('isVisible') && (!config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false)); +}).length; + }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configs.@each.overrideErrorTrigger', 'subSectionTabs.@each.isVisible', 'subSectionTabs.@each.errorsCount'), /** * @type {boolean} http://git-wip-us.apache.org/repos/asf/ambari/blob/b8a8a1be/ambari-web/app/models/configs/theme/sub_section_tab.js -- diff --git a/ambari-web/app/models/configs/theme/sub_section_tab.js b/ambari-web/app/models/configs/theme/sub_section_tab.js index 1d6eedf..bf7c015 100644 --- a/ambari-web/app/models/configs/theme/sub_section_tab.js +++ b/ambari-web/app/models/configs/theme/sub_section_tab.js @@ -61,9 +61,9 @@ App.SubSectionTab = DS.Model.extend({ */ errorsCount: function () { return this.get('configs').filter(function(config) { - return !config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false); + return config.get('isVisible') && (!config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false)); }).length; - }.property('configs.@each.isValid', 'configs.@each.overrideErrorTrigger'), + }.property('configs.@each.isVisible', 'configs.@each.isValid', 'configs.@each.overrideErrorTrigger'), /** * Determines if subsection is filtered by checking it own configs
ambari git commit: AMBARI-13430 Incorrect error count on Ranger userInfo tab. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk bb65cc049 -> b23069409 AMBARI-13430 Incorrect error count on Ranger userInfo tab. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b2306940 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2306940 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2306940 Branch: refs/heads/trunk Commit: b23069409876c2c9e63eabd5f1737c6b7c315345 Parents: bb65cc0 Author: aBabiichukAuthored: Thu Oct 15 10:50:51 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 10:50:51 2015 +0300 -- ambari-web/app/models/configs/theme/sub_section.js | 10 ++ ambari-web/app/models/configs/theme/sub_section_tab.js | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b2306940/ambari-web/app/models/configs/theme/sub_section.js -- diff --git a/ambari-web/app/models/configs/theme/sub_section.js b/ambari-web/app/models/configs/theme/sub_section.js index 937e5ba..261d3b8 100644 --- a/ambari-web/app/models/configs/theme/sub_section.js +++ b/ambari-web/app/models/configs/theme/sub_section.js @@ -101,10 +101,12 @@ App.SubSection = DS.Model.extend({ * @type {number} */ errorsCount: function () { -return this.get('configs').filter(function(config) { - return !config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false); -}).filterProperty('isVisible').length; - }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configs.@each.overrideErrorTrigger'), +var visibleTabs = this.get('subSectionTabs').filterProperty('isVisible'); +var subSectionTabsErrors = visibleTabs.length ? visibleTabs.mapProperty('errorsCount').reduce(function(p, c) { return p + c; }) : 0; +return subSectionTabsErrors + this.get('configs').filter(function(config) { + return config.get('isVisible') && (!config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false)); +}).length; + }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configs.@each.overrideErrorTrigger', 'subSectionTabs.@each.isVisible', 'subSectionTabs.@each.errorsCount'), /** * @type {boolean} http://git-wip-us.apache.org/repos/asf/ambari/blob/b2306940/ambari-web/app/models/configs/theme/sub_section_tab.js -- diff --git a/ambari-web/app/models/configs/theme/sub_section_tab.js b/ambari-web/app/models/configs/theme/sub_section_tab.js index 1d6eedf..bf7c015 100644 --- a/ambari-web/app/models/configs/theme/sub_section_tab.js +++ b/ambari-web/app/models/configs/theme/sub_section_tab.js @@ -61,9 +61,9 @@ App.SubSectionTab = DS.Model.extend({ */ errorsCount: function () { return this.get('configs').filter(function(config) { - return !config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false); + return config.get('isVisible') && (!config.get('isValid') || (config.get('overrides') || []).someProperty('isValid', false)); }).length; - }.property('configs.@each.isValid', 'configs.@each.overrideErrorTrigger'), + }.property('configs.@each.isVisible', 'configs.@each.isValid', 'configs.@each.overrideErrorTrigger'), /** * Determines if subsection is filtered by checking it own configs
ambari git commit: AMBARI-13389 Incorrect accounts names on Admin->Service Account page. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 782bf7d92 -> 25e535e0d AMBARI-13389 Incorrect accounts names on Admin->Service Account page. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/25e535e0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25e535e0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25e535e0 Branch: refs/heads/branch-2.1 Commit: 25e535e0dcbc36aacbcad2aa339bc857a350ddec Parents: 782bf7d Author: aBabiichukAuthored: Thu Oct 15 09:57:45 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 09:57:45 2015 +0300 -- .../ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml | 1 + .../AMBARI_METRICS/0.1.0/configuration/ams-env.xml | 1 + .../common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 1 + .../FALCON/0.5.0.2.1/configuration/falcon-env.xml| 1 + .../common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml | 1 + .../common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml | 1 + .../common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 2 ++ .../common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml | 3 +++ .../common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml | 1 + .../common-services/KNOX/0.5.0.2.2/configuration/knox-env.xml| 2 ++ .../MAHOUT/1.0.0.2.3/configuration/mahout-env.xml| 1 + .../common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 1 + .../RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml | 2 ++ .../common-services/SPARK/1.2.0.2.2/configuration/spark-env.xml | 2 ++ .../common-services/SQOOP/1.4.4.2.0/configuration/sqoop-env.xml | 1 + .../common-services/STORM/0.9.1.2.1/configuration/storm-env.xml | 1 + .../common-services/TEZ/0.4.0.2.1/configuration/tez-env.xml | 1 + .../YARN/2.1.0.2.0/configuration-mapred/mapred-env.xml | 1 + .../common-services/YARN/2.1.0.2.0/configuration/yarn-env.xml| 1 + .../ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml | 1 + .../resources/stacks/BIGTOP/0.8/configuration/cluster-env.xml| 2 ++ .../stacks/BIGTOP/0.8/services/FLUME/configuration/flume-env.xml | 1 + .../stacks/BIGTOP/0.8/services/HBASE/configuration/hbase-env.xml | 1 + .../stacks/BIGTOP/0.8/services/HDFS/configuration/hadoop-env.xml | 2 ++ .../stacks/BIGTOP/0.8/services/HIVE/configuration/hive-env.xml | 3 +++ .../stacks/BIGTOP/0.8/services/OOZIE/configuration/oozie-env.xml | 1 + .../BIGTOP/0.8/services/YARN/configuration-mapred/mapred-env.xml | 1 + .../stacks/BIGTOP/0.8/services/YARN/configuration/yarn-env.xml | 1 + .../0.8/services/ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../HDP/2.0.6.GlusterFS/services/YARN/configuration/yarn-env.xml | 1 + .../resources/stacks/HDP/2.0.6/configuration/cluster-env.xml | 2 ++ .../2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml | 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../HDP/2.1.GlusterFS/services/STORM/configuration/storm-env.xml | 1 + .../HDP/2.1.GlusterFS/services/TEZ/configuration/tez-env.xml | 1 + .../HDP/2.1.GlusterFS/services/YARN/configuration/yarn-env.xml | 1 + .../stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml| 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml| 2 ++ .../stacks/HDP/0.2/services/HDFS/configuration/hadoop-env.xml| 4 .../HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml | 1 + .../stacks/HDP/2.0.6/services/FLUME/configuration/flume-env.xml | 1 + .../HDP/0.2/services/HDFS/configuration/hadoop-env.xml | 3 +++ 44 files changed, 64 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/25e535e0/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml index 4e82773..e9969d4 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml @@ -90,6 +90,7 @@ accumulo_user +Accumulo User accumulo USER User for running Accumulo server processes.
ambari git commit: AMBARI-13389 Incorrect accounts names on Admin->Service Account page. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 8c972fc52 -> bb65cc049 AMBARI-13389 Incorrect accounts names on Admin->Service Account page. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb65cc04 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb65cc04 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb65cc04 Branch: refs/heads/trunk Commit: bb65cc04937d75c35606ed737299ecd894af69d4 Parents: 8c972fc Author: aBabiichukAuthored: Mon Oct 12 17:25:51 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 09:53:46 2015 +0300 -- .../ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml | 1 + .../AMBARI_METRICS/0.1.0/configuration/ams-env.xml | 1 + .../common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 1 + .../FALCON/0.5.0.2.1/configuration/falcon-env.xml| 1 + .../common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml | 1 + .../common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml | 1 + .../common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 2 ++ .../common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml | 3 +++ .../common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml | 1 + .../common-services/KNOX/0.5.0.2.2/configuration/knox-env.xml| 2 ++ .../MAHOUT/1.0.0.2.3/configuration/mahout-env.xml| 1 + .../common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 1 + .../RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml | 2 ++ .../common-services/SPARK/1.2.0.2.2/configuration/spark-env.xml | 2 ++ .../common-services/SQOOP/1.4.4.2.0/configuration/sqoop-env.xml | 1 + .../common-services/STORM/0.9.1.2.1/configuration/storm-env.xml | 1 + .../common-services/TEZ/0.4.0.2.1/configuration/tez-env.xml | 1 + .../YARN/2.1.0.2.0/configuration-mapred/mapred-env.xml | 1 + .../common-services/YARN/2.1.0.2.0/configuration/yarn-env.xml| 1 + .../ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml | 1 + .../resources/stacks/BIGTOP/0.8/configuration/cluster-env.xml| 2 ++ .../stacks/BIGTOP/0.8/services/FLUME/configuration/flume-env.xml | 1 + .../stacks/BIGTOP/0.8/services/HBASE/configuration/hbase-env.xml | 1 + .../stacks/BIGTOP/0.8/services/HDFS/configuration/hadoop-env.xml | 2 ++ .../stacks/BIGTOP/0.8/services/HIVE/configuration/hive-env.xml | 3 +++ .../stacks/BIGTOP/0.8/services/OOZIE/configuration/oozie-env.xml | 1 + .../BIGTOP/0.8/services/YARN/configuration-mapred/mapred-env.xml | 1 + .../stacks/BIGTOP/0.8/services/YARN/configuration/yarn-env.xml | 1 + .../0.8/services/ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../HDP/2.0.6.GlusterFS/services/YARN/configuration/yarn-env.xml | 1 + .../resources/stacks/HDP/2.0.6/configuration/cluster-env.xml | 2 ++ .../2.1.GlusterFS/services/FALCON/configuration/falcon-env.xml | 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../HDP/2.1.GlusterFS/services/STORM/configuration/storm-env.xml | 1 + .../HDP/2.1.GlusterFS/services/TEZ/configuration/tez-env.xml | 1 + .../HDP/2.1.GlusterFS/services/YARN/configuration/yarn-env.xml | 1 + .../stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml| 1 + .../services/GLUSTERFS/configuration/hadoop-env.xml | 2 ++ .../resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml| 2 ++ .../stacks/HDP/0.2/services/HDFS/configuration/hadoop-env.xml| 4 .../HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml | 1 + .../stacks/HDP/2.0.6/services/FLUME/configuration/flume-env.xml | 1 + .../HDP/0.2/services/HDFS/configuration/hadoop-env.xml | 3 +++ 44 files changed, 64 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb65cc04/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml index 4e82773..e9969d4 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml @@ -90,6 +90,7 @@ accumulo_user +Accumulo User accumulo USER User for running Accumulo server processes.
[1/3] ambari git commit: AMBARI-13433. Issues with CSV download.
Repository: ambari Updated Branches: refs/heads/trunk 95d85dbc4 -> c877445e4 http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/network_1hr.json -- diff --git a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json index 931d460..855fb1c 100644 --- a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json @@ -2,8 +2,8 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/network[1352702257,1352705857,15];, "metrics" : { "network" : { - "Out" : "[[12583.08,1352706495],[12583.08,1352706510],[12583.08,1352706525],[12583.08,1352706540],[12583.08,1352706555],[12583.08,1352706570],[12583.08,1352706585],[12583.08,1352706600],[12583.08,1352706615],[12583.08,1352706630],[12583.08,1352706645],[12583.08,1352706660],[12583.08,1352706675],[12106.336,1352706690],[10795.29,1352706705],[10795.29,1352706720],[10795.29,1352706735],[10795.29,1352706750],[10795.29,1352706765],[10795.29,1352706780],[10795.29,1352706795],[10795.29,1352706810],[10795.29,1352706825],[10795.29,1352706840],[31635.684667,1352706855],[88946.77,1352706870],[88946.77,1352706885],[68785.01,1352706900],[13340.17,1352706915],[13340.17,1352706930],[13340.17,1352706945],[13340.17,1352706960],[13340.17,1352706975],[13340.17,1352706990],[13340.17,1352707005],[13340.17,1352707020],[13340.17,1352707035],[13340.17,1352707050],[13340.17,1352707065],[13340.17,1352707080],[13340.17,1352707095],[13340.17,1352707110],[13340.17,1352707125],[13340.17,1352707140],[13340.1 7,1352707155],[13340.17,1352707170],[13118.971333,1352707185],[11681.18,1352707200],[11681.18,1352707215],[11681.18,1352707230],[11681.18,1352707245],[11681.18,1352707260],[11681.18,1352707275],[11681.18,1352707290],[11681.18,1352707305],[11681.18,1352707320],[11681.18,1352707335],[11681.18,1352707350],[11681.18,1352707365],[11681.18,1352707380],[11681.18,1352707395],[11681.18,1352707410],[11681.18,1352707425],[11681.18,1352707440],[11681.18,1352707455],[11681.18,1352707470],[11681.18,1352707485],[11983.44,1352707500],[12587.96,1352707515],[12587.96,1352707530],[12587.96,1352707545],[12587.96,1352707560],[12587.96,1352707575],[12587.96,1352707590],[12587.96,1352707605],[12587.96,1352707620],[12587.96,1352707635],[12587.96,1352707650],[12587.96,1352707665],[12587.96,1352707680],[12587.96,1352707695],[12587.96,1352707710],[12587.96,1352707725],[36661.51,1352707740],[84808.62,1352707755],[66401.5,1352707770],[15781.92,1352707785],[15781.92,1352707800],[30233.69,1352707815],[88040.7 7,1352707830],[77739.934,1352707845],[10784.5,1352707860],[10784.5,1352707875],[10784.5,1352707890],[10784.5,1352707905],[10784.5,1352707920],[10784.5,1352707935],[10784.5,1352707950],[10784.5,1352707965],[10784.5,1352707980],[10784.5,1352707995],[10784.5,1352708010],[10784.5,1352708025],[10784.5,1352708040],[10784.5,1352708055],[10784.5,1352708070],[10784.5,1352708085],[10784.5,1352708100],[10784.5,1352708115],[10784.5,1352708130],[10784.5,1352708145],[12577.01,1352708160],[12577.01,1352708175],[12577.01,1352708190],[12577.01,1352708205],[12577.01,1352708220],[12577.01,1352708235],[12577.01,1352708250],[12577.01,1352708265],[12577.01,1352708280],[12577.01,1352708295],[12577.01,1352708310],[12577.01,1352708325],[12577.01,1352708340],[12577.01,1352708355],[12577.01,1352708370],[12577.01,1352708385],[12577.01,1352708400],[12577.01,1352708415],[12577.01,1352708430],[12577.01,1352708445],[76909.477333,1352708460],[86806.78,1352708475],[86806.78,1352708490],[28706.124,1352708505],[14180. 96,1352708520],[14180.96,1352708535],[14180.96,1352708550],[14180.96,1352708565],[14180.96,1352708580],[14180.96,1352708595],[14180.96,1352708610],[14180.96,1352708625],[14180.96,1352708640],[14180.96,1352708655],[14180.96,1352708670],[14180.96,1352708685],[14180.96,1352708700],[14180.96,1352708715],[14180.96,1352708730],[14180.96,1352708745],[14180.96,1352708760],[14180.96,1352708775],[14180.96,1352708790],[12369.776,1352708805],[10784.99,1352708820],[10784.99,1352708835],[10784.99,1352708850],[10784.99,1352708865],[10784.99,1352708880],[10784.99,1352708895],[10784.99,1352708910],[10784.99,1352708925],[10784.99,1352708940],[10784.99,1352708955],[10784.99,1352708970],[10784.99,1352708985],[10784.99,1352709000],[10784.99,1352709015],[10784.99,1352709030],[10784.99,1352709045],[10784.99,1352709060],[10784.99,1352709075],[11502.454,1352709090],[12578.65,1352709105],[12578.65,1352709120],[12578.65,1352709135],[12578.65,1352709150],[12578.65,1352709165],[12578.65,1352709180],[12578.65,13
[3/3] ambari git commit: AMBARI-13433. Issues with CSV download.
AMBARI-13433. Issues with CSV download. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c877445e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c877445e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c877445e Branch: refs/heads/trunk Commit: c877445e4863a14754faea893555f80b6f909491 Parents: 95d85db Author: Alex AntonenkoAuthored: Thu Oct 15 17:00:52 2015 +0300 Committer: Alex Antonenko Committed: Thu Oct 15 17:40:24 2015 +0300 -- .../assets/data/cluster_metrics/cpu_1hr.json| 10 +-- .../assets/data/cluster_metrics/load_1hr.json | 8 +- .../assets/data/cluster_metrics/memory_1hr.json | 12 +-- .../data/cluster_metrics/network_1hr.json | 4 +- .../common/widgets/export_metrics_mixin.js | 14 +++- ambari-web/app/styles/application.less | 4 +- .../app/styles/enhanced_service_dashboard.less | 78 ++-- .../app/templates/common/chart/linear_time.hbs | 12 ++- .../templates/common/widget/gauge_widget.hbs| 14 ++-- .../templates/common/widget/graph_widget.hbs| 22 +++--- .../templates/common/widget/number_widget.hbs | 8 +- .../templates/common/widget/template_widget.hbs | 14 ++-- .../app/templates/main/charts/linear_time.hbs | 4 +- .../main/dashboard/widgets/cluster_metrics.hbs | 2 +- .../app/views/common/chart/linear_time.js | 22 -- .../views/common/export_metrics_menu_view.js| 2 +- .../views/common/widget/graph_widget_view.js| 16 ++-- .../dashboard/widgets/cluster_metrics_widget.js | 2 +- .../common/widgets/export_metrics_mixin_test.js | 43 +-- .../test/views/common/chart/linear_time_test.js | 20 + 20 files changed, 196 insertions(+), 115 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json -- diff --git a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json index 89b0dfa..bb8d7cb 100644 --- a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json @@ -2,11 +2,11 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/cpu[1352702257,1352705857,15];, "metrics" : { "cpu" : { - "User" : "[[15.5,1352706465],[15.96667,1352706480],[16.4,1352706495],[15.5,1352706510],[15.5,1352706525],[15.5,1352706540],[15.5,1352706555],[15.5,1352706570],[15.82,1352706585],[16.7,1352706600],[16.16667,1352706615],[14.7,1352706630],[14.7,1352706645],[14.96667,1352706660],[15.64,1352706675],[15.48,1352706690],[15.7,1352706705],[15.7,1352706720],[15.7,1352706735],[15.7,1352706750],[15.7,1352706765],[15.62,1352706780],[15.24,1352706795],[14.78,1352706810],[14.7,1352706825],[29.9,1352706840],[51.38667,1352706855],[29.8,1352706870],[36.2,1352706885],[41.58667,1352706900],[48.16,1352706915],[15.2,1352706930],[14.98,1352706945],[14.1,1352706960],[14.2,1352706975],[15.1,1352706990],[15.1,1352707005],[15.1,1352707020],[15.1,1352707035],[15.38,1352707050],[17.01333,1352707065],[15.8,1352707080],[15.8,1352707095],[15.8,1352707110],[15.8,1352707125],[15.8,1352707140],[15.8,1352707155],[15.92,1352707170],[17.74667,1352707185],[26.5,13 52707200],[33.38,1352707215],[62.1,1352707230],[66.9,1352707245],[57.88,1352707260],[20.42,1352707275],[15.22,1352707290],[16.5,1352707305],[16.04,1352707320],[14.2,1352707335],[14.2,1352707350],[14.2,1352707365],[14.2,1352707380],[14.2,1352707395],[14.4,1352707410],[15.2,1352707425],[15.34,1352707440],[15.9,1352707455],[15.9,1352707470],[15.9,1352707485],[15.8,1352707500],[15.1,1352707515],[14.94,1352707530],[16.5,1352707545],[15.9,1352707560],[14.8,1352707575],[15.1,1352707590],[15.8,1352707605],[15.9,1352707620],[16.1,1352707635],[16.1,1352707650],[16.1,1352707665],[15.76667,1352707680],[15.1,1352707695],[15.1,1352707710],[15.1,1352707725],[15.96667,1352707740],[31.94,1352707755],[56.40667,1352707770],[16.0,1352707785],[22.04,1352707800],[45.68,1352707815],[39.77333,1352707830],[14.9,1352707845],[14.9,1352707860],[14.9,1352707875],[14.9,1352707890],[14.9,1352707905],[14.96,1352707920],[15.0,1352707935],[14.2,1352707950],[14.2,1352707965],[1
[2/3] ambari git commit: AMBARI-13433. Issues with CSV download.
http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json -- diff --git a/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json b/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json index 40d9170..576c25f 100644 --- a/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json @@ -2,12 +2,12 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/memory[1352702257,1352705857,15];, "metrics" : { "memory" : { - "Cache" : "[[2.19856896E8,1352706465],[2.19856896E8,1352706480],[2.146645E8,1352706495],[2.04279808E8,1352706510],[2.04279808E8,1352706525],[2.0454959787E8,1352706540],[2.0529152E8,1352706555],[2.059829248E8,1352706570],[2.07884288E8,1352706585],[2.07884288E8,1352706600],[2.0824692053E8,1352706615],[2.0924416E8,1352706630],[2.0924416E8,1352706645],[2.0981213867E8,1352706660],[2.1137408E8,1352706675],[2.11685376E8,1352706690],[2.1254144E8,1352706705],[2.1254144E8,1352706720],[2.129313792E8,1352706735],[2.14003712E8,1352706750],[2.14003712E8,1352706765],[2.1431282347E8,1352706780],[2.1516288E8,1352706795],[2.15523328E8,1352706810],[2.1696512E8,1352706825],[2.1696512E8,1352706840],[2.1444962987E8,1352706855],[2.07532032E8,1352706870],[2.07532032E8,1352706885],[1.998348288E8,1352706900],[1.7866752E8,1352706915],[1.7916340907E8,1352706930],[1.80527104E8,1352706945],[1.80527104E8,1352706960],[1.806893056E8,1352706975],[1.81743616E8,1352706990],[1.81743616E8,1352707005],[1.819705 344E8,1352707020],[1.82878208E8,1352707035],[1.830600704E8,1352707050],[1.84242176E8,1352707065],[1.84242176E8,1352707080],[1.844666368E8,1352707095],[1.8536448E8,1352707110],[1.8536448E8,1352707125],[1.8567031467E8,1352707140],[1.8651136E8,1352707155],[1.868283904E8,1352707170],[1.88096512E8,1352707185],[1.88096512E8,1352707200],[1.888616448E8,1352707215],[1.91922176E8,1352707230],[1.91922176E8,1352707245],[1.90906368E8,1352707260],[1.86843136E8,1352707275],[1.873313792E8,1352707290],[1.89284352E8,1352707305],[1.89284352E8,1352707320],[1.894621184E8,1352707335],[1.90173184E8,1352707350],[1.90173184E8,1352707365],[1.904254976E8,1352707380],[1.91434752E8,1352707395],[1.895170048E8,1352707410],[1.81846016E8,1352707425],[1.81846016E8,1352707440],[1.821253632E8,1352707455],[1.83242752E8,1352707470],[1.83242752E8,1352707485],[1.8375748267E8,1352707500],[1.84786944E8,1352707515],[1.853145088E8,1352707530],[1.86105856E8,1352707545],[1.86105856E8,1352707560],[1.8650589867E8,1352707575],[1.8 7305984E8,1352707590],[1.87305984E8,1352707605],[1.84549376E8,1352707620],[1.7903616E8,1352707635],[1.796603904E8,1352707650],[1.80596736E8,1352707665],[1.80596736E8,1352707680],[1.8098449067E8,1352707695],[1.8176E8,1352707710],[1.8176E8,1352707725],[1.82194176E8,1352707740],[1.83062528E8,1352707755],[1.8359883093E8,1352707770],[1.85073664E8,1352707785],[1.85073664E8,1352707800],[1.833091072E8,1352707815],[1.7625088E8,1352707830],[1.7642018133E8,1352707845],[1.7752064E8,1352707860],[1.7752064E8,1352707875],[1.7768502613E8,1352707890],[1.78753536E8,1352707905],[1.78753536E8,1352707920],[1.789779968E8,1352707935],[1.7987584E8,1352707950],[1.7987584E8,1352707965],[1.788010496E8,1352707980],[1.74501888E8,1352707995],[1.7473344853E8,1352708010],[1.76238592E8,1352708025],[1.76238592E8,1352708040],[1.76238592E8,1352708055],[1.77414144E8,1352708070],[1.7749906773E8,1352708085],[1.78688E8,1352708100],[1.78688E8,1352708115],[1.78688E8,1352708130],[1.80191232E8,1352708145],[1.80191232E8,135270 8160],[1.80191232E8,1352708175],[1.77688576E8,1352708190],[1.77688576E8,1352708205],[1.78950144E8,1352708220],[1.78950144E8,1352708235],[1.78950144E8,1352708250],[1.80211712E8,1352708265],[1.80211712E8,1352708280],[1.80211712E8,1352708295],[1.81460992E8,1352708310],[1.81460992E8,1352708325],[1.7311552853E8,1352708340],[1.72519424E8,1352708355],[1.72519424E8,1352708370],[1.7511519573E8,1352708385],[1.75300608E8,1352708400],[1.76685056E8,1352708415],[1.76898048E8,1352708430],[1.76898048E8,1352708445],[1.7891437227E8,1352708460],[1.79224576E8,1352708475],[1.79224576E8,1352708490],[1.802764288E8,1352708505],[1.80539392E8,1352708520],[1.7745455787E8,1352708535],[1.763328E8,1352708550],[1.763328E8,1352708565],[1.7743817387E8,1352708580],[1.77840128E8,1352708595],[1.77840128E8,1352708610],[1.78618368E8,1352708625],[1.79007488E8,1352708640],[1.8176E8,1352708655],[1.83595008E8,1352708670],[1.83595008E8,1352708685],[1.780629504E8,1352708700],[1.74374912E8,1352708715],[1.7513076053E8,135270873
[2/2] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)
AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8738b7ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8738b7ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8738b7ee Branch: refs/heads/branch-2.1 Commit: 8738b7ee6dda5e8961304a3711b6a5b3a12f6e13 Parents: cbfe96b Author: Sumit MohantyAuthored: Thu Oct 15 08:06:19 2015 -0700 Committer: Sumit Mohanty Committed: Thu Oct 15 08:29:46 2015 -0700 -- ambari-server/pom.xml | 2 +- .../resources/ResourceInstanceFactoryImpl.java | 10 +- .../api/services/KerberosDescriptorService.java | 90 + .../server/controller/ControllerModule.java | 83 - .../controller/ResourceProviderFactory.java | 8 + .../AbstractControllerResourceProvider.java | 2 + .../KerberosDescriptorResourceProvider.java | 182 +++ .../ambari/server/controller/spi/Resource.java | 10 +- .../server/orm/dao/KerberosDescriptorDAO.java | 107 +++ .../orm/entities/KerberosDescriptorEntity.java | 56 ++ .../server/topology/KerberosDescriptor.java | 26 +++ .../topology/KerberosDescriptorFactory.java | 30 +++ .../server/topology/KerberosDescriptorImpl.java | 50 + .../server/upgrade/UpgradeCatalog213.java | 18 ++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 7 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 7 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 7 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 8 + .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 7 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 7 + .../src/main/resources/META-INF/persistence.xml | 1 + .../src/main/resources/key_properties.json | 3 + .../src/main/resources/properties.json | 8 +- .../KerberosDescriptorResourceProviderTest.java | 160 .../orm/dao/KerberosDescriptorDAOTest.java | 82 + .../scheduler/ExecutionScheduleManagerTest.java | 169 + .../server/upgrade/UpgradeCatalog213Test.java | 124 + 27 files changed, 1092 insertions(+), 172 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8738b7ee/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index fcd43a9..c76629a 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1872,7 +1872,7 @@ org.easymock easymock - 3.1 + 3.3 test http://git-wip-us.apache.org/repos/asf/ambari/blob/8738b7ee/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 0499590..e7bbec4 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 @@ -6,9 +6,9 @@ * 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 - * + * + * 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. @@ -388,6 +388,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new HostKerberosIdentityResourceDefinition(); break; + case KerberosDescriptor: +resourceDefinition = new SimpleResourceDefinition(Resource.Type.KerberosDescriptor, "kerberos_descriptor", "kerberos_descriptors"); +break; + case Credential: resourceDefinition = new CredentialResourceDefinition(); break; http://git-wip-us.apache.org/repos/asf/ambari/blob/8738b7ee/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
[2/2] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)
AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81280ea3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81280ea3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81280ea3 Branch: refs/heads/trunk Commit: 81280ea39f787ac823f5287e792a655039983576 Parents: c877445 Author: Sumit MohantyAuthored: Thu Oct 15 08:06:19 2015 -0700 Committer: Sumit Mohanty Committed: Thu Oct 15 08:06:19 2015 -0700 -- ambari-server/pom.xml | 2 +- .../resources/ResourceInstanceFactoryImpl.java | 10 +- .../api/services/KerberosDescriptorService.java | 90 + .../server/controller/ControllerModule.java | 83 - .../controller/ResourceProviderFactory.java | 8 + .../AbstractControllerResourceProvider.java | 2 + .../KerberosDescriptorResourceProvider.java | 182 +++ .../ambari/server/controller/spi/Resource.java | 10 +- .../server/orm/dao/KerberosDescriptorDAO.java | 107 +++ .../orm/entities/KerberosDescriptorEntity.java | 56 ++ .../server/topology/KerberosDescriptor.java | 26 +++ .../topology/KerberosDescriptorFactory.java | 30 +++ .../server/topology/KerberosDescriptorImpl.java | 50 + .../server/upgrade/UpgradeCatalog213.java | 18 ++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 7 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 7 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 7 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 8 + .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 7 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 7 + .../src/main/resources/META-INF/persistence.xml | 1 + .../src/main/resources/key_properties.json | 3 + .../src/main/resources/properties.json | 8 +- .../KerberosDescriptorResourceProviderTest.java | 160 .../orm/dao/KerberosDescriptorDAOTest.java | 82 + .../scheduler/ExecutionScheduleManagerTest.java | 169 + .../server/upgrade/UpgradeCatalog213Test.java | 129 + 27 files changed, 1096 insertions(+), 173 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 75a9489..17e9ea9 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1884,7 +1884,7 @@ org.easymock easymock - 3.1 + 3.3 test http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/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 0499590..e7bbec4 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 @@ -6,9 +6,9 @@ * 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 - * + * + * 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. @@ -388,6 +388,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new HostKerberosIdentityResourceDefinition(); break; + case KerberosDescriptor: +resourceDefinition = new SimpleResourceDefinition(Resource.Type.KerberosDescriptor, "kerberos_descriptor", "kerberos_descriptors"); +break; + case Credential: resourceDefinition = new CredentialResourceDefinition(); break; http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
[1/2] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.1 cbfe96b16 -> 8738b7ee6 http://git-wip-us.apache.org/repos/asf/ambari/blob/8738b7ee/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java index 8bd31f7..e0e40e8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java @@ -27,6 +27,7 @@ import com.google.inject.Provider; import com.google.inject.persist.PersistService; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.GuiceJpaInitializer; @@ -55,7 +56,9 @@ import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.stack.OsFamily; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; import org.easymock.Capture; +import org.easymock.EasyMock; import org.easymock.EasyMockSupport; +import org.easymock.IMocksControl; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -69,9 +72,10 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import static org.easymock.EasyMock.anyLong; +import java.util.List; import java.util.Map; -import static org.easymock.EasyMock.anyLong; import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.createMockBuilder; @@ -101,6 +105,8 @@ public class UpgradeCatalog213Test { private HostVersionDAO hostVersionDAO = createNiceMock(HostVersionDAO.class); private ClusterDAO clusterDAO = createNiceMock(ClusterDAO.class); + private IMocksControl mocksControl = EasyMock.createControl(); + @Before public void init() { reset(entityManagerProvider); @@ -386,6 +392,7 @@ public class UpgradeCatalog213Test { expect(mockClusters.getClusters()).andReturn(new HashMap() {{ put("normal", mockClusterExpected); }}).once(); +expect(mockClusterExpected.getCurrentStackVersion()).andReturn(new StackId("HDP", "2.2")); expect(mockClusterExpected.getDesiredConfigByType("storm-site")).andReturn(mockStormSite).atLeastOnce(); expect(mockStormSite.getProperties()).andReturn(propertiesExpectedHiveSite).atLeastOnce(); @@ -398,7 +405,7 @@ public class UpgradeCatalog213Test { @Test public void testUpdateHDFSConfiguration() throws Exception { EasyMockSupport easyMockSupport = new EasyMockSupport(); -final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); +final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); final ConfigHelper mockConfigHelper = easyMockSupport.createMock(ConfigHelper.class); final Clusters mockClusters = easyMockSupport.createStrictMock(Clusters.class); @@ -443,29 +450,29 @@ public class UpgradeCatalog213Test { Method updateAmsHbaseEnvContent = UpgradeCatalog213.class.getDeclaredMethod("updateAmsHbaseEnvContent", String.class); UpgradeCatalog213 upgradeCatalog213 = new UpgradeCatalog213(injector); String oldContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" + -"\n" + -"# The maximum amount of heap to use, in MB. Default is 1000.\n" + -"export HBASE_HEAPSIZE={{hbase_heapsize}}\n" + -"\n" + -"{% if java_version 8 %}\n" + -"export HBASE_MASTER_OPTS=\" -XX:PermSize=64m -XX:MaxPermSize={{hbase_master_maxperm_size}} -Xms{{hbase_heapsize}} -Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly\"\n" + -"export HBASE_REGIONSERVER_OPTS=\"-XX:MaxPermSize=128m -Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}} -Xmx{{regionserver_heapsize}}\"\n" + -"{% else %}\n" + -"export HBASE_MASTER_OPTS=\" -Xms{{hbase_heapsize}} -Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly\"\n" + -"export HBASE_REGIONSERVER_OPTS=\" -Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}}
[1/2] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk c877445e4 -> 81280ea39 http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java index 15234db..f8f47c7 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java @@ -27,10 +27,12 @@ import com.google.inject.Provider; import com.google.inject.persist.PersistService; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; +import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.InMemoryDefaultTestModule; +import org.apache.ambari.server.orm.dao.DaoUtils; import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Cluster; @@ -40,7 +42,10 @@ import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.OsFamily; +import org.easymock.Capture; +import org.easymock.EasyMock; import org.easymock.EasyMockSupport; +import org.easymock.IMocksControl; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -50,9 +55,11 @@ import javax.persistence.EntityManager; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; -import java.util.HashSet; +import java.util.List; import java.util.Map; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.createMockBuilder; import static org.easymock.EasyMock.createNiceMock; import static org.easymock.EasyMock.createStrictMock; @@ -72,6 +79,8 @@ public class UpgradeCatalog213Test { private UpgradeCatalogHelper upgradeCatalogHelper; private StackEntity desiredStackEntity; + private IMocksControl mocksControl = EasyMock.createControl(); + @Before public void init() { reset(entityManagerProvider); @@ -211,7 +220,7 @@ public class UpgradeCatalog213Test { expect(mockClusters.getClusters()).andReturn(new HashMap() {{ put("normal", mockClusterExpected); }}).atLeastOnce(); -expect(mockClusterExpected.getCurrentStackVersion()).andReturn(new StackId("HDP","2.2")); +expect(mockClusterExpected.getCurrentStackVersion()).andReturn(new StackId("HDP", "2.2")); expect(mockClusterExpected.getDesiredConfigByType("hbase-env")).andReturn(mockHbaseEnv).atLeastOnce(); expect(mockHbaseEnv.getProperties()).andReturn(propertiesHbaseEnv).atLeastOnce(); @@ -225,7 +234,7 @@ public class UpgradeCatalog213Test { @Test public void testUpdateHDFSConfiguration() throws Exception { EasyMockSupport easyMockSupport = new EasyMockSupport(); -final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); +final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); final ConfigHelper mockConfigHelper = easyMockSupport.createMock(ConfigHelper.class); final Clusters mockClusters = easyMockSupport.createStrictMock(Clusters.class); @@ -269,29 +278,29 @@ public class UpgradeCatalog213Test { Method updateAmsHbaseEnvContent = UpgradeCatalog213.class.getDeclaredMethod("updateAmsHbaseEnvContent", String.class); UpgradeCatalog213 upgradeCatalog213 = new UpgradeCatalog213(injector); String oldContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" + -"\n" + -"# The maximum amount of heap to use, in MB. Default is 1000.\n" + -"export HBASE_HEAPSIZE={{hbase_heapsize}}\n" + -"\n" + -"{% if java_version 8 %}\n" + -"export HBASE_MASTER_OPTS=\" -XX:PermSize=64m -XX:MaxPermSize={{hbase_master_maxperm_size}} -Xms{{hbase_heapsize}} -Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly\"\n" + -"export HBASE_REGIONSERVER_OPTS=\"-XX:MaxPermSize=128m -Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}} -Xmx{{regionserver_heapsize}}\"\n" + -
[3/3] ambari git commit: AMBARI-13433. Issues with CSV download.
AMBARI-13433. Issues with CSV download. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b22f4d8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b22f4d8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b22f4d8 Branch: refs/heads/branch-2.1 Commit: 4b22f4d875468299af75175de83d406959ce6df2 Parents: 535069c Author: Alex AntonenkoAuthored: Thu Oct 15 17:00:52 2015 +0300 Committer: Alex Antonenko Committed: Thu Oct 15 17:42:22 2015 +0300 -- .../assets/data/cluster_metrics/cpu_1hr.json| 10 +-- .../assets/data/cluster_metrics/load_1hr.json | 8 +- .../assets/data/cluster_metrics/memory_1hr.json | 12 +-- .../data/cluster_metrics/network_1hr.json | 4 +- .../common/widgets/export_metrics_mixin.js | 14 +++- ambari-web/app/styles/application.less | 4 +- .../app/styles/enhanced_service_dashboard.less | 78 ++-- .../app/templates/common/chart/linear_time.hbs | 12 ++- .../templates/common/widget/gauge_widget.hbs| 14 ++-- .../templates/common/widget/graph_widget.hbs| 22 +++--- .../templates/common/widget/number_widget.hbs | 8 +- .../templates/common/widget/template_widget.hbs | 14 ++-- .../app/templates/main/charts/linear_time.hbs | 4 +- .../main/dashboard/widgets/cluster_metrics.hbs | 2 +- .../app/views/common/chart/linear_time.js | 22 -- .../views/common/export_metrics_menu_view.js| 2 +- .../views/common/widget/graph_widget_view.js| 16 ++-- .../dashboard/widgets/cluster_metrics_widget.js | 2 +- .../common/widgets/export_metrics_mixin_test.js | 43 +-- .../test/views/common/chart/linear_time_test.js | 20 + 20 files changed, 196 insertions(+), 115 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4b22f4d8/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json -- diff --git a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json index 89b0dfa..bb8d7cb 100644 --- a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json @@ -2,11 +2,11 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/cpu[1352702257,1352705857,15];, "metrics" : { "cpu" : { - "User" : "[[15.5,1352706465],[15.96667,1352706480],[16.4,1352706495],[15.5,1352706510],[15.5,1352706525],[15.5,1352706540],[15.5,1352706555],[15.5,1352706570],[15.82,1352706585],[16.7,1352706600],[16.16667,1352706615],[14.7,1352706630],[14.7,1352706645],[14.96667,1352706660],[15.64,1352706675],[15.48,1352706690],[15.7,1352706705],[15.7,1352706720],[15.7,1352706735],[15.7,1352706750],[15.7,1352706765],[15.62,1352706780],[15.24,1352706795],[14.78,1352706810],[14.7,1352706825],[29.9,1352706840],[51.38667,1352706855],[29.8,1352706870],[36.2,1352706885],[41.58667,1352706900],[48.16,1352706915],[15.2,1352706930],[14.98,1352706945],[14.1,1352706960],[14.2,1352706975],[15.1,1352706990],[15.1,1352707005],[15.1,1352707020],[15.1,1352707035],[15.38,1352707050],[17.01333,1352707065],[15.8,1352707080],[15.8,1352707095],[15.8,1352707110],[15.8,1352707125],[15.8,1352707140],[15.8,1352707155],[15.92,1352707170],[17.74667,1352707185],[26.5,13 52707200],[33.38,1352707215],[62.1,1352707230],[66.9,1352707245],[57.88,1352707260],[20.42,1352707275],[15.22,1352707290],[16.5,1352707305],[16.04,1352707320],[14.2,1352707335],[14.2,1352707350],[14.2,1352707365],[14.2,1352707380],[14.2,1352707395],[14.4,1352707410],[15.2,1352707425],[15.34,1352707440],[15.9,1352707455],[15.9,1352707470],[15.9,1352707485],[15.8,1352707500],[15.1,1352707515],[14.94,1352707530],[16.5,1352707545],[15.9,1352707560],[14.8,1352707575],[15.1,1352707590],[15.8,1352707605],[15.9,1352707620],[16.1,1352707635],[16.1,1352707650],[16.1,1352707665],[15.76667,1352707680],[15.1,1352707695],[15.1,1352707710],[15.1,1352707725],[15.96667,1352707740],[31.94,1352707755],[56.40667,1352707770],[16.0,1352707785],[22.04,1352707800],[45.68,1352707815],[39.77333,1352707830],[14.9,1352707845],[14.9,1352707860],[14.9,1352707875],[14.9,1352707890],[14.9,1352707905],[14.96,1352707920],[15.0,1352707935],[14.2,1352707950],[14.2,1352707965],[1
ambari git commit: AMBARI-13432 Issue with config tab. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 80c1c9c30 -> 6bcdcd9ac AMBARI-13432 Issue with config tab. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6bcdcd9a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6bcdcd9a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6bcdcd9a Branch: refs/heads/trunk Commit: 6bcdcd9ac9c44c6536355b061024e91eacafa960 Parents: 80c1c9c Author: aBabiichukAuthored: Thu Oct 15 16:26:39 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 16:30:17 2015 +0300 -- ambari-web/app/controllers/main/service/info/configs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6bcdcd9a/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 947254a..4cb67a7 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -447,10 +447,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A for (var prop in config.properties) { var fileName = App.config.getOriginalFileName(config.type); var serviceConfig = allConfigs.filterProperty('name', prop).findProperty('filename', fileName); -var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); -var isFinal = !!(config.properties_attributes && config.properties_attributes.final && config.properties_attributes.final[prop]); - if (serviceConfig) { + var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); + var isFinal = !!(config.properties_attributes && config.properties_attributes.final && config.properties_attributes.final[prop]); if (self.get('selectedConfigGroup.isDefault') || configGroup.get('name') == self.get('selectedConfigGroup.name')) { var overridePlainObject = { "value": value,
ambari git commit: AMBARI-13432 Issue with config tab. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b9985a0d3 -> 535069c82 AMBARI-13432 Issue with config tab. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/535069c8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/535069c8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/535069c8 Branch: refs/heads/branch-2.1 Commit: 535069c82fbaa827daf2959943bc64e8f2c2b9bc Parents: b9985a0 Author: aBabiichukAuthored: Thu Oct 15 16:26:39 2015 +0300 Committer: aBabiichuk Committed: Thu Oct 15 16:26:58 2015 +0300 -- ambari-web/app/controllers/main/service/info/configs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/535069c8/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 34088b5..cf5c46b 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -449,10 +449,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A for (var prop in config.properties) { var fileName = App.config.getOriginalFileName(config.type); var serviceConfig = allConfigs.filterProperty('name', prop).findProperty('filename', fileName); -var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); -var isFinal = !!(config.properties_attributes && config.properties_attributes.final && config.properties_attributes.final[prop]); - if (serviceConfig) { + var value = App.config.formatPropertyValue(serviceConfig, config.properties[prop]); + var isFinal = !!(config.properties_attributes && config.properties_attributes.final && config.properties_attributes.final[prop]); if (self.get('selectedConfigGroup.isDefault') || configGroup.get('name') == self.get('selectedConfigGroup.name')) { var overridePlainObject = { "value": value,
ambari git commit: AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 6bcdcd9ac -> 95d85dbc4 AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95d85dbc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95d85dbc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95d85dbc Branch: refs/heads/trunk Commit: 95d85dbc4a890678a9565b649c037db97076fe67 Parents: 6bcdcd9 Author: Dmytro SenAuthored: Thu Oct 15 17:33:02 2015 +0300 Committer: Dmytro Sen Committed: Thu Oct 15 17:33:02 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 37 +-- .../server/upgrade/UpgradeCatalog213.java | 18 .../server/upgrade/UpgradeCatalog213Test.java | 47 3 files changed, 77 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/95d85dbc/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 12a1f44..308e7c9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -122,6 +122,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { private static final String TOPOLOGY_HOST_REQUEST_TABLE = "topology_host_request"; private static final String TOPOLOGY_HOST_TASK_TABLE = "topology_host_task"; private static final String TOPOLOGY_LOGICAL_TASK_TABLE = "topology_logical_task"; + private static final String HDFS_SITE_CONFIG = "hdfs-site"; // constants for stack table changes private static final String STACK_ID_COLUMN_NAME = "stack_id"; @@ -1458,7 +1459,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { /*** * Update dfs.namenode.rpc-address set hostname instead of localhost */ - if (cluster.getDesiredConfigByType("hdfs-site") != null && !cluster.getHosts("HDFS","NAMENODE").isEmpty()) { + if (cluster.getDesiredConfigByType(HDFS_SITE_CONFIG) != null && !cluster.getHosts("HDFS","NAMENODE").isEmpty()) { URI nameNodeRpc = null; String hostName = cluster.getHosts("HDFS","NAMENODE").iterator().next(); @@ -1467,33 +1468,19 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS") != null) { try { if (isNNHAEnabled(cluster)) { - String nn1RpcAddress = null; - Config hdfsSiteConfig = cluster.getDesiredConfigByType("hdfs-site"); - Map properties = hdfsSiteConfig.getProperties(); - String nameServices = properties.get("dfs.nameservices"); - if (!StringUtils.isEmpty(nameServices)) { -String namenodes = properties.get(String.format("dfs.ha.namenodes.%s",nameServices)); -if (!StringUtils.isEmpty(namenodes) && namenodes.split(",").length > 1) { - nn1RpcAddress = properties.get(String.format("dfs.namenode.rpc-address.%s.%s", nameServices, - namenodes.split(",")[0])); -} - } - if (!StringUtils.isEmpty(nn1RpcAddress)) { -if (!nn1RpcAddress.startsWith("http")) { - nn1RpcAddress = "http://; + nn1RpcAddress; -} -nameNodeRpc= new URI(nn1RpcAddress); - } else { -// set default value -nameNodeRpc= new URI("http://localhost:8020;); - } + // NN HA enabled + // Remove dfs.namenode.rpc-address property + Set removePropertiesSet = new HashSet<>(); + removePropertiesSet.add("dfs.namenode.rpc-address"); + removeConfigurationPropertiesFromCluster(cluster, HDFS_SITE_CONFIG, removePropertiesSet); } else { + // NN HA disabled nameNodeRpc = new URI(cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS")); + Map hdfsProp = new HashMap (); + hdfsProp.put("dfs.namenode.rpc-address", hostName + ":" + nameNodeRpc.getPort()); +
[1/3] ambari git commit: AMBARI-13433. Issues with CSV download.
Repository: ambari Updated Branches: refs/heads/branch-2.1 535069c82 -> 4b22f4d87 http://git-wip-us.apache.org/repos/asf/ambari/blob/4b22f4d8/ambari-web/app/assets/data/cluster_metrics/network_1hr.json -- diff --git a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json index 931d460..855fb1c 100644 --- a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json +++ b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json @@ -2,8 +2,8 @@ "href" : "http://ambari/api/clusters/vmc?fields=metrics/network[1352702257,1352705857,15];, "metrics" : { "network" : { - "Out" : "[[12583.08,1352706495],[12583.08,1352706510],[12583.08,1352706525],[12583.08,1352706540],[12583.08,1352706555],[12583.08,1352706570],[12583.08,1352706585],[12583.08,1352706600],[12583.08,1352706615],[12583.08,1352706630],[12583.08,1352706645],[12583.08,1352706660],[12583.08,1352706675],[12106.336,1352706690],[10795.29,1352706705],[10795.29,1352706720],[10795.29,1352706735],[10795.29,1352706750],[10795.29,1352706765],[10795.29,1352706780],[10795.29,1352706795],[10795.29,1352706810],[10795.29,1352706825],[10795.29,1352706840],[31635.684667,1352706855],[88946.77,1352706870],[88946.77,1352706885],[68785.01,1352706900],[13340.17,1352706915],[13340.17,1352706930],[13340.17,1352706945],[13340.17,1352706960],[13340.17,1352706975],[13340.17,1352706990],[13340.17,1352707005],[13340.17,1352707020],[13340.17,1352707035],[13340.17,1352707050],[13340.17,1352707065],[13340.17,1352707080],[13340.17,1352707095],[13340.17,1352707110],[13340.17,1352707125],[13340.17,1352707140],[13340.1 7,1352707155],[13340.17,1352707170],[13118.971333,1352707185],[11681.18,1352707200],[11681.18,1352707215],[11681.18,1352707230],[11681.18,1352707245],[11681.18,1352707260],[11681.18,1352707275],[11681.18,1352707290],[11681.18,1352707305],[11681.18,1352707320],[11681.18,1352707335],[11681.18,1352707350],[11681.18,1352707365],[11681.18,1352707380],[11681.18,1352707395],[11681.18,1352707410],[11681.18,1352707425],[11681.18,1352707440],[11681.18,1352707455],[11681.18,1352707470],[11681.18,1352707485],[11983.44,1352707500],[12587.96,1352707515],[12587.96,1352707530],[12587.96,1352707545],[12587.96,1352707560],[12587.96,1352707575],[12587.96,1352707590],[12587.96,1352707605],[12587.96,1352707620],[12587.96,1352707635],[12587.96,1352707650],[12587.96,1352707665],[12587.96,1352707680],[12587.96,1352707695],[12587.96,1352707710],[12587.96,1352707725],[36661.51,1352707740],[84808.62,1352707755],[66401.5,1352707770],[15781.92,1352707785],[15781.92,1352707800],[30233.69,1352707815],[88040.7 7,1352707830],[77739.934,1352707845],[10784.5,1352707860],[10784.5,1352707875],[10784.5,1352707890],[10784.5,1352707905],[10784.5,1352707920],[10784.5,1352707935],[10784.5,1352707950],[10784.5,1352707965],[10784.5,1352707980],[10784.5,1352707995],[10784.5,1352708010],[10784.5,1352708025],[10784.5,1352708040],[10784.5,1352708055],[10784.5,1352708070],[10784.5,1352708085],[10784.5,1352708100],[10784.5,1352708115],[10784.5,1352708130],[10784.5,1352708145],[12577.01,1352708160],[12577.01,1352708175],[12577.01,1352708190],[12577.01,1352708205],[12577.01,1352708220],[12577.01,1352708235],[12577.01,1352708250],[12577.01,1352708265],[12577.01,1352708280],[12577.01,1352708295],[12577.01,1352708310],[12577.01,1352708325],[12577.01,1352708340],[12577.01,1352708355],[12577.01,1352708370],[12577.01,1352708385],[12577.01,1352708400],[12577.01,1352708415],[12577.01,1352708430],[12577.01,1352708445],[76909.477333,1352708460],[86806.78,1352708475],[86806.78,1352708490],[28706.124,1352708505],[14180. 96,1352708520],[14180.96,1352708535],[14180.96,1352708550],[14180.96,1352708565],[14180.96,1352708580],[14180.96,1352708595],[14180.96,1352708610],[14180.96,1352708625],[14180.96,1352708640],[14180.96,1352708655],[14180.96,1352708670],[14180.96,1352708685],[14180.96,1352708700],[14180.96,1352708715],[14180.96,1352708730],[14180.96,1352708745],[14180.96,1352708760],[14180.96,1352708775],[14180.96,1352708790],[12369.776,1352708805],[10784.99,1352708820],[10784.99,1352708835],[10784.99,1352708850],[10784.99,1352708865],[10784.99,1352708880],[10784.99,1352708895],[10784.99,1352708910],[10784.99,1352708925],[10784.99,1352708940],[10784.99,1352708955],[10784.99,1352708970],[10784.99,1352708985],[10784.99,1352709000],[10784.99,1352709015],[10784.99,1352709030],[10784.99,1352709045],[10784.99,1352709060],[10784.99,1352709075],[11502.454,1352709090],[12578.65,1352709105],[12578.65,1352709120],[12578.65,1352709135],[12578.65,1352709150],[12578.65,1352709165],[12578.65,1352709180],[12578.65,13
[2/2] ambari git commit: AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen)
AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbfe96b1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbfe96b1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbfe96b1 Branch: refs/heads/branch-2.1 Commit: cbfe96b1693de08f95a48abd161a672475f540dd Parents: 08c431d Author: Dmytro SenAuthored: Thu Oct 15 17:59:02 2015 +0300 Committer: Dmytro Sen Committed: Thu Oct 15 17:59:02 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 37 +-- .../server/upgrade/UpgradeCatalog213.java | 18 .../server/upgrade/UpgradeCatalog213Test.java | 47 3 files changed, 77 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfe96b1/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 12a1f44..308e7c9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -122,6 +122,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { private static final String TOPOLOGY_HOST_REQUEST_TABLE = "topology_host_request"; private static final String TOPOLOGY_HOST_TASK_TABLE = "topology_host_task"; private static final String TOPOLOGY_LOGICAL_TASK_TABLE = "topology_logical_task"; + private static final String HDFS_SITE_CONFIG = "hdfs-site"; // constants for stack table changes private static final String STACK_ID_COLUMN_NAME = "stack_id"; @@ -1458,7 +1459,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { /*** * Update dfs.namenode.rpc-address set hostname instead of localhost */ - if (cluster.getDesiredConfigByType("hdfs-site") != null && !cluster.getHosts("HDFS","NAMENODE").isEmpty()) { + if (cluster.getDesiredConfigByType(HDFS_SITE_CONFIG) != null && !cluster.getHosts("HDFS","NAMENODE").isEmpty()) { URI nameNodeRpc = null; String hostName = cluster.getHosts("HDFS","NAMENODE").iterator().next(); @@ -1467,33 +1468,19 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS") != null) { try { if (isNNHAEnabled(cluster)) { - String nn1RpcAddress = null; - Config hdfsSiteConfig = cluster.getDesiredConfigByType("hdfs-site"); - Map properties = hdfsSiteConfig.getProperties(); - String nameServices = properties.get("dfs.nameservices"); - if (!StringUtils.isEmpty(nameServices)) { -String namenodes = properties.get(String.format("dfs.ha.namenodes.%s",nameServices)); -if (!StringUtils.isEmpty(namenodes) && namenodes.split(",").length > 1) { - nn1RpcAddress = properties.get(String.format("dfs.namenode.rpc-address.%s.%s", nameServices, - namenodes.split(",")[0])); -} - } - if (!StringUtils.isEmpty(nn1RpcAddress)) { -if (!nn1RpcAddress.startsWith("http")) { - nn1RpcAddress = "http://; + nn1RpcAddress; -} -nameNodeRpc= new URI(nn1RpcAddress); - } else { -// set default value -nameNodeRpc= new URI("http://localhost:8020;); - } + // NN HA enabled + // Remove dfs.namenode.rpc-address property + Set removePropertiesSet = new HashSet<>(); + removePropertiesSet.add("dfs.namenode.rpc-address"); + removeConfigurationPropertiesFromCluster(cluster, HDFS_SITE_CONFIG, removePropertiesSet); } else { + // NN HA disabled nameNodeRpc = new URI(cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS")); + Map hdfsProp = new HashMap (); + hdfsProp.put("dfs.namenode.rpc-address", hostName + ":" + nameNodeRpc.getPort()); + updateConfigurationPropertiesForCluster(cluster, HDFS_SITE_CONFIG, +
[1/2] ambari git commit: AMBARI-13390 Unable to set user value for kafka-broker/kafka.metrics.reporters (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.1 4b22f4d87 -> cbfe96b16 AMBARI-13390 Unable to set user value for kafka-broker/kafka.metrics.reporters (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08c431d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08c431d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08c431d4 Branch: refs/heads/branch-2.1 Commit: 08c431d4bbb3b2bd58e830009350fb88ba570618 Parents: 4b22f4d Author: Dmytro SenAuthored: Tue Oct 13 16:11:43 2015 +0300 Committer: Dmytro Sen Committed: Thu Oct 15 17:58:24 2015 +0300 -- .../server/upgrade/UpgradeCatalog213.java | 38 + .../0.8.1.2.2/configuration/kafka-broker.xml| 2 +- .../KAFKA/0.8.1.2.2/package/scripts/kafka.py| 5 +- .../KAFKA/0.8.1.2.2/package/scripts/params.py | 10 .../server/upgrade/UpgradeCatalog213Test.java | 56 +++- 5 files changed, 95 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08c431d4/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index b60404e..4217cdd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -65,6 +65,7 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.Set; import java.util.UUID; /** @@ -73,6 +74,7 @@ import java.util.UUID; public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private static final String STORM_SITE = "storm-site"; + private static final String KAFKA_BROKER = "kafka-broker"; private static final String AMS_ENV = "ams-env"; private static final String AMS_HBASE_ENV = "ams-hbase-env"; private static final String HBASE_ENV_CONFIG = "hbase-env"; @@ -156,6 +158,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { updateAMSConfigs(); updateHbaseEnvConfig(); updateAlertDefinitions(); +updateKafkaConfigs(); } /** @@ -643,6 +646,41 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { } + protected void updateKafkaConfigs() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); +Clusters clusters = ambariManagementController.getClusters(); + +if (clusters != null) { + Map clusterMap = clusters.getClusters(); + if (clusterMap != null && !clusterMap.isEmpty()) { +for (final Cluster cluster : clusterMap.values()) { + Set installedServices =cluster.getServices().keySet(); + Config kafkaBroker = cluster.getDesiredConfigByType(KAFKA_BROKER); + if (kafkaBroker != null) { +Map newProperties = new HashMap<>(); +Map kafkaBrokerProperties = kafkaBroker.getProperties(); +String kafkaMetricsReporters = kafkaBrokerProperties.get("kafka.metrics.reporters"); +if (kafkaMetricsReporters == null || + "{{kafka_metrics_reporters}}".equals(kafkaMetricsReporters)) { + + if (installedServices.contains("AMBARI_METRICS")) { +newProperties.put("kafka.metrics.reporters", "org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter"); + } else if (installedServices.contains("GANGLIA")) { +newProperties.put("kafka.metrics.reporters", "kafka.ganglia.KafkaGangliaMetricsReporter"); + } else { +newProperties.put("kafka.metrics.reporters", " "); + } + +} +if (!newProperties.isEmpty()) { + updateConfigurationPropertiesForCluster(cluster, KAFKA_BROKER, newProperties, true, true); +} + } +} + } +} + } + protected String updateAmsEnvContent(String oldContent) { if (oldContent == null) { return null; http://git-wip-us.apache.org/repos/asf/ambari/blob/08c431d4/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml
ambari git commit: AMBARI-13438. Ranger Audit properties for all services should be recommended to be same as in ranger service. (jaimin)
Repository: ambari Updated Branches: refs/heads/branch-2.1 7a705671a -> d794062b8 AMBARI-13438. Ranger Audit properties for all services should be recommended to be same as in ranger service. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d794062b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d794062b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d794062b Branch: refs/heads/branch-2.1 Commit: d794062b828feb634669ecb7fcf87da5a37b83fb Parents: 7a70567 Author: Jaimin JetlyAuthored: Thu Oct 15 16:45:23 2015 -0700 Committer: Jaimin Jetly Committed: Thu Oct 15 16:56:30 2015 -0700 -- .../RANGER/0.4.0/configuration/ranger-env.xml | 20 +++--- .../stacks/HDP/2.0.6/services/stack_advisor.py | 33 + .../HBASE/configuration/ranger-hbase-audit.xml | 43 +++- .../HDFS/configuration/ranger-hdfs-audit.xml| 43 +++- .../HIVE/configuration/ranger-hive-audit.xml| 43 +++- .../KAFKA/configuration/ranger-kafka-audit.xml | 45 +++- .../KNOX/configuration/ranger-knox-audit.xml| 43 +++- .../RANGER/configuration/ranger-admin-site.xml | 10 ++- .../RANGER/configuration/ranger-env.xml | 32 + .../RANGER/configuration/ranger-ugsync-site.xml | 8 +-- .../services/RANGER/themes/theme_version_2.json | 72 ++-- .../STORM/configuration/ranger-storm-audit.xml | 43 +++- .../YARN/configuration/ranger-yarn-audit.xml| 43 +++- .../stacks/HDP/2.3/services/stack_advisor.py| 47 + .../stacks/2.0.6/common/test_stack_advisor.py | 65 ++ 15 files changed, 510 insertions(+), 80 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d794062b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml index 0a2a3db..59b7d9e 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml +++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml @@ -116,11 +116,11 @@ Yes - Enabled + ON No - Disabled + OFF 1 @@ -138,11 +138,11 @@ Yes - Enabled + ON No - Disabled + OFF 1 @@ -160,11 +160,11 @@ Yes - Enabled + ON No - Disabled + OFF 1 @@ -182,11 +182,11 @@ Yes - Enabled + ON No - Disabled + OFF 1 @@ -204,11 +204,11 @@ Yes - Enabled + ON No - Disabled + OFF 1 http://git-wip-us.apache.org/repos/asf/ambari/blob/d794062b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 9bb21ea..7fb9884 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -483,6 +483,18 @@ class HDP206StackAdvisor(DefaultStackAdvisor): pass + def getHostNamesWithComponent(self, serviceName, componentName, services): +""" +Returns the list of hostnames on which service component is installed +""" +if services is not None and serviceName in [service["StackServices"]["service_name"] for service in services["services"]]: + service = [serviceEntry for serviceEntry in services["services"] if serviceEntry["StackServices"]["service_name"] == serviceName][0] + components = [componentEntry for componentEntry in service["components"] if componentEntry["StackServiceComponents"]["component_name"] == componentName] + if (len(components) > 0 and len(components[0]["StackServiceComponents"]["hostnames"]) > 0): +componentHostnames = components[0]["StackServiceComponents"]["hostnames"] +return componentHostnames +return [] +
ambari git commit: AMBARI-13443. Do not timeout when user is on wizard (rzang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d794062b8 -> 119a50fcf AMBARI-13443. Do not timeout when user is on wizard (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/119a50fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/119a50fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/119a50fc Branch: refs/heads/branch-2.1 Commit: 119a50fcfffbb4344995544323b3f06996a51c88 Parents: d794062 Author: Richard ZangAuthored: Thu Oct 15 17:34:00 2015 -0700 Committer: Richard Zang Committed: Thu Oct 15 17:42:03 2015 -0700 -- ambari-web/app/controllers/main.js | 8 +++- .../main/admin/stack_and_upgrade_controller_test.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/119a50fc/ambari-web/app/controllers/main.js -- diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js index b7b0b4a..fb73770 100644 --- a/ambari-web/app/controllers/main.js +++ b/ambari-web/app/controllers/main.js @@ -227,7 +227,7 @@ App.MainController = Em.Controller.extend({ checkActiveness: function() { var scope = App.router.get('mainController'); //console.error("checkActiveness " + scope.get('lastUserActiveTime') + " : " + Date.now()); -if (Date.now() - scope.get('lastUserActiveTime') > scope.get('userTimeOut')) { +if (Date.now() - scope.get('lastUserActiveTime') > scope.get('userTimeOut') && !scope.isOnWizard()) { scope.set('isUserActive', false); //console.error("LOGOUT!"); scope.unbindActivityEventMonitors(); @@ -241,6 +241,12 @@ App.MainController = Em.Controller.extend({ this.bindActivityEventMonitors(); }, + isOnWizard: function() { +var isWizard = window.location.href.indexOf('/step') != -1; +var isUpgrade = window.location.href.indexOf('/stack/upgrade') != -1; +return isWizard || isUpgrade; + }, + bindActivityEventMonitors: function() { $(window).bind('mousemove', this.keepActive); $(window).bind('keypress', this.keepActive); http://git-wip-us.apache.org/repos/asf/ambari/blob/119a50fc/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js -- diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js index ce176ea..0124608 100644 --- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js +++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js @@ -311,8 +311,8 @@ describe('App.MainAdminStackAndUpgradeController', function() { value: '2.2', label: 'HDP-2.2', type: 'ROLLING', - skipComponentFailures: false, - skipSCFailures: false + skipComponentFailures: 'false', + skipSCFailures: 'false' }, success: "runPreUpgradeCheckSuccess", error: "runPreUpgradeCheckError"
ambari git commit: AMBARI-13443. Do not timeout when user is on wizard (rzang)
Repository: ambari Updated Branches: refs/heads/trunk d834d3a37 -> 082db1cc2 AMBARI-13443. Do not timeout when user is on wizard (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/082db1cc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/082db1cc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/082db1cc Branch: refs/heads/trunk Commit: 082db1cc29c106f1a817683485143b39f39ca8f4 Parents: d834d3a Author: Richard ZangAuthored: Thu Oct 15 17:34:00 2015 -0700 Committer: Richard Zang Committed: Thu Oct 15 17:37:26 2015 -0700 -- ambari-web/app/controllers/main.js | 8 +++- .../main/admin/stack_and_upgrade_controller_test.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/082db1cc/ambari-web/app/controllers/main.js -- diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js index b7b0b4a..fb73770 100644 --- a/ambari-web/app/controllers/main.js +++ b/ambari-web/app/controllers/main.js @@ -227,7 +227,7 @@ App.MainController = Em.Controller.extend({ checkActiveness: function() { var scope = App.router.get('mainController'); //console.error("checkActiveness " + scope.get('lastUserActiveTime') + " : " + Date.now()); -if (Date.now() - scope.get('lastUserActiveTime') > scope.get('userTimeOut')) { +if (Date.now() - scope.get('lastUserActiveTime') > scope.get('userTimeOut') && !scope.isOnWizard()) { scope.set('isUserActive', false); //console.error("LOGOUT!"); scope.unbindActivityEventMonitors(); @@ -241,6 +241,12 @@ App.MainController = Em.Controller.extend({ this.bindActivityEventMonitors(); }, + isOnWizard: function() { +var isWizard = window.location.href.indexOf('/step') != -1; +var isUpgrade = window.location.href.indexOf('/stack/upgrade') != -1; +return isWizard || isUpgrade; + }, + bindActivityEventMonitors: function() { $(window).bind('mousemove', this.keepActive); $(window).bind('keypress', this.keepActive); http://git-wip-us.apache.org/repos/asf/ambari/blob/082db1cc/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js -- diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js index ce176ea..0124608 100644 --- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js +++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js @@ -311,8 +311,8 @@ describe('App.MainAdminStackAndUpgradeController', function() { value: '2.2', label: 'HDP-2.2', type: 'ROLLING', - skipComponentFailures: false, - skipSCFailures: false + skipComponentFailures: 'false', + skipSCFailures: 'false' }, success: "runPreUpgradeCheckSuccess", error: "runPreUpgradeCheckError"
ambari git commit: AMBARI-13436. Kerberos Wizard: null in request logs (rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c8f1e53df -> 7a705671a AMBARI-13436. Kerberos Wizard: null in request logs (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a705671 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a705671 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a705671 Branch: refs/heads/branch-2.1 Commit: 7a705671ad2410f1eb450eda5c021836ad717411 Parents: c8f1e53 Author: Robert LevasAuthored: Thu Oct 15 19:03:48 2015 -0400 Committer: Robert Levas Committed: Thu Oct 15 19:03:48 2015 -0400 -- .../server/controller/ShortTaskStatus.java | 23 +-- .../AmbariManagementControllerTest.java | 30 2 files changed, 50 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7a705671/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java index 6fe4db2..975476f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java @@ -19,6 +19,8 @@ package org.apache.ambari.server.controller; import org.apache.ambari.server.actionmanager.HostRoleCommand; +import org.apache.ambari.server.utils.StageUtils; +import org.apache.commons.lang.StringUtils; public class ShortTaskStatus { protected long requestId; @@ -39,7 +41,7 @@ public class ShortTaskStatus { String customCommandName, String outputLog, String errorLog) { this.taskId = taskId; this.stageId = stageId; -this.hostName = hostName; +this.hostName = translateHostName(hostName); this.role = role; this.command = command; this.status = status; @@ -52,7 +54,7 @@ public class ShortTaskStatus { this.taskId = hostRoleCommand.getTaskId(); this.stageId = hostRoleCommand.getStageId(); this.command = hostRoleCommand.getRoleCommand().toString(); -this.hostName = hostRoleCommand.getHostName(); +this.hostName = translateHostName(hostRoleCommand.getHostName()); this.role = hostRoleCommand.getRole().toString(); this.status = hostRoleCommand.getStatus().toString(); this.customCommandName = hostRoleCommand.getCustomCommandName(); @@ -97,7 +99,7 @@ public class ShortTaskStatus { } public void setHostName(String hostName) { -this.hostName = hostName; +this.hostName = translateHostName(hostName); } public String getRole() { @@ -155,4 +157,19 @@ public class ShortTaskStatus { return sb.toString(); } + /** + * If the hostname is null (or empty), returns the hostname of the Ambari Server; else returns the + * supplied hostname value. + * + * @param hostName a hostname + * @return the hostname of the Ambari Server if the hostname is null (or empty); else supplied hostname value + */ + private String translateHostName(String hostName) { +// if the hostname in the command is null, replace it with the hostname of the Ambari Server +// This is because commands (to be) handled by the Ambari Server have a null value for its +// host designation. +return (StringUtils.isEmpty(hostName)) +? StageUtils.getHostName() +: hostName; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/7a705671/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java index 092ad00..069f67d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java @@ -100,6 +100,7 @@ import org.apache.ambari.server.state.configgroup.ConfigGroup; import org.apache.ambari.server.state.configgroup.ConfigGroupFactory; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostInstallEvent; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostOpSucceededEvent; +import org.apache.ambari.server.state.svccomphost.ServiceComponentHostServerActionEvent; import
ambari git commit: AMBARI-13440. Unit test fixes (smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.1 f6a2ecc67 -> c8f1e53df AMBARI-13440. Unit test fixes (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c8f1e53d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c8f1e53d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c8f1e53d Branch: refs/heads/branch-2.1 Commit: c8f1e53df3a2689b6ce1c2ad1d1d7af8979b0d4f Parents: f6a2ecc Author: Sumit MohantyAuthored: Thu Oct 15 13:50:15 2015 -0700 Committer: Sumit Mohanty Committed: Thu Oct 15 13:50:15 2015 -0700 -- ambari-agent/src/test/python/ambari_agent/TestController.py | 2 ++ ambari-agent/src/test/python/ambari_agent/TestHardware.py | 1 + ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py| 3 +++ ambari-agent/src/test/python/ambari_agent/TestRegistration.py | 1 + .../org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java | 1 - 5 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c8f1e53d/ambari-agent/src/test/python/ambari_agent/TestController.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestController.py b/ambari-agent/src/test/python/ambari_agent/TestController.py index ba6e6c8..1d2cc07 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestController.py +++ b/ambari-agent/src/test/python/ambari_agent/TestController.py @@ -182,6 +182,7 @@ class TestController(unittest.TestCase): + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch("urllib2.build_opener") @patch("urllib2.install_opener") @@ -221,6 +222,7 @@ class TestController(unittest.TestCase): self.assertTrue(aq.start.called) + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch("urllib2.build_opener") @patch("urllib2.install_opener") http://git-wip-us.apache.org/repos/asf/ambari/blob/c8f1e53d/ambari-agent/src/test/python/ambari_agent/TestHardware.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestHardware.py b/ambari-agent/src/test/python/ambari_agent/TestHardware.py index f35ff98..e096b95 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestHardware.py +++ b/ambari-agent/src/test/python/ambari_agent/TestHardware.py @@ -36,6 +36,7 @@ from ambari_commons import OSCheck @patch.object(socket, "gethostbyname", new = MagicMock(return_value = "192.168.1.1")) class TestHardware(TestCase): + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch.object(OSCheck, "get_os_type") @patch.object(OSCheck, "get_os_version") http://git-wip-us.apache.org/repos/asf/ambari/blob/c8f1e53d/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py b/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py index 0c78fdb..b2825bd 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py +++ b/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py @@ -77,6 +77,7 @@ class TestHeartbeat(TestCase): self.assertEquals(not heartbeat.reports, True, "Heartbeat should not contain task in progress") + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch.object(ActionQueue, "result") @patch.object(HostInfoLinux, "register") @@ -202,6 +203,7 @@ class TestHeartbeat(TestCase): self.assertEquals(hb, expected) + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch.object(HostInfoLinux, 'register') def test_heartbeat_no_host_check_cmd_in_queue(self, register_mock): @@ -229,6 +231,7 @@ class TestHeartbeat(TestCase): self.assertFalse(args[1]) + @patch.object(Hardware, "osdisks", new = MagicMock(return_value=[])) @patch.object(Hardware, "_chk_mount", new = MagicMock(return_value=True)) @patch.object(HostInfoLinux, 'register') def test_heartbeat_host_check_no_cmd(self, register_mock): http://git-wip-us.apache.org/repos/asf/ambari/blob/c8f1e53d/ambari-agent/src/test/python/ambari_agent/TestRegistration.py -- diff --git
ambari git commit: AMBARI-13436. Kerberos Wizard: null in request logs (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk fbc65a9c4 -> 86fb7574a AMBARI-13436. Kerberos Wizard: null in request logs (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/86fb7574 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86fb7574 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86fb7574 Branch: refs/heads/trunk Commit: 86fb7574aa8bdb02791ef31b45322c92c9e5ac02 Parents: fbc65a9 Author: Robert LevasAuthored: Thu Oct 15 18:01:30 2015 -0400 Committer: Robert Levas Committed: Thu Oct 15 18:01:35 2015 -0400 -- .../server/controller/ShortTaskStatus.java | 23 +++--- .../AmbariManagementControllerTest.java | 25 2 files changed, 45 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/86fb7574/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java index 6fe4db2..975476f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java @@ -19,6 +19,8 @@ package org.apache.ambari.server.controller; import org.apache.ambari.server.actionmanager.HostRoleCommand; +import org.apache.ambari.server.utils.StageUtils; +import org.apache.commons.lang.StringUtils; public class ShortTaskStatus { protected long requestId; @@ -39,7 +41,7 @@ public class ShortTaskStatus { String customCommandName, String outputLog, String errorLog) { this.taskId = taskId; this.stageId = stageId; -this.hostName = hostName; +this.hostName = translateHostName(hostName); this.role = role; this.command = command; this.status = status; @@ -52,7 +54,7 @@ public class ShortTaskStatus { this.taskId = hostRoleCommand.getTaskId(); this.stageId = hostRoleCommand.getStageId(); this.command = hostRoleCommand.getRoleCommand().toString(); -this.hostName = hostRoleCommand.getHostName(); +this.hostName = translateHostName(hostRoleCommand.getHostName()); this.role = hostRoleCommand.getRole().toString(); this.status = hostRoleCommand.getStatus().toString(); this.customCommandName = hostRoleCommand.getCustomCommandName(); @@ -97,7 +99,7 @@ public class ShortTaskStatus { } public void setHostName(String hostName) { -this.hostName = hostName; +this.hostName = translateHostName(hostName); } public String getRole() { @@ -155,4 +157,19 @@ public class ShortTaskStatus { return sb.toString(); } + /** + * If the hostname is null (or empty), returns the hostname of the Ambari Server; else returns the + * supplied hostname value. + * + * @param hostName a hostname + * @return the hostname of the Ambari Server if the hostname is null (or empty); else supplied hostname value + */ + private String translateHostName(String hostName) { +// if the hostname in the command is null, replace it with the hostname of the Ambari Server +// This is because commands (to be) handled by the Ambari Server have a null value for its +// host designation. +return (StringUtils.isEmpty(hostName)) +? StageUtils.getHostName() +: hostName; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/86fb7574/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java index 528d343..7e2090a 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java @@ -100,6 +100,7 @@ import org.apache.ambari.server.state.configgroup.ConfigGroup; import org.apache.ambari.server.state.configgroup.ConfigGroupFactory; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostInstallEvent; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostOpSucceededEvent; +import org.apache.ambari.server.state.svccomphost.ServiceComponentHostServerActionEvent; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostStartEvent;
ambari git commit: AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":
Repository: ambari Updated Branches: refs/heads/branch-2.1 70c8adac7 -> ecd37040c AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":"storm-site"] (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ecd37040 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ecd37040 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ecd37040 Branch: refs/heads/branch-2.1 Commit: ecd37040c262c3749965f8d31bdbfc7e1c7feefe Parents: 70c8ada Author: Dmytro SenAuthored: Thu Oct 15 20:28:39 2015 +0300 Committer: Dmytro Sen Committed: Thu Oct 15 20:32:49 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 5 + .../BlueprintConfigurationProcessorTest.java | 17 + 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ecd37040/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 892cf32..223db51 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 @@ -2018,9 +2018,14 @@ public class BlueprintConfigurationProcessor { // STORM stormSiteMap.put("nimbus.host", new SingleHostTopologyUpdater("NIMBUS")); +stormSiteMap.put("nimbus_hosts", new SingleHostTopologyUpdater("NIMBUS")); +stormSiteMap.put("drpc_server_host", new SingleHostTopologyUpdater("DRPC_SERVER")); +stormSiteMap.put("storm_ui_server_host", new SingleHostTopologyUpdater("STORM_UI_SERVER")); stormSiteMap.put("worker.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); stormSiteMap.put("supervisor.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); stormSiteMap.put("nimbus.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); +multiStormSiteMap.put("supervisor_hosts", +new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("SUPERVISOR"))); multiStormSiteMap.put("storm.zookeeper.servers", new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER"))); multiStormSiteMap.put("nimbus.seeds", http://git-wip-us.apache.org/repos/asf/ambari/blob/ecd37040/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 a97ca74..7181bb6 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 @@ -443,6 +443,10 @@ public class BlueprintConfigurationProcessorTest { Map > properties = new HashMap >(); Map typeProps = new HashMap (); typeProps.put("storm.zookeeper.servers", "['testhost:5050','testhost2:9090','testhost2a:9090','testhost2b:9090']"); +typeProps.put("drpc_server_host", "['testhost:5050']"); +typeProps.put("storm_ui_server_host", "['testhost:5050']"); +typeProps.put("supervisor_hosts", "['testhost:5050','testhost2:9090']"); + properties.put("storm-site", typeProps); Configuration clusterConfig = new Configuration(properties, @@ -452,12 +456,16 @@ public class BlueprintConfigurationProcessorTest { hgComponents.add("NAMENODE"); hgComponents.add("SECONDARY_NAMENODE"); hgComponents.add("ZOOKEEPER_SERVER"); +hgComponents.add("DRPC_SERVER"); +hgComponents.add("STORM_UI_SERVER"); +hgComponents.add("SUPERVISOR"); TestHostGroup group1 = new TestHostGroup("group1", hgComponents, Collections.singleton("testhost")); Collection hgComponents2 = new HashSet(); hgComponents2.add("DATANODE"); hgComponents2.add("HDFS_CLIENT"); hgComponents2.add("ZOOKEEPER_SERVER"); +
ambari git commit: AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8738b7ee6 -> 70c8adac7 AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/70c8adac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/70c8adac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/70c8adac Branch: refs/heads/branch-2.1 Commit: 70c8adac7d1e6cd6592f0dc0da66a9b4eff0256e Parents: 8738b7e Author: Andrew OnishukAuthored: Thu Oct 15 20:01:42 2015 +0300 Committer: Andrew Onishuk Committed: Thu Oct 15 20:01:42 2015 +0300 -- .../server/upgrade/UpgradeCatalog213.java | 25 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 8 +++ .../2.0.6/hooks/before-ANY/scripts/params.py| 3 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../server/upgrade/UpgradeCatalog213Test.java | 4 6 files changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/70c8adac/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 7a42b3b..a94723f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -83,7 +83,15 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private static final String AMS_ENV = "ams-env"; private static final String AMS_HBASE_ENV = "ams-hbase-env"; private static final String HBASE_ENV_CONFIG = "hbase-env"; + private static final String HADOOP_ENV_CONFIG = "hadoop-env"; private static final String CONTENT_PROPERTY = "content"; + private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if is_datanode_max_locked_memory_set %}\n" + +"# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n" + +"# Makes sense to fix only when runing DN as root \n" + +"if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + +" ulimit -l {{datanode_max_locked_memory}}\n" + +"fi\n" + +"{% endif %};\n"; public static final String UPGRADE_PACKAGE_COL = "upgrade_package"; public static final String UPGRADE_TYPE_COL = "upgrade_type"; @@ -174,6 +182,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { bootstrapRepoVersionForHDP21(); addNewConfigurationsFromXml(); +updateHadoopEnv(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); @@ -575,6 +584,22 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { return rootJson.toString(); } + + protected void updateHadoopEnv() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); + +for (final Cluster cluster : getCheckedClusterMap(ambariManagementController.getClusters()).values()) { + Config hadoopEnvConfig = cluster.getDesiredConfigByType(HADOOP_ENV_CONFIG); + if (hadoopEnvConfig != null) { +String content = hadoopEnvConfig.getProperties().get(CONTENT_PROPERTY); +if (content != null) { + content += HADOOP_ENV_CONTENT_TO_APPEND; + Map updates = Collections.singletonMap(CONTENT_PROPERTY, content); + updateConfigurationPropertiesForCluster(cluster, HADOOP_ENV_CONFIG, updates, true, false); +} + } +} + } protected void updateHDFSConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( http://git-wip-us.apache.org/repos/asf/ambari/blob/70c8adac/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml index a8f7951..5319da9 100644 ---
ambari git commit: AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 81280ea39 -> 52083d1ff AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52083d1f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52083d1f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52083d1f Branch: refs/heads/trunk Commit: 52083d1ff8425948485149cd1c862ba9ddcb58db Parents: 81280ea Author: Andrew OnishukAuthored: Thu Oct 15 19:58:01 2015 +0300 Committer: Andrew Onishuk Committed: Thu Oct 15 19:58:27 2015 +0300 -- .../server/upgrade/UpgradeCatalog213.java | 25 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 8 +++ .../2.0.6/hooks/before-ANY/scripts/params.py| 3 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../server/upgrade/UpgradeCatalog213Test.java | 4 6 files changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 90a75be..803e5f4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -58,7 +58,15 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private static final String AMS_ENV = "ams-env"; private static final String AMS_HBASE_ENV = "ams-hbase-env"; private static final String HBASE_ENV_CONFIG = "hbase-env"; + private static final String HADOOP_ENV_CONFIG = "hadoop-env"; private static final String CONTENT_PROPERTY = "content"; + private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if is_datanode_max_locked_memory_set %}\n" + +"# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n" + +"# Makes sense to fix only when runing DN as root \n" + +"if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + +" ulimit -l {{datanode_max_locked_memory}}\n" + +"fi\n" + +"{% endif %};\n"; private static final String KERBEROS_DESCRIPTOR_TABLE = "kerberos_descriptor"; private static final String KERBEROS_DESCRIPTOR_NAME_COLUMN = "kerberos_descriptor_name"; @@ -141,6 +149,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); +updateHadoopEnv(); updateKafkaConfigs(); } @@ -212,6 +221,22 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { return rootJson.toString(); } + + protected void updateHadoopEnv() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); + +for (final Cluster cluster : getCheckedClusterMap(ambariManagementController.getClusters()).values()) { + Config hadoopEnvConfig = cluster.getDesiredConfigByType(HADOOP_ENV_CONFIG); + if (hadoopEnvConfig != null) { +String content = hadoopEnvConfig.getProperties().get(CONTENT_PROPERTY); +if (content != null) { + content += HADOOP_ENV_CONTENT_TO_APPEND; + Map updates = Collections.singletonMap(CONTENT_PROPERTY, content); + updateConfigurationPropertiesForCluster(cluster, HADOOP_ENV_CONFIG, updates, true, false); +} + } +} + } protected void updateHDFSConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml index a8f7951..5319da9 100644 ---
ambari git commit: AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":
Repository: ambari Updated Branches: refs/heads/trunk 52083d1ff -> 22f0982df AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":"storm-site"] (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22f0982d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22f0982d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22f0982d Branch: refs/heads/trunk Commit: 22f0982df86002b08ee772bff73d648fbb046c5f Parents: 52083d1 Author: Dmytro SenAuthored: Thu Oct 15 20:28:39 2015 +0300 Committer: Dmytro Sen Committed: Thu Oct 15 20:28:39 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 5 + .../BlueprintConfigurationProcessorTest.java | 17 + 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/22f0982d/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 5fd5563..18fca8a 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 @@ -2102,9 +2102,14 @@ public class BlueprintConfigurationProcessor { // STORM stormSiteMap.put("nimbus.host", new SingleHostTopologyUpdater("NIMBUS")); +stormSiteMap.put("nimbus_hosts", new SingleHostTopologyUpdater("NIMBUS")); +stormSiteMap.put("drpc_server_host", new SingleHostTopologyUpdater("DRPC_SERVER")); +stormSiteMap.put("storm_ui_server_host", new SingleHostTopologyUpdater("STORM_UI_SERVER")); stormSiteMap.put("worker.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); stormSiteMap.put("supervisor.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); stormSiteMap.put("nimbus.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); +multiStormSiteMap.put("supervisor_hosts", +new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("SUPERVISOR"))); multiStormSiteMap.put("storm.zookeeper.servers", new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER"))); multiStormSiteMap.put("nimbus.seeds", http://git-wip-us.apache.org/repos/asf/ambari/blob/22f0982d/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 ac86668..34b72b6 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 @@ -448,6 +448,10 @@ public class BlueprintConfigurationProcessorTest { Map > properties = new HashMap >(); Map typeProps = new HashMap (); typeProps.put("storm.zookeeper.servers", "['testhost:5050','testhost2:9090','testhost2a:9090','testhost2b:9090']"); +typeProps.put("drpc_server_host", "['testhost:5050']"); +typeProps.put("storm_ui_server_host", "['testhost:5050']"); +typeProps.put("supervisor_hosts", "['testhost:5050','testhost2:9090']"); + properties.put("storm-site", typeProps); Configuration clusterConfig = new Configuration(properties, @@ -457,12 +461,16 @@ public class BlueprintConfigurationProcessorTest { hgComponents.add("NAMENODE"); hgComponents.add("SECONDARY_NAMENODE"); hgComponents.add("ZOOKEEPER_SERVER"); +hgComponents.add("DRPC_SERVER"); +hgComponents.add("STORM_UI_SERVER"); +hgComponents.add("SUPERVISOR"); TestHostGroup group1 = new TestHostGroup("group1", hgComponents, Collections.singleton("testhost")); Collection hgComponents2 = new HashSet(); hgComponents2.add("DATANODE"); hgComponents2.add("HDFS_CLIENT"); hgComponents2.add("ZOOKEEPER_SERVER"); +
ambari git commit: AMBARI-13420: RU should check for INSTALL_FAILED components before starting (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 5c800d27b -> 520e41f8c AMBARI-13420: RU should check for INSTALL_FAILED components before starting (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/520e41f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/520e41f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/520e41f8 Branch: refs/heads/trunk Commit: 520e41f8c4a51cfc238f9cac7619e78cff191ad0 Parents: 5c800d2 Author: Jayush LuniyaAuthored: Thu Oct 15 12:25:47 2015 -0700 Committer: Jayush Luniya Committed: Thu Oct 15 12:25:47 2015 -0700 -- .../ambari/server/checks/CheckDescription.java | 7 + .../checks/ComponentsInstallationCheck.java | 100 .../checks/ComponentsInstallationCheckTest.java | 245 +++ .../checks/ConfigurationMergeCheckTest.java | 2 +- .../ServicesNamenodeTruncateCheckTest.java | 2 +- .../server/checks/ServicesUpCheckTest.java | 1 + 6 files changed, 355 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/520e41f8/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java index 7151b0e..fef4f7e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java @@ -133,6 +133,13 @@ public enum CheckDescription { "The following Services must be started: {{fails}}. Try to do a Stop & Start in case they were started outside of Ambari."); }}), + COMPONENTS_INSTALLATION(PrereqCheckType.SERVICE, + "All service components must be installed", + new HashMap () {{ +put(AbstractCheckDescriptor.DEFAULT, +"The following Services must be reinstalled: {{fails}}. Try to reinstall the service components in INSTALL_FAILED state."); + }}), + SERVICES_YARN_WP(PrereqCheckType.SERVICE, "YARN work preserving restart should be enabled", new HashMap () {{ http://git-wip-us.apache.org/repos/asf/ambari/blob/520e41f8/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java new file mode 100644 index 000..07f4d05 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java @@ -0,0 +1,100 @@ +/* + * 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.checks; + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.controller.PrereqCheckRequest; +import org.apache.ambari.server.orm.models.HostComponentSummary; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.ComponentInfo; +import org.apache.ambari.server.state.Service; +import org.apache.ambari.server.state.ServiceComponent; +import org.apache.ambari.server.state.StackId; +import org.apache.ambari.server.state.State; +import org.apache.ambari.server.state.stack.PrereqCheckStatus; +import org.apache.ambari.server.state.stack.PrerequisiteCheck; +import org.apache.commons.lang.StringUtils; + +import com.google.inject.Singleton; + +/** + * Checks that services are up. + */ +@Singleton +@UpgradeCheck(group
ambari git commit: AMBARI-13420: RU should check for INSTALL_FAILED components before starting (jluniya)
Repository: ambari Updated Branches: refs/heads/branch-2.1 65b3f125c -> 8e6b369dd AMBARI-13420: RU should check for INSTALL_FAILED components before starting (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e6b369d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e6b369d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e6b369d Branch: refs/heads/branch-2.1 Commit: 8e6b369dd6871f904da2424fe0fb6f1e3097495a Parents: 65b3f12 Author: Jayush LuniyaAuthored: Thu Oct 15 12:25:47 2015 -0700 Committer: Jayush Luniya Committed: Thu Oct 15 12:28:24 2015 -0700 -- .../ambari/server/checks/CheckDescription.java | 7 + .../checks/ComponentsInstallationCheck.java | 100 .../checks/ComponentsInstallationCheckTest.java | 245 +++ .../checks/ConfigurationMergeCheckTest.java | 2 +- .../ServicesNamenodeTruncateCheckTest.java | 2 +- .../server/checks/ServicesUpCheckTest.java | 1 + 6 files changed, 355 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8e6b369d/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java index 7151b0e..fef4f7e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java @@ -133,6 +133,13 @@ public enum CheckDescription { "The following Services must be started: {{fails}}. Try to do a Stop & Start in case they were started outside of Ambari."); }}), + COMPONENTS_INSTALLATION(PrereqCheckType.SERVICE, + "All service components must be installed", + new HashMap () {{ +put(AbstractCheckDescriptor.DEFAULT, +"The following Services must be reinstalled: {{fails}}. Try to reinstall the service components in INSTALL_FAILED state."); + }}), + SERVICES_YARN_WP(PrereqCheckType.SERVICE, "YARN work preserving restart should be enabled", new HashMap () {{ http://git-wip-us.apache.org/repos/asf/ambari/blob/8e6b369d/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java new file mode 100644 index 000..07f4d05 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsInstallationCheck.java @@ -0,0 +1,100 @@ +/* + * 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.checks; + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.controller.PrereqCheckRequest; +import org.apache.ambari.server.orm.models.HostComponentSummary; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.ComponentInfo; +import org.apache.ambari.server.state.Service; +import org.apache.ambari.server.state.ServiceComponent; +import org.apache.ambari.server.state.StackId; +import org.apache.ambari.server.state.State; +import org.apache.ambari.server.state.stack.PrereqCheckStatus; +import org.apache.ambari.server.state.stack.PrerequisiteCheck; +import org.apache.commons.lang.StringUtils; + +import com.google.inject.Singleton; + +/** + * Checks that services are up. + */ +@Singleton
ambari git commit: AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections window.(xiwang)
Repository: ambari Updated Branches: refs/heads/trunk 520e41f8c -> 716e25803 AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections window.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/716e2580 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/716e2580 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/716e2580 Branch: refs/heads/trunk Commit: 716e25803d686a5d466ef8350404c9676509051d Parents: 520e41f Author: Xi WangAuthored: Wed Oct 14 18:58:38 2015 -0700 Committer: Xi Wang Committed: Thu Oct 15 12:43:25 2015 -0700 -- .../main/admin/stack_and_upgrade_controller.js | 24 ++-- ambari-web/app/styles/stack_versions.less | 16 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/716e2580/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 8998055..6a94e6e 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 @@ -92,7 +92,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }), Em.Object.create({ displayName: Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.title'), - type: 'NON-ROLLING', + type: 'NON_ROLLING', icon: "icon-bolt", description: Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.description'), selected: false, @@ -512,8 +512,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, var upgradeTypeDisplayName = upgradeMethod ? upgradeMethod.get('displayName') : null; this.set('upgradeTypeDisplayName', upgradeTypeDisplayName); this.set('failuresTolerance', Em.Object.create({ - skipComponentFailures: params.skipComponentFailures, - skipSCFailures: params.skipSCFailures + skipComponentFailures: params.skipComponentFailures == 'true', + skipSCFailures: params.skipSCFailures == 'true' })); this.setDBProperties({ upgradeVersion: params.label, @@ -522,8 +522,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, isDowngrade: !!params.isDowngrade, upgradeTypeDisplayName: upgradeTypeDisplayName, failuresTolerance: Em.Object.create({ -skipComponentFailures: params.skipComponentFailures, -skipSCFailures: params.skipSCFailures +skipComponentFailures: params.skipComponentFailures == 'true', +skipSCFailures: params.skipSCFailures == 'true' }) }); App.set('upgradeState', 'PENDING'); @@ -541,8 +541,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, */ updateOptionsSuccessCallback: function (data, opt, params) { this.set('failuresTolerance', Em.Object.create({ - skipComponentFailures: params.skipComponentFailures, - skipSCFailures: params.skipSCFailures + skipComponentFailures: params.skipComponentFailures == 'true', + skipSCFailures: params.skipSCFailures == 'true' })); }, @@ -596,7 +596,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }); } else { var ruMethod = self.get('upgradeMethods').findProperty('type', 'ROLLING'); -var ssuMethod = self.get('upgradeMethods').findProperty('type', 'NON-ROLLING'); +var ssuMethod = self.get('upgradeMethods').findProperty('type', 'NON_ROLLING'); ruMethod.set('selected', ruMethod.get('allowed')); ssuMethod.set('selected', !ruMethod.get('allowed') && ssuMethod.get('allowed')); } @@ -665,8 +665,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, sender: self, data: { upgradeId: self.get('upgradeId'), - skipComponentFailures: this.get('skipComponentFailures') || false, - skipSCFailures: this.get('skipSCFailures') || false + skipComponentFailures: this.get('skipComponentFailures')? 'true': 'false', + skipSCFailures: this.get('skipSCFailures')? 'true': 'false' }, success: 'updateOptionsSuccessCallback' }); @@ -762,8 +762,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, value: version.get('repositoryVersion'), label:
ambari git commit: AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections window.(xiwang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8e6b369dd -> f6a2ecc67 AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections window.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6a2ecc6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6a2ecc6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6a2ecc6 Branch: refs/heads/branch-2.1 Commit: f6a2ecc671601c95e841f8f7b7260c1c9591d88a Parents: 8e6b369 Author: Xi WangAuthored: Wed Oct 14 18:58:38 2015 -0700 Committer: Xi Wang Committed: Thu Oct 15 12:44:47 2015 -0700 -- .../main/admin/stack_and_upgrade_controller.js | 24 ++-- ambari-web/app/styles/stack_versions.less | 16 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f6a2ecc6/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 8998055..6a94e6e 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 @@ -92,7 +92,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }), Em.Object.create({ displayName: Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.title'), - type: 'NON-ROLLING', + type: 'NON_ROLLING', icon: "icon-bolt", description: Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.description'), selected: false, @@ -512,8 +512,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, var upgradeTypeDisplayName = upgradeMethod ? upgradeMethod.get('displayName') : null; this.set('upgradeTypeDisplayName', upgradeTypeDisplayName); this.set('failuresTolerance', Em.Object.create({ - skipComponentFailures: params.skipComponentFailures, - skipSCFailures: params.skipSCFailures + skipComponentFailures: params.skipComponentFailures == 'true', + skipSCFailures: params.skipSCFailures == 'true' })); this.setDBProperties({ upgradeVersion: params.label, @@ -522,8 +522,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, isDowngrade: !!params.isDowngrade, upgradeTypeDisplayName: upgradeTypeDisplayName, failuresTolerance: Em.Object.create({ -skipComponentFailures: params.skipComponentFailures, -skipSCFailures: params.skipSCFailures +skipComponentFailures: params.skipComponentFailures == 'true', +skipSCFailures: params.skipSCFailures == 'true' }) }); App.set('upgradeState', 'PENDING'); @@ -541,8 +541,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, */ updateOptionsSuccessCallback: function (data, opt, params) { this.set('failuresTolerance', Em.Object.create({ - skipComponentFailures: params.skipComponentFailures, - skipSCFailures: params.skipSCFailures + skipComponentFailures: params.skipComponentFailures == 'true', + skipSCFailures: params.skipSCFailures == 'true' })); }, @@ -596,7 +596,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, }); } else { var ruMethod = self.get('upgradeMethods').findProperty('type', 'ROLLING'); -var ssuMethod = self.get('upgradeMethods').findProperty('type', 'NON-ROLLING'); +var ssuMethod = self.get('upgradeMethods').findProperty('type', 'NON_ROLLING'); ruMethod.set('selected', ruMethod.get('allowed')); ssuMethod.set('selected', !ruMethod.get('allowed') && ssuMethod.get('allowed')); } @@ -665,8 +665,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, sender: self, data: { upgradeId: self.get('upgradeId'), - skipComponentFailures: this.get('skipComponentFailures') || false, - skipSCFailures: this.get('skipSCFailures') || false + skipComponentFailures: this.get('skipComponentFailures')? 'true': 'false', + skipSCFailures: this.get('skipSCFailures')? 'true': 'false' }, success: 'updateOptionsSuccessCallback' }); @@ -762,8 +762,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, value: version.get('repositoryVersion'), label:
ambari git commit: AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 05ee3061b -> 5c800d27b AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c800d27 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c800d27 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c800d27 Branch: refs/heads/trunk Commit: 5c800d27bc81e589a338269c07e6435ec0334dd4 Parents: 05ee306 Author: Robert LevasAuthored: Thu Oct 15 13:48:29 2015 -0400 Committer: Robert Levas Committed: Thu Oct 15 13:48:29 2015 -0400 -- .../server/controller/KerberosHelperImpl.java | 4 +- .../AmbariManagementControllerImplTest.java | 48 .../server/controller/KerberosHelperTest.java | 228 +++ 3 files changed, 277 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c800d27/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 dbb59bd..bf8c519 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 @@ -2275,9 +2275,7 @@ public class KerberosHelperImpl implements KerberosHelper { private class EnableKerberosHandler extends Handler { @Override public boolean shouldProcess(SecurityState desiredSecurityState, ServiceComponentHost sch) throws AmbariException { - return (desiredSecurityState == SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURING); + return (desiredSecurityState == SecurityState.SECURED_KERBEROS); } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/5c800d27/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java index dd80f46..1d9e53d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java @@ -596,6 +596,54 @@ public class AmbariManagementControllerImplTest { } /** + * Ensure that when the cluster security type updated from KERBEROS to KERBEROS, + * KerberosHandler.toggleKerberos IS NOT invoked + */ + + @Test + public void testUpdateClustersToggleKerberosReenable() throws Exception { +// member state mocks +Capture controllerCapture = new Capture(); +Injector injector = createStrictMock(Injector.class); +Cluster cluster = createNiceMock(Cluster.class); +ActionManager actionManager = createNiceMock(ActionManager.class); +ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class); + +// requests +Set setRequests = Collections.singleton(clusterRequest); + +KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class); +// expectations +injector.injectMembers(capture(controllerCapture)); +expect(injector.getInstance(Gson.class)).andReturn(null); +expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null); + expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper); +expect(clusterRequest.getClusterId()).andReturn(1L).times(6); + expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); +expect(clusters.getClusterById(1L)).andReturn(cluster).times(2); +expect(cluster.getClusterName()).andReturn("cluster").times(2); + expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); + +cluster.addSessionAttributes(anyObject(Map.class)); +expectLastCall().once(); + +expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, null)) +.andReturn(false) +.once(); +// Note: kerberosHelper.toggleKerberos is not called + +// replay mocks +replay(actionManager, cluster, clusters, injector, clusterRequest, sessionManager, kerberosHelper); + +// test +
ambari git commit: AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ecd37040c -> 65b3f125c AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/65b3f125 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65b3f125 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65b3f125 Branch: refs/heads/branch-2.1 Commit: 65b3f125cb7f0567130d2eeac8c35c1c550be611 Parents: ecd3704 Author: Robert LevasAuthored: Thu Oct 15 15:00:20 2015 -0400 Committer: Robert Levas Committed: Thu Oct 15 15:00:20 2015 -0400 -- .../server/controller/KerberosHelperImpl.java | 4 +- .../AmbariManagementControllerImplTest.java | 48 .../server/controller/KerberosHelperTest.java | 228 +++ 3 files changed, 277 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/65b3f125/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 b04a9f5..20b4658 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 @@ -2275,9 +2275,7 @@ public class KerberosHelperImpl implements KerberosHelper { private class EnableKerberosHandler extends Handler { @Override public boolean shouldProcess(SecurityState desiredSecurityState, ServiceComponentHost sch) throws AmbariException { - return (desiredSecurityState == SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURING); + return (desiredSecurityState == SecurityState.SECURED_KERBEROS); } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/65b3f125/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java index 10ede77..dce1aa0 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java @@ -596,6 +596,54 @@ public class AmbariManagementControllerImplTest { } /** + * Ensure that when the cluster security type updated from KERBEROS to KERBEROS, + * KerberosHandler.toggleKerberos IS NOT invoked + */ + + @Test + public void testUpdateClustersToggleKerberosReenable() throws Exception { +// member state mocks +Capture controllerCapture = new Capture(); +Injector injector = createStrictMock(Injector.class); +Cluster cluster = createNiceMock(Cluster.class); +ActionManager actionManager = createNiceMock(ActionManager.class); +ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class); + +// requests +Set setRequests = Collections.singleton(clusterRequest); + +KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class); +// expectations +injector.injectMembers(capture(controllerCapture)); +expect(injector.getInstance(Gson.class)).andReturn(null); +expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null); + expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper); +expect(clusterRequest.getClusterId()).andReturn(1L).times(6); + expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); +expect(clusters.getClusterById(1L)).andReturn(cluster).times(2); +expect(cluster.getClusterName()).andReturn("cluster").times(2); + expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); + +cluster.addSessionAttributes(anyObject(Map.class)); +expectLastCall().once(); + +expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, null)) +.andReturn(false) +.once(); +// Note: kerberosHelper.toggleKerberos is not called + +// replay mocks +replay(actionManager, cluster, clusters, injector, clusterRequest, sessionManager, kerberosHelper); + +// test
ambari git commit: AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 22f0982df -> 868a15d65 AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/868a15d6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/868a15d6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/868a15d6 Branch: refs/heads/trunk Commit: 868a15d65074b2c4ab8aaf653e7f8779f1124769 Parents: 22f0982 Author: Robert LevasAuthored: Thu Oct 15 13:42:50 2015 -0400 Committer: Robert Levas Committed: Thu Oct 15 13:42:57 2015 -0400 -- .../server/controller/KerberosHelperImpl.java | 4 +- .../AmbariManagementControllerImplTest.java | 48 .../server/controller/KerberosHelperTest.java | 228 +++ 3 files changed, 277 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/868a15d6/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 dbb59bd..bf8c519 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 @@ -2275,9 +2275,7 @@ public class KerberosHelperImpl implements KerberosHelper { private class EnableKerberosHandler extends Handler { @Override public boolean shouldProcess(SecurityState desiredSecurityState, ServiceComponentHost sch) throws AmbariException { - return (desiredSecurityState == SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) && - (sch.getSecurityState() != SecurityState.SECURING); + return (desiredSecurityState == SecurityState.SECURED_KERBEROS); } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/868a15d6/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java index dd80f46..1d9e53d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java @@ -596,6 +596,54 @@ public class AmbariManagementControllerImplTest { } /** + * Ensure that when the cluster security type updated from KERBEROS to KERBEROS, + * KerberosHandler.toggleKerberos IS NOT invoked + */ + + @Test + public void testUpdateClustersToggleKerberosReenable() throws Exception { +// member state mocks +Capture controllerCapture = new Capture(); +Injector injector = createStrictMock(Injector.class); +Cluster cluster = createNiceMock(Cluster.class); +ActionManager actionManager = createNiceMock(ActionManager.class); +ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class); + +// requests +Set setRequests = Collections.singleton(clusterRequest); + +KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class); +// expectations +injector.injectMembers(capture(controllerCapture)); +expect(injector.getInstance(Gson.class)).andReturn(null); +expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null); + expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper); +expect(clusterRequest.getClusterId()).andReturn(1L).times(6); + expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); +expect(clusters.getClusterById(1L)).andReturn(cluster).times(2); +expect(cluster.getClusterName()).andReturn("cluster").times(2); + expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes(); + +cluster.addSessionAttributes(anyObject(Map.class)); +expectLastCall().once(); + +expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, null)) +.andReturn(false) +.once(); +// Note: kerberosHelper.toggleKerberos is not called + +// replay mocks +replay(actionManager, cluster, clusters, injector, clusterRequest, sessionManager, kerberosHelper); + +// test +