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

Enis Soztutar commented on HBASE-11045:
---------------------------------------

bq. FileSystem#createNonRecursive() isn't implemented by many filesystems, 
using it would run the risk of hitting implementations that don't.
HBase does not have to work on every file system. We should be ok to list a 
support for atomic createNonRecursive() as a requirement from the underlying FS 
for HBase. 
bq. Is there any barrier to using a check for the parent dir existing before 
calling create?
I am afraid no. HBase needs this to be atomic in the namespace, since we use it 
for fencing. Similar to atomic renames, it is a requirement from FS, and I 
don't think this is unrealistic. FS owns the namespace, and it should be able 
to provide this semantics. 
We rely on an atomic directory rename + createNonRecursive() to ensure that the 
region server who is dead cannot create more WAL files and commit new data or 
fencing. Otherwise, there will be data loss. In an non-atomic implementation, 
there will be a race condition, where we rename the directory, but the fenced 
out server will still be able to create a new file there and continue 
committing data which will then be lost. 


> Replace deprecated method FileSystem#createNonRecursive
> -------------------------------------------------------
>
>                 Key: HBASE-11045
>                 URL: https://issues.apache.org/jira/browse/HBASE-11045
>             Project: HBase
>          Issue Type: Task
>            Reporter: Gustavo Anatoly
>            Assignee: Gustavo Anatoly
>            Priority: Minor
>             Fix For: 0.99.0
>
>
> This change affect directly ProtobufLogWriter#init() associated to 
> TestHLog#testFailedToCreateHLogIfParentRenamed.



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

Reply via email to