[
https://issues.apache.org/jira/browse/HDFS-7816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337001#comment-14337001
]
Daryn Sharp commented on HDFS-7816:
-----------------------------------
Use the force, I mean Javadoc, Luke! It needs to be fixed, but as Kihwal says,
we must maintain compatibility.
{code}
The URL class does not itself encode or decode any URL components according to
the escaping mechanism defined in RFC2396. It is the responsibility of the
caller to encode any fields, which need to be escaped prior to calling URL, and
also to decode any escaped fields, that are returned from URL. Furthermore,
because URL has no knowledge of URL escaping, it does not recognise equivalence
between the encoded or decoded form of the same URL. For example, the two URLs:
http://foo.com/hello world/ and http://foo.com/hello%20world
would be considered not equal to each other.
Note, the java.net.URI class does perform escaping of its component fields in
certain circumstances. The recommended way to manage the encoding and decoding
of URLs is to use java.net.URI, and to convert between these two classes using
toURI() and URI.toURL().
{code}
> 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)