From 39c09c43bdbc818cfa956aa4d75b438d2972f379 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Tue, 25 Feb 2014 20:20:21 +0000 Subject: [PATCH] HDFS-6006. Remove duplicate code in FSNameSystem#getFileInfo. Contributed by Akira Ajisaka. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1571813 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, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index c3668568e9..dfbc75bcc0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -436,6 +436,9 @@ Release 2.4.0 - UNRELEASED HDFS-5939. WebHdfs returns misleading error code and logs nothing if trying to create a file with no DNs in cluster. (Yongjun Zhang via jing9) + HDFS-6006. Remove duplicate code in FSNameSystem#getFileInfo. + (Akira Ajisaka via cnauroth) + OPTIMIZATIONS HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery 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 0548bac054..747dbe6675 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 @@ -3434,9 +3434,6 @@ HdfsFileStatus getFileInfo(String src, boolean resolveLink) HdfsFileStatus stat = null; FSPermissionChecker pc = getPermissionChecker(); checkOperation(OperationCategory.READ); - if (!DFSUtil.isValidName(src)) { - throw new InvalidPathException("Invalid file name: " + src); - } byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src); readLock(); try {