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 Wagle <[email protected]> Authored: Mon Sep 18 10:44:18 2017 -0700 Committer: Siddharth Wagle <[email protected]> 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 {
