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

Enis Soztutar commented on HDFS-6264:
-------------------------------------

Correction: For HBase, it is not only a unit test that requires 
createNonRecursive(). It is pretty important for doing fencing properly for the 
dead region servers. See my comments at 
https://issues.apache.org/jira/browse/HBASE-11045?focusedCommentId=13977198&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13977198
 

It is unfortunate that createNonRecursive() was deprecated without a proper 
replacement. HBase relies on atomic createNonRecursive for semantic correctness 
and prevent data loss via doing fencing by relying on atomic rename + 
createNonRecursive(). 


> Provide FileSystem#create() variant which throws exception if parent 
> directory doesn't exist
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-6264
>                 URL: https://issues.apache.org/jira/browse/HDFS-6264
>             Project: Hadoop HDFS
>          Issue Type: Task
>            Reporter: Ted Yu
>
> FileSystem#createNonRecursive() is deprecated.
> However, there is no DistributedFileSystem#create() implementation which 
> throws exception if parent directory doesn't exist.
> This limits clients' migration away from the deprecated method.
> For HBase, TestHLog#testFailedToCreateHLogIfParentRenamed relies on the 
> behavior of FileSystem#createNonRecursive().
> Variant of create() method should be added which throws exception if parent 
> directory doesn't exist.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to