ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-13099. Config changes w/ blueprint provisioning are not picked up (Oliver Szabo via smohanty)
Date Fri, 18 Sep 2015 00:08:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 da2fbccb6 -> 4e1cce23f


AMBARI-13099. Config changes w/ blueprint provisioning are not picked up (Oliver Szabo via
smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e1cce23
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e1cce23
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e1cce23

Branch: refs/heads/branch-2.1
Commit: 4e1cce23f259990873e4f9a4f79b8f5f362fad6e
Parents: da2fbcc
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Thu Sep 17 17:08:12 2015 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Thu Sep 17 17:08:46 2015 -0700

----------------------------------------------------------------------
 .../server/actionmanager/ExecutionCommandWrapper.java | 14 --------------
 .../controller/AmbariManagementControllerImpl.java    | 13 +------------
 2 files changed, 1 insertion(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4e1cce23/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index 20a6932..40038eb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.actionmanager;
 
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -32,8 +31,6 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.utils.StageUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import com.google.inject.Inject;
 import com.google.inject.Injector;
@@ -56,17 +53,6 @@ public class ExecutionCommandWrapper {
     this.executionCommand = executionCommand;
   }
 
-  public ExecutionCommand getExecutionCommand(boolean forceRefreshAllConfig) {
-    // for Blueprint-based installs, force a refresh on the configuration
-    // prior to sending the commands down
-    if (forceRefreshAllConfig && (executionCommand != null)) {
-      executionCommand.setForceRefreshConfigTagsBeforeExecution(Collections.singleton("*"));
-    }
-
-    // delegate to main wrapper method to handle the configuration merging
-    return getExecutionCommand();
-  }
-
   @SuppressWarnings("serial")
   public ExecutionCommand getExecutionCommand() {
     if (executionCommand != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/4e1cce23/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index d9ea65b..ddbc26d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1863,13 +1863,8 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     StackInfo stackInfo = ambariMetaInfo.getStack(stackId.getStackName(),
         stackId.getStackVersion());
 
-    final boolean isBlueprintInstall = isBlueprintInstall(commandParamsInp);
-    if (isBlueprintInstall) {
-      LOG.info("AmbariManagementControllerImpl.createHostAction: Blueprint install detected,
forcing refresh of all configuration types");
-    }
-
     ExecutionCommand execCmd = stage.getExecutionCommandWrapper(scHost.getHostName(),
-      scHost.getServiceComponentName()).getExecutionCommand(isBlueprintInstall);
+      scHost.getServiceComponentName()).getExecutionCommand();
 
     Host host = clusters.getHost(scHost.getHostName());
 
@@ -2032,12 +2027,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     }
   }
 
-  private static boolean isBlueprintInstall(Map<String, String> commandParams) {
-    return commandParams != null && commandParams.containsKey(CLUSTER_PHASE_PROPERTY)
&&
-      ((commandParams.get(CLUSTER_PHASE_PROPERTY).equals(CLUSTER_PHASE_INITIAL_INSTALL))
||
-        ((commandParams.get(CLUSTER_PHASE_PROPERTY).equals(CLUSTER_PHASE_INITIAL_START))));
-  }
-
   /**
    * Computes os-dependent packages for service/host. Does not take into
    * account package dependencies for ANY_OS. Instead of this method


Mime
View raw message