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 14:16:29 UTC

[1/2] git commit: AMBARI-8090. Make Oozie memory setting higher with default installation (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 7841caf36 -> dd2a8895f
  refs/heads/trunk 2ca27fadc -> ab7fc1ffe


AMBARI-8090. Make Oozie memory setting higher with default installation (aonishuk)


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

Branch: refs/heads/trunk
Commit: ab7fc1ffecc363dd1e4ed51dfcd1cc9cdc5e86fb
Parents: 2ca27fa
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Sat Nov 1 15:16:18 2014 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Sat Nov 1 15:16:18 2014 +0200

----------------------------------------------------------------------
 .../ambari/server/upgrade/UpgradeCatalog170.java       | 13 +++++++++++--
 .../2.0.6/services/OOZIE/configuration/oozie-env.xml   | 12 +++++++++++-
 .../HDP/2.0.6/services/OOZIE/package/scripts/params.py |  2 ++
 .../ambari/server/upgrade/UpgradeCatalog170Test.java   |  1 +
 4 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab7fc1ff/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 0ea33c0..a14707f 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
@@ -1041,10 +1041,10 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
 
   protected void addMissingConfigs() throws AmbariException {
     addNewConfigurationsFromXml();
-    updateOozieConfigLog4j();
+    updateOozieConfigs();
   }
 
-  protected void updateOozieConfigLog4j() throws AmbariException {
+  protected void updateOozieConfigs() throws AmbariException {
     final String PROPERTY_NAME = "log4j.appender.oozie.layout.ConversionPattern=";
     final String PROPERTY_VALUE_OLD = "%d{ISO8601} %5p %c{1}:%L - %m%n";
     final String PROPERTY_VALUE_NEW = "%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%n";
@@ -1074,6 +1074,15 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
             updateConfigurationPropertiesForCluster(cluster, "oozie-log4j",
                 prop, true, false);
           }
+
+          //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")) {
+            Map<String, String> oozieProps = new HashMap<String, String>();
+            oozieProps.put("oozie_heapsize","2048m");
+            oozieProps.put("oozie_permsize","256m");
+            updateConfigurationPropertiesForCluster(cluster, "oozie-env",
+                    oozieProps, true, false);
+          }
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab7fc1ff/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
index 4f8c93a..65665bf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
@@ -57,6 +57,16 @@
     <value>11001</value>
     <description>The admin port Oozie server runs.</description>
   </property>
+  <property>
+    <name>oozie_heapsize</name>
+    <value>2048</value>
+    <description>Oozie heap size.</description>
+  </property>
+  <property>
+    <name>oozie_permsize</name>
+    <value>256</value>
+    <description>Oozie permanent generation size.</description>
+  </property>
 
   <!-- oozie-env.sh -->
   <property>
@@ -82,7 +92,7 @@ export JRE_HOME=${JAVA_HOME}
 # Settings for the Embedded Tomcat that runs Oozie
 # Java System properties for Oozie should be specified in this variable
 #
-# export CATALINA_OPTS=
+export CATALINA_OPTS="$CATALINA_OPTS -Xmx{{oozie_heapsize}} -XX:MaxPermSize={{oozie_permsize}}"
 
 # Oozie configuration file to load from Oozie configuration directory
 #

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab7fc1ff/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index fbe032d..afcd0cb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -78,6 +78,8 @@ hadoop_jar_location = "/usr/lib/hadoop/"
 # for HDP1 it's "/usr/share/HDP-oozie/ext.zip"
 ext_js_path = "/usr/share/HDP-oozie/ext-2.2.zip"
 security_enabled = config['configurations']['cluster-env']['security_enabled']
+oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize']
+oozie_permsize = config['configurations']['oozie-env']['oozie_permsize']
 
 kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
 oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file']

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab7fc1ff/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
index acda6a6..d456101 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
@@ -518,6 +518,7 @@ public class UpgradeCatalog170Test {
     expect(clusters.getClusters()).andReturn(clustersMap).times(1);
     expect(cluster.getDesiredConfigByType("global")).andReturn(config).anyTimes();
     expect(cluster.getDesiredConfigByType("oozie-log4j")).andReturn(config).anyTimes();
+    expect(cluster.getDesiredConfigByType("oozie-env")).andReturn(config).anyTimes();
     expect(cluster.getClusterId()).andReturn(1L);
     expect(cluster.getNextConfigVersion("hadoop-env")).andReturn(3L);
     expect(config.getProperties()).andReturn(globalConfigs).anyTimes();


[2/2] git commit: AMBARI-8090. Make Oozie memory setting higher with default installation (aonishuk)

Posted by ao...@apache.org.
AMBARI-8090. Make Oozie memory setting higher with default installation (aonishuk)


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

Branch: refs/heads/branch-1.7.0
Commit: dd2a8895f358b6474fa15450635e208d28cf9a61
Parents: 7841caf
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Sat Nov 1 15:16:20 2014 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Sat Nov 1 15:16:20 2014 +0200

----------------------------------------------------------------------
 .../ambari/server/upgrade/UpgradeCatalog170.java       | 13 +++++++++++--
 .../2.0.6/services/OOZIE/configuration/oozie-env.xml   | 12 +++++++++++-
 .../HDP/2.0.6/services/OOZIE/package/scripts/params.py |  2 ++
 .../ambari/server/upgrade/UpgradeCatalog170Test.java   |  1 +
 4 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dd2a8895/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 27d317e..911932b 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
@@ -1040,10 +1040,10 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
 
   protected void addMissingConfigs() throws AmbariException {
     addNewConfigurationsFromXml();
-    updateOozieConfigLog4j();
+    updateOozieConfigs();
   }
 
-  protected void updateOozieConfigLog4j() throws AmbariException {
+  protected void updateOozieConfigs() throws AmbariException {
     final String PROPERTY_NAME = "log4j.appender.oozie.layout.ConversionPattern=";
     final String PROPERTY_VALUE_OLD = "%d{ISO8601} %5p %c{1}:%L - %m%n";
     final String PROPERTY_VALUE_NEW = "%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%n";
@@ -1073,6 +1073,15 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
             updateConfigurationPropertiesForCluster(cluster, "oozie-log4j",
                 prop, true, false);
           }
+
+          //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")) {
+            Map<String, String> oozieProps = new HashMap<String, String>();
+            oozieProps.put("oozie_heapsize","2048m");
+            oozieProps.put("oozie_permsize","256m");
+            updateConfigurationPropertiesForCluster(cluster, "oozie-env",
+                    oozieProps, true, false);
+          }
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd2a8895/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
index 4f8c93a..65665bf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/configuration/oozie-env.xml
@@ -57,6 +57,16 @@
     <value>11001</value>
     <description>The admin port Oozie server runs.</description>
   </property>
+  <property>
+    <name>oozie_heapsize</name>
+    <value>2048</value>
+    <description>Oozie heap size.</description>
+  </property>
+  <property>
+    <name>oozie_permsize</name>
+    <value>256</value>
+    <description>Oozie permanent generation size.</description>
+  </property>
 
   <!-- oozie-env.sh -->
   <property>
@@ -82,7 +92,7 @@ export JRE_HOME=${JAVA_HOME}
 # Settings for the Embedded Tomcat that runs Oozie
 # Java System properties for Oozie should be specified in this variable
 #
-# export CATALINA_OPTS=
+export CATALINA_OPTS="$CATALINA_OPTS -Xmx{{oozie_heapsize}} -XX:MaxPermSize={{oozie_permsize}}"
 
 # Oozie configuration file to load from Oozie configuration directory
 #

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd2a8895/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index fbe032d..afcd0cb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -78,6 +78,8 @@ hadoop_jar_location = "/usr/lib/hadoop/"
 # for HDP1 it's "/usr/share/HDP-oozie/ext.zip"
 ext_js_path = "/usr/share/HDP-oozie/ext-2.2.zip"
 security_enabled = config['configurations']['cluster-env']['security_enabled']
+oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize']
+oozie_permsize = config['configurations']['oozie-env']['oozie_permsize']
 
 kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
 oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file']

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd2a8895/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
index acda6a6..d456101 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
@@ -518,6 +518,7 @@ public class UpgradeCatalog170Test {
     expect(clusters.getClusters()).andReturn(clustersMap).times(1);
     expect(cluster.getDesiredConfigByType("global")).andReturn(config).anyTimes();
     expect(cluster.getDesiredConfigByType("oozie-log4j")).andReturn(config).anyTimes();
+    expect(cluster.getDesiredConfigByType("oozie-env")).andReturn(config).anyTimes();
     expect(cluster.getClusterId()).andReturn(1L);
     expect(cluster.getNextConfigVersion("hadoop-env")).andReturn(3L);
     expect(config.getProperties()).andReturn(globalConfigs).anyTimes();