From fa0ecb75678c2fa6c10c94472692a38f6506b642 Mon Sep 17 00:00:00 2001 From: Daryn Sharp Date: Mon, 23 Sep 2013 15:34:05 +0000 Subject: [PATCH] merge -c 1525626 FIXES: HDFS-5240. Separate formatting from logging in the audit logger API (daryn) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1525627 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 2b49aad6073..8332b5476a8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -48,6 +48,8 @@ Release 2.3.0 - UNRELEASED and the excludedNodes parameter types respectively to Node and Set. (Junping Du via szetszwo) + HDFS-5240. Separate formatting from logging in the audit logger API (daryn) + OPTIMIZATIONS HDFS-5239. Allow FSNamesystem lock fairness to be configurable (daryn) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index 8ca245cee41..a5b9ee8fe70 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -6873,10 +6873,13 @@ public class FSNamesystem implements Namesystem, FSClusterStats, } sb.append(trackingId); } - auditLog.info(sb); + logAuditMessage(sb.toString()); } } + public void logAuditMessage(String message) { + auditLog.info(message); + } } }