[
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)