DataSetLockManager (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.datanode, class: DataSetLockManager

Package org.apache.hadoop.hdfs.server.datanode

# Class DataSetLockManager

java.lang.Object
org.apache.hadoop.hdfs.server.datanode.DataSetLockManager

All Implemented Interfaces:
  `DataNodeLockManager<AutoCloseDataSetLock>`

public class DataSetLockManager extends Object implements DataNodeLockManager<AutoCloseDataSetLock>
Class for maintain a set of lock for fsDataSetImpl.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.hadoop.hdfs.server.common.DataNodeLockManager

  `DataNodeLockManager.LockLevel`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.slf4j.Logger`
  `LOG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataSetLockManager()`
  `DataSetLockManager(org.apache.hadoop.conf.Configuration conf, DataNode dn)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addLock(DataNodeLockManager.LockLevel level, String... resources)`
  Add a lock to LockManager.
  `Exception`
  `getLastException()`
  `void`
  `hook()`
  LockManager may need to back hook.
  `void`
  `lockLeakCheck()`
  `AutoCloseDataSetLock`
  `readLock(DataNodeLockManager.LockLevel level, String... resources)`
  Acquire readLock and then lock.
  `void`
  `removeLock(DataNodeLockManager.LockLevel level, String... resources)`
  Remove a lock from LockManager.
  `AutoCloseDataSetLock`
  `writeLock(DataNodeLockManager.LockLevel level, String... resources)`
  Acquire writeLock and then lock.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOG

    public static final org.slf4j.Logger LOG

- ## Constructor Details

  - ### DataSetLockManager

    public DataSetLockManager()

  - ### DataSetLockManager

    public DataSetLockManager(org.apache.hadoop.conf.Configuration conf, DataNode dn)

- ## Method Details

  - ### readLock

    public AutoCloseDataSetLock readLock(DataNodeLockManager.LockLevel level, String... resources)
    Description copied from interface: `DataNodeLockManager`
    Acquire readLock and then lock.
    Specified by:
      `readLock` in interface `DataNodeLockManager<AutoCloseDataSetLock>`

  - ### writeLock

    public AutoCloseDataSetLock writeLock(DataNodeLockManager.LockLevel level, String... resources)
    Description copied from interface: `DataNodeLockManager`
    Acquire writeLock and then lock.
    Specified by:
      `writeLock` in interface `DataNodeLockManager<AutoCloseDataSetLock>`

  - ### addLock

    public void addLock(DataNodeLockManager.LockLevel level, String... resources)
    Description copied from interface: `DataNodeLockManager`
    Add a lock to LockManager.
    Specified by:
      `addLock` in interface `DataNodeLockManager<AutoCloseDataSetLock>`

  - ### removeLock

    public void removeLock(DataNodeLockManager.LockLevel level, String... resources)
    Description copied from interface: `DataNodeLockManager`
    Remove a lock from LockManager.
    Specified by:
      `removeLock` in interface `DataNodeLockManager<AutoCloseDataSetLock>`

  - ### hook

    public void hook()
    Description copied from interface: `DataNodeLockManager`
    LockManager may need to back hook.
    Specified by:
      `hook` in interface `DataNodeLockManager<AutoCloseDataSetLock>`

  - ### lockLeakCheck

    public void lockLeakCheck()

  - ### getLastException

    public Exception getLastException()