ambari git commit: AMBARI-21942. Upgrade to IOP 4.2.5 from IOP 4.1 failed with combined Solr host names longer than item_text column size in table upgrade_item. Addendum fix. (swagle)
Repository: ambari Updated Branches: refs/heads/trunk a9e558d89 -> cf98c01f4 AMBARI-21942. Upgrade to IOP 4.2.5 from IOP 4.1 failed with combined Solr host names longer than item_text column size in table upgrade_item. Addendum fix. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf98c01f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf98c01f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf98c01f Branch: refs/heads/trunk Commit: cf98c01f49796839a83557bfe76336f10f710501 Parents: a9e558d Author: Siddharth WagleAuthored: Mon Sep 18 10:44:18 2017 -0700 Committer: Siddharth Wagle Committed: Mon Sep 18 10:44:18 2017 -0700 -- .../ambari/server/upgrade/UpgradeCatalog260.java | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cf98c01f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java index 79ff9e2..2669358 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java @@ -31,7 +31,6 @@ import javax.persistence.EntityManager; import javax.persistence.Query; import org.apache.ambari.server.AmbariException; -import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.dao.ArtifactDAO; @@ -46,7 +45,6 @@ import org.apache.ambari.server.state.kerberos.KerberosDescriptorFactory; import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor; import org.apache.commons.lang.StringUtils; -import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -191,15 +189,8 @@ public class UpgradeCatalog260 extends AbstractUpgradeCatalog { * Expand item_text column of upgrade_item */ private void expandUpgradeItemItemTextColumn() throws SQLException { -Configuration.DatabaseType databaseType = configuration.getDatabaseType(); - -if (Configuration.DatabaseType.MYSQL == databaseType) { - dbAccessor.alterColumn(UPGRADE_ITEM_TABLE, new DBAccessor.DBColumnInfo( -UPGRADE_ITEM_ITEM_TEXT, new FieldTypeDefinition("TEXT"), null)); -} else { - dbAccessor.changeColumnType(UPGRADE_ITEM_TABLE, UPGRADE_ITEM_ITEM_TEXT, -String.class, char[].class); -} +dbAccessor.changeColumnType(UPGRADE_ITEM_TABLE, UPGRADE_ITEM_ITEM_TEXT, + String.class, char[].class); } private void renameServiceDeletedColumn() throws AmbariException, SQLException {
ambari git commit: AMBARI-21942. Upgrade to IOP 4.2.5 from IOP 4.1 failed with combined Solr host names longer than item_text column size in table upgrade_item. Addendum fix. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.6 e3bbe0a8b -> 6a6d29d58 AMBARI-21942. Upgrade to IOP 4.2.5 from IOP 4.1 failed with combined Solr host names longer than item_text column size in table upgrade_item. Addendum fix. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a6d29d5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a6d29d5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a6d29d5 Branch: refs/heads/branch-2.6 Commit: 6a6d29d58339c617e4a34907536b38e99732ee2c Parents: e3bbe0a Author: Siddharth WagleAuthored: Mon Sep 18 10:43:12 2017 -0700 Committer: Siddharth Wagle Committed: Mon Sep 18 10:43:12 2017 -0700 -- .../ambari/server/upgrade/UpgradeCatalog260.java | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a6d29d5/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java index a56bda2..478030d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java @@ -29,7 +29,6 @@ import javax.persistence.EntityManager; import javax.persistence.Query; import org.apache.ambari.server.AmbariException; -import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.dao.ArtifactDAO; @@ -44,7 +43,6 @@ import org.apache.ambari.server.state.kerberos.KerberosDescriptorFactory; import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor; import org.apache.commons.lang.StringUtils; -import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -189,15 +187,8 @@ public class UpgradeCatalog260 extends AbstractUpgradeCatalog { * Expand item_text column of upgrade_item */ private void expandUpgradeItemItemTextColumn() throws SQLException { -Configuration.DatabaseType databaseType = configuration.getDatabaseType(); - -if (Configuration.DatabaseType.MYSQL == databaseType) { - dbAccessor.alterColumn(UPGRADE_ITEM_TABLE, new DBAccessor.DBColumnInfo( -UPGRADE_ITEM_ITEM_TEXT, new FieldTypeDefinition("TEXT"), null)); -} else { - dbAccessor.changeColumnType(UPGRADE_ITEM_TABLE, UPGRADE_ITEM_ITEM_TEXT, -String.class, char[].class); -} +dbAccessor.changeColumnType(UPGRADE_ITEM_TABLE, UPGRADE_ITEM_ITEM_TEXT, + String.class, char[].class); } private void renameServiceDeletedColumn() throws AmbariException, SQLException {