You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mg...@apache.org on 2018/05/15 15:32:28 UTC
[ambari] 02/03: AMBARI-23794 Fix WebHCat property in kerberize.json
in HDP 2.5
This is an automated email from the ASF dual-hosted git repository.
mgergely pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 1b96587e570e4bb8d4fee531271a6f2fd39d33de
Author: Miklos Gergely <mg...@hortonworks.com>
AuthorDate: Tue May 15 12:32:19 2018 +0200
AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5
---
.../org/apache/ambari/server/upgrade/UpgradeCatalog270.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java
index 171ed2e..66dde7d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java
@@ -239,7 +239,9 @@ public class UpgradeCatalog270 extends AbstractUpgradeCatalog {
protected static final String COMPONENT_STATE_SERVICE_COMPONENT_DESIRED_STATE_FK = "hstcomponentstatecomponentname";
protected static final String HIVE_SERVICE_COMPONENT_WEBHCAT_SERVER = "WEBHCAT_SERVER";
protected static final String CONFIGURATION_CORE_SITE = "core-site";
+ protected static final String CONFIGURATION_WEBHCAT_SITE = "webhcat-site";
protected static final String PROPERTY_HADOOP_PROXYUSER_HTTP_HOSTS = "hadoop.proxyuser.HTTP.hosts";
+ protected static final String PROPERTY_TEMPLETON_HIVE_PROPERTIES = "templeton.hive.properties";
public static final String AMBARI_INFRA_OLD_NAME = "AMBARI_INFRA";
public static final String AMBARI_INFRA_NEW_NAME = "AMBARI_INFRA_SOLR";
@@ -1080,6 +1082,17 @@ public class UpgradeCatalog270 extends AbstractUpgradeCatalog {
updated = true;
}
}
+ final KerberosConfigurationDescriptor webhcatSiteConfiguration = webhcatServer.getConfiguration(CONFIGURATION_WEBHCAT_SITE);
+ if (webhcatSiteConfiguration != null) {
+ final String currentTempletonHiveProperties = webhcatSiteConfiguration.getProperty(PROPERTY_TEMPLETON_HIVE_PROPERTIES);
+ if (StringUtils.isNotBlank(currentTempletonHiveProperties)) {
+ LOG.info("Updating " + PROPERTY_TEMPLETON_HIVE_PROPERTIES + "...");
+ String newValue = currentTempletonHiveProperties.replace("hive_metastore_host|", "hive_metastore_hosts|");
+ newValue = newValue.replace("\\\\,", "\\,"); // Replacing the concatDelimiter in 'append' variable replacement function
+ webhcatSiteConfiguration.putProperty(PROPERTY_TEMPLETON_HIVE_PROPERTIES, newValue);
+ updated = true;
+ }
+ }
}
}
return updated;
--
To stop receiving notification emails like this one, please contact
mgergely@apache.org.