Package org.apache.hadoop.hdfs.protocol
Class SnapshotStatus
java.lang.Object
org.apache.hadoop.hdfs.protocol.SnapshotStatus
Metadata about a snapshottable directory.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotStatus(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(HdfsFileStatus dirStatus, int snapshotID, boolean isDeleted, byte[] parentFullPath) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.Pathbyte[]static StringgetParentPath(String snapshotPath) intstatic StringgetSnapshotPath(String snapshottableDir, String snapshotRelativePath) booleanstatic voidprint(SnapshotStatus[] stats, PrintStream out) Print a list ofSnapshotStatusout to a given stream.voidsetParentFullPath(byte[] path) sets the path name.
-
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
- 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
Print a list ofSnapshotStatusout to a given stream.- Parameters:
stats- The list ofSnapshotStatusout- The given stream for printing.
-
getSnapshotPath
-
getParentPath
-