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.AttrFlagsNested 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
NONEFields 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
ConstructorsConstructorDescriptionMapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy) MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy, String scheme) MapRFileStatus(String dir, long time) -
Method Summary
Modifier and TypeMethodDescriptionintCompare this object to another objectbooleanCompare if this object is equal to another objectlongGet the access time of the file.getAudit()longlongGet the block size of the file.longGet the change time of the file.longintgetCid()intgetCinum()booleanbooleangetGroup()Get the group associated with the file.longgetLen()Get the length of this file, in bytes.longintgetMajor()intgetMinor()intgetMode()longGet the modification time of the file.intgetNlink()longgetOwner()Get the owner of the file.org.apache.hadoop.fs.PathgetPath()org.apache.hadoop.fs.permission.FsPermissionGet FsPermission associated with the file.shortGet the replication factor of a file.static MapRFileStatusgetStatus(com.mapr.fs.jni.JNIFileStatus status) static MapRFileStatus[]getStatus(com.mapr.fs.jni.JNIFileStatus[] statuses) static MapRFileStatus[]static MapRFileStatusorg.apache.hadoop.fs.PathgetType()intgetUniq()intcom.mapr.fs.jni.JNIFileStatus.VolumeInfobooleanbooleanhasAce()inthashCode()Returns a hash code value for the object, which is defined as the hash code of the path name.booleanisDir()Is this a directory?booleanbooleanisFile()booleanbooleanIs this a symbolic link?booleanisTable()booleanisVol()voidreadFields(DataInput in) protected voidSets group.protected voidSets owner.voidsetPath(org.apache.hadoop.fs.Path p) protected voidsetPermission(org.apache.hadoop.fs.permission.FsPermission permission) Sets permission.voidsetSymlink(org.apache.hadoop.fs.Path p) voidwrite(DataOutput out) Methods inherited from class org.apache.hadoop.fs.FileStatus
attributes, compareTo, hasAcl, isEncrypted, isErasureCoded, isSnapshotEnabled, toString, validateObject
-
Constructor Details
-
MapRFileStatus
public MapRFileStatus() -
MapRFileStatus
-
MapRFileStatus
public MapRFileStatus(com.mapr.fs.jni.JNIFileStatus proxy) -
MapRFileStatus
-
-
Method Details
-
getLength
public long getLength() -
getCompress
public boolean getCompress() -
getCompressionName
-
hasAce
public boolean hasAce() -
getAceString
-
getCompressString
-
getWireSecurityEnabled
public boolean getWireSecurityEnabled() -
getWireSecurity
-
getDiskFlushEnabled
public boolean getDiskFlushEnabled() -
getDiskFlush
-
getAudit
-
getType
-
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
-
getPFidStr
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getVolName
-
getVolLinkAttrType
public int getVolLinkAttrType() -
getLen
public long getLen()Get the length of this file, in bytes.- Overrides:
getLenin classorg.apache.hadoop.fs.FileStatus- Returns:
- the length of this file, in bytes.
-
isDir
public boolean isDir()Is this a directory?- Overrides:
isDirin classorg.apache.hadoop.fs.FileStatus- Returns:
- true if this is a directory
-
isDirectory
public boolean isDirectory()- Overrides:
isDirectoryin classorg.apache.hadoop.fs.FileStatus
-
isFile
public boolean isFile()- Overrides:
isFilein classorg.apache.hadoop.fs.FileStatus
-
isRegular
public boolean isRegular() -
isVol
public boolean isVol()- Returns:
trueif a is volume mounted at this path.
-
getVolumeInfo
public com.mapr.fs.jni.JNIFileStatus.VolumeInfo getVolumeInfo() -
isTable
public boolean isTable()- Overrides:
isTablein classorg.apache.hadoop.fs.FileStatus
-
getBlockSize
public long getBlockSize()Get the block size of the file.- Overrides:
getBlockSizein classorg.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:
getReplicationin classorg.apache.hadoop.fs.FileStatus- Returns:
- the replication factor of a file.
-
getModificationTime
public long getModificationTime()Get the modification time of the file.- Overrides:
getModificationTimein classorg.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:
getAccessTimein classorg.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:
getPermissionin classorg.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
Get the owner of the file.- Overrides:
getOwnerin classorg.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
Get the group associated with the file.- Overrides:
getGroupin classorg.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:
getPathin classorg.apache.hadoop.fs.FileStatus
-
setPath
public void setPath(org.apache.hadoop.fs.Path p) - Overrides:
setPathin classorg.apache.hadoop.fs.FileStatus
-
setPermission
protected void setPermission(org.apache.hadoop.fs.permission.FsPermission permission) Sets permission.- Overrides:
setPermissionin classorg.apache.hadoop.fs.FileStatus- Parameters:
permission- if permission is null, default value is set
-
setOwner
Sets owner.- Overrides:
setOwnerin classorg.apache.hadoop.fs.FileStatus- Parameters:
owner- if it is null, default value is set
-
setGroup
Sets group.- Overrides:
setGroupin classorg.apache.hadoop.fs.FileStatus- Parameters:
group- if it is null, default value is set
-
isSymlink
public boolean isSymlink()Is this a symbolic link?- Overrides:
isSymlinkin classorg.apache.hadoop.fs.FileStatus- Returns:
- true if this is a symbolic link
-
getSymlink
- Overrides:
getSymlinkin classorg.apache.hadoop.fs.FileStatus- Returns:
- The contents of the symbolic link.
- Throws:
IOException
-
setSymlink
public void setSymlink(org.apache.hadoop.fs.Path p) - Overrides:
setSymlinkin classorg.apache.hadoop.fs.FileStatus
-
getOffset
public long getOffset() -
write
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Overrides:
writein classorg.apache.hadoop.fs.FileStatus- Throws:
IOException
-
readFields
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Overrides:
readFieldsin classorg.apache.hadoop.fs.FileStatus- Throws:
IOException
-
compareTo
Compare this object to another object- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classorg.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
Compare if this object is equal to another object- Overrides:
equalsin classorg.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:
hashCodein classorg.apache.hadoop.fs.FileStatus- Returns:
- a hash code value for the path name.
-
getStatus
-
getStatus
-
getStatus
-
getStatus
-