Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1052 HDFS scalability with multiple namenodes
  3. HDFS-1648

Federation: Only DataStorage must be locked using in_use.lock and no locks must be associated with BlockPoolStorage

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Federation Branch
    • Federation Branch
    • datanode
    • None
    • Reviewed

    Description

      StorageDirectory locks in_use.lock file, when analyzeStorage() method is called during
      initialization.

      Since BlockPoolStorage uses this method, an in_use.lock file is created and locked under BlockPool directory
      <StorageDirectory>/current/bpid/. This lock is not released when datanode shutsdown. Restarting datanode without
      formatting it results in datanode failure to acquire in_use.lock and hence failure to restart.

      in_use.lock file that currently exists in <StorageDirectory> (at the datanode level) is sufficient to prevent two
      instances of datanodes running on the same node. There is no need for such a lock in block pool directories.

      Change is needed so that BlockPoolStorage can disable locking when it creates it's StorageDirectory.

      Attachments

        1. HDFS-1648.patch
          3 kB
          Tanping Wang

        Activity

          People

            tanping Tanping Wang
            tanping Tanping Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: