Repository: ambari
Updated Branches:
  refs/heads/trunk f0cb0d411 -> db7c6f50c


AMBARI-5834. After upgraded to 1.6.0, Nagios server cannot start. (swagle)


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

Branch: refs/heads/trunk
Commit: 7e9a6df31c0068c453eafa4386e875b6bd15f819
Parents: 513afd8
Author: Siddharth Wagle <swa...@hortonworks.com>
Authored: Wed May 21 18:17:13 2014 -0700
Committer: Siddharth Wagle <swa...@hortonworks.com>
Committed: Thu May 22 10:05:10 2014 -0700

----------------------------------------------------------------------
 .../org/apache/ambari/server/upgrade/UpgradeCatalog160.java | 8 ++++++++
 .../apache/ambari/server/upgrade/UpgradeCatalog160Test.java | 9 +++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e9a6df3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
index 523a886..51b6e0b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
@@ -27,7 +27,9 @@ import org.apache.ambari.server.orm.DBAccessor;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Upgrade catalog for version 1.6.0.
@@ -107,6 +109,12 @@ public class UpgradeCatalog160 extends 
AbstractUpgradeCatalog {
 
     // Add missing property for YARN
     updateConfigurationProperties("global", 
Collections.singletonMap("jobhistory_heapsize", "900"), false);
+
+    // Add missing properties for HDFS
+    Map<String, String> hdfsProperties = new HashMap<String, String>();
+    hdfsProperties.put("dfs.namenode.checkpoint.period", "21600");
+    hdfsProperties.put("dfs.namenode.checkpoint.txns", "1000000");
+    updateConfigurationProperties("hdfs-site", hdfsProperties, false);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e9a6df3/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
index 5eca757..00dbbf8 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
@@ -32,6 +32,7 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.sql.SQLException;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -100,6 +101,14 @@ public class UpgradeCatalog160Test {
       Collections.singletonMap("jobhistory_heapsize", "900"), false);
     expectLastCall();
 
+    upgradeCatalog.updateConfigurationProperties(
+      "hdfs-site", new HashMap<String, String>() {{
+        put("dfs.namenode.checkpoint.txns", "1000000");
+        put("dfs.namenode.checkpoint.period", "21600");
+      }}, false
+    );
+    expectLastCall();
+
     replay(upgradeCatalog, dbAccessor, configuration);
 
     Class<?> c = AbstractUpgradeCatalog.class;

Reply via email to