All Implemented Interfaces:
Comparable<byte[]>, INodeAttributes, INodeDirectoryAttributes, Diff.Element<byte[]>, org.apache.hadoop.util.LightWeightGSet.LinkedElement
Enclosing class:
Snapshot

public static class Snapshot.Root extends INodeDirectory
The root directory of the snapshot.
  • Method Details

    • getChildrenList

      public ReadOnlyList<INode> getChildrenList(int snapshotId)
      Overrides:
      getChildrenList in class INodeDirectory
      Parameters:
      snapshotId - if it is not Snapshot.CURRENT_STATE_ID, get the result from the corresponding snapshot; otherwise, get the result from the current directory.
      Returns:
      the current children list if the specified snapshot is null; otherwise, return the children list corresponding to the snapshot. Note that the returned list is never null.
    • getChild

      public INode getChild(byte[] name, int snapshotId)
      Overrides:
      getChild in class INodeDirectory
      Parameters:
      name - the name of the child
      snapshotId - if it is not Snapshot.CURRENT_STATE_ID, get the result from the corresponding snapshot; otherwise, get the result from the current directory.
      Returns:
      the child inode.
    • computeContentSummary

      public ContentSummaryComputationContext computeContentSummary(int snapshotId, ContentSummaryComputationContext summary) throws org.apache.hadoop.security.AccessControlException
      Description copied from class: INode
      Count subtree content summary with a ContentCounts.
      Overrides:
      computeContentSummary in class INodeDirectory
      Parameters:
      snapshotId - Specify the time range for the calculation. If this parameter equals to Snapshot.CURRENT_STATE_ID, the result covers both the current states and all the snapshots. Otherwise the result only covers all the files/directories contained in the specific snapshot.
      summary - the context object holding counts for the subtree.
      Returns:
      The same objects as summary.
      Throws:
      org.apache.hadoop.security.AccessControlException
    • metadataEquals

      public boolean metadataEquals(INodeDirectoryAttributes other)
      Description copied from class: INodeDirectory
      Compare the metadata with another INodeDirectory
      Specified by:
      metadataEquals in interface INodeDirectoryAttributes
      Overrides:
      metadataEquals in class INodeDirectory
    • getFullPathName

      public String getFullPathName()
      Overrides:
      getFullPathName in class INode
    • getRootFullPathName

      public String getRootFullPathName()
      Get the full path name of the root directory of this snapshot.
      Returns:
      full path to the root directory of the snapshot