[
https://issues.apache.org/jira/browse/HADOOP-10965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131614#comment-15131614
]
Andrew Wang commented on HADOOP-10965:
--------------------------------------
Is the problem that the defaultFS was not set, and thus "hadoop fs -ls /" is
listing the local machine instead of HDFS? If so, you can try turning on
HADOOP-12043, though I admit there's irony in saying incorrect configuration
needs to be fixed via configuration.
What we print now is pretty similar to what happens on a local FS, e.g.:
{noformat}
andrew@fortuna [06:34:42] [~]
-> % mkdir a
andrew@fortuna [06:34:44] [~]
-> % ls a/b/c
ls: cannot access a/b/c: No such file or directory
{noformat}
There are two working directories in copyFromLocal, so you need to check in two
places. Maybe we could also provide a fully-qualified path to help
disambiguate? i.e. you'd see something like:
{noformat}
copyFromLocal: `data': No such file or directory:
hdfs://nameservice/user/fs111/data
{noformat}
> Incorrect error message by fs -copyFromLocal
> --------------------------------------------
>
> Key: HADOOP-10965
> URL: https://issues.apache.org/jira/browse/HADOOP-10965
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.4.1
> Reporter: André Kelpe
> Assignee: John Zhuge
> Priority: Minor
> Labels: supportability
> Attachments: HADOOP-10965.001.patch
>
>
> Whenever I try to copy data from local to a cluster, but forget to create the
> parent directory first, I get a very confusing error message:
> {code}
> $ whoami
> fs111
> $ hadoop fs -ls /user
> Found 2 items
> drwxr-xr-x - fs111 supergroup 0 2014-08-11 20:17 /user/hive
> drwxr-xr-x - vagrant supergroup 0 2014-08-11 19:15 /user/vagrant
> $ hadoop fs -copyFromLocal data data
> copyFromLocal: `data': No such file or directory
> {code}
> From the error message, you would say that the local "data" directory is not
> existing, but that is not the case. What is missing is the "/user/fs111"
> directory on HDFS. After I created it, the copyFromLocal command works fine.
> I believe the error message is confusing and should at least be fixed. What
> would be even better, if hadoop could restore the old behaviour in 1.x, where
> copyFromLocal would just create the directories, if they are missing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)