hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9348) DFS GetErasureCodingPolicy API on a non-existent file should be handled properly
Date Mon, 02 Nov 2015 21:20:27 GMT

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

Andrew Wang commented on HDFS-9348:
-----------------------------------

Nice find here, yea I think this is a bug, we should throw an exception. The javadoc in HdfsAdmin
for getEncryptionZoneForPath says:

{noformat}
   * Get the path of the encryption zone for a given file or directory.
   *
   * @param path The path to get the ez for.
   *
   * @return The EncryptionZone of the ez, or null if path is not in an ez.
   * @throws IOException            if there was a general IO exception
   * @throws AccessControlException if the caller does not have access to path
   * @throws FileNotFoundException  if the path does not exist
{noformat}

> DFS GetErasureCodingPolicy API on a non-existent file should be handled properly
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-9348
>                 URL: https://issues.apache.org/jira/browse/HDFS-9348
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>            Priority: Minor
>         Attachments: HDFS-9348-00.patch
>
>
> Presently calling {{dfs#getErasureCodingPolicy()}} on a non-existent file is returning
the ErasureCodingPolicy info. As per the [discussion|https://issues.apache.org/jira/browse/HDFS-8777?focusedCommentId=14981077&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14981077]
it has to validate and throw FileNotFoundException.
> Also, {{dfs#getEncryptionZoneForPath()}} API has the same behavior. Again we can discuss
to add the file existence validation in this case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message