ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject [1/2] ambari git commit: AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing 'kafka.timeline.metrics.instanceId' property. (dsen via avijayan)
Date Fri, 19 May 2017 23:38:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 28dff1787 -> b0ddc77e5


AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing
'kafka.timeline.metrics.instanceId' property. (dsen via avijayan)


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

Branch: refs/heads/branch-2.5
Commit: a8a90fe0fda474b295a27c7ec4069d995ca30072
Parents: 28dff17
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Fri May 19 16:29:22 2017 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Fri May 19 16:29:22 2017 -0700

----------------------------------------------------------------------
 .../server/upgrade/UpgradeCatalog251.java       |  1 +
 .../server/upgrade/UpgradeCatalog251Test.java   | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8a90fe0/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
index 146520f..40fafb2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java
@@ -93,6 +93,7 @@ public class UpgradeCatalog251 extends AbstractUpgradeCatalog {
    */
   @Override
   protected void executeDMLUpdates() throws AmbariException, SQLException {
+    addNewConfigurationsFromXml();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8a90fe0/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java
index 4575998..862ab6e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java
@@ -20,13 +20,16 @@ package org.apache.ambari.server.upgrade;
 
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMockBuilder;
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
 import static org.easymock.EasyMock.newCapture;
 import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.reset;
 import static org.easymock.EasyMock.verify;
 
+import java.lang.reflect.Method;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.Statement;
@@ -163,4 +166,21 @@ public class UpgradeCatalog251Test {
     Assert.assertEquals(Integer.valueOf(0), captured.getDefaultValue());
     Assert.assertEquals(Short.class, captured.getType());
   }
+
+  @Test
+  public void testExecuteDMLUpdates() throws Exception {
+    Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
+    UpgradeCatalog251 upgradeCatalog251 = createMockBuilder(UpgradeCatalog251.class)
+            .addMockedMethod(addNewConfigurationsFromXml)
+            .createMock();
+
+    upgradeCatalog251.addNewConfigurationsFromXml();
+    expectLastCall().once();
+
+    replay(upgradeCatalog251);
+
+    upgradeCatalog251.executeDMLUpdates();
+
+    verify(upgradeCatalog251);
+  }
 }


Mime
View raw message