You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Andras Bokor (JIRA)" <ji...@apache.org> on 2017/11/03 15:50:00 UTC

[jira] [Commented] (HADOOP-9161) FileSystem.moveFromLocalFile fails to remove source

    [ https://issues.apache.org/jira/browse/HADOOP-9161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237793#comment-16237793 ] 

Andras Bokor commented on HADOOP-9161:
--------------------------------------

I cannot reproduce it from JUnit tests. I tried the following code:
{code}
    Path src = new Path("file:///" + ROOT + File.separator + "whatever");
    FileSystemTestHelper.createFile(fs, src);
    Path dst = new Path("file:///" + ROOT + File.separator + "whatever2");
    fs.moveFromLocalFile(src, dst);
    
    Path src2 = new Path("file:///" + ROOT + File.separator + "dir/whatever");
    Path srcDir = new Path("file:///" + ROOT + File.separator + "dir");
    Path dst2 = new Path("file:///" + ROOT + File.separator + "dir2");
    FileSystemTestHelper.createFile(fs, src2);
    fs.moveFromLocalFile(srcDir, dst2);{code}

This small test passes. Possibly this bug was fixed in the past 5 years.

> FileSystem.moveFromLocalFile fails to remove source
> ---------------------------------------------------
>
>                 Key: HADOOP-9161
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9161
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.23.0, 2.0.0-alpha, 3.0.0-alpha1
>            Reporter: Daryn Sharp
>            Priority: Major
>
> FileSystem.moveFromLocalFile fails with cannot remove file:/path after copying the files.  It appears to be trying to remove a file uri as a relative path.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org