You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/11/01 21:07:54 UTC

[2/2] git commit: AMBARI-8098. Upgrade to 1.7.0 fails if Oozie was not installed with NPE (aonishuk)

AMBARI-8098. Upgrade to 1.7.0 fails if Oozie was not installed with NPE (aonishuk)


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

Branch: refs/heads/branch-1.7.0
Commit: 504fe667ca14b53a22548de10e70b7352263e04d
Parents: 3a2cd15
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Sat Nov 1 22:07:45 2014 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Sat Nov 1 22:07:45 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/504fe667/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 911932b..e3422dd 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
@@ -1075,7 +1075,8 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
           }
 
           //oozie_heapsize is added for HDP2, we should check if it exists and not add it for HDP1
-          if(cluster.getDesiredConfigByType("oozie-env").getProperties().containsKey("oozie_heapsize")) {
+          if(cluster.getDesiredConfigByType("oozie-env") != null &&
+              cluster.getDesiredConfigByType("oozie-env").getProperties().containsKey("oozie_heapsize")) {
             Map<String, String> oozieProps = new HashMap<String, String>();
             oozieProps.put("oozie_heapsize","2048m");
             oozieProps.put("oozie_permsize","256m");