From c563401796c58119d1b42dda55d6916bdab56dfe Mon Sep 17 00:00:00 2001 From: cnauroth Date: Thu, 5 Nov 2015 06:47:16 -0800 Subject: [PATCH] HDFS-9378. hadoop-hdfs-client tests do not write logs. Contributed by Chris Nauroth. --- .../src/test/resources/log4j.properties | 49 +++++++++++++++++++ hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 + 2 files changed, 51 insertions(+) create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/test/resources/log4j.properties diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/test/resources/log4j.properties b/hadoop-hdfs-project/hadoop-hdfs-client/src/test/resources/log4j.properties new file mode 100644 index 0000000000..7378846711 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/test/resources/log4j.properties @@ -0,0 +1,49 @@ +# +# 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. +# +# log4j configuration used during build and unit tests + +log4j.rootLogger=info,stdout +log4j.threshold=ALL +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n + +# +# NameNode metrics logging. +# The default is to retain two namenode-metrics.log files up to 64MB each. +# +log4j.logger.NameNodeMetricsLog=INFO,NNMETRICSRFA +log4j.additivity.NameNodeMetricsLog=false +log4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender +log4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log +log4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout +log4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.NNMETRICSRFA.MaxBackupIndex=1 +log4j.appender.NNMETRICSRFA.MaxFileSize=64MB + +# +# DataNode metrics logging. +# The default is to retain two datanode-metrics.log files up to 64MB each. +# +log4j.logger.DataNodeMetricsLog=INFO,DNMETRICSRFA +log4j.additivity.DataNodeMetricsLog=false +log4j.appender.DNMETRICSRFA=org.apache.log4j.RollingFileAppender +log4j.appender.DNMETRICSRFA.File=${hadoop.log.dir}/datanode-metrics.log +log4j.appender.DNMETRICSRFA.layout=org.apache.log4j.PatternLayout +log4j.appender.DNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.DNMETRICSRFA.MaxBackupIndex=1 +log4j.appender.DNMETRICSRFA.MaxFileSize=64MB diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 26079cb789..910753a44f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2239,6 +2239,8 @@ Release 2.8.0 - UNRELEASED HDFS-9360. Storage type usage isn't updated properly after file deletion. (Ming Ma via xyao) + HDFS-9378. hadoop-hdfs-client tests do not write logs. (cnauroth) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES