You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Istvan Fajth (Jira)" <ji...@apache.org> on 2019/09/11 21:21:00 UTC

[jira] [Commented] (HDDS-2112) Ozone rename is behaving different compared with HDFS

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

Istvan Fajth commented on HDDS-2112:
------------------------------------

Great [~stevel@apache.org], I was as well unsure, and I did not checked the contract tests to see, but I completely agree that it is tedious, also it would spare me a couple of hours if rename threw an exception in these situations.

Thank you for the clarification, and closure of the ticket!

> Ozone rename is behaving different compared with HDFS
> -----------------------------------------------------
>
>                 Key: HDDS-2112
>                 URL: https://issues.apache.org/jira/browse/HDDS-2112
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Filesystem
>            Reporter: Istvan Fajth
>            Priority: Major
>         Attachments: demonstrative_test.patch
>
>
> I am attaching a patch file, that introduces two new tests for the OzoneFileSystem implementation which demonstrates the expected behaviour.
> Case 1:
> Given a directory a file "/source/subdir/file", and a directory /target
> When fs.rename("/source/subdir/file", "/target/subdir/file") is called
> Then DistributedFileSystem (HDFS), is returning false from the method, while OzoneFileSystem throws a FileNotFoundException as "/target/subdir" is not existing.
> The expected behaviour would be to return false in this case instead of throwing an exception with that behave the same as DistributedFileSystem does.
>  
> Case 2:
> Given a directory "/source" and a file "/targetFile"
> When fs.rename("/source", "/targetFile") is called
> Then DistributedFileSystem (HDFS), is returning false from the method, while OzoneFileSystem throws a FileAlreadyExistsException as "/targetFile" does exist.
> The expected behaviour would be to return false in this case instead of throwing an exception with that behave the same as DistributedFileSystem does.
>  
> It may be considered as well a bug in HDFS, however it is not clear from the FileSystem interface's documentation on the two rename methods that it defines in which cases an exception should be thrown and in which cases a return false is the expected behaviour.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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