소스 검색

HADOOP-7253. Update the default configuration to fix security audit log
and metrics2 property configuration warnings. (omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203@1097966 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 년 전
부모
커밋
56de0c24d0
4개의 변경된 파일6개의 추가작업 그리고 17개의 파일을 삭제
  1. 3 0
      CHANGES.txt
  2. 0 0
      conf/hadoop-metrics2.properties
  3. 3 2
      conf/log4j.properties
  4. 0 15
      src/test/org/apache/hadoop/metrics2/impl/TestMetricsConfig.java

+ 3 - 0
CHANGES.txt

@@ -2,6 +2,9 @@ Hadoop Change Log
 
 Release 0.20.203.0 - unreleased
 
+    HADOOP-7253. Update the default configuration to fix security audit log
+    and metrics2 property configuration warnings. (omalley)
+
     HADOOP-7247. Update documentation to match current jar names. (omalley)
 
     HADOOP-7246. Update the log4j configuration to match the EventCounter

+ 0 - 0
conf/hadoop-metrics2.properties.example → conf/hadoop-metrics2.properties


+ 3 - 2
conf/log4j.properties

@@ -79,7 +79,8 @@ log4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}
 log4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout
 log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
 #new logger
-log4j.category.SecurityLogger=INFO,DRFAS
+log4j.logger.SecurityLogger=OFF,console
+log4j.logger.SecurityLogger.additivity=false
 
 #
 # Rolling File Appender
@@ -100,7 +101,7 @@ log4j.category.SecurityLogger=INFO,DRFAS
 # FSNamesystem Audit logging
 # All audit events are logged at INFO level
 #
-log4j.logger.org.apache.hadoop.fs.FSNamesystem.audit=WARN
+log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=WARN
 
 # Custom Logging levels
 

+ 0 - 15
src/test/org/apache/hadoop/metrics2/impl/TestMetricsConfig.java

@@ -109,21 +109,6 @@ public class TestMetricsConfig {
                  t2i1.getString("bar"));
   }
 
-  /**
-   * Should throw if missing config files
-   */
-  @Test public void testMissingFiles() {
-    try {
-      MetricsConfig.create("JobTracker");
-    }
-    catch (MetricsConfigException e) {
-      assertTrue("expected the 'cannot locate configuration' exception",
-                 e.getMessage().startsWith("Cannot locate configuration"));
-      return;
-    }
-    fail("should've thrown");
-  }
-
   /**
    * Test the config file load order
    * @throws Exception