Namesystem (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.namenode, interface: Namesystem

Package org.apache.hadoop.hdfs.server.namenode

# Interface Namesystem

All Superinterfaces:
  `RwLock`, `SafeMode`

All Known Implementing Classes:
  `FSNamesystem`

@Private public interface Namesystem extends RwLock, SafeMode
Namesystem operations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkAndProvisionSnapshotTrashRoots()`
  Check if snapshot roots are created for all existing snapshottable directories.
  `BlockCollection`
  `getBlockCollection(long id)`
  `CacheManager`
  `getCacheManager()`
  `FSDirectory`
  `getFSDirectory()`
  `HAContext`
  `getHAContext()`
  `boolean`
  `inTransitionToActive()`
  `boolean`
  `isInSnapshot(long blockCollectionID)`
  `boolean`
  `isRunning()`
  Is this name system running?
  `void`
  `removeXattr(long id, String xattrName)`
  Remove xAttr from the inode.
  `void`
  `startSecretManagerIfNecessary()`

  ### Methods inherited from interface org.apache.hadoop.hdfs.util.RwLock

  `hasReadLock, hasReadLock, hasWriteLock, hasWriteLock, readLock, readLock, readLockInterruptibly, readLockInterruptibly, readUnlock, readUnlock, readUnlock, writeLock, writeLock, writeLockInterruptibly, writeLockInterruptibly, writeUnlock, writeUnlock, writeUnlock`

  ### Methods inherited from interface org.apache.hadoop.hdfs.server.namenode.SafeMode

  `isInSafeMode, isInStartupSafeMode`

- ## Method Details

  - ### isRunning

    boolean isRunning()
    Is this name system running?

  - ### getBlockCollection

    BlockCollection getBlockCollection(long id)

  - ### getFSDirectory

    FSDirectory getFSDirectory()

  - ### startSecretManagerIfNecessary

    void startSecretManagerIfNecessary()

  - ### isInSnapshot

    boolean isInSnapshot(long blockCollectionID)

  - ### getCacheManager

    CacheManager getCacheManager()

  - ### getHAContext

    HAContext getHAContext()

  - ### inTransitionToActive

    boolean inTransitionToActive()
    Returns:
      Whether the namenode is transitioning to active state and is in the middle of the starting active services.

  - ### removeXattr

    void removeXattr(long id, String xattrName) throws IOException
    Remove xAttr from the inode.
    Parameters:
      `id` -
      `xattrName` -
    Throws:
      `IOException`

  - ### checkAndProvisionSnapshotTrashRoots

    void checkAndProvisionSnapshotTrashRoots()
    Check if snapshot roots are created for all existing snapshottable directories. Create them if not.