Class MkdirOperation

All Implemented Interfaces:
org.apache.hadoop.util.functional.CallableRaisingIOE<Boolean>

@Private @Evolving public class MkdirOperation extends ExecutingStoreOperation<Boolean>
The mkdir operation. A walk up the ancestor list halting as soon as a directory (good) or file (bad) is found. Optimized with the expectation that there is a marker up the path or (ultimately) a sibling of the path being created. It performs the directory listing probe ahead of the simple object HEAD call for this reason -the object is the failure mode which SHOULD NOT be encountered on normal execution. Magic paths are handled specially
  • The only path check is for a directory already existing there.
  • No ancestors are checked
  • Parent markers are never deleted, irrespective of FS settings
As a result, irrespective of depth, the operations performed are only
  1. One LIST
  2. If needed, one PUT
  • Constructor Details

    • MkdirOperation

      public MkdirOperation(StoreContext storeContext, org.apache.hadoop.fs.Path dir, MkdirOperation.MkdirCallbacks callbacks, boolean isMagicPath, boolean performanceMkdir)
      Initialize Mkdir Operation context for S3A.
      Parameters:
      storeContext - Store context.
      dir - Dir path of the directory.
      callbacks - MkdirCallbacks object used by the Mkdir operation.
      isMagicPath - True if the path is magic commit path.
      performanceMkdir - If true, skip validation of the parent directory structure.
  • Method Details