Package com.mapr.fs

Class MapRFileStatus

  • All Implemented Interfaces:
    com.mapr.fs.jni.MapRConstants, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Comparable<java.lang.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:
    Serialized Form
    • 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, 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, UserBit, UTF8_ENCODING, WireSecureBit
    • Constructor Detail

      • MapRFileStatus

        public MapRFileStatus()
      • MapRFileStatus

        public MapRFileStatus​(java.lang.String dir,
                              long time)
      • MapRFileStatus

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

        public MapRFileStatus​(com.mapr.fs.jni.JNIFileStatus proxy,
                              java.lang.String scheme)
    • Method Detail

      • getLength

        public long getLength()
      • getCompress

        public boolean getCompress()
      • getCompressionName

        public java.lang.String getCompressionName()
      • hasAce

        public boolean hasAce()
      • getAceString

        public java.lang.String getAceString()
      • getCompressString

        public java.lang.String getCompressString()
      • getWireSecurityEnabled

        public boolean getWireSecurityEnabled()
      • getWireSecurity

        public java.lang.String getWireSecurity()
      • getDiskFlushEnabled

        public boolean getDiskFlushEnabled()
      • getDiskFlush

        public java.lang.String getDiskFlush()
      • getAudit

        public java.lang.String getAudit()
      • getType

        public java.lang.String getType()
      • getsubType

        public java.lang.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 java.lang.String getFidStr()
      • getPFidStr

        public java.lang.String getPFidStr()
      • getMajor

        public int getMajor()
      • getMinor

        public int getMinor()
      • getVolName

        public java.lang.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 java.lang.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 java.lang.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​(java.lang.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​(java.lang.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 java.io.IOException
        Overrides:
        getSymlink in class org.apache.hadoop.fs.FileStatus
        Returns:
        The contents of the symbolic link.
        Throws:
        java.io.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​(java.io.DataOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.hadoop.io.Writable
        Overrides:
        write in class org.apache.hadoop.fs.FileStatus
        Throws:
        java.io.IOException
      • readFields

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

        public int compareTo​(java.lang.Object o)
        Compare this object to another object
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.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:
        java.lang.ClassCastException - if the specified object's is not of type FileStatus
      • equals

        public boolean equals​(java.lang.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,
                                               java.lang.String scheme)
      • getStatus

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

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