浏览代码

HADOOP-7633. Adds log4j.properties to the hadoop-conf dir on deploy. Contributed by Eric Yang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1171905 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 13 年之前
父节点
当前提交
2d4689a1bc
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 3 0
      src/packages/hadoop-setup-conf.sh

+ 3 - 0
CHANGES.txt

@@ -181,6 +181,9 @@ Release 0.20.205.0 - unreleased
     HADOOP-7637. Fix to include FairScheduler configuration file in 
     RPM. (Eric Yang via ddas)
 
+    HADOOP-7633. Adds log4j.properties to the hadoop-conf dir on 
+    deploy (Eric Yang via ddas)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

+ 3 - 0
src/packages/hadoop-setup-conf.sh

@@ -434,6 +434,9 @@ if [ "${AUTOSETUP}" == "1" -o "${AUTOSETUP}" == "y" ]; then
   if [ ! -e ${HADOOP_CONF_DIR}/capacity-scheduler.xml ]; then
     template_generator ${HADOOP_PREFIX}/share/hadoop/templates/conf/capacity-scheduler.xml ${HADOOP_CONF_DIR}/capacity-scheduler.xml
   fi
+  if [ ! -e ${HADOOP_CONF_DIR}/log4j.properties ]; then
+    cp ${HADOOP_PREFIX}/share/hadoop/templates/conf/log4j.properties ${HADOOP_CONF_DIR}/log4j.properties
+  fi
 
   #set the owner of the hadoop dir to root
   chown root ${HADOOP_PREFIX}