[
https://issues.apache.org/jira/browse/HDFS-13911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16626840#comment-16626840
]
Ayush Saxena commented on HDFS-13911:
-------------------------------------
Thanx [~vivek.kumar] for reporting the issue.I agree to the fact that what goes
in should also come out.
I think to do so they are two approaches either we sort the put command to take
it without %20 and don't throw URIException in case we use just space or We can
add in the get command to decode %20 and stuffs similarly as it is done in put
command. :)
> HDFS - Inconsistency in get and put syntax if filename/dirname contains space
> -----------------------------------------------------------------------------
>
> Key: HDFS-13911
> URL: https://issues.apache.org/jira/browse/HDFS-13911
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: fs
> Affects Versions: 3.1.1
> Reporter: vivek kumar
> Assignee: Ayush Saxena
> Priority: Minor
>
> Inconsistency in get and put syntax if file/fdir name contains space.
> While copying file/dir from local to HDFS, space needs to be represented with
> %20. However, the same representation does not work for copying file to
> Local. Expectaion is to have same syntax for both get and put.
> test:/ # mkdir /opt/
> test:/ # mkdir /opt/test\ space
> test:/ # vi /opt/test\ space/test\ file.txt
> test:/ # ll /opt/test\ space/
> total 4
> -rw-r--r-- 1 root root 7 Sep 12 18:37 test file.txt
> test:/ #
> *test:/ # hadoop fs -put /opt/test\ space/ /tmp/*
> *put: unexpected URISyntaxException*
> test:/ #
> *test:/ # hadoop fs -put /opt/test%20space/ /tmp/*
> test:/ #
> test:/ # hadoop fs -ls /tmp
> drwxr-xr-x - user1 hadoop 0 2018-09-12 18:38 /tmp/test space
> test:/ #
> *test:/ # hadoop fs -get /tmp/test%20space /srv/*
> *get: `/tmp/test%20space': No such file or directory*
> test:/ #
> *test:/ # hadoop fs -get /tmp/test\ space /srv/*
> test:/ # ll /srv/test\ space/
> total 4
> -rw-r--r-- 1 root root 7 Sep 12 18:39 test file.txt
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]