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

dmitriusan pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 302fa8a  AMBARI-25312. Ambari 2.7.4 is missing upgrade catalogs 
(dlysnichenko) (#3018)
302fa8a is described below

commit 302fa8a62e9d5e289f2bcbc9ef71cc27ae852a9e
Author: Lisnichenko Dmitro <dmitriu...@apache.org>
AuthorDate: Thu Jun 20 12:18:46 2019 +0300

    AMBARI-25312. Ambari 2.7.4 is missing upgrade catalogs (dlysnichenko) 
(#3018)
    
    * AMBARI-25312. Ambari 2.7.4 is missing upgrade catalogs (dlysnichenko)
    
    * AMBARI-25312. Ambari 2.7.4 is missing upgrade catalogs (dlysnichenko)
---
 .../ambari/server/upgrade/SchemaUpgradeHelper.java |  1 +
 .../ambari/server/upgrade/UpgradeCatalog273.java   | 66 ++++++++++++++++++++++
 .../ambari/server/upgrade/UpgradeCatalog274.java   |  6 +-
 3 files changed, 70 insertions(+), 3 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
index 8896302..4fa8030 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
@@ -191,6 +191,7 @@ public class SchemaUpgradeHelper {
       catalogBinder.addBinding().to(UpgradeCatalog270.class);
       catalogBinder.addBinding().to(UpgradeCatalog271.class);
       catalogBinder.addBinding().to(UpgradeCatalog272.class);
+      catalogBinder.addBinding().to(UpgradeCatalog273.class);
       catalogBinder.addBinding().to(UpgradeCatalog274.class);
       catalogBinder.addBinding().to(UpdateAlertScriptPaths.class);
       catalogBinder.addBinding().to(FinalUpgradeCatalog.class);
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog273.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog273.java
new file mode 100644
index 0000000..2fba336
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog273.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.upgrade;
+
+import java.sql.SQLException;
+
+import org.apache.ambari.server.AmbariException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+
+/**
+ * The {@link UpgradeCatalog273} upgrades Ambari from 2.7.2 to 2.7.3.
+ */
+public class UpgradeCatalog273 extends AbstractUpgradeCatalog {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(UpgradeCatalog273.class);
+
+  @Inject
+  public UpgradeCatalog273(Injector injector) {
+    super(injector);
+  }
+
+  @Override
+  public String getSourceVersion() {
+    return "2.7.2";
+  }
+
+  @Override
+  public String getTargetVersion() {
+    return "2.7.3";
+  }
+
+  @Override
+  protected void executeDDLUpdates() throws AmbariException, SQLException {
+    // nothing to do
+  }
+
+  @Override
+  protected void executePreDMLUpdates() throws AmbariException, SQLException {
+    // nothing to do
+  }
+
+  @Override
+  protected void executeDMLUpdates() throws AmbariException, SQLException {
+    addNewConfigurationsFromXml();
+  }
+
+}
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog274.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog274.java
index b85b88a..458beeb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog274.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog274.java
@@ -31,7 +31,7 @@ import com.google.inject.Inject;
 import com.google.inject.Injector;
 
 /**
- * The {@link UpgradeCatalog274} upgrades Ambari from 2.7.2 to 2.7.4.
+ * The {@link UpgradeCatalog274} upgrades Ambari from 2.7.3 to 2.7.4.
  */
 public class UpgradeCatalog274 extends AbstractUpgradeCatalog {
 
@@ -48,7 +48,7 @@ public class UpgradeCatalog274 extends AbstractUpgradeCatalog 
{
 
   @Override
   public String getSourceVersion() {
-    return "2.7.2";
+    return "2.7.3";
   }
 
   /**
@@ -86,7 +86,7 @@ public class UpgradeCatalog274 extends AbstractUpgradeCatalog 
{
    */
   @Override
   protected void executeDMLUpdates() throws AmbariException, SQLException {
-    // no actions needed
+    addNewConfigurationsFromXml();
   }
 
 

Reply via email to