ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-10786. Rename of ambari_sequences.sequence_value handled inappropriately during Upgrade (dlysnichenko)
Date Thu, 07 May 2015 10:02:03 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 3608de943 -> 0633c7587


AMBARI-10786. Rename of ambari_sequences.sequence_value handled inappropriately during Upgrade
(dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0633c758
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0633c758
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0633c758

Branch: refs/heads/branch-2.0.maint
Commit: 0633c758711a6189d40ed40e08dfb3b965b74ae0
Parents: 3608de9
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Thu May 7 13:00:54 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu May 7 13:01:42 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0633c758/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index 98ac89f..a703d42 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -497,6 +497,9 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
    */
   private void renameSequenceValueColumnName() throws AmbariException, SQLException {
     final DatabaseType databaseType = configuration.getDatabaseType();
+    if (dbAccessor.tableHasColumn("ambari_sequences", "sequence_value")) {
+      return;
+    }
     if (databaseType == DatabaseType.MYSQL) {
       dbAccessor.executeQuery("ALTER TABLE ambari_sequences CHANGE value sequence_value DECIMAL(38)
NOT NULL");
     } else if (databaseType == DatabaseType.DERBY) {


Mime
View raw message