hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3154) Add a notion of immutable/mutable files
Date Tue, 27 Mar 2012 17:56:28 GMT

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

Colin Patrick McCabe commented on HDFS-3154:
--------------------------------------------

> The main benefit is caching.

Caching has nothing to do with whether files are immutable.  For example, Ceph has extensive
client-side caching, but not immutable files.

HDFS could actually implement client-side caching very easily.  The reason is because we don't
make the consistency guaranatees that filesystems with stronger semantics do.  It is those
semantic guarantees that make caching difficult and complex to implement, as well as often
inefficient.

> Another benefit is to protect the files. It avoid accidentally append/truncate on immutable
files.

You can already do this.  Create two users both in the "users" group.  Have the files owned
by user #1 and put them in the "users" group.  Then use mode 0640.  Then user #2 can read
the files, but not write them.

Let's not reinvent the wheel.  Reinvented wheels tend to come out square, in my experience.
                
> Add a notion of immutable/mutable files
> ---------------------------------------
>
>                 Key: HDFS-3154
>                 URL: https://issues.apache.org/jira/browse/HDFS-3154
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: name-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>
> The notion of immutable file is useful since it lets the system and tools optimize certain
things as discussed in [this email thread|http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-dev/201203.mbox/%3CCAPn_vTuZomPmBTypP8_1xTr49Sj0fy7Mjhik4DbcAA+BLH53=g@mail.gmail.com%3E].
 Also, many applications require only immutable files.  Here is a proposal:
> - Immutable files means that the file content is immutable.  Operations such as append
and truncate that change the file content are not allowed to act on immutable files.  However,
the meta data such as replication and permission of an immutable file can be updated.  Immutable
files can also be deleted or renamed.
> - Users have to pass immutable/mutable as a flag in file creation.  This is an unmodifiable
property of the created file.
> - If users want to change the data in an immutable file, the file could be copied to
another file which is created as mutable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message