Package alluxio.client.file
Class URIStatus
- java.lang.Object
-
- alluxio.client.file.URIStatus
-
@PublicApi @ThreadSafe public class URIStatus extends java.lang.Object
Wrapper aroundFileInfo
. Represents the metadata about a file or directory in Alluxio. This is a snapshot of information about the file or directory and not all attributes are guaranteed to be up to date. Attributes documented as immutable will always be accurate, and attributes documented as mutable may be out of date.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
AccessControlList
getAcl()
java.util.List<java.lang.Long>
getBlockIds()
BlockInfo
getBlockInfo(long blockId)
long
getBlockSizeBytes()
CacheContext
getCacheContext()
long
getCreationTimeMs()
DefaultAccessControlList
getDefaultAcl()
java.util.List<FileBlockInfo>
getFileBlockInfos()
long
getFileId()
FileInfo
getFileInfo()
This is an experimental API.java.lang.String
getGroup()
int
getInAlluxioPercentage()
int
getInMemoryPercentage()
long
getLastAccessTimeMs()
long
getLastModificationTimeMs()
long
getLength()
int
getMode()
long
getMountId()
java.lang.String
getName()
For example for the uri: alluxio://host:1000/foo/bar/baz, baz is the name.java.lang.String
getOwner()
java.lang.String
getPath()
For example, for the uri: alluxio://host:1000/foo/bar/baz, the path is /foo/bar/baz.java.lang.String
getPersistenceState()
java.util.Set<java.lang.String>
getPinnedMediumTypes()
int
getReplicationMax()
int
getReplicationMin()
long
getTtl()
alluxio.grpc.TtlAction
getTtlAction()
java.lang.String
getUfsFingerprint()
java.lang.String
getUfsPath()
java.util.Map<java.lang.String,byte[]>
getXAttr()
int
hashCode()
boolean
isCacheable()
boolean
isCompleted()
boolean
isFolder()
boolean
isMountPoint()
boolean
isPersisted()
boolean
isPinned()
java.lang.String
toString()
-
-
-
Constructor Detail
-
URIStatus
public URIStatus(FileInfo info)
Constructs an instance of this class from aFileInfo
.- Parameters:
info
- an object containing the information about a particular uri
-
URIStatus
public URIStatus(FileInfo info, @Nullable CacheContext context)
Constructs an instance of this class from aFileInfo
.- Parameters:
info
- an object containing the information about a particular uricontext
- cache context associated with this uri
-
-
Method Detail
-
getAcl
public AccessControlList getAcl()
- Returns:
- the ACL entries for this path, mutable
-
getDefaultAcl
public DefaultAccessControlList getDefaultAcl()
- Returns:
- the default ACL entries for this path, mutable
-
getBlockInfo
@Nullable public BlockInfo getBlockInfo(long blockId)
- Parameters:
blockId
- the block ID- Returns:
- the corresponding block info or null
-
getBlockIds
public java.util.List<java.lang.Long> getBlockIds()
- Returns:
- a list of block ids belonging to the file, empty for directories, immutable
-
getBlockSizeBytes
public long getBlockSizeBytes()
- Returns:
- the default block size for this file, 0 for directories, immutable
-
getCreationTimeMs
public long getCreationTimeMs()
- Returns:
- the epoch time the entity referenced by this uri was created, immutable
-
getFileId
public long getFileId()
- Returns:
- the unique long identifier of the entity referenced by this uri used by Alluxio servers, immutable
-
getGroup
public java.lang.String getGroup()
- Returns:
- the group that owns the entity referenced by this uri, mutable
-
getInMemoryPercentage
public int getInMemoryPercentage()
- Returns:
- the percentage of blocks in Alluxio memory tier storage, mutable
-
getInAlluxioPercentage
public int getInAlluxioPercentage()
- Returns:
- the percentage of blocks in Alluxio tier storage, mutable
-
getLastModificationTimeMs
public long getLastModificationTimeMs()
- Returns:
- the epoch time the entity referenced by this uri was last modified, mutable
-
getLastAccessTimeMs
public long getLastAccessTimeMs()
- Returns:
- the epoch time the entity referenced by this uri was last accessed, mutable
-
getLength
public long getLength()
- Returns:
- the length in bytes of the file, 0 for directories, mutable
-
getName
public java.lang.String getName()
For example for the uri: alluxio://host:1000/foo/bar/baz, baz is the name.- Returns:
- the last path component of the entity referenced by this uri, mutable
-
getPath
public java.lang.String getPath()
For example, for the uri: alluxio://host:1000/foo/bar/baz, the path is /foo/bar/baz.- Returns:
- the entire path component of the entity referenced by this uri, mutable
-
getMode
public int getMode()
- Returns:
- the int representation of the ACL mode bits of the entity referenced by this uri, mutable
-
getPersistenceState
public java.lang.String getPersistenceState()
- Returns:
- the string representation of the persistence status, mutable
-
getTtl
public long getTtl()
- Returns:
- the time-to-live in milliseconds since the creation time of the entity referenced by this uri, mutable
-
getTtlAction
public alluxio.grpc.TtlAction getTtlAction()
- Returns:
- the action to perform on ttl expiry
-
getUfsPath
public java.lang.String getUfsPath()
- Returns:
- the uri of the under storage location of the entity referenced by this uri, mutable
-
getOwner
public java.lang.String getOwner()
- Returns:
- the owner of the entity referenced by this uri, mutable
-
getReplicationMax
public int getReplicationMax()
- Returns:
- the maximum number of replicas of the entity referenced by this uri, mutable
-
getReplicationMin
public int getReplicationMin()
- Returns:
- the minimum number of replicas of the entity referenced by this uri, mutable
-
isCacheable
public boolean isCacheable()
- Returns:
- whether the entity referenced by this uri can be stored in Alluxio space, mutable
-
isCompleted
public boolean isCompleted()
- Returns:
- whether the entity referenced by this uri has been marked as completed, immutable
-
isFolder
public boolean isFolder()
- Returns:
- whether the entity referenced by this uri is a directory, immutable
-
isPersisted
public boolean isPersisted()
- Returns:
- whether the entity referenced by this uri is persisted to an underlying storage, mutable
-
isPinned
public boolean isPinned()
- Returns:
- whether the entity referenced by this uri is pinned, mutable
-
getPinnedMediumTypes
public java.util.Set<java.lang.String> getPinnedMediumTypes()
- Returns:
- the pinned location list
-
isMountPoint
public boolean isMountPoint()
- Returns:
- whether the entity referenced by this uri is a mount point
-
getMountId
public long getMountId()
- Returns:
- the id of the mount of this file is mapped to
-
getFileBlockInfos
public java.util.List<FileBlockInfo> getFileBlockInfos()
- Returns:
- the list of file block descriptors
-
getUfsFingerprint
public java.lang.String getUfsFingerprint()
- Returns:
- the ufs fingerprint
-
getXAttr
public java.util.Map<java.lang.String,byte[]> getXAttr()
- Returns:
- the extended attributes
-
getCacheContext
@Nullable public CacheContext getCacheContext()
- Returns:
- the Presto context
-
getFileInfo
public FileInfo getFileInfo()
This is an experimental API. The returnedFileInfo
object does not have a stable API. Make modifications to the returned file info object at your own risk.- Returns:
- the underlying file info object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-