Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-726

HDFS locking mechanisms should be simplified or removed

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.11.0
    • None
    • None

    Description

      HDFS includes a locking mechanism that allows clients to lock files and directories in the filesystem. This requires that the Namenode, in addition to all other management of filesystem state also has to act like a lock manager on behalf of clients. Rather than burden the Namenode with this Hadoop should include a distinct general purpose distributed lock manager.

      In the interim, the locking functionality on the filesystem should be simplified to permit only file locks or removed altogether. At this point, removing or simplifying the functionality is not likely to break client code, removing it later will be much harder. In any case, locks in HDFS don't work very well, see HADOOP-656. Also, directory locks are overkill most UNIX fses don't support it.

      Attachments

        1. HADOOP-726-2.patch
          6 kB
          Raghu Angadi
        2. HADOOP-726-1.patch
          5 kB
          Raghu Angadi
        3. remove-fs-locks.patch
          8 kB
          Raghu Angadi

        Issue Links

          Activity

            rangadi Raghu Angadi added a comment -

            Attached remove-fs-locks.patch. It is not meant for inclusion. Initially we just want to deprecate the locking interface and remove the functionality later. Before deprecating I removed the locks to verify hadoop passes build tests.

            I will submit another patch that deprecates the inteface.

            rangadi Raghu Angadi added a comment - Attached remove-fs-locks.patch. It is not meant for inclusion. Initially we just want to deprecate the locking interface and remove the functionality later. Before deprecating I removed the locks to verify hadoop passes build tests. I will submit another patch that deprecates the inteface.
            rangadi Raghu Angadi added a comment -

            HADOOP-726.patch marks locking functions @Deprecated.

            rangadi Raghu Angadi added a comment - HADOOP-726 .patch marks locking functions @Deprecated.
            hadoopqa Hadoop QA added a comment -

            +1, because http://issues.apache.org/jira/secure/attachment/12349472/HADOOP-726-1.patch applied and successfully tested against trunk revision r498829.

            hadoopqa Hadoop QA added a comment - +1, because http://issues.apache.org/jira/secure/attachment/12349472/HADOOP-726-1.patch applied and successfully tested against trunk revision r498829.
            cutting Doug Cutting added a comment -

            I think what's most important is to deprecate the public methods. You've deprecated a number of package-private methods, and left some prominent public methods, like FileSystem#lock(), S3FileSystem#lock() and LocalFileSystem#lock(). These should also be deprecated. A separate issue should be created that removes these methods and their implementations in the next release.

            cutting Doug Cutting added a comment - I think what's most important is to deprecate the public methods. You've deprecated a number of package-private methods, and left some prominent public methods, like FileSystem#lock(), S3FileSystem#lock() and LocalFileSystem#lock(). These should also be deprecated. A separate issue should be created that removes these methods and their implementations in the next release.
            rangadi Raghu Angadi added a comment -

            Thanks Doug. 2.patch depcrecates the public lock / release() interface for FileSystem and other related classes. verified that this does not introduce any deprecation warning in compiler.

            I will file another issue for removing the functionality.

            rangadi Raghu Angadi added a comment - Thanks Doug. 2.patch depcrecates the public lock / release() interface for FileSystem and other related classes. verified that this does not introduce any deprecation warning in compiler. I will file another issue for removing the functionality.
            cutting Doug Cutting added a comment -

            I just committed this. Thanks, Raghu!

            cutting Doug Cutting added a comment - I just committed this. Thanks, Raghu!

            People

              rangadi Raghu Angadi
              sameerp Sameer Paranjpye
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: