hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6006) Remove duplicating code in FSNameSystem#getFileInfo
Date Tue, 25 Feb 2014 00:04:19 GMT

    [ https://issues.apache.org/jira/browse/HDFS-6006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13911019#comment-13911019
] 

Akira AJISAKA commented on HDFS-6006:
-------------------------------------

The patch is to remove duplicate code, so new tests are not needed.

> Remove duplicating code in FSNameSystem#getFileInfo
> ---------------------------------------------------
>
>                 Key: HDFS-6006
>                 URL: https://issues.apache.org/jira/browse/HDFS-6006
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.3.0
>            Reporter: Akira AJISAKA
>            Assignee: Akira AJISAKA
>            Priority: Trivial
>              Labels: newbie
>         Attachments: HDFS-6006.patch
>
>
> In FSNameSystem#getFileInfo, it checks src file name two times.
> {code}
>     if (!DFSUtil.isValidName(src)) {
>       throw new InvalidPathException("Invalid file name: " + src);
>     }
>     HdfsFileStatus stat = null;
>     FSPermissionChecker pc = getPermissionChecker();
>     checkOperation(OperationCategory.READ);
>     if (!DFSUtil.isValidName(src)) {
>       throw new InvalidPathException("Invalid file name: " + src);
>     }
> {code}
> The latter should be removed.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message