ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: Revert "AMBARI-14670 - Express Upgrade failed during restart of STORM components (jonathanhurley)"
Date Thu, 14 Jan 2016 22:42:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 2115abb5a -> 03b5977eb


Revert "AMBARI-14670 - Express Upgrade failed during restart of STORM components (jonathanhurley)"

This reverts commit d74d7c43322d963b5fecb57c91d3340858b46ec3 due to UT failures.


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

Branch: refs/heads/branch-2.2
Commit: 03b5977ebfda3e627e2e535a6b0a4c7dea1e8529
Parents: 2115abb
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Thu Jan 14 14:42:13 2016 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Thu Jan 14 14:42:13 2016 -0800

----------------------------------------------------------------------
 .../internal/UpgradeResourceProvider.java       | 12 +++----
 .../ambari/server/state/stack/UpgradePack.java  | 20 +++--------
 .../state/stack/upgrade/ConfigureTask.java      | 38 ++++++--------------
 .../ambari/server/state/stack/upgrade/Task.java |  9 -----
 .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml |  1 -
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml |  7 ----
 .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml     |  6 ----
 7 files changed, 19 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index f728562..cefdab0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -768,9 +768,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     // Resolve or build a proper config upgrade pack
     List<UpgradePack.IntermediateStack> intermediateStacks = pack.getIntermediateStacks();
     ConfigUpgradePack configUpgradePack;
