[ 
https://issues.apache.org/jira/browse/HDFS-7056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Shvachko updated HDFS-7056:
--------------------------------------
    Attachment: HDFS-7056.patch

This patch implements diskspaceConsumed() and computeContentSummary() so that 
it takes into account blocks in the file and in the snapshot.
As Plamen stated with truncate diskspaceConsumed() cannot just compute bytes of 
the current file. The new implementation actually counts all bytes that are 
stored on DataNodes as blocks of a file or of its snapshot. The number of bytes 
is multiplied by the replication factor as in current code.
Note that if truncates are not used the space consumed will be the same as 
today.

> Snapshot support for truncate
> -----------------------------
>
>                 Key: HDFS-7056
>                 URL: https://issues.apache.org/jira/browse/HDFS-7056
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Konstantin Shvachko
>            Assignee: Plamen Jeliazkov
>         Attachments: HDFS-3107-HDFS-7056-combined.patch, HDFS-7056.patch, 
> HDFS-7056.patch, HDFS-7056.patch, HDFSSnapshotWithTruncateDesign.docx
>
>
> Implementation of truncate in HDFS-3107 does not allow truncating files which 
> are in a snapshot. It is desirable to be able to truncate and still keep the 
> old file state of the file in the snapshot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to