浏览代码

HADOOP-7630. Fixes hadoop-metrics2.properties to have a property *.period set to a default value. Contributed by Eric Yang.

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

+ 3 - 0
CHANGES.txt

@@ -187,6 +187,9 @@ Release 0.20.205.0 - unreleased
     HADOOP-7631. Fixes a config problem to do with running streaming jobs
     (Eric Yang via ddas)
 
+    HADOOP-7630. Fixes hadoop-metrics2.properties to have a property
+    *.period set to a default value. (Eric Yang via ddas)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

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

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

+ 20 - 0
src/packages/templates/conf/hadoop-metrics2.properties

@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# syntax: [prefix].[source|sink|jmx].[instance].[options]
+# See package.html for org.apache.hadoop.metrics2 for details
+
+*.period=60
+