org.apache.hadoop.hdfs.protocol
Class SnapshottableDirectoryStatus

java.lang.Object
  extended by org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus

public class SnapshottableDirectoryStatus
extends Object

Metadata about a snapshottable directory


Nested Class Summary
static class SnapshottableDirectoryStatus.Bean
           
 
Field Summary
static Comparator<SnapshottableDirectoryStatus> COMPARATOR
          Compare the statuses by full paths.
 
Constructor Summary
SnapshottableDirectoryStatus(long modification_time, long access_time, org.apache.hadoop.fs.permission.FsPermission permission, String owner, String group, byte[] localName, long inodeId, int childrenNum, int snapshotNumber, int snapshotQuota, byte[] parentFullPath)
           
 
Method Summary
 org.apache.hadoop.hdfs.protocol.HdfsFileStatus getDirStatus()
           
 org.apache.hadoop.fs.Path getFullPath()
           
 byte[] getParentFullPath()
           
 int getSnapshotNumber()
           
 int getSnapshotQuota()
           
static void print(SnapshottableDirectoryStatus[] stats, PrintStream out)
          Print a list of SnapshottableDirectoryStatus out to a given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPARATOR

public static final Comparator<SnapshottableDirectoryStatus> COMPARATOR
Compare the statuses by full paths.

Constructor Detail

SnapshottableDirectoryStatus

public SnapshottableDirectoryStatus(long modification_time,
                                    long access_time,
                                    org.apache.hadoop.fs.permission.FsPermission permission,
                                    String owner,
                                    String group,
                                    byte[] localName,
                                    long inodeId,
                                    int childrenNum,
                                    int snapshotNumber,
                                    int snapshotQuota,
                                    byte[] parentFullPath)
Method Detail

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

public org.apache.hadoop.hdfs.protocol.HdfsFileStatus getDirStatus()
Returns:
The basic information of the directory

getFullPath

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

print

public static void print(SnapshottableDirectoryStatus[] stats,
                         PrintStream out)
Print a list of SnapshottableDirectoryStatus out to a given stream.

Parameters:
stats - The list of SnapshottableDirectoryStatus
out - The given stream for printing.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.