hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsuyoshi OZAWA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6193) HftpFileSystem open should throw FileNotFoundException for non-existing paths
Date Fri, 02 May 2014 18:46:20 GMT

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

Tsuyoshi OZAWA commented on HDFS-6193:

Thanks for the pointing, [~jira.shegalov]! Now I could apply your patch against branch-2.4.0.
However, some compilation error occurs with the patch.

In HftpFileSystem, RangeHeaderInputStream cannot call the super constructor as follows:
static class RangeHeaderInputStream extends ByteRangeInputStream {
   RangeHeaderInputStream(RangeHeaderUrlOpener o, RangeHeaderUrlOpener r)
        throws IOException {
      super(o, r, true);

FileDataServlet: the method ExceptionHandler.toHttpStatus is missing:

Can you check them? Thanks!

> HftpFileSystem open should throw FileNotFoundException for non-existing paths
> -----------------------------------------------------------------------------
>                 Key: HDFS-6193
>                 URL: https://issues.apache.org/jira/browse/HDFS-6193
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Gera Shegalov
>            Assignee: Gera Shegalov
>            Priority: Blocker
>         Attachments: HDFS-6193-branch-2.4.0.v01.patch
> WebHdfsFileSystem.open and HftpFileSystem.open incorrectly handles non-existing paths.

> - 'open', does not really open anything, i.e., it does not contact the server, and therefore
cannot discover FileNotFound, it's deferred until next read. It's counterintuitive and not
how local FS or HDFS work. In POSIX you get ENOENT on open. [LzoInputFormat.getSplits|https://github.com/kevinweil/elephant-bird/blob/master/core/src/main/java/com/twitter/elephantbird/mapreduce/input/LzoInputFormat.java]
is an example of the code that's broken because of this.
> - On the server side, FileDataServlet incorrectly sends SC_BAD_REQUEST instead of SC_NOT_FOUND
for non-exitsing paths

This message was sent by Atlassian JIRA

View raw message