ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-6223. After Ambari upgraded to 1.6.1, Hive, Oozie and Nagios failed to start (aonishuk)
Date Fri, 20 Jun 2014 17:12:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 1b73c1f26 -> d2348e77c


AMBARI-6223. After Ambari upgraded to 1.6.1, Hive, Oozie and Nagios failed to start (aonishuk)


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

Branch: refs/heads/branch-1.6.1
Commit: d2348e77c0b12758e33a47f979816bbb15db8003
Parents: 1b73c1f
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Jun 20 20:11:47 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Jun 20 20:11:47 2014 +0300

----------------------------------------------------------------------
 .../server/upgrade/UpgradeCatalog161.java       | 11 ++++++++++
 .../server/upgrade/UpgradeCatalog161Test.java   | 22 ++++++++++++++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d2348e77/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
index 9f38f18..7332c21 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
@@ -22,7 +22,10 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.persistence.EntityManager;
 import javax.persistence.TypedQuery;
@@ -289,6 +292,14 @@ public class UpgradeCatalog161 extends AbstractUpgradeCatalog {
             updatedClusterProvisionedStateCount, State.INSTALLED);
       }
     });
+    
+    addMissingConfigs();
+  }
+  
+  protected void addMissingConfigs() throws AmbariException {
+    updateConfigurationProperties("hbase-site", Collections.singletonMap("hbase.regionserver.info.port",
"60030"), false);
+    updateConfigurationProperties("global", Collections.singletonMap("oozie_admin_port",
"11001"), false);
+    updateConfigurationProperties("hive-site", Collections.singletonMap("hive.heapsize",
"1024"), false);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/d2348e77/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
index f70fcd4..2a33ba8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
@@ -35,9 +35,12 @@ import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.verify;
 
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
@@ -120,8 +123,11 @@ public class UpgradeCatalog161Test {
     EntityTransaction et = createMock(EntityTransaction.class);
     TypedQuery query = createMock(TypedQuery.class);
 
-    UpgradeCatalog161 upgradeCatalog =
-      createMockBuilder(UpgradeCatalog161.class).createMock();
+    Method m = AbstractUpgradeCatalog.class.getDeclaredMethod
+        ("updateConfigurationProperties", String.class, Map.class, boolean.class);
+
+    UpgradeCatalog161 upgradeCatalog = createMockBuilder(UpgradeCatalog161.class)
+      .addMockedMethod(m).createMock();
 
     expect(configuration.getDatabaseUrl()).andReturn(Configuration.JDBC_IN_MEMORY_URL).anyTimes();
     expect(injector.getProvider(EntityManager.class)).andReturn(provider).anyTimes();
@@ -132,6 +138,18 @@ public class UpgradeCatalog161Test {
       ":provisioningState", ClusterEntity.class)).andReturn(query);
     expect(query.setParameter("provisioningState", State.INSTALLED)).andReturn(null);
     expect(query.executeUpdate()).andReturn(0);
+    
+    upgradeCatalog.updateConfigurationProperties("hbase-site",
+        Collections.singletonMap("hbase.regionserver.info.port", "60030"), false);
+    expectLastCall();
+    
+    upgradeCatalog.updateConfigurationProperties("global",
+        Collections.singletonMap("oozie_admin_port", "11001"), false);
+    expectLastCall();
+    
+    upgradeCatalog.updateConfigurationProperties("hive-site",
+        Collections.singletonMap("hive.heapsize", "1024"), false);
+    expectLastCall();
 
     replay(upgradeCatalog, dbAccessor, configuration, injector, provider, em,
       et, query);


Mime
View raw message