Package org.apache.hadoop.hdfs.protocol
Class SnapshottableDirectoryStatus
java.lang.Object
org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus
Metadata about a snapshottable directory
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<SnapshottableDirectoryStatus>Compare the statuses by full paths. -
Constructor Summary
ConstructorsConstructorDescriptionSnapshottableDirectoryStatus(long modification_time, long access_time, org.apache.hadoop.fs.permission.FsPermission permission, EnumSet<HdfsFileStatus.Flags> flags, String owner, String group, byte[] localName, long inodeId, int childrenNum, int snapshotNumber, int snapshotQuota, byte[] parentFullPath) SnapshottableDirectoryStatus(HdfsFileStatus dirStatus, int snapshotNumber, int snapshotQuota, byte[] parentFullPath) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.Pathbyte[]intintstatic voidprint(SnapshottableDirectoryStatus[] stats, PrintStream out) Print a list ofSnapshottableDirectoryStatusout to a given stream.
-
Field Details
-
COMPARATOR
Compare the statuses by full paths.
-
-
Constructor Details
-
SnapshottableDirectoryStatus
public SnapshottableDirectoryStatus(long modification_time, long access_time, org.apache.hadoop.fs.permission.FsPermission permission, EnumSet<HdfsFileStatus.Flags> flags, String owner, String group, byte[] localName, long inodeId, int childrenNum, int snapshotNumber, int snapshotQuota, byte[] parentFullPath) -
SnapshottableDirectoryStatus
public SnapshottableDirectoryStatus(HdfsFileStatus dirStatus, int snapshotNumber, int snapshotQuota, byte[] parentFullPath)
-
-
Method Details
-
getSnapshotNumber
public int getSnapshotNumber()- Returns:
- Number of snapshots that have been taken for the directory
-
getSnapshotQuota
public int getSnapshotQuota()- Returns:
- Number of snapshots allowed for the directory
-
getParentFullPath
public byte[] getParentFullPath()- Returns:
- Full path of the parent
-
getDirStatus
- Returns:
- The basic information of the directory
-
getFullPath
public org.apache.hadoop.fs.Path getFullPath()- Returns:
- Full path of the file
-
print
Print a list ofSnapshottableDirectoryStatusout to a given stream.- Parameters:
stats- The list ofSnapshottableDirectoryStatusout- The given stream for printing.
-