You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/12/25 19:09:44 UTC

ambari git commit: AMBARI-19274 : Add common log rotation settings to hbase, zookeeper, ams. (Madhuvanthi Radhakrishnan via avijayan)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c2d9c1b72 -> f4475c43a


AMBARI-19274 : Add common log rotation settings to hbase, zookeeper, ams. (Madhuvanthi Radhakrishnan via avijayan)


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

Branch: refs/heads/branch-2.5
Commit: f4475c43a05e4f6ce8b0b269873bec889817083b
Parents: c2d9c1b
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Sun Dec 25 11:09:30 2016 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Sun Dec 25 11:09:30 2016 -0800

----------------------------------------------------------------------
 .../0.1.0/configuration/ams-hbase-log4j.xml     | 50 ++++++++++++++++++--
 .../0.1.0/configuration/ams-log4j.xml           | 25 +++++++++-
 .../AMBARI_METRICS/0.1.0/package/scripts/ams.py |  2 +-
 .../0.1.0/package/scripts/hbase.py              |  2 +-
 .../0.1.0/package/scripts/params.py             |  8 ++++
 .../0.96.0.2.0/configuration/hbase-log4j.xml    | 50 ++++++++++++++++++--
 .../HBASE/0.96.0.2.0/package/scripts/hbase.py   |  2 +-
 .../0.96.0.2.0/package/scripts/params_linux.py  |  6 +++
 .../YARN/2.1.0.2.0/configuration/yarn-log4j.xml | 25 +++++++++-
 .../3.4.5/configuration/zookeeper-log4j.xml     | 25 +++++++++-
 .../3.4.5/package/scripts/params_linux.py       |  4 ++
 .../services/YARN/configuration/yarn-log4j.xml  |  6 +--
 .../AMBARI_METRICS/test_metrics_collector.py    |  6 +--
 .../stacks/2.0.6/HBASE/test_hbase_client.py     |  4 +-
 .../stacks/2.0.6/HBASE/test_hbase_master.py     |  6 +--
 .../2.0.6/HBASE/test_hbase_regionserver.py      |  8 ++--
 .../2.0.6/HBASE/test_phoenix_queryserver.py     |  6 +--
 17 files changed, 200 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml
index 08c7b94..ab42034 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml
@@ -20,6 +20,48 @@
  */
 -->
 <configuration supports_final="false" supports_adding_forbidden="true">
+   <property>
+    <name>ams_hbase_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>HBase Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ams_hbase_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>HBase Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ams_hbase_security_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>HBase Security Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ams_hbase_security_log_maxbackupindex</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>HBase Security Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
   <property>
     <name>content</name>
     <display-name>ams-hbase-log4j template</display-name>
@@ -71,8 +113,8 @@ log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
 log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
 
 # Rolling File Appender properties
-hbase.log.maxfilesize=256MB
-hbase.log.maxbackupindex=20
+hbase.log.maxfilesize={{ams_hbase_log_maxfilesize}}MB
+hbase.log.maxbackupindex={{ams_hbase_log_maxbackupindex}}
 
 # Rolling File Appender
 log4j.appender.RFA=org.apache.log4j.RollingFileAppender
@@ -88,8 +130,8 @@ log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
 # Security audit appender
 #
 hbase.security.log.file=SecurityAuth.audit
-hbase.security.log.maxfilesize=256MB
-hbase.security.log.maxbackupindex=20
+hbase.security.log.maxfilesize={{ams_hbase_security_log_maxfilesize}}MB
+hbase.security.log.maxbackupindex={{ams_hbase_security_log_maxbackupindex}}
 log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
 log4j.appender.RFAS.File=${hbase.log.dir}/${hbase.security.log.file}
 log4j.appender.RFAS.MaxFileSize=${hbase.security.log.maxfilesize}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
index 81f6dbc..5782e7c 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
@@ -19,6 +19,27 @@
   -->
 <configuration supports_final="false" supports_adding_forbidden="true">
   <property>
