hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7816) Unable to open webhdfs paths with "+"
Date Sat, 07 Mar 2015 00:42:39 GMT

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

Haohui Mai commented on HDFS-7816:
----------------------------------

{code}
+      throws IOException {
+    URI uri;
+    try {
+      uri = new URI(decoder.path());
+    } catch (java.net.URISyntaxException e) {
+      throw new IOException("Invalid path:", e);
+    }
{code}

For GC reasons it might make more sense to (1) take {{QueryStringDecoder.decodeComponent()}}
and make some tweaks based on it, and it is okay to throw {{IllegalArgumentException}} directly
(which will be translated to 400).

> Unable to open webhdfs paths with "+"
> -------------------------------------
>
>                 Key: HDFS-7816
>                 URL: https://issues.apache.org/jira/browse/HDFS-7816
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.7.0
>            Reporter: Jason Lowe
>            Assignee: Kihwal Lee
>            Priority: Blocker
>         Attachments: HDFS-7816.patch, HDFS-7816.patch
>
>
> webhdfs requests to open files with % characters in the filename fail because the filename
is not being decoded properly.  For example:
> $ hadoop fs -cat 'webhdfs://nn/user/somebody/abc%def'
> cat: File does not exist: /user/somebody/abc%25def



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

Mime
View raw message