Class INodeWithAdditionalFields

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.INode
org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields
All Implemented Interfaces:
Comparable<byte[]>, INodeAttributes, Diff.Element<byte[]>, org.apache.hadoop.util.LightWeightGSet.LinkedElement
Direct Known Subclasses:
INodeDirectory, INodeFile, INodeSymlink

@Private public abstract class INodeWithAdditionalFields extends INode implements org.apache.hadoop.util.LightWeightGSet.LinkedElement
INode with additional fields including id, name, permission, access time and modification time.
  • Field Details

  • Method Details

    • setNext

      public void setNext(org.apache.hadoop.util.LightWeightGSet.LinkedElement next)
      Specified by:
      setNext in interface org.apache.hadoop.util.LightWeightGSet.LinkedElement
    • getNext

      public org.apache.hadoop.util.LightWeightGSet.LinkedElement getNext()
      Specified by:
      getNext in interface org.apache.hadoop.util.LightWeightGSet.LinkedElement
    • getId

      public final long getId()
      Get inode id
      Specified by:
      getId in class INode
    • getLocalNameBytes

      public final byte[] getLocalNameBytes()
      Specified by:
      getLocalNameBytes in interface INodeAttributes
      Returns:
      null if the local name is null; otherwise, return the local name byte array.
    • setLocalName

      public final void setLocalName(byte[] name)
      Description copied from class: INode
      Set local file name
      Specified by:
      setLocalName in class INode
    • getPermissionStatus

      public final org.apache.hadoop.fs.permission.PermissionStatus getPermissionStatus(int snapshotId)
      Description copied from class: INode
      Get the PermissionStatus
      Specified by:
      getPermissionStatus in class INode
    • getFsPermissionShort

      public final short getFsPermissionShort()
      Specified by:
      getFsPermissionShort in interface INodeAttributes
      Returns:
      the permission as a short.
    • getPermissionLong

      public long getPermissionLong()
      Specified by:
      getPermissionLong in interface INodeAttributes
      Returns:
      the permission information as a long.
    • getAclFeature

      public final AclFeature getAclFeature(int snapshotId)
    • updateModificationTime

      public final INode updateModificationTime(long mtime, int latestSnapshotId)
      Update modification time if it is larger than the current value.
      Specified by:
      updateModificationTime in class INode
    • setModificationTime

      public final void setModificationTime(long modificationTime)
      Description copied from class: INode
      Set the last modification time of inode.
      Specified by:
      setModificationTime in class INode
    • setAccessTime

      public final void setAccessTime(long accessTime)
      Set last access time of inode.
      Specified by:
      setAccessTime in class INode
    • addFeature

      protected void addFeature(INode.Feature f)
    • removeFeature

      protected void removeFeature(INode.Feature f)
    • getFeature

      protected <T extends INode.Feature> T getFeature(Class<? extends INode.Feature> clazz)
    • removeAclFeature

      public void removeAclFeature()
    • addAclFeature

      public void addAclFeature(AclFeature f)
    • removeXAttrFeature

      public void removeXAttrFeature()
    • addXAttrFeature

      public void addXAttrFeature(XAttrFeature f)
    • getFeatures

      public final INode.Feature[] getFeatures()