+    <name>ams_log_max_backup_size</name>
+    <value>80</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>AMS Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ams_log_number_of_backup_files</name>
+    <value>60</value>
+    <description>The number of backup files</description>
+    <display-name>AMS Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
     <name>content</name>
     <display-name>ams-log4j template</display-name>
     <description>Custom log4j.properties</description>
@@ -51,8 +72,8 @@ log4j.rootLogger=INFO,file
 # Direct log messages to a log file
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.File=${ams.log.dir}/${ams.log.file}
-log4j.appender.file.MaxFileSize=80MB
-log4j.appender.file.MaxBackupIndex=60
+log4j.appender.file.MaxFileSize={{ams_log_max_backup_size}}MB
+log4j.appender.file.MaxBackupIndex={{ams_log_number_of_backup_files}}
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
     </value>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
index 1ad3b85..8ce62cb 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
@@ -239,7 +239,7 @@ def ams(name=None, action=None):
            mode=0644,
            group=params.user_group,
            owner=params.ams_user,
-           content=params.log4j_props
+           content=InlineTemplate(params.log4j_props)
       )
 
     File(format("{ams_collector_conf_dir}/ams-env.sh"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
index 7fb9715..26b3502 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
@@ -251,7 +251,7 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
          mode=0644,
          group=params.user_group,
          owner=params.hbase_user,
-         content=params.hbase_log4j_props
+         content=InlineTemplate(params.hbase_log4j_props)
     )
   elif os.path.exists(format("{params.hbase_conf_dir}/log4j.properties")):
     File(format("{params.hbase_conf_dir}/log4j.properties"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index ad66ffe..6d66a91 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -300,6 +300,14 @@ if security_enabled:
   regionserver_keytab_path = config['configurations']['ams-hbase-security-site']['hbase.regionserver.keytab.file']
   regionserver_jaas_princ = config['configurations']['ams-hbase-security-site']['hbase.regionserver.kerberos.principal'].replace('_HOST',_hostname_lowercase)
 
+#Ambari metrics log4j settings
+ams_hbase_log_maxfilesize = default('configurations/ams-hbase-log4j/ams_hbase_log_maxfilesize',256)
+ams_hbase_log_maxbackupindex = default('configurations/ams-hbase-log4j/ams_hbase_log_maxbackupindex',20)
+ams_hbase_security_log_maxfilesize = default('configurations/ams-hbase-log4j/ams_hbase_security_log_maxfilesize',256)
+ams_hbase_security_log_maxbackupindex = default('configurations/ams-hbase-log4j/ams_hbase_security_log_maxbackupindex',20)
+ams_log_max_backup_size = default('configurations/ams-log4j/ams_log_max_backup_size',80)
+ams_log_number_of_backup_files = default('configurations/ams-log4j/ams_log_number_of_backup_files',60)
+
 #log4j.properties
 if (('ams-hbase-log4j' in config['configurations']) and ('content' in config['configurations']['ams-hbase-log4j'])):
   hbase_log4j_props = config['configurations']['ams-hbase-log4j']['content']

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-log4j.xml b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-log4j.xml
index 8495de1..2177705 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-log4j.xml
@@ -20,6 +20,48 @@
  */
 -->
 <configuration supports_final="false" supports_adding_forbidden="true">
+ <property>
+    <name>hbase_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>HBase Log: backup file size</display-name>
+    <value-attributes>
+        <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+      <name>hbase_log_maxbackupindex</name>
+      <value>20</value>
+      <description>The number of backup files</description>
+      <display-name>HBase Log: # of backup files</display-name>
+      <value-attributes>
+        <type>int</type>
+        <minimum>0</minimum>
+      </value-attributes>
+      <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+    <name>hbase_security_log_maxfilesize</name>
+    <value>256</value>
+    <description>The maximum size of security backup file before the log is rotated</description>
+    <display-name>HBase Security Log: backup file size</display-name>
+    <value-attributes>
+        <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+      <name>hbase_security_log_maxbackupindex</name>
+      <value>20</value>
+      <description>The number of security backup files</description>
+      <display-name>HBase Security Log: # of backup files</display-name>
+      <value-attributes>
+        <type>int</type>
+        <minimum>0</minimum>
+      </value-attributes>
+      <on-ambari-upgrade add="false"/>
+ </property>
   <property>
     <name>content</name>
     <display-name>hbase-log4j template</display-name>
@@ -71,8 +113,8 @@ log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
 log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
 
 # Rolling File Appender properties
-hbase.log.maxfilesize=256MB
-hbase.log.maxbackupindex=20
+hbase.log.maxfilesize={{hbase_log_maxfilesize}}MB
+hbase.log.maxbackupindex={{hbase_log_maxbackupindex}}
 
 # Rolling File Appender
 log4j.appender.RFA=org.apache.log4j.RollingFileAppender
@@ -88,8 +130,8 @@ log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
 # Security audit appender
 #
 hbase.security.log.file=SecurityAuth.audit
-hbase.security.log.maxfilesize=256MB
-hbase.security.log.maxbackupindex=20
+hbase.security.log.maxfilesize={{hbase_security_log_maxfilesize}}MB
+hbase.security.log.maxbackupindex={{hbase_security_log_maxbackupindex}}
 log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
 log4j.appender.RFAS.File=${hbase.log.dir}/${hbase.security.log.file}
 log4j.appender.RFAS.MaxFileSize=${hbase.security.log.maxfilesize}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
index e513677..68856ce 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
@@ -184,7 +184,7 @@ def hbase(name=None):
          mode=0644,
          group=params.user_group,
          owner=params.hbase_user,
-         content=params.log4j_props
+         content=InlineTemplate(params.log4j_props)
     )
   elif (os.path.exists(format("{params.hbase_conf_dir}/log4j.properties"))):
     File(format("{params.hbase_conf_dir}/log4j.properties"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 8200a85..8eed2d5 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -211,6 +211,12 @@ else:
   master_security_config = ""
 
 #log4j.properties
+# HBase log4j settings
+hbase_log_maxfilesize = default('configurations/hbase-log4j/hbase_log_maxfilesize',256)
+hbase_log_maxbackupindex = default('configurations/hbase-log4j/hbase_log_maxbackupindex',20)
+hbase_security_log_maxfilesize = default('configurations/hbase-log4j/hbase_security_log_maxfilesize',256)
+hbase_security_log_maxbackupindex = default('configurations/hbase-log4j/hbase_security_log_maxbackupindex',20)
+
 if (('hbase-log4j' in config['configurations']) and ('content' in config['configurations']['hbase-log4j'])):
   log4j_props = config['configurations']['hbase-log4j']['content']
 else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml
index 89dd52d..715976b 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-log4j.xml
@@ -21,6 +21,27 @@
 -->
 <configuration supports_final="false" supports_adding_forbidden="true">
   <property>
+     <property>
+    <name>yarn_rm_summary_log_max_backup_size</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Yarn Log: backup file size</display-name>
+    <value-attributes>
+        <unit>MB</unit>
+    </value-attributes>
+     <on-ambari-upgrade add="false"/>
+   </property>
+   <property>
+      <name>yarn_rm_summary_log_number_of_backup_files</name>
+      <value>20</value>
+      <description>The number of backup files</description>
+      <display-name>Yarn Log: # of backup files</display-name>
+    <value-attributes>
+        <type>int</type>
+        <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+    </property>
     <name>content</name>
     <display-name>yarn-log4j template</display-name>
     <description>Custom log4j.properties</description>
@@ -54,8 +75,8 @@ yarn.server.resourcemanager.appsummary.logger=${hadoop.root.logger}
 #    - yarn.server.resourcemanager.appsummary.logger (resource manager app summary log level and appender)
 log4j.appender.RMSUMMARY=org.apache.log4j.RollingFileAppender
 log4j.appender.RMSUMMARY.File=${yarn.log.dir}/${yarn.server.resourcemanager.appsummary.log.file}
-log4j.appender.RMSUMMARY.MaxFileSize=256MB
-log4j.appender.RMSUMMARY.MaxBackupIndex=20
+log4j.appender.RMSUMMARY.MaxFileSize={{yarn_rm_summary_log_max_backup_size}}MB
+log4j.appender.RMSUMMARY.MaxBackupIndex={{yarn_rm_summary_log_number_of_backup_files}}
 log4j.appender.RMSUMMARY.layout=org.apache.log4j.PatternLayout
 log4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
 log4j.appender.JSA.layout=org.apache.log4j.PatternLayout

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml
index 04f872c..3725bc0 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml
@@ -21,6 +21,27 @@
 -->
 <configuration supports_final="false" supports_adding_forbidden="true">
   <property>
+    <name>zookeeper_log_max_backup_size</name>
+    <value>256</value>
+    <description>The maximum size of backup file before the log is rotated</description>
+    <display-name>Zookeeper Log: backup file size</display-name>
+    <value-attributes>
+      <unit>MB</unit>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+<property>
+    <name>zookeeper_log_number_of_backup_files</name>
+    <value>20</value>
+    <description>The number of backup files</description>
+    <display-name>Zookeeper Log: # of backup files</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>0</minimum>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
     <name>content</name>
     <display-name>zookeeper-log4j template</display-name>
     <description>Custom log4j.properties</description>
@@ -76,9 +97,9 @@ log4j.appender.ROLLINGFILE.Threshold=DEBUG
 log4j.appender.ROLLINGFILE.File={{zk_log_dir}}/zookeeper.log
 
 # Max log file size of 10MB
-log4j.appender.ROLLINGFILE.MaxFileSize=10MB
+log4j.appender.ROLLINGFILE.MaxFileSize={{zookeeper_log_max_backup_size}}MB
 # uncomment the next line to limit number of backup files
-#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
+#log4j.appender.ROLLINGFILE.MaxBackupIndex={{zookeeper_log_number_of_backup_files}}
 
 log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/params_linux.py
index 84cc431..0780d2e 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/params_linux.py
@@ -98,6 +98,10 @@ smokeuser = config['configurations']['cluster-env']['smokeuser']
 smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
 kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
 
+# Zookeeper log4j settings
+zookeeper_log_max_backup_size = default('configurations/zookeeper-log4j/zookeeper_log_max_backup_size',10)
+zookeeper_log_number_of_backup_files = default('configurations/zookeeper-log4j/zookeeper_log_number_of_backup_files',10)
+
 #log4j.properties
 if ('zookeeper-log4j' in config['configurations']) and ('content' in config['configurations']['zookeeper-log4j']):
   log4j_props = config['configurations']['zookeeper-log4j']['content']

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml
index 84c6db1..34e97d4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-log4j.xml
@@ -24,11 +24,11 @@
     <name>yarn_rm_summary_log_max_backup_size</name>
     <value>256</value>
     <description>The maximum size of backup file before the log is rotated</description>
-    <display-name>Yarn Log: rmsummary backup file size</display-name>
+    <display-name>Yarn Log: backup file size</display-name>
     <value-attributes>
         <unit>MB</unit>
     </value-attributes>
-     <on-ambari-upgrade add="true"/>
+     <on-ambari-upgrade add="false"/>
    </property>
    <property>
       <name>yarn_rm_summary_log_number_of_backup_files</name>
@@ -39,7 +39,7 @@
         <type>int</type>
         <minimum>0</minimum>
     </value-attributes>
-    <on-ambari-upgrade add="true"/>
+    <on-ambari-upgrade add="false"/>
     </property>
   <property>
     <name>content</name>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
index ea43824..6a754e3 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
@@ -162,7 +162,7 @@ class TestMetricsCollector(RMFTestCase):
     self.assertResourceCalled('File', '/etc/ambari-metrics-collector/conf/log4j.properties',
                               owner = 'ams',
                               group = 'hadoop',
-                              content = "\n",
+                              content = InlineTemplate(self.getConfig()['configurations']['ams-hbase-log4j']['content']),
                               mode=0644,
     )
     self.assertResourceCalled('File', '/etc/ambari-metrics-collector/conf/ams-env.sh',
@@ -371,10 +371,10 @@ class TestMetricsCollector(RMFTestCase):
                                   owner = 'ams',
                                   action = ['delete']
         )
-        
+    
     self.assertResourceCalled('File', '/etc/ams-hbase/conf/log4j.properties',
                               owner = 'ams',
                               group = 'hadoop',
                               mode = 0644,
-                              content = "\n"
+                              content = InlineTemplate(self.getConfig()['configurations']['ams-hbase-log4j']['content'])
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index 2ac018a..cffec06 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -115,7 +115,7 @@ class TestHBaseClient(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
     self.assertNoMoreResources()
     
@@ -200,7 +200,7 @@ class TestHBaseClient(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
     self.assertNoMoreResources()
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index e57e235..42bc989 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -378,7 +378,7 @@ class TestHBaseMaster(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
 
     self.assertResourceCalled('HdfsResource', 'hdfs://c6401.ambari.apache.org:8020/apps/hbase/data',
@@ -513,7 +513,7 @@ class TestHBaseMaster(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
     self.assertResourceCalled('HdfsResource', 'hdfs://c6401.ambari.apache.org:8020/apps/hbase/data',
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
@@ -656,7 +656,7 @@ class TestHBaseMaster(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2')
+                              content=InlineTemplate('log4jproperties\nline2'))
 
     self.assertResourceCalled('HdfsResource', 'hdfs://nn1/apps/hbase/data',
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
index b1c0042..9bb0dd7 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
@@ -215,7 +215,7 @@ class TestHbaseRegionServer(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
 
   def assert_configure_secured(self):
@@ -308,7 +308,7 @@ class TestHbaseRegionServer(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2'
+                              content=InlineTemplate('log4jproperties\nline2')
     )
 
   def test_start_default_22(self):
@@ -411,7 +411,7 @@ class TestHbaseRegionServer(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2')
+                              content=InlineTemplate('log4jproperties\nline2'))
     self.assertResourceCalled('Execute', '/usr/hdp/current/hbase-regionserver/bin/hbase-daemon.sh --config /usr/hdp/current/hbase-regionserver/conf start regionserver',
       not_if = 'ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f /var/run/hbase/hbase-hbase-regionserver.pid && ps -p `ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-regionserver.pid` >/dev/null 2>&1',
       user = 'hbase')
@@ -520,7 +520,7 @@ class TestHbaseRegionServer(RMFTestCase):
                               mode=0644,
                               group='hadoop',
                               owner='hbase',
-                              content='log4jproperties\nline2')
+                              content=InlineTemplate('log4jproperties\nline2'))
 
     self.assertResourceCalled('Package', 'phoenix_2_2_*', retry_count=5, retry_on_repo_unavailability=False)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4475c43/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
index db1ec82..60022e1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
@@ -326,7 +326,7 @@ class TestPhoenixQueryServer(RMFTestCase):
       mode = 0644,
       group = 'hadoop',
       owner = 'hbase',
-      content = 'log4jproperties\nline2'
+      content = InlineTemplate('log4jproperties\nline2')
     )
 
   def assert_configure_secured(self):
@@ -434,7 +434,7 @@ class TestPhoenixQueryServer(RMFTestCase):
       mode = 0644,
       group = 'hadoop',
       owner = 'hbase',
-      content = 'log4jproperties\nline2'
+      content = InlineTemplate('log4jproperties\nline2')
     )
 
   def test_upgrade_restart(self):
@@ -465,4 +465,4 @@ class TestPhoenixQueryServer(RMFTestCase):
                               sudo = True)
     self.assertResourceCalled("Directory", "/etc/hadoop/conf", action = ["delete"])
     self.assertResourceCalled("Link", "/etc/hadoop/conf", to="/etc/hadoop/conf.backup")
-    self.assertNoMoreResources()
\ No newline at end of file
+    self.assertNoMoreResources()