You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2018/05/21 20:42:19 UTC
[ambari] branch trunk updated: AMBARI-23919 - Stack upgrade from
2.6.5 to 3.0.0 fails because WebHCat component doesn't exist
This is an automated email from the ASF dual-hosted git repository.
jonathanhurley pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 1718ddc AMBARI-23919 - Stack upgrade from 2.6.5 to 3.0.0 fails because WebHCat component doesn't exist
1718ddc is described below
commit 1718ddcaf18d8041d79816664036f5b8f22c391f
Author: Jonathan Hurley <jh...@hortonworks.com>
AuthorDate: Mon May 21 14:39:24 2018 -0400
AMBARI-23919 - Stack upgrade from 2.6.5 to 3.0.0 fails because WebHCat component doesn't exist
---
.../org/apache/ambari/server/state/UpgradeHelper.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
index c0b6d21..f3438ac 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
@@ -827,14 +827,32 @@ public class UpgradeHelper {
* @param component the component name
*/
private void setDisplayNames(UpgradeContext context, String service, String component) {
+ StackId currentStackId = context.getCluster().getCurrentStackVersion();
StackId stackId = context.getRepositoryVersion().getStackId();
try {
ServiceInfo serviceInfo = m_ambariMetaInfoProvider.get().getService(stackId.getStackName(),
stackId.getStackVersion(), service);
+
+ // if the service doesn't exist in the new stack, try the old one
+ if (null == serviceInfo) {
+ serviceInfo = m_ambariMetaInfoProvider.get().getService(currentStackId.getStackName(),
+ currentStackId.getStackVersion(), service);
+ }
+
+ if (null == serviceInfo) {
+ LOG.debug("Unable to lookup service display name information for {}", service);
+ return;
+ }
+
context.setServiceDisplay(service, serviceInfo.getDisplayName());
ComponentInfo compInfo = serviceInfo.getComponentByName(component);
+ if (null == compInfo) {
+ LOG.debug("Unable to lookup component display name information for {}", component);
+ return;
+ }
+
context.setComponentDisplay(service, component, compInfo.getDisplayName());
} catch (AmbariException e) {
--
To stop receiving notification emails like this one, please contact
jonathanhurley@apache.org.