Class PathLock

Object
io.delta.storage.internal.PathLock

public class PathLock extends Object
A lock that provides per-file-path `acquire` and `release` semantics. Can be used to ensure that no two writers are creating the same external (e.g. S3) file at the same time.

Note: For all APIs, the caller should resolve the path to make sure we are locking the correct absolute path.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    acquire(org.apache.hadoop.fs.Path resolvedPath)
    Acquire a lock for the path before writing.
    void
    release(org.apache.hadoop.fs.Path resolvedPath)
    Release the lock for the path after writing.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PathLock

      public PathLock()
  • Method Details

    • release

      public void release(org.apache.hadoop.fs.Path resolvedPath)
      Release the lock for the path after writing.
    • acquire

      public void acquire(org.apache.hadoop.fs.Path resolvedPath) throws InterruptedException
      Acquire a lock for the path before writing.
      Throws:
      InterruptedException