incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject git commit: AMBARI-3158. Ambari Hadoop: Job Summary Log should be configured to log as separate file. (Dmytro Shkvyra via odiachenko)
Date Tue, 10 Sep 2013 23:43:07 GMT
Updated Branches:
  refs/heads/trunk 7a058ce61 -> 57c53df7c


AMBARI-3158. Ambari Hadoop: Job Summary Log should be configured to log as separate file.
(Dmytro Shkvyra via odiachenko)


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

Branch: refs/heads/trunk
Commit: 57c53df7c105ec966407d1deca8a5f308de23030
Parents: 7a058ce
Author: Oleksandr Diachenko <odiachenko@hortonworks.com>
Authored: Wed Sep 11 02:41:51 2013 +0300
Committer: Oleksandr Diachenko <odiachenko@hortonworks.com>
Committed: Wed Sep 11 02:42:39 2013 +0300

----------------------------------------------------------------------
 .../modules/hdp-hadoop/templates/log4j.properties.erb   | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/57c53df7/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/log4j.properties.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/log4j.properties.erb
b/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/log4j.properties.erb
index bc8d8b7..b3f6d13 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/log4j.properties.erb
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/log4j.properties.erb
@@ -169,16 +169,20 @@ log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter
 # hadoop.mapreduce.jobsummary.log.file rolled daily:
 # hadoop.mapreduce.jobsummary.logger=INFO,JSA
 # 
-hadoop.mapreduce.jobsummary.logger=${hadoop.root.logger}
+hadoop.mapreduce.jobsummary.logger=<%=scope.function_hdp_default(["mapred-site/mapreduce.reduce.log.level","INFO"])%>,JSA
 hadoop.mapreduce.jobsummary.log.file=hadoop-mapreduce.jobsummary.log
 log4j.appender.JSA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.JSA.File=${hadoop.log.dir}/${hadoop.mapreduce.jobsummary.log.file}
-log4j.appender.JSA.layout=org.apache.log4j.PatternLayout
+log4j.appender.JSA.File=<% if (scope.function_hdp_get_major_stack_version([scope.function_hdp_template_var("stack_version")])
>= 2)%><%=scope.function_hdp_template_var("yarn_log_dir_prefix")%>/<%=scope.function_hdp_template_var("yarn_user")%>/${hadoop.mapreduce.jobsummary.log.file}<%
else %><%=scope.function_hdp_template_var("hdfs_log_dir_prefix")%>/<%=scope.function_hdp_template_var("mapred_user")%>/${hadoop.mapreduce.jobsummary.log.file}<%end-%>log4j.appender.JSA.layout=org.apache.log4j.PatternLayout
 log4j.appender.JSA.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
 log4j.appender.JSA.DatePattern=.yyyy-MM-dd
+log4j.appender.JSA.layout=org.apache.log4j.PatternLayout
+<% if (scope.function_hdp_get_major_stack_version([scope.function_hdp_template_var("stack_version")])
>= 2)%>
+log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=${hadoop.mapreduce.jobsummary.logger}
+log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=false
+<% else %>
 log4j.logger.org.apache.hadoop.mapred.JobInProgress$JobSummary=${hadoop.mapreduce.jobsummary.logger}
 log4j.additivity.org.apache.hadoop.mapred.JobInProgress$JobSummary=false
-
+<%end-%>
 
 <%=scope.function_hdp_template_var("rca_prefix")%>ambari.jobhistory.database=<%=scope.function_hdp_host("ambari_db_rca_url")%>
 <%=scope.function_hdp_template_var("rca_prefix")%>ambari.jobhistory.driver=<%=scope.function_hdp_host("ambari_db_rca_driver")%>


Mime
View raw message