[
https://issues.apache.org/jira/browse/HADOOP-14217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16202122#comment-16202122
]
ASF GitHub Bot commented on HADOOP-14217:
-----------------------------------------
Github user yufeldman commented on a diff in the pull request:
https://github.com/apache/hadoop/pull/269#discussion_r144330296
--- Diff:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java
---
@@ -196,8 +196,7 @@ public Path(String pathString) throws
IllegalArgumentException {
// parse uri scheme, if any
int colon = pathString.indexOf(':');
int slash = pathString.indexOf('/');
- if ((colon != -1) &&
- ((slash == -1) || (colon < slash))) { // has a scheme
+ if ((colon != -1) && (colon == (slash-1))) { // has a scheme
--- End diff --
@vrozov You have a point - if I change behavior here to colon > 0 it will
support parts of path that are just ":".
The only thing is different behavior when you merge two paths -
`URI.resolve()` resolves it differently
E.g:
`/abc/:` and `:/:/` versus `/abc/:` and `/:/:/`
In first case result will be `/abc/:/:/:/` and in the second case
`/abc/:/:/`
> Object Storage: support colon in object path
> --------------------------------------------
>
> Key: HADOOP-14217
> URL: https://issues.apache.org/jira/browse/HADOOP-14217
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs, fs/oss
> Affects Versions: 2.8.1
> Reporter: Genmao Yu
> Assignee: Yuliya Feldman
> Attachments: Colon handling in hadoop Path.pdf
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]