You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2018/08/21 15:51:26 UTC

[ambari] branch trunk updated: AMBARI-24506 - ADDENDUM - Upgrade: Infra Solr service is not renamed in Upgrade History table (#2139)

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

oleewere 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 539d8ee  AMBARI-24506 - ADDENDUM - Upgrade: Infra Solr service is not renamed in Upgrade History table (#2139)
539d8ee is described below

commit 539d8ee66eafa2e8a0fa920319afb3bc2be23954
Author: kasakrisz <33...@users.noreply.github.com>
AuthorDate: Tue Aug 21 17:51:22 2018 +0200

    AMBARI-24506 - ADDENDUM - Upgrade: Infra Solr service is not renamed in Upgrade History table (#2139)
---
 .../org/apache/ambari/server/upgrade/UpgradeCatalog271.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
index 8a30951..eb609b1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
@@ -36,7 +36,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.dao.DaoUtils;
-import org.apache.ambari.server.orm.entities.ServiceConfigEntity;
+import org.apache.ambari.server.orm.entities.ConfigGroupEntity;
 import org.apache.ambari.server.orm.entities.UpgradeHistoryEntity;
 import org.apache.ambari.server.state.BlueprintProvisioningState;
 import org.apache.ambari.server.state.Cluster;
@@ -288,16 +288,16 @@ public class UpgradeCatalog271 extends AbstractUpgradeCatalog {
     EntityManager entityManager = getEntityManagerProvider().get();
 
     executeInTransaction(() -> {
-      TypedQuery<ServiceConfigEntity> serviceConfigUpdate = entityManager.createQuery(
-              "UPDATE ConfigGroupEntity SET serviceName = :newServiceName WHERE serviceName = :oldServiceName", ServiceConfigEntity.class);
+      TypedQuery<ConfigGroupEntity> serviceConfigUpdate = entityManager.createQuery(
+              "UPDATE ConfigGroupEntity SET serviceName = :newServiceName WHERE serviceName = :oldServiceName", ConfigGroupEntity.class);
       serviceConfigUpdate.setParameter("newServiceName", AMBARI_INFRA_NEW_NAME);
       serviceConfigUpdate.setParameter("oldServiceName", AMBARI_INFRA_OLD_NAME);
       serviceConfigUpdate.executeUpdate();
     });
 
     executeInTransaction(() -> {
-      TypedQuery<ServiceConfigEntity> serviceConfigUpdate = entityManager.createQuery(
-              "UPDATE ConfigGroupEntity SET tag = :newServiceName WHERE tag = :oldServiceName", ServiceConfigEntity.class);
+      TypedQuery<ConfigGroupEntity> serviceConfigUpdate = entityManager.createQuery(
+              "UPDATE ConfigGroupEntity SET tag = :newServiceName WHERE tag = :oldServiceName", ConfigGroupEntity.class);
       serviceConfigUpdate.setParameter("newServiceName", AMBARI_INFRA_NEW_NAME);
       serviceConfigUpdate.setParameter("oldServiceName", AMBARI_INFRA_OLD_NAME);
       serviceConfigUpdate.executeUpdate();
@@ -305,7 +305,7 @@ public class UpgradeCatalog271 extends AbstractUpgradeCatalog {
 
     executeInTransaction(() -> {
       TypedQuery<UpgradeHistoryEntity> upgradeHistoryUpdate = entityManager.createQuery(
-        "UPDATE UpgradeHistoryEntity SET service_name = :newServiceName WHERE service_name = :oldServiceName", UpgradeHistoryEntity.class);
+        "UPDATE UpgradeHistoryEntity SET serviceName = :newServiceName WHERE serviceName = :oldServiceName", UpgradeHistoryEntity.class);
       upgradeHistoryUpdate.setParameter("newServiceName", AMBARI_INFRA_NEW_NAME);
       upgradeHistoryUpdate.setParameter("oldServiceName", AMBARI_INFRA_OLD_NAME);
       upgradeHistoryUpdate.executeUpdate();