Package com.mapr.fs

Class MapRFileStatus

java.lang.Object
org.apache.hadoop.fs.FileStatus
com.mapr.fs.MapRFileStatus
All Implemented Interfaces:
com.mapr.fs.jni.MapRConstants, ObjectInputValidation, Serializable, Comparable<Object>, org.apache.hadoop.io.Writable

public class MapRFileStatus extends org.apache.hadoop.fs.FileStatus implements com.mapr.fs.jni.MapRConstants
Interface that represents the client side information for a file.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileStatus

    org.apache.hadoop.fs.FileStatus.AttrFlags

    Nested classes/interfaces inherited from interface com.mapr.fs.jni.MapRConstants

    com.mapr.fs.jni.MapRConstants.ErrorValue, com.mapr.fs.jni.MapRConstants.JniUsername, com.mapr.fs.jni.MapRConstants.PutConstants, com.mapr.fs.jni.MapRConstants.RowConstants
  • Field Summary

    Fields inherited from class org.apache.hadoop.fs.FileStatus

    NONE

    Fields inherited from interface com.mapr.fs.jni.MapRConstants

    AtimeBit, AuditBit, ChunkSizeBit, ClusterConfDefault, CompressBit, CompressorTypeBit, DEFAULT_USER_IDENTIFIER, DEFAULT_USER_IDENTIFIER_ESCAPED, DefaultChunkSize, DefaultCLDBIp, DefaultCLDBPort, DiskFlushBit, EMPTY_BYTE_ARRAY, EMPTY_END_ROW, EMPTY_START_ROW, FidNameBit, GlobalClusterConfDefault, GroupBit, HADOOP_MAX_BLOCKSIZE, HADOOP_SECURITY_SPOOFED_GID, HADOOP_SECURITY_SPOOFED_GROUP, HADOOP_SECURITY_SPOOFED_UID, HADOOP_SECURITY_SPOOFED_USER, HOSTNAME_IP_SEPARATOR, IP_PORT_SEPARATOR, IPV6_ADDR_ENDER, IPV6_ADDR_STARTER, IPv6DefaultCLDBIp, LAST_ROW, LATEST_TIMESTAMP, MAPR_ENV_VAR, MAPR_PROPERTY_HOME, MapRClusterDir, MapRClusterDirPattern, MapRClusterDirSlash, MAPRFS_PREFIX, MAPRFS_SCHEME, MapRHomeDefault, MAX_CLUSTERS_CROSSED, MAX_PATH_LENGTH, MAX_PORT_NUMBER, MAX_RA_THREADS, MIN_RA_THREADS, MinChunkSize, ModeBit, MtimeBit, MULTI_ADDR_SEPARATOR, NUM_CONTAINERS_PER_RPC, OLDEST_TIMESTAMP, RA_THREADS_PER_STREAM, ReplBit, SSL_TRUSTSTORE, UserBit, UTF8_ENCODING, WireSecureBit
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy)
     
    MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy, String scheme)
     
    MapRFileStatus(String dir, long time)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compare this object to another object
    boolean
    Compare if this object is equal to another object
    long
    Get the access time of the file.
     
     
    long
     
    long
    Get the block size of the file.
    long
    Get the change time of the file.
    long
     
    int
     
    int
     
    boolean
     
     
     
     
    boolean
     
     
    Get the group associated with the file.
    long
    Get the length of this file, in bytes.
    long
     
    int
     
    int
     
    int
     
    long
    Get the modification time of the file.
    int
     
    long
     
    Get the owner of the file.
    org.apache.hadoop.fs.Path
     
    org.apache.hadoop.fs.permission.FsPermission
    Get FsPermission associated with the file.
     
    short
    Get the replication factor of a file.
    getStatus(com.mapr.fs.jni.JNIFileStatus status)
     
    getStatus(com.mapr.fs.jni.JNIFileStatus[] statuses)
     
    getStatus(com.mapr.fs.jni.JNIFileStatus[] statuses, String scheme)
     
    getStatus(com.mapr.fs.jni.JNIFileStatus status, String scheme)
     
     
    org.apache.hadoop.fs.Path
     
     
    int
     
    int
     
     
    com.mapr.fs.jni.JNIFileStatus.VolumeInfo
     
     
    boolean
     
    boolean
     
    int
    Returns a hash code value for the object, which is defined as the hash code of the path name.
    boolean
    Is this a directory?
    boolean
     
    boolean
     
    boolean
     
    boolean
    Is this a symbolic link?
    boolean
     
    boolean
     
    void
     
    protected void
    Sets group.
    protected void
    Sets owner.
    void
    setPath(org.apache.hadoop.fs.Path p)
     
    protected void
    setPermission(org.apache.hadoop.fs.permission.FsPermission permission)
    Sets permission.
    void
    setSymlink(org.apache.hadoop.fs.Path p)
     
    void
     

    Methods inherited from class org.apache.hadoop.fs.FileStatus

    attributes, compareTo, hasAcl, isEncrypted, isErasureCoded, isSnapshotEnabled, toString, validateObject

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MapRFileStatus

      public MapRFileStatus()
    • MapRFileStatus

      public MapRFileStatus(String dir, long time)
    • MapRFileStatus

      public MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy)
    • MapRFileStatus

      public MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy, String scheme)
  • Method Details

    • getLength

      public long getLength()
    • getCompress

      public boolean getCompress()
    • getCompressionName

      public String getCompressionName()
    • hasAce

      public boolean hasAce()
    • getAceString

      public String getAceString()
    • getCompressString

      public String getCompressString()
    • getWireSecurityEnabled

      public boolean getWireSecurityEnabled()
    • getWireSecurity

      public String getWireSecurity()
    • getDiskFlushEnabled

      public boolean getDiskFlushEnabled()
    • getDiskFlush

      public String getDiskFlush()
    • getAudit

      public String getAudit()
    • getType

      public String getType()
    • getsubType

      public String getsubType()
    • getMode

      public int getMode()
    • getNlink

      public int getNlink()
    • getCid

      public int getCid()
    • getCinum

      public int getCinum()
    • getUniq

      public int getUniq()
    • getBlocks

      public long getBlocks()
    • getFidStr

      public String getFidStr()
    • getPFidStr

      public String getPFidStr()
    • getMajor

      public int getMajor()
    • getMinor

      public int getMinor()
    • getVolName

      public String getVolName()
    • getVolLinkAttrType

      public int getVolLinkAttrType()
    • getLen

      public long getLen()
      Get the length of this file, in bytes.
      Overrides:
      getLen in class org.apache.hadoop.fs.FileStatus
      Returns:
      the length of this file, in bytes.
    • isDir

      public boolean isDir()
      Is this a directory?
      Overrides:
      isDir in class org.apache.hadoop.fs.FileStatus
      Returns:
      true if this is a directory
    • isDirectory

      public boolean isDirectory()
      Overrides:
      isDirectory in class org.apache.hadoop.fs.FileStatus
    • isFile

      public boolean isFile()
      Overrides:
      isFile in class org.apache.hadoop.fs.FileStatus
    • isRegular

      public boolean isRegular()
    • isVol

      public boolean isVol()
      Returns:
      true if a is volume mounted at this path.
    • getVolumeInfo

      public com.mapr.fs.jni.JNIFileStatus.VolumeInfo getVolumeInfo()
    • isTable

      public boolean isTable()
      Overrides:
      isTable in class org.apache.hadoop.fs.FileStatus
    • getBlockSize

      public long getBlockSize()
      Get the block size of the file.
      Overrides:
      getBlockSize in class org.apache.hadoop.fs.FileStatus
      Returns:
      the number of bytes
    • getChunkSize

      public long getChunkSize()
    • getReplication

      public short getReplication()
      Get the replication factor of a file.
      Overrides:
      getReplication in class org.apache.hadoop.fs.FileStatus
      Returns:
      the replication factor of a file.
    • getModificationTime

      public long getModificationTime()
      Get the modification time of the file.
      Overrides:
      getModificationTime in class org.apache.hadoop.fs.FileStatus
      Returns:
      the modification time of file in milliseconds since January 1, 1970 UTC.
    • getAccessTime

      public long getAccessTime()
      Get the access time of the file.
      Overrides:
      getAccessTime in class org.apache.hadoop.fs.FileStatus
      Returns:
      the access time of file in milliseconds since January 1, 1970 UTC.
    • getChangeTime

      public long getChangeTime()
      Get the change time of the file.
      Returns:
      the change time of file in milliseconds since January 1, 1970 UTC.
    • getPermission

      public org.apache.hadoop.fs.permission.FsPermission getPermission()
      Get FsPermission associated with the file.
      Overrides:
      getPermission in class org.apache.hadoop.fs.FileStatus
      Returns:
      permssion. If a filesystem does not have a notion of permissions or if permissions could not be determined, then default permissions equivalent of "rwxrwxrwx" is returned.
    • getOwner

      public String getOwner()
      Get the owner of the file.
      Overrides:
      getOwner in class org.apache.hadoop.fs.FileStatus
      Returns:
      owner of the file. The string could be empty if there is no notion of owner of a file in a filesystem or if it could not be determined (rare).
    • getGroup

      public String getGroup()
      Get the group associated with the file.
      Overrides:
      getGroup in class org.apache.hadoop.fs.FileStatus
      Returns:
      group for the file. The string could be empty if there is no notion of group of a file in a filesystem or if it could not be determined (rare).
    • getPath

      public org.apache.hadoop.fs.Path getPath()
      Overrides:
      getPath in class org.apache.hadoop.fs.FileStatus
    • setPath

      public void setPath(org.apache.hadoop.fs.Path p)
      Overrides:
      setPath in class org.apache.hadoop.fs.FileStatus
    • setPermission

      protected void setPermission(org.apache.hadoop.fs.permission.FsPermission permission)
      Sets permission.
      Overrides:
      setPermission in class org.apache.hadoop.fs.FileStatus
      Parameters:
      permission - if permission is null, default value is set
    • setOwner

      protected void setOwner(String owner)
      Sets owner.
      Overrides:
      setOwner in class org.apache.hadoop.fs.FileStatus
      Parameters:
      owner - if it is null, default value is set
    • setGroup

      protected void setGroup(String group)
      Sets group.
      Overrides:
      setGroup in class org.apache.hadoop.fs.FileStatus
      Parameters:
      group - if it is null, default value is set
    • isSymlink

      public boolean isSymlink()
      Is this a symbolic link?
      Overrides:
      isSymlink in class org.apache.hadoop.fs.FileStatus
      Returns:
      true if this is a symbolic link
    • getSymlink

      public org.apache.hadoop.fs.Path getSymlink() throws IOException
      Overrides:
      getSymlink in class org.apache.hadoop.fs.FileStatus
      Returns:
      The contents of the symbolic link.
      Throws:
      IOException
    • setSymlink

      public void setSymlink(org.apache.hadoop.fs.Path p)
      Overrides:
      setSymlink in class org.apache.hadoop.fs.FileStatus
    • getOffset

      public long getOffset()
    • write

      public void write(DataOutput out) throws IOException
      Specified by:
      write in interface org.apache.hadoop.io.Writable
      Overrides:
      write in class org.apache.hadoop.fs.FileStatus
      Throws:
      IOException
    • readFields

      public void readFields(DataInput in) throws IOException
      Specified by:
      readFields in interface org.apache.hadoop.io.Writable
      Overrides:
      readFields in class org.apache.hadoop.fs.FileStatus
      Throws:
      IOException
    • compareTo

      public int compareTo(Object o)
      Compare this object to another object
      Specified by:
      compareTo in interface Comparable<Object>
      Overrides:
      compareTo in class org.apache.hadoop.fs.FileStatus
      Parameters:
      o - the object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Throws:
      ClassCastException - if the specified object's is not of type FileStatus
    • equals

      public boolean equals(Object o)
      Compare if this object is equal to another object
      Overrides:
      equals in class org.apache.hadoop.fs.FileStatus
      Parameters:
      o - the object to be compared.
      Returns:
      true if two file status has the same path name; false if not.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object, which is defined as the hash code of the path name.
      Overrides:
      hashCode in class org.apache.hadoop.fs.FileStatus
      Returns:
      a hash code value for the path name.
    • getStatus

      public static MapRFileStatus getStatus(com.mapr.fs.jni.JNIFileStatus status)
    • getStatus

      public static MapRFileStatus getStatus(com.mapr.fs.jni.JNIFileStatus status, String scheme)
    • getStatus

      public static MapRFileStatus[] getStatus(com.mapr.fs.jni.JNIFileStatus[] statuses)
    • getStatus

      public static MapRFileStatus[] getStatus(com.mapr.fs.jni.JNIFileStatus[] statuses, String scheme)