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:26 UTC

[ambari] branch trunk updated (a8d4829 -> 1b900a0)

This is an automated email from the ASF dual-hosted git repository.

mgergely pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


    from a8d4829  [AMBARI-23830] Enable Ranger Plugins for supported components if ranger is installed.
     new dbf99ff  AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5
     new 1b96587  AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5
     new 1b900a0  AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ambari/server/upgrade/UpgradeCatalog270.java     | 20 +++++++++++++++++---
 .../stacks/HDP/2.5/services/HIVE/kerberos.json       |  2 +-
 2 files changed, 18 insertions(+), 4 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
mgergely@apache.org.

[ambari] 02/03: AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5

Posted by mg...@apache.org.
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.

[ambari] 03/03: AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5

Posted by mg...@apache.org.
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 1b900a0cce34fb8788de39558a924f563bae05ab
Author: Miklos Gergely <mg...@hortonworks.com>
AuthorDate: Tue May 15 15:12:46 2018 +0200

    AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5
---
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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 66dde7d..200b967 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
@@ -1057,15 +1057,16 @@ public class UpgradeCatalog270 extends AbstractUpgradeCatalog {
       }
     }
 
-    final boolean updatedWebHCatHostsInHadoopProxyuserHttpHostsForHive = updateWebHCatHostsInHadoopProxyuserHttpHostsForHive(kerberosDescriptor);
+    final boolean updateWebHCatHostKerberosDescriptor = updateWebHCatHostKerberosDescriptor(kerberosDescriptor);
 
-    if (ambariInfraService != null || updatedWebHCatHostsInHadoopProxyuserHttpHostsForHive) {
+    if (ambariInfraService != null || updateWebHCatHostKerberosDescriptor) {
       artifactEntity.setArtifactData(kerberosDescriptor.toMap());
       artifactDAO.merge(artifactEntity);
     }
   }
 
-  private boolean updateWebHCatHostsInHadoopProxyuserHttpHostsForHive(KerberosDescriptor kerberosDescriptor) {
+  // some command json elements were modified from ..._host to ..._hosts, kerberos related properties must be adjusted accordingly
+  private boolean updateWebHCatHostKerberosDescriptor(KerberosDescriptor kerberosDescriptor) {
     boolean updated = false;
     final KerberosServiceDescriptor hiveService = kerberosDescriptor.getServices().get(HiveServiceValidator.HIVE_SERVICE);
     if (hiveService != null) {

-- 
To stop receiving notification emails like this one, please contact
mgergely@apache.org.

[ambari] 01/03: AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5

Posted by mg...@apache.org.
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 dbf99ff467c49fcbc344010e9b3ba2db6a498320
Author: Miklos Gergely <mg...@hortonworks.com>
AuthorDate: Tue May 8 17:40:48 2018 +0200

    AMBARI-23794 Fix WebHCat property in kerberize.json in HDP 2.5
---
 .../src/main/resources/stacks/HDP/2.5/services/HIVE/kerberos.json       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/kerberos.json
index 33ac06c..b6bc887 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/kerberos.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/kerberos.json
@@ -150,7 +150,7 @@
             {
               "webhcat-site": {
                 "templeton.kerberos.secret": "secret",
-                "templeton.hive.properties": "hive.metastore.local=false,hive.metastore.uris=${clusterHostInfo/hive_metastore_host|each(thrift://%s:9083, \\\\,, \\s*\\,\\s*)},hive.metastore.sasl.enabled=true,hive.metastore.execute.setugi=true,hive.metastore.warehouse.dir=/apps/hive/warehouse,hive.exec.mode.local.auto=false,hive.metastore.kerberos.principal=hive/_HOST@${realm}"
+                "templeton.hive.properties": "hive.metastore.local=false,hive.metastore.uris=${clusterHostInfo/hive_metastore_hosts|each(thrift://%s:9083, \\\\,, \\s*\\,\\s*)},hive.metastore.sasl.enabled=true,hive.metastore.execute.setugi=true,hive.metastore.warehouse.dir=/apps/hive/warehouse,hive.exec.mode.local.auto=false,hive.metastore.kerberos.principal=hive/_HOST@${realm}"
               }
             }
           ]

-- 
To stop receiving notification emails like this one, please contact
mgergely@apache.org.