From c92b59fd8db89d78b877ac52d40d4354655cc652 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Wed, 20 Mar 2013 00:36:13 +0000 Subject: [PATCH] HDFS-4614. FSNamesystem#getContentSummary should use getPermissionChecker helper method. Contributed by Aaron T. Myers. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1458593 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8ae1682ac35..62f73fcdf7c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -427,6 +427,9 @@ Release 2.0.5-beta - UNRELEASED HDFS-4596. Shutting down namenode during checkpointing can lead to md5sum error. (Andrew Wang via atm) + HDFS-4614. FSNamesystem#getContentSummary should use getPermissionChecker + helper method. (atm) + Release 2.0.4-alpha - UNRELEASED INCOMPATIBLE CHANGES 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 c9a62518b41..aa077fe5a29 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 @@ -3054,8 +3054,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats, ContentSummary getContentSummary(String src) throws AccessControlException, FileNotFoundException, UnresolvedLinkException, StandbyException { - FSPermissionChecker pc = new FSPermissionChecker(fsOwnerShortUserName, - supergroup); + FSPermissionChecker pc = getPermissionChecker(); checkOperation(OperationCategory.READ); readLock(); try {