AMBARI-18232. Upgrade Execute: add xsd for upgrade packs (ncole)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/86d24d75 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86d24d75 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86d24d75 Branch: refs/heads/branch-2.5 Commit: 86d24d75cece213ac6bc2bbc200440acc855945c Parents: 6ee7f9f Author: Nate Cole <[email protected]> Authored: Tue Aug 23 14:53:49 2016 -0400 Committer: Jonathan Hurley <[email protected]> Committed: Wed Oct 26 14:54:07 2016 -0400 ---------------------------------------------------------------------- .../ambari/server/stack/ExtensionDirectory.java | 24 +- .../server/stack/ModuleFileUnmarshaller.java | 106 +++++- .../apache/ambari/server/stack/RepoUtil.java | 6 +- .../ambari/server/stack/ServiceDirectory.java | 15 +- .../ambari/server/stack/StackDirectory.java | 27 +- .../apache/ambari/server/stack/StackModule.java | 17 +- .../state/stack/upgrade/ConfigureFunction.java | 19 +- .../server/state/stack/upgrade/ExecuteTask.java | 7 - .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 69 ++-- .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 42 ++- .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 78 ++-- .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 84 +++-- .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml | 40 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 126 ++++--- .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 140 ++++--- .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 53 +-- .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 85 +++-- .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 109 +++--- .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 55 ++- .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 86 +++-- .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml | 141 ++++--- .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 54 +-- .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 104 +++--- .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml | 52 ++- .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml | 136 ++++--- .../resources/stacks/HDP/2.5/repos/repoinfo.xml | 5 + .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml | 53 +-- .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml | 52 ++- .../src/main/resources/upgrade-pack.xsd | 363 +++++++++++++++++++ .../server/state/stack/UpgradePackTest.java | 62 ++++ .../upgrades/HDP/2.2.0/upgrade_test_15388.xml | 7 +- .../HDP/2.1.1/upgrades/upgrade_bucket_test.xml | 22 +- .../HDP/2.1.1/upgrades/upgrade_direction.xml | 4 +- .../2.1.1/upgrades/upgrade_grouping_rolling.xml | 6 +- .../upgrades/upgrade_nonrolling_new_stack.xml | 57 +-- .../upgrades/upgrade_server_action_test.xml | 17 +- .../stacks/HDP/2.1.1/upgrades/upgrade_test.xml | 29 +- .../HDP/2.1.1/upgrades/upgrade_test_checks.xml | 26 +- .../2.1.1/upgrades/upgrade_test_nonrolling.xml | 24 +- .../HDP/2.1.1/upgrades/upgrade_test_partial.xml | 29 +- .../HDP/2.1.1/upgrades/upgrade_to_new_stack.xml | 26 +- .../stacks/HDP/2.2.0/upgrades/upgrade_test.xml | 40 +- .../HDP/2.2.0/upgrades/upgrade_test_15388.xml | 41 +-- .../HDP/2.2.0/upgrades/upgrade_test_checks.xml | 26 +- .../upgrades/upgrade_test_skip_failures.xml | 5 +- .../upgrades/HDP/2.2.0/upgrade_test_15388.xml | 6 +- .../HDP/2.2.0/upgrades/upgrade_test_15388.xml | 44 +-- 47 files changed, 1758 insertions(+), 861 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionDirectory.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionDirectory.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionDirectory.java index f2647fd..7b31925 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionDirectory.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionDirectory.java @@ -18,29 +18,17 @@ package org.apache.ambari.server.stack; +import java.io.File; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.state.stack.ExtensionMetainfoXml; -import org.apache.ambari.server.state.stack.RepositoryXml; -import org.apache.ambari.server.state.stack.StackRoleCommandOrder; -import org.apache.ambari.server.state.stack.UpgradePack; -import org.apache.commons.io.FilenameUtils; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.bind.JAXBException; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; - /** * Encapsulates IO operations on a extension definition extension directory. * @@ -150,7 +138,7 @@ public class ExtensionDirectory extends StackDefinitionDirectory { try { metaInfoXml = unmarshaller.unmarshal(ExtensionMetainfoXml.class, extensionMetaInfoFile); - } catch (JAXBException e) { + } catch (Exception e) { metaInfoXml = new ExtensionMetainfoXml(); metaInfoXml.setValid(false); metaInfoXml.addError("Unable to parse extension metainfo.xml file at location: " + http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/ModuleFileUnmarshaller.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ModuleFileUnmarshaller.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ModuleFileUnmarshaller.java index 7d47339..d76d59f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ModuleFileUnmarshaller.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ModuleFileUnmarshaller.java @@ -18,6 +18,25 @@ package org.apache.ambari.server.stack; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import javax.xml.XMLConstants; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + import org.apache.ambari.server.state.stack.ConfigUpgradePack; import org.apache.ambari.server.state.stack.ConfigurationXml; import org.apache.ambari.server.state.stack.ExtensionMetainfoXml; @@ -25,25 +44,25 @@ import org.apache.ambari.server.state.stack.RepositoryXml; import org.apache.ambari.server.state.stack.ServiceMetainfoXml; import org.apache.ambari.server.state.stack.StackMetainfoXml; import org.apache.ambari.server.state.stack.UpgradePack; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; +import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.SAXException; /** * Provides functionality to unmarshal stack definition files to their * corresponding object representations. */ -class ModuleFileUnmarshaller { +public class ModuleFileUnmarshaller { + + private static final Logger LOG = LoggerFactory.getLogger(ModuleFileUnmarshaller.class); + /** * Map of class to JAXB context */ - private static final Map<Class<?>, JAXBContext> jaxbContexts = new HashMap<Class<?>, JAXBContext>(); + private static final Map<Class<?>, JAXBContext> jaxbContexts = new HashMap<>(); + private static final Map<String, Schema> jaxbSchemas = new HashMap<>(); + /** * Unmarshal a file to it's corresponding object type. @@ -53,11 +72,70 @@ class ModuleFileUnmarshaller { * * @return object representation of the specified file * @throws JAXBException if unable to unmarshal the file + * @throws XMLStreamException + * @throws SAXException + * @throws FileNotFoundException + */ + public <T> T unmarshal(Class<T> clz, File file) throws JAXBException, IOException, XMLStreamException, SAXException { + return unmarshal(clz, file, false); + } + + /** + * Unmarshal a file to it's corresponding object type. + * + * @param clz class of the object representation + * @param file file to unmarshal + * @param logXsd log XSD information + * + * @return object representation of the specified file + * @throws JAXBException if unable to unmarshal the file + * @throws XMLStreamException + * @throws SAXException + * @throws FileNotFoundException */ - public <T> T unmarshal(Class<T> clz, File file) throws JAXBException { + public <T> T unmarshal(Class<T> clz, File file, boolean logXsd) throws JAXBException, IOException, XMLStreamException, SAXException { Unmarshaller u = jaxbContexts.get(clz).createUnmarshaller(); - return clz.cast(u.unmarshal(file)); + XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); + + FileReader reader = new FileReader(file); + XMLStreamReader xmlReader = xmlFactory.createXMLStreamReader(reader); + + xmlReader.nextTag(); + String xsdName = xmlReader.getAttributeValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "noNamespaceSchemaLocation"); + + InputStream xsdStream = null; + + if (null != xsdName) { + if (logXsd) { + LOG.info("Processing " + file.getAbsolutePath() + " with " + xsdName); + } + if (jaxbSchemas.containsKey(xsdName)) { + u.setSchema(jaxbSchemas.get(xsdName)); + } else { + + xsdStream = clz.getClassLoader().getResourceAsStream(xsdName); + + if (null != xsdStream) { + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + Schema schema = factory.newSchema(new StreamSource(xsdStream)); + + u.setSchema(schema); + + jaxbSchemas.put(xsdName, schema); + } else if (logXsd) { + LOG.info("Schema '" + xsdName + "' for " + file.getAbsolutePath() + " was not found, ignoring"); + } + } + } else if (logXsd) { + LOG.info("NOT processing " + file.getAbsolutePath() + "; there is no XSD"); + } + + try { + return clz.cast(u.unmarshal(file)); + } finally { + IOUtils.closeQuietly(xsdStream); + } } /** @@ -65,7 +143,7 @@ class ModuleFileUnmarshaller { */ static { try { - // three classes define the top-level element "metainfo", so we need 3 contexts. + // three classes define the top-level element "metainfo", so we need 3 contexts for them JAXBContext ctx = JAXBContext.newInstance(StackMetainfoXml.class, RepositoryXml.class, ConfigurationXml.class, UpgradePack.class, ConfigUpgradePack.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java index e60fd85..3f17fd2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java @@ -25,7 +25,6 @@ import java.util.List; import java.util.Set; import javax.annotation.Nullable; -import javax.xml.bind.JAXBException; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.controller.RepositoryResponse; @@ -95,7 +94,7 @@ public class RepoUtil { if (repositoryFile.exists()) { try { repoFile = unmarshaller.unmarshal(RepositoryXml.class, repositoryFile); - } catch (JAXBException e) { + } catch (Exception e) { repoFile = new RepositoryXml(); repoFile.setValid(false); String msg = "Unable to parse repo file at location: " + @@ -122,11 +121,12 @@ public class RepoUtil { for (OperatingSystemEntity os : operatingSystems) { List<RepositoryInfo> serviceReposForOs = stackReposByOs.get(os.getOsType()); ImmutableSet<String> repoNames = ImmutableSet.copyOf(Lists.transform(os.getRepositories(), REPO_ENTITY_TO_NAME)); - for (RepositoryInfo repoInfo : serviceReposForOs) + for (RepositoryInfo repoInfo : serviceReposForOs) { if (!repoNames.contains(repoInfo.getRepoName())) { os.getRepositories().add(toRepositoryEntity(repoInfo)); addedRepos.add(String.format("%s (%s)", repoInfo.getRepoId(), os.getOsType())); } + } } LOG.info("Added {} service repos: {}", addedRepos.size(),Iterables.toString(addedRepos)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java index 20446ce..00dc046 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java @@ -18,6 +18,11 @@ package org.apache.ambari.server.stack; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.state.ServiceInfo; @@ -28,14 +33,6 @@ import org.codehaus.jackson.type.TypeReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.bind.JAXBException; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; - /** * Encapsulates IO operations on a stack definition service directory. */ @@ -398,7 +395,7 @@ public abstract class ServiceDirectory extends StackDefinitionDirectory { try { metaInfoXml = unmarshaller.unmarshal(ServiceMetainfoXml.class, f); - } catch (JAXBException e) { + } catch (Exception e) { metaInfoXml = new ServiceMetainfoXml(); metaInfoXml.setValid(false); String msg = String.format("Unable to parse service metainfo.xml file '%s' ", f.getAbsolutePath()); http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/StackDirectory.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackDirectory.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackDirectory.java index c2c8a9e..daa9014 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackDirectory.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackDirectory.java @@ -18,12 +18,20 @@ package org.apache.ambari.server.stack; +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; +import org.apache.ambari.server.state.stack.ConfigUpgradePack; import org.apache.ambari.server.state.stack.RepositoryXml; import org.apache.ambari.server.state.stack.StackMetainfoXml; import org.apache.ambari.server.state.stack.StackRoleCommandOrder; -import org.apache.ambari.server.state.stack.ConfigUpgradePack; import org.apache.ambari.server.state.stack.UpgradePack; import org.apache.commons.io.FilenameUtils; import org.codehaus.jackson.map.ObjectMapper; @@ -31,17 +39,6 @@ import org.codehaus.jackson.type.TypeReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.bind.JAXBException; - -import java.io.File; -import java.io.FilenameFilter; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; - /** * Encapsulates IO operations on a stack definition stack directory. */ @@ -350,7 +347,7 @@ public class StackDirectory extends StackDefinitionDirectory { try { metaInfoXml = unmarshaller.unmarshal(StackMetainfoXml.class, stackMetaInfoFile); - } catch (JAXBException e) { + } catch (Exception e) { metaInfoXml = new StackMetainfoXml(); metaInfoXml.setValid(false); String msg = "Unable to parse stack metainfo.xml file at location: " + @@ -451,7 +448,7 @@ public class StackDirectory extends StackDefinitionDirectory { pack = unmarshaller.unmarshal(UpgradePack.class, upgradeFile); pack.setName(packName); } - catch (JAXBException e) { + catch (Exception e) { if (upgradeFile == null) { throw new AmbariException("Null upgrade pack"); } @@ -465,7 +462,7 @@ public class StackDirectory extends StackDefinitionDirectory { try { pack = unmarshaller.unmarshal(ConfigUpgradePack.class, upgradeFile); } - catch (JAXBException e) { + catch (Exception e) { if (upgradeFile == null) { throw new AmbariException("Null config upgrade pack"); } http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java index bb8d740..37f4167 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java @@ -19,7 +19,6 @@ package org.apache.ambari.server.stack; import java.io.File; -import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -28,14 +27,10 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; -import javax.xml.bind.JAXBException; - import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.api.services.AmbariMetaInfo; -import org.apache.ambari.server.stack.StackDefinitionDirectory; import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.ExtensionInfo; import org.apache.ambari.server.state.PropertyDependencyInfo; @@ -48,11 +43,7 @@ import org.apache.ambari.server.state.stack.RepositoryXml; import org.apache.ambari.server.state.stack.ServiceMetainfoXml; import org.apache.ambari.server.state.stack.StackMetainfoXml; import org.apache.ambari.server.state.stack.UpgradePack; -import org.apache.ambari.server.state.stack.UpgradePack.OrderService; -import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping; import org.apache.ambari.server.state.stack.upgrade.Grouping; -import org.apache.ambari.server.state.stack.upgrade.ServiceCheckGrouping; -import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping.ExecuteStage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -864,7 +855,7 @@ public class StackModule extends BaseModule<StackModule, StackInfo> implements V ConfigUpgradePack serviceConfigPack = unmarshaller.unmarshal(ConfigUpgradePack.class, serviceConfig); pack.services.addAll(serviceConfigPack.services); } - catch (JAXBException e) { + catch (Exception e) { throw new AmbariException("Unable to parse service config upgrade file at location: " + serviceConfig.getAbsolutePath(), e); } } @@ -904,8 +895,8 @@ public class StackModule extends BaseModule<StackModule, StackInfo> implements V throw new AmbariException("Expected class: " + first.getClass() + " instead of " + group.getClass()); } /* If the current group doesn't specify an "after entry" and the first group does - then the current group should be added first. The first group in the list should - never be ordered relative to any other group. */ + then the current group should be added first. The first group in the list should + never be ordered relative to any other group. */ if (group.addAfterGroupEntry == null && first.addAfterGroupEntry != null) { list.add(0, group); } @@ -1013,7 +1004,7 @@ public class StackModule extends BaseModule<StackModule, StackInfo> implements V try { pack = unmarshaller.unmarshal(UpgradePack.class, serviceFile); } - catch (JAXBException e) { + catch (Exception e) { throw new AmbariException("Unable to parse service upgrade file at location: " + serviceFile.getAbsolutePath(), e); } http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureFunction.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureFunction.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureFunction.java index 086551e..075516f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureFunction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureFunction.java @@ -17,11 +17,12 @@ */ package org.apache.ambari.server.state.stack.upgrade; - import javax.xml.bind.annotation.XmlAccessType; - import javax.xml.bind.annotation.XmlAccessorType; - import javax.xml.bind.annotation.XmlRootElement; - import javax.xml.bind.annotation.XmlTransient; - import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; /** * Used to represent Configuring of a component. @@ -36,6 +37,14 @@ public class ConfigureFunction extends Task { public static final String actionVerb = "Configuring"; + /** + * The hosts to run the task on. Default to running on + * {@link ExecuteHostType#ALL}. + */ + @XmlAttribute + public ExecuteHostType hosts = ExecuteHostType.ALL; + + @Override public Task.Type getType() { return type; http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java index d175a13..3995cb6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ExecuteTask.java @@ -59,13 +59,6 @@ public class ExecuteTask extends Task { @XmlElement(name="function") public String function; - /** - * Command to run under normal conditions. - * If both a function and command are defined, only the function will be executed. - */ - @XmlElement(name="command") - public String command; - public static final String actionVerb = "Executing"; @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/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 044e9de..e3bb29d 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 @@ -17,11 +17,12 @@ --> -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.3.*.*</target> <target-stack>HDP-2.3</target-stack> - <type>NON_ROLLING</type> <downgrade-allowed>false</downgrade-allowed> + <type>NON_ROLLING</type> + <prerequisite-checks> <!-- List of additional pre-req checks to run in addition to the required pre-reqs --> <check>org.apache.ambari.server.checks.StormRestAPIDeletedCheck</check> @@ -67,9 +68,9 @@ </group> <group xsi:type="stop" name="STOP_HIGH_LEVEL_SERVICE_COMPONENTS" title="Stop Components for High-Level Services"> + <service-check>false</service-check> <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> - <service-check>false</service-check> <parallel-scheduler/> <service name="FLUME"> @@ -142,9 +143,9 @@ </group> <group xsi:type="stop" name="STOP_LOW_LEVEL_SERVICE_COMPONENTS" title="Stop Components for Core Services"> + <service-check>false</service-check> <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> - <service-check>false</service-check> <parallel-scheduler/> <service name="HBASE"> @@ -250,7 +251,9 @@ </execute-stage> <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client"> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </execute-stage> <execute-stage service="YARN" component="APP_TIMELINE_SERVER" title="Apply config changes for AppTimelineServer"> @@ -278,7 +281,9 @@ </execute-stage> <execute-stage service="YARN" component="RESOURCEMANAGER" title="Calculating Yarn Properties"> - <task xsi:type="server_action" summary="Calculating Yarn Properties" class="org.apache.ambari.server.serveraction.upgrades.YarnConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.YarnConfigCalculation"> + <summary>Calculating Yarn Properties</summary> + </task> </execute-stage> <!--HBASE--> @@ -287,7 +292,9 @@ </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Calculating HBase Properties"> - <task xsi:type="server_action" summary="Calculating HBase Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation"> + <summary>Calculating HBase Properties</summary> + </task> </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for HBase Master"> @@ -308,12 +315,16 @@ </execute-stage> <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez"> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </execute-stage> <!--HIVE--> <execute-stage service="HIVE" component="HIVE_SERVER" title="Apply config changes for Hive Server"> - <task xsi:type="server_action" summary="Calculating ZooKeeper Quorum Properties for Hive" class="org.apache.ambari.server.serveraction.upgrades.HiveZKQuorumConfigAction" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HiveZKQuorumConfigAction"> + <summary>Calculating ZooKeeper Quorum Properties for Hive</summary> + </task> </execute-stage> <execute-stage service="HIVE" component="HIVE_SERVER" title="Apply config changes for Hive Server"> @@ -346,7 +357,9 @@ </execute-stage> <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Apply config changes for Oozie Server"> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> </execute-stage> <!--FALCON--> @@ -375,7 +388,6 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> <service name="ZOOKEEPER"> - <service-check>false</service-check> <component>ZOOKEEPER_SERVER</component> <component>ZOOKEEPER_CLIENT</component> </service> @@ -410,7 +422,8 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <execute-stage service="HDFS" component="NAMENODE" title="Wait to leave Safemode"> - <task xsi:type="execute" hosts="all" summary="Wait for NameNode to leave Safemode"> + <task xsi:type="execute" hosts="all"> + <summary>Wait for NameNode to leave Safemode</summary> <script>scripts/namenode.py</script> <function>wait_for_safemode_off</function> </task> @@ -475,8 +488,8 @@ </group> <group name="SERVICE_CHECK_1" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -532,8 +545,8 @@ </group> <group name="SERVICE_CHECK_2" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>HIVE</service> <service>OOZIE</service> @@ -571,11 +584,6 @@ <component>DRPC_SERVER</component> </service> - <execute-stage service="STORM" component="DRPC_SERVER" title="Rebuild Storm Topology"> - <task xsi:type="manual"> - <message>Please rebuild your topology using the new Storm version dependencies and resubmit it using the newly created jar.</message> - </task> - </execute-stage> </group> <group xsi:type="restart" name="FLUME" title="Flume"> @@ -588,8 +596,8 @@ </group> <group name="SERVICE_CHECK_3" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>FALCON</service> <service>STORM</service> @@ -834,14 +842,16 @@ --> <task xsi:type="configure_function"/> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> @@ -875,12 +885,14 @@ <service name="STORM"> <component name="NIMBUS"> <pre-upgrade> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -893,7 +905,8 @@ <component name="SUPERVISOR"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -906,7 +919,8 @@ <component name="STORM_UI_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -919,7 +933,8 @@ <component name="DRPC_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml index c8642c0..87afdbc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml @@ -16,8 +16,7 @@ limitations under the License. --> - -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.2.*.*</target> <target-stack>HDP-2.2</target-stack> <type>NON_ROLLING</type> @@ -63,8 +62,8 @@ </group> <group xsi:type="stop" name="STOP_HIGH_LEVEL_SERVICE_COMPONENTS" title="Stop Components for High-Level Services"> - <skippable>true</skippable> <service-check>false</service-check> + <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> @@ -155,10 +154,10 @@ </group> <group xsi:type="stop" name="STOP_LOW_LEVEL_SERVICE_COMPONENTS" title="Stop Components for Core Services"> + <service-check>false</service-check> <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> - <service-check>false</service-check> <service name="HBASE"> <component>HBASE_REGIONSERVER</component> @@ -223,7 +222,9 @@ <skippable>true</skippable> <!-- May fix configuration problems manually --> <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client"> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </execute-stage> <execute-stage service="TEZ" component="TEZ_CLIENT" title="Apply config changes for Tez"> @@ -231,11 +232,15 @@ </execute-stage> <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez"> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </execute-stage> <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Apply config changes for Oozie Server"> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> </execute-stage> <execute-stage service="STORM" component="NIMBUS" title="Apply config changes for Nimbus"> @@ -267,7 +272,6 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> <service name="ZOOKEEPER"> - <service-check>true</service-check> <component>ZOOKEEPER_SERVER</component> <component>ZOOKEEPER_CLIENT</component> </service> @@ -313,7 +317,8 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <execute-stage service="HDFS" component="NAMENODE" title="Wait to leave Safemode"> - <task xsi:type="execute" hosts="all" summary="Wait for NameNode to leave Safemode"> + <task xsi:type="execute" hosts="all"> + <summary>Wait for NameNode to leave Safemode</summary> <script>scripts/namenode.py</script> <function>wait_for_safemode_off</function> </task> @@ -378,8 +383,8 @@ </group> <group name="SERVICE_CHECK_1" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>RANGER</service> @@ -455,8 +460,8 @@ </group> <group name="SERVICE_CHECK_2" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>HIVE</service> <service>SPARK</service> @@ -511,12 +516,6 @@ <component>STORM_UI_SERVER</component> <component>DRPC_SERVER</component> </service> - - <execute-stage service="STORM" component="DRPC_SERVER" title="Rebuild Storm Topology"> - <task xsi:type="manual"> - <message>Please rebuild your topology using the new Storm version dependencies and resubmit it using the newly created jar.</message> - </task> - </execute-stage> </group> <group xsi:type="restart" name="SLIDER" title="Slider"> @@ -538,8 +537,9 @@ </group> <group name="SERVICE_CHECK_3" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> + <priority> <service>FALCON</service> <service>KAFKA</service> @@ -790,14 +790,16 @@ <!-- It is extremely important that both of these tasks run on the exact same host. Hence, pick the first alphabetically. --> <task xsi:type="configure_function" hosts="first" /> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml index c26a8a1..e082f72 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml @@ -16,8 +16,7 @@ limitations under the License. --> - -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.3.*.*</target> <target-stack>HDP-2.3</target-stack> <type>NON_ROLLING</type> @@ -66,9 +65,9 @@ </group> <group xsi:type="stop" name="STOP_HIGH_LEVEL_SERVICE_COMPONENTS" title="Stop Components for High-Level Services"> + <service-check>false</service-check> <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> - <service-check>false</service-check> <parallel-scheduler/> <service name="FLUME"> @@ -166,8 +165,8 @@ </group> <group xsi:type="stop" name="STOP_LOW_LEVEL_SERVICE_COMPONENTS" title="Stop Components for Core Services"> - <skippable>true</skippable> <service-check>false</service-check> + <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> @@ -268,7 +267,9 @@ </execute-stage> <execute-stage service="RANGER" component="RANGER_ADMIN" title="Calculating Ranger Properties"> - <task xsi:type="server_action" summary="Calculating Ranger Properties" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation"> + <summary>Calculating Ranger Properties</summary> + </task> </execute-stage> <execute-stage service="RANGER" component="RANGER_ADMIN" title="Apply config changes for Ranger"> @@ -334,7 +335,9 @@ </execute-stage> <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client"> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </execute-stage> <execute-stage service="YARN" component="APP_TIMELINE_SERVER" title="Apply config changes for AppTimelineServer"> @@ -376,7 +379,9 @@ </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Calculating HBase Properties"> - <task xsi:type="server_action" summary="Calculating HBase Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation"> + <summary>Calculating HBase Properties</summary> + </task> </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for HBase Master"> @@ -427,7 +432,9 @@ </execute-stage> <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez"> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </execute-stage> <!--HIVE--> @@ -473,7 +480,9 @@ </execute-stage> <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Apply config changes for Oozie Server"> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> </execute-stage> <!--KNOX--> @@ -550,7 +559,6 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> <service name="ZOOKEEPER"> - <service-check>false</service-check> <component>ZOOKEEPER_SERVER</component> <component>ZOOKEEPER_CLIENT</component> </service> @@ -596,7 +604,8 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <execute-stage service="HDFS" component="NAMENODE" title="Wait to leave Safemode"> - <task xsi:type="execute" hosts="all" summary="Wait for NameNode to leave Safemode"> + <task xsi:type="execute" hosts="all"> + <summary>Wait for NameNode to leave Safemode</summary> <script>scripts/namenode.py</script> <function>wait_for_safemode_off</function> </task> @@ -661,8 +670,8 @@ </group> <group name="SERVICE_CHECK_1" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>RANGER</service> @@ -738,8 +747,8 @@ </group> <group name="SERVICE_CHECK_2" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>HIVE</service> <service>SPARK</service> @@ -795,11 +804,6 @@ <component>DRPC_SERVER</component> </service> - <execute-stage service="STORM" component="DRPC_SERVER" title="Rebuild Storm Topology"> - <task xsi:type="manual"> - <message>Please rebuild your topology using the new Storm version dependencies and resubmit it using the newly created jar.</message> - </task> - </execute-stage> </group> <group xsi:type="restart" name="SLIDER" title="Slider"> @@ -835,8 +839,8 @@ </group> <group name="SERVICE_CHECK_3" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>FALCON</service> <service>KAFKA</service> @@ -915,14 +919,16 @@ <function>set_pre_start</function> </task> - <task xsi:type="execute" hosts="any" summary="Upgrading Ranger database schema"> + <task xsi:type="execute" hosts="any"> + <summary>Upgrading Ranger database schema</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_database</function> </task> <task xsi:type="configure_function" hosts="all" /> - <task xsi:type="execute" hosts="any" summary="Applying Ranger java patches"> + <task xsi:type="execute" hosts="any"> + <summary>Applying Ranger java patches</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_java_patches</function> </task> @@ -1108,14 +1114,16 @@ <!-- It is extremely important that both of these tasks run on the exact same host. Hence, pick the first alphabetically. --> <task xsi:type="configure_function" hosts="first" /> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> @@ -1165,12 +1173,14 @@ <service name="STORM"> <component name="NIMBUS"> <pre-upgrade> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1181,12 +1191,14 @@ <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1199,7 +1211,8 @@ <component name="SUPERVISOR"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1210,7 +1223,8 @@ <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1223,7 +1237,8 @@ <component name="STORM_UI_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1236,7 +1251,8 @@ <component name="DRPC_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/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 d022d3a..ed81582 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 @@ -16,8 +16,7 @@ limitations under the License. --> - -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.4.*.*</target> <target-stack>HDP-2.4</target-stack> <type>NON_ROLLING</type> @@ -72,11 +71,10 @@ </group> <group xsi:type="stop" name="STOP_HIGH_LEVEL_SERVICE_COMPONENTS" title="Stop Components for High-Level Services"> + <service-check>false</service-check> <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> - <service-check>false</service-check> <parallel-scheduler/> - <service-check>false</service-check> <service name="ATLAS"> <component>ATLAS_SERVER</component> @@ -178,8 +176,8 @@ </group> <group xsi:type="stop" name="STOP_LOW_LEVEL_SERVICE_COMPONENTS" title="Stop Components for Core Services"> - <skippable>true</skippable> <service-check>false</service-check> + <skippable>true</skippable> <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> @@ -282,7 +280,9 @@ </execute-stage> <execute-stage service="RANGER" component="RANGER_ADMIN" title="Calculating Ranger Properties"> - <task xsi:type="server_action" summary="Calculating Ranger Properties" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation"> + <summary>Calculating Ranger Properties</summary> + </task> </execute-stage> <execute-stage service="RANGER" component="RANGER_ADMIN" title="Apply config changes for Ranger"> @@ -348,7 +348,9 @@ </execute-stage> <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client"> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </execute-stage> <execute-stage service="YARN" component="APP_TIMELINE_SERVER" title="Apply config changes for AppTimelineServer"> @@ -376,7 +378,9 @@ </execute-stage> <execute-stage service="YARN" component="RESOURCEMANAGER" title="Calculating Yarn Properties for Spark Shuffle"> - <task xsi:type="server_action" summary="Calculating Yarn Properties for Spark" class="org.apache.ambari.server.serveraction.upgrades.SparkShufflePropertyConfig" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.SparkShufflePropertyConfig"> + <summary>Calculating Yarn Properties for Spark</summary> + </task> </execute-stage> <!--HBASE--> @@ -393,7 +397,9 @@ </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Calculating HBase Properties"> - <task xsi:type="server_action" summary="Calculating HBase Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation" /> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation"> + <summary>Calculating HBase Properties</summary> + </task> </execute-stage> <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for HBase Master"> @@ -444,7 +450,9 @@ </execute-stage> <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez"> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </execute-stage> <!--HIVE--> @@ -494,7 +502,9 @@ </execute-stage> <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Apply config changes for Oozie Server"> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> </execute-stage> <!--KNOX--> @@ -572,7 +582,6 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <parallel-scheduler/> <service name="ZOOKEEPER"> - <service-check>false</service-check> <component>ZOOKEEPER_SERVER</component> <component>ZOOKEEPER_CLIENT</component> </service> @@ -619,7 +628,8 @@ <supports-auto-skip-failure>false</supports-auto-skip-failure> <execute-stage service="HDFS" component="NAMENODE" title="Wait to leave Safemode"> - <task xsi:type="execute" hosts="all" summary="Wait for NameNode to leave Safemode"> + <task xsi:type="execute" hosts="all"> + <summary>Wait for NameNode to leave Safemode</summary> <script>scripts/namenode.py</script> <function>wait_for_safemode_off</function> </task> @@ -689,8 +699,8 @@ </group> <group name="SERVICE_CHECK_1" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>RANGER</service> @@ -777,8 +787,8 @@ </group> <group name="SERVICE_CHECK_2" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>HIVE</service> <service>SPARK</service> @@ -833,12 +843,6 @@ <component>STORM_UI_SERVER</component> <component>DRPC_SERVER</component> </service> - - <execute-stage service="STORM" component="DRPC_SERVER" title="Rebuild Storm Topology"> - <task xsi:type="manual"> - <message>Please rebuild your topology using the new Storm version dependencies and resubmit it using the newly created jar.</message> - </task> - </execute-stage> </group> <group xsi:type="restart" name="SLIDER" title="Slider"> @@ -874,8 +878,8 @@ </group> <group name="SERVICE_CHECK_3" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>FALCON</service> <service>KAFKA</service> @@ -955,14 +959,16 @@ <function>set_pre_start</function> </task> - <task xsi:type="execute" hosts="any" summary="Upgrading Ranger database schema"> + <task xsi:type="execute" hosts="any"> + <summary>Upgrading Ranger database schema</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_database</function> </task> <task xsi:type="configure_function" hosts="all" /> - <task xsi:type="execute" hosts="any" summary="Applying Ranger java patches"> + <task xsi:type="execute" hosts="any"> + <summary>Applying Ranger java patches</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_java_patches</function> </task> @@ -1167,14 +1173,16 @@ <!-- It is extremely important that both of these tasks run on the exact same host. Hence, pick the first alphabetically. --> <task xsi:type="configure_function" hosts="first" /> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> @@ -1224,12 +1232,14 @@ <service name="STORM"> <component name="NIMBUS"> <pre-upgrade> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1240,12 +1250,14 @@ <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1258,7 +1270,8 @@ <component name="SUPERVISOR"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1269,7 +1282,8 @@ <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1282,7 +1296,8 @@ <component name="STORM_UI_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -1295,7 +1310,8 @@ <component name="DRPC_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml index d779a8d..3cc0a65 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml @@ -16,12 +16,11 @@ limitations under the License. --> - -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.2.*.*</target> + <target-stack>HDP-2.2</target-stack> <skip-failures>false</skip-failures> <skip-service-check-failures>false</skip-service-check-failures> - <target-stack>HDP-2.2</target-stack> <type>ROLLING</type> <prerequisite-checks> <!-- List of additional pre-req checks to run in addition to the required pre-reqs --> @@ -133,8 +132,8 @@ </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -148,8 +147,9 @@ </group> <group name="CORE_SLAVES" title="Core Slaves" xsi:type="colocated"> - <skippable>true</skippable> <service-check>false</service-check> + <skippable>true</skippable> + <service name="HDFS"> <component>DATANODE</component> </service> @@ -164,14 +164,14 @@ <batch> <percent>20</percent> - <summary>Verification Required</summary> + <summary>Verification Required</summary> <message>The initial batch of {{components}} hosts have been {{direction.past}}. You are advised to check the hosts and perform cluster/workload-specific tests against your cluster to ensure proper operation before proceeding with {{direction.text}} of the remaining services.</message> </batch> </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -281,8 +281,8 @@ </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -444,7 +444,9 @@ <component name="MAPREDUCE2_CLIENT"> <pre-upgrade> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </pre-upgrade> <upgrade> @@ -503,7 +505,9 @@ <pre-upgrade> <task xsi:type="configure" id="hdp_2_2_0_0_tez_client_adjust_tez_lib_uris_property" /> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </pre-upgrade> <upgrade> <task xsi:type="restart-task"/> @@ -583,29 +587,35 @@ <service name="OOZIE"> <component name="OOZIE_SERVER"> <pre-upgrade> - <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers"> + <task xsi:type="execute" hosts="all" sequential="true"> + <summary>Shut down all Oozie servers</summary> <script>scripts/oozie_server.py</script> <function>stop</function> </task> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> <!-- It is extremely important that both of these tasks run on the exact same host. Hence, pick the first alphabetically. --> <task xsi:type="configure_function" hosts="first" /> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers"> + <task xsi:type="execute" hosts="all" sequential="true"> + <summary>Shut down all Oozie servers</summary> <script>scripts/oozie_server.py</script> <function>stop</function> </task> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> http://git-wip-us.apache.org/repos/asf/ambari/blob/86d24d75/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 0bc917e..9cdfdfc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -15,9 +15,12 @@ See the License for the specific language governing permissions and limitations under the License. --> -<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="upgrade-pack.xsd"> <target>2.3.*.*</target> <target-stack>HDP-2.3</target-stack> + <skip-failures>false</skip-failures> + <skip-service-check-failures>false</skip-service-check-failures> <type>ROLLING</type> <prerequisite-checks> @@ -44,9 +47,6 @@ </configuration> </prerequisite-checks> - <skip-failures>false</skip-failures> - <skip-service-check-failures>false</skip-service-check-failures> - <order> <group xsi:type="cluster" name="PRE_CLUSTER" title="Prepare Upgrade"> <direction>UPGRADE</direction> @@ -164,8 +164,8 @@ </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -180,8 +180,8 @@ </group> <group name="CORE_SLAVES" title="Core Slaves" xsi:type="colocated"> - <skippable>true</skippable> <service-check>false</service-check> + <skippable>true</skippable> <service name="HDFS"> <component>DATANODE</component> </service> @@ -202,8 +202,8 @@ </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -315,8 +315,8 @@ </group> <group name="SERVICE_CHECK" title="All Service Checks" xsi:type="service-check"> - <skippable>true</skippable> <direction>UPGRADE</direction> + <skippable>true</skippable> <priority> <service>ZOOKEEPER</service> <service>HDFS</service> @@ -438,9 +438,9 @@ <service name="RANGER"> <component name="RANGER_ADMIN"> - <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <pre-upgrade> - <task xsi:type="execute" hosts="all" summary="Stop Ranger Admin"> + <task xsi:type="execute" hosts="all"> + <summary>Stop Ranger Admin</summary> <script>scripts/ranger_admin.py</script> <function>stop</function> </task> @@ -450,7 +450,9 @@ <task xsi:type="configure" id="hdp_2_3_0_0_update_ranger_env"/> <task xsi:type="configure" id="hdp_2_3_0_0_update_ranger_admin"/> - <task xsi:type="server_action" summary="Calculating Ranger Properties" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerConfigCalculation"> + <summary>Calculating Ranger Properties</summary> + </task> <task xsi:type="configure" id="hdp_2_3_0_0_update_ranger_usersync"/> @@ -471,19 +473,23 @@ <function>set_pre_start</function> </task> - <task xsi:type="execute" hosts="any" summary="Upgrading Ranger database schema"> + <task xsi:type="execute" hosts="any"> + <summary>Upgrading Ranger database schema</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_database</function> </task> <task xsi:type="configure_function" hosts="all" /> - <task xsi:type="execute" hosts="any" summary="Applying Ranger java patches"> + <task xsi:type="execute" hosts="any"> + <summary>Applying Ranger java patches</summary> <script>scripts/ranger_admin.py</script> <function>setup_ranger_java_patches</function> </task> </pre-upgrade> + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -499,7 +505,6 @@ <service name="HDFS"> <component name="NAMENODE"> - <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <pre-upgrade> <task xsi:type="configure" id="hdp_2_3_0_0_namenode_ha_adjustments"/> @@ -517,6 +522,8 @@ <task xsi:type="configure" id="hdp_2_3_0_0_hdfs_ranger_hdfs_delete_old_properties"/> </pre-upgrade> + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -549,11 +556,12 @@ <service name="MAPREDUCE2"> <component name="HISTORYSERVER"> - <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <pre-upgrade> <task xsi:type="configure" id="hdp_2_3_0_0_mapreduce2_adjust_history_server"/> </pre-upgrade> + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -561,7 +569,9 @@ <component name="MAPREDUCE2_CLIENT"> <pre-upgrade> - <task xsi:type="server_action" summary="Verifying LZO codec path for mapreduce" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for mapreduce</summary> + </task> </pre-upgrade> <upgrade> @@ -576,9 +586,9 @@ <task xsi:type="configure" id="hdp_2_3_0_0_yarn_ats_enable_recovery"/> <task xsi:type="configure" id="hdp_2_3_0_0_yarn_keep_ats_v1"/> </pre-upgrade> - + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> - + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -595,9 +605,9 @@ <task xsi:type="configure" id="hdp_2_3_0_0_yarn_rm_check_cs_root_max_capacity"/> </pre-upgrade> - + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> - + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -618,7 +628,6 @@ <service name="HBASE"> <component name="HBASE_MASTER"> - <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <pre-upgrade> <task xsi:type="configure" id="hdp_2_3_0_0_hbase_master_adjust_phoenix_scheduler_factory"/> @@ -626,7 +635,9 @@ <task xsi:type="configure" id="hdp_2_3_0_0_hbase_master_set_global_memstore_size"/> - <task xsi:type="server_action" summary="Calculating HBase Properties" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.HBaseConfigCalculation"> + <summary>Calculating HBase Properties</summary> + </task> <task xsi:type="configure" id="hdp_2_3_0_0_hbase_master_adjust_phoenix_indexed_wal_edit_codec"/> @@ -643,6 +654,8 @@ <!-- These HBASE configs changed in HDP 2.3.4.0, but Ambari can't distinguish HDP 2.3.2.0 vs HDP 2.3.4.0, so easier to always do them. --> <task xsi:type="configure" id="hdp_2_3_4_0_hbase_remove_local_indexing"/> </pre-upgrade> + + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <upgrade> @@ -670,7 +683,9 @@ <task xsi:type="configure" id="hdp_2_2_0_0_tez_client_adjust_tez_counters_properties"/> <task xsi:type="configure" id="hdp_2_3_0_0_tez_client_adjust_tez_lib_uris_property"/> <task xsi:type="configure" id="hdp_2_3_0_0_tez_keep_ats_v1"/> - <task xsi:type="server_action" summary="Verifying LZO codec path for Tez" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath"> + <summary>Verifying LZO codec path for Tez</summary> + </task> </pre-upgrade> <upgrade> <task xsi:type="restart-task"/> @@ -771,9 +786,12 @@ <pre-upgrade> <task xsi:type="configure" id="hdp_2_3_0_0_oozie_remove_redundant_configurations"/> - <task xsi:type="server_action" summary="Adjusting Oozie properties" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"/> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.OozieConfigCalculation"> + <summary>Adjusting Oozie properties</summary> + </task> - <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers"> + <task xsi:type="execute" hosts="all" sequential="true"> + <summary>Shut down all Oozie servers</summary> <script>scripts/oozie_server.py</script> <function>stop</function> </task> @@ -781,19 +799,22 @@ <!-- It is extremely important that both of these tasks run on the exact same host. Hence, pick the first alphabetically. --> <task xsi:type="configure_function" hosts="first" /> - <task xsi:type="execute" hosts="first" sequential="true" summary="Upgrading the Oozie database and creating a new sharelib"> + <task xsi:type="execute" hosts="first" sequential="true"> + <summary>Upgrading the Oozie database and creating a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>upgrade_oozie_database_and_sharelib</function> </task> </pre-upgrade> <pre-downgrade> - <task xsi:type="execute" hosts="all" sequential="true" summary="Shut down all Oozie servers"> + <task xsi:type="execute" hosts="all" sequential="true"> + <summary>Shut down all Oozie servers</summary> <script>scripts/oozie_server.py</script> <function>stop</function> </task> - <task xsi:type="execute" hosts="any" sequential="true" summary="Create a new sharelib"> + <task xsi:type="execute" hosts="any" sequential="true"> + <summary>Create a new sharelib</summary> <script>scripts/oozie_server_upgrade.py</script> <function>create_sharelib</function> </task> @@ -829,7 +850,8 @@ <!-- In HDP 2.3.4.0, Kafka had changes that required stopping all Kafka Brokers, running a migration script, and then starting one at a time. This is needed during both upgrade and downgrade. --> <pre-upgrade> - <task xsi:type="execute" hosts="all" summary="Shut down all Kafka Brokers"> + <task xsi:type="execute" hosts="all"> + <summary>Shut down all Kafka Brokers</summary> <script>scripts/kafka_broker.py</script> <function>stop</function> </task> @@ -849,7 +871,7 @@ <task xsi:type="configure" id="hdp_2_3_0_0_knox_remove_deprecated_ranger_properties"/> </pre-upgrade> - + <pre-downgrade/> <!-- no-op to prevent config changes on downgrade --> <upgrade> @@ -860,29 +882,20 @@ <service name="STORM"> <component name="NIMBUS"> - <pre-downgrade> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> - <script>scripts/storm_upgrade.py</script> - <function>delete_storm_zookeeper_data</function> - </task> - - <task xsi:type="execute" summary="Removing local Storm data"> - <script>scripts/storm_upgrade.py</script> - <function>delete_storm_local_data</function> - </task> - </pre-downgrade> <pre-upgrade> <task xsi:type="manual"> <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing Storm data from ZooKeeper"> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_zookeeper_data</function> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -905,6 +918,21 @@ <task xsi:type="configure" id="increase_storm_zookeeper_timeouts"/> </pre-upgrade> + + <pre-downgrade> + <task xsi:type="execute"> + <summary>Removing Storm data from ZooKeeper</summary> + <script>scripts/storm_upgrade.py</script> + <function>delete_storm_zookeeper_data</function> + </task> + + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> + <script>scripts/storm_upgrade.py</script> + <function>delete_storm_local_data</function> + </task> + </pre-downgrade> + <upgrade> <task xsi:type="restart-task"/> </upgrade> @@ -912,7 +940,8 @@ <component name="SUPERVISOR"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -923,7 +952,8 @@ <message>Before continuing, please deactivate and kill any currently running topologies.</message> </task> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -936,7 +966,8 @@ <component name="STORM_UI_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task> @@ -949,7 +980,8 @@ <component name="DRPC_SERVER"> <pre-upgrade> - <task xsi:type="execute" summary="Removing local Storm data"> + <task xsi:type="execute"> + <summary>Removing local Storm data</summary> <script>scripts/storm_upgrade.py</script> <function>delete_storm_local_data</function> </task>
