[
https://issues.apache.org/jira/browse/HADOOP-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136194#comment-13136194
]
Daryn Sharp commented on HADOOP-7771:
-------------------------------------
{code}
* @throws IOException if this object does not exist or is not a directory
*/
public PathData getPathDataForChild(PathData child) throws IOException {
- if (!stat.isDirectory()) {
+ if (exists && !stat.isDirectory()) {
{code}
If the javadoc is true, I think should be:
{{if (!exists || !stat.isDirectory())}}
The use of {{isDstDir}} appears wrong and is duplication of most of the prior
logic. Why is this flag used to force {{processPath()}} to treat all recursive
destinations as directories if the top level dest is a directory? Especially
if there's 1 source dir arg? This method is invoked recursive so I'm not sure
why it assumes everything is a directory if the top level dst is a directory?
Are you sure the {{PathData}} change isn't all that's needed?
> NPE when running hdfs dfs -copyToLocal, -get etc
> ------------------------------------------------
>
> Key: HADOOP-7771
> URL: https://issues.apache.org/jira/browse/HADOOP-7771
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 0.23.0, 0.24.0
> Reporter: John George
> Assignee: John George
> Priority: Blocker
> Attachments: HADOOP-7771.patch
>
>
> NPE when running hdfs dfs -copyToLocal if the destination directory does not
> exist. The behavior in branch-0.20-security is to create the directory and
> copy/get the contents from source.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira