Class SnapshotStatus

java.lang.Object
org.apache.hadoop.hdfs.protocol.SnapshotStatus

public class SnapshotStatus extends Object
Metadata about a snapshottable directory.
  • Constructor Details

    • SnapshotStatus

      public SnapshotStatus(long modificationTime, long accessTime, org.apache.hadoop.fs.permission.FsPermission permission, EnumSet<HdfsFileStatus.Flags> flags, String owner, String group, byte[] localName, long inodeId, int childrenNum, int snapshotID, boolean isDeleted, byte[] parentFullPath)
    • SnapshotStatus

      public SnapshotStatus(HdfsFileStatus dirStatus, int snapshotID, boolean isDeleted, byte[] parentFullPath)
  • Method Details

    • setParentFullPath

      public void setParentFullPath(byte[] path)
      sets the path name.
      Parameters:
      path - path
    • getSnapshotID

      public int getSnapshotID()
      Returns:
      snapshot id for the snapshot
    • isDeleted

      public boolean isDeleted()
      Returns:
      whether snapshot is deleted
    • getDirStatus

      public HdfsFileStatus getDirStatus()
      Returns:
      The basic information of the directory
    • getParentFullPath

      public byte[] getParentFullPath()
      Returns:
      Full path of the file
    • getFullPath

      public org.apache.hadoop.fs.Path getFullPath()
      Returns:
      Full path of the snapshot
    • print

      public static void print(SnapshotStatus[] stats, PrintStream out)
      Print a list of SnapshotStatus out to a given stream.
      Parameters:
      stats - The list of SnapshotStatus
      out - The given stream for printing.
    • getSnapshotPath

      public static String getSnapshotPath(String snapshottableDir, String snapshotRelativePath)
    • getParentPath

      public static String getParentPath(String snapshotPath)