hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hongyuan Li (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-12802) local FileContext does not rename .crc file
Date Fri, 07 Jul 2017 07:23:00 GMT

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

Hongyuan Li edited comment on HADOOP-12802 at 7/7/17 7:22 AM:
--------------------------------------------------------------

[~boky01], i don't think so , the implement of {{rename}} of LocalFileContext is different
from {{LocalFileSystem}}#{{rename}}. The junit test failure of reporter is caused by the nonexistance
 of file {{newCrcPath}},

set {{fs.AbstractFileSystem.file.impl}} to {{org.apache.hadoop.fs.LocalFileSystem}} may solve
this problem. [~y0un5] 

*Update*

forgot this, i misktaked the version of hadoop


was (Author: hongyuan li):
[~boky01], i don't think so , the implement of {{rename}} of LocalFileContext is different
from {{LocalFileSystem}}#{{rename}}. The junit test failure of reporter is caused by the nonexistance
 of file {{newCrcPath}},

set {{fs.AbstractFileSystem.file.impl}} to {{org.apache.hadoop.fs.LocalFileSystem}} may solve
this problem. [~y0un5] 

*Update*

forgot this, the latest patch seems solved this.

> local FileContext does not rename .crc file
> -------------------------------------------
>
>                 Key: HADOOP-12802
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12802
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.2, 3.0.0-alpha1
>            Reporter: Youngjoon Kim
>            Assignee: Andras Bokor
>         Attachments: HADOOP-12802.01.patch
>
>
> After run the following code, "old" file is renamed to "new", but ".old.crc" is not renamed
to ".new.crc"
> {code}
> Path oldPath = new Path("/tmp/old");
> Path newPath = new Path("/tmp/new");
> Configuration conf = new Configuration();
> FileContext fc = FileContext.getLocalFSFileContext(conf);
> FSDataOutputStream out = fc.create(oldPath, EnumSet.of(CreateFlag.CREATE));
> out.close();
> fc.rename(oldPath, newPath);
> {code}
> On the other hand, local FileSystem successfully renames .crc file.
> {code}
> Path oldPath = new Path("/tmp/old");
> Path newPath = new Path("/tmp/new");
> Configuration conf = new Configuration();
> FileSystem fs = FileSystem.getLocal(conf);
> FSDataOutputStream out = fs.create(oldPath);
> out.close();
> fs.rename(oldPath, newPath);
> {code}



--
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


Mime
View raw message