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

Konstantin Shvachko commented on HADOOP-2655:
---------------------------------------------

- I think it is ok to have a short window during "unlinking" a block, when it 
is not visible to the data-node.
I believe it should be a pretty rare event.
- Relying on mod time is not such a good idea. It's not the time itself, but 
the way you will have to find another hard link.
You will need rely on that the other link to the blockFile is in 
".../previous/blockFile".
And if an administrator renamed previous directory in order to preserve the 
snapshot for longer time storage then
your approach will not recognize that the blockFile has another link.
- We should probably use stat instead
{code}
stat -c%h blockFile
{code}
I checked it works both on Linux and CygWin.

> Copy on write for data and metadata files in the presence of snapshots
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-2655
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2655
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>
> If a DFS Client wants to append data to an existing file (appends, 
> HADOOP-1700) and a snapshot is present, the Datanoed has to implement some 
> form of a copy-on-write for writes to data and meta data files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to