-
-    // No intermediate stacks
-    if (intermediateStacks == null || intermediateStacks.isEmpty()) {
+    if (intermediateStacks == null || intermediateStacks.isEmpty()) { // No intermediate
stacks
       configUpgradePack = s_metaProvider.get().getConfigUpgradePack(
               targetStackId.getStackName(), targetStackId.getStackVersion());
     } else {
@@ -1448,15 +1446,13 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
         if (null != configType) {
           itemDetail = String.format("Updating configuration %s", configType);
         } else {
-          itemDetail = "Skipping Configuration Task "
-              + StringUtils.defaultString(ct.id, "(missing id)");
+          itemDetail = "Skipping Configuration Task";
         }
 
         entity.setText(itemDetail);
 
-        String configureTaskSummary = ct.getSummary(configUpgradePack);
-        if (null != configureTaskSummary) {
-          stageText = configureTaskSummary;
+        if (null != ct.summary) {
+          stageText = ct.summary;
         } else {
           stageText = itemDetail;
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
index 5849a20..ab8f53d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
@@ -34,7 +34,6 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlValue;
 
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping;
 import org.apache.ambari.server.state.stack.upgrade.Direction;
 import org.apache.ambari.server.state.stack.upgrade.Grouping;
@@ -154,16 +153,7 @@ public class UpgradePack {
   }
 
   /**
-   * Gets a list of stacks which are between the current stack version and the
-   * target stack version inclusive. For example, if upgrading from HDP-2.2 to
-   * HDP-2.4, this should include HDP-2.3 and HDP-2.4.
-   * <p/>
-   * This method is used to combine the correct configuration packs for a
-   * specific upgrade from
-   * {@link AmbariMetaInfo#getConfigUpgradePack(String, String)}.
-   *
-   * @return a list of intermediate stacks (target stack inclusive) or
-   *         {@code null} if none.
+   * @return a list for intermediate stacks for cross-stack upgrade, or null if no any
    */
   public List<IntermediateStack> getIntermediateStacks() {
     return intermediateStacks;
@@ -196,11 +186,9 @@ public class UpgradePack {
   }
 
   /**
-   * Gets the groups defined for the upgrade pack. If a direction is defined for
-   * a group, it must match the supplied direction to be returned
-   *
-   * @param direction
-   *          the direction to return the ordered groups
+   * Gets the groups defined for the upgrade pack.  If a direction is defined
+   * for a group, it must match the supplied direction to be returned
+   * @param direction the direction to return the ordered groups
    * @return the list of groups
    */
   public List<Grouping> getGroups(Direction direction) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
index 66545f5..f5da91d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
@@ -28,20 +28,20 @@ import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
+import org.apache.ambari.server.state.stack.ConfigUpgradePack;
+import org.apache.commons.lang.StringUtils;
 import org.apache.ambari.server.serveraction.upgrades.ConfigureAction;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.DesiredConfig;
-import org.apache.ambari.server.state.stack.ConfigUpgradePack;
-import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Condition;
-import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.ConfigurationKeyValue;
-import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Replace;
-import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Transfer;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.gson.Gson;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Transfer;
+import static org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Replace;
+import static org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Condition;
+import static org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.ConfigurationKeyValue;
 
 /**
  * The {@link ConfigureTask} represents a configuration change. This task
@@ -134,22 +134,6 @@ public class ConfigureTask extends ServerSideActionTask {
   }
 
   /**
-   * Gets the summary of the task or {@code null}.
-   *
-   * @return the task summary or {@code null}.
-   */
-  public String getSummary(ConfigUpgradePack configUpgradePack) {
-    if(StringUtils.isNotBlank(id) && null != configUpgradePack){
-      ConfigUpgradeChangeDefinition definition = configUpgradePack.enumerateConfigChangesByID().get(id);
-      if (null != definition && StringUtils.isNotBlank(definition.summary)) {
-          return definition.summary;
-      }
-    }
-
-    return super.getSummary();
-  }
-
-  /**
    * Gets a map containing the following properties pertaining to the
    * configuration value to change:
    * <ul>
@@ -174,7 +158,7 @@ public class ConfigureTask extends ServerSideActionTask {
                                                      ConfigUpgradePack configUpgradePack)
{
     Map<String, String> configParameters = new HashMap<>();
 
-    if (id == null || id.isEmpty()) {
+    if (this.id == null || this.id.isEmpty()) {
       LOG.warn("Config task id is not defined, skipping config change");
       return configParameters;
     }
@@ -185,10 +169,10 @@ public class ConfigureTask extends ServerSideActionTask {
     }
 
     // extract config change definition, referenced by current ConfigureTask
-    ConfigUpgradeChangeDefinition definition = configUpgradePack.enumerateConfigChangesByID().get(id);
+    ConfigUpgradeChangeDefinition definition = configUpgradePack.enumerateConfigChangesByID().get(this.id);
     if (definition == null) {
       LOG.warn(String.format("Can not resolve config change definition by id %s, " +
-              "skipping config change", id));
+              "skipping config change", this.id));
       return configParameters;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
index 980f88e..60091a6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
@@ -54,15 +54,6 @@ public abstract class Task {
   }
 
   /**
-   * Gets the summary of the task or {@code null}.
-   *
-   * @return the task summary or {@code null}.
-   */
-  public String getSummary() {
-    return summary;
-  }
-
-  /**
    * Identifies the type of task.
    */
   public enum Type {

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
b/ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
index 90e3b37..bb0c9a6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
@@ -34,7 +34,6 @@
     </configuration>
   </prerequisite-checks>
 
-  <!-- Instructs the upgrade pack how to build the configuration pack -->
   <upgrade-path>
     <intermediate-stack version="2.2"/>
     <intermediate-stack version="2.3"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
index 1efeb6c..012c629 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
@@ -29,13 +29,6 @@
       </check-properties>
     </configuration>
   </prerequisite-checks>
-
-  <!-- Instructs the upgrade pack how to build the configuration pack -->
-  <upgrade-path>
-    <intermediate-stack version="2.3"/>
-    <intermediate-stack version="2.4"/>
-  </upgrade-path>
-
   <order>
     <group xsi:type="cluster" name="PRE_CLUSTER" title="Prepare Upgrade">
       <direction>UPGRADE</direction>

http://git-wip-us.apache.org/repos/asf/ambari/blob/03b5977e/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
index acebdd8..5aee69d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
@@ -43,12 +43,6 @@
     </configuration>
   </prerequisite-checks>
 
-  <!-- Instructs the upgrade pack how to build the configuration pack -->
-  <upgrade-path>
-    <intermediate-stack version="2.3"/>
-    <intermediate-stack version="2.4"/>
-  </upgrade-path>
-
   <skip-failures>false</skip-failures>
   <skip-service-check-failures>false</skip-service-check-failures>
 


Mime
View raw message