Package alluxio.wire
Class FileInfo
- java.lang.Object
-
- alluxio.wire.FileInfo
-
- All Implemented Interfaces:
java.io.Serializable
@NotThreadSafe public final class FileInfo extends java.lang.Object implements java.io.Serializable
The file information.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
convertAclToStringEntries()
java.util.List<java.lang.String>
convertDefaultAclToStringEntries()
boolean
equals(java.lang.Object o)
AccessControlList
getAcl()
java.util.List<java.lang.Long>
getBlockIds()
long
getBlockSizeBytes()
long
getCreationTimeMs()
DefaultAccessControlList
getDefaultAcl()
FileBlockInfo
getFileBlockInfo(long blockId)
java.util.List<FileBlockInfo>
getFileBlockInfos()
long
getFileId()
java.lang.String
getGroup()
int
getInAlluxioPercentage()
int
getInMemoryPercentage()
long
getLastAccessTimeMs()
long
getLastModificationTimeMs()
long
getLength()
java.util.Set<java.lang.String>
getMediumTypes()
int
getMode()
long
getMountId()
java.lang.String
getName()
java.lang.String
getOwner()
java.lang.String
getPath()
java.lang.String
getPersistenceState()
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()
FileInfo
setAcl(AccessControlList acl)
FileInfo
setBlockIds(java.util.List<java.lang.Long> blockIds)
FileInfo
setBlockSizeBytes(long blockSizeBytes)
FileInfo
setCacheable(boolean cacheable)
FileInfo
setCompleted(boolean completed)
FileInfo
setCreationTimeMs(long creationTimeMs)
FileInfo
setDefaultAcl(DefaultAccessControlList defaultAcl)
FileInfo
setFileBlockInfos(java.util.List<FileBlockInfo> fileBlockInfos)
FileInfo
setFileId(long fileId)
FileInfo
setFolder(boolean folder)
FileInfo
setGroup(java.lang.String group)
FileInfo
setInAlluxioPercentage(int inAlluxioPercentage)
FileInfo
setInMemoryPercentage(int inMemoryPercentage)
FileInfo
setLastAccessTimeMs(long lastAccessTimeMs)
FileInfo
setLastModificationTimeMs(long lastModificationTimeMs)
FileInfo
setLength(long length)
FileInfo
setMediumTypes(java.util.Set<java.lang.String> mediumTypes)
FileInfo
setMode(int mode)
FileInfo
setMountId(long mountId)
FileInfo
setMountPoint(boolean mountPoint)
FileInfo
setName(java.lang.String name)
FileInfo
setOwner(java.lang.String owner)
FileInfo
setPath(java.lang.String path)
FileInfo
setPersisted(boolean persisted)
FileInfo
setPersistenceState(java.lang.String persistenceState)
FileInfo
setPinned(boolean pinned)
FileInfo
setReplicationMax(int replicationMax)
FileInfo
setReplicationMin(int replicationMin)
FileInfo
setTtl(long ttl)
FileInfo
setTtlAction(alluxio.grpc.TtlAction ttlAction)
FileInfo
setUfsFingerprint(java.lang.String ufsFingerprint)
FileInfo
setUfsPath(java.lang.String ufsPath)
FileInfo
setXAttr(java.util.Map<java.lang.String,byte[]> xAttr)
java.lang.String
toString()
-
-
-
Constructor Detail
-
FileInfo
public FileInfo()
Creates a new instance ofFileInfo
.
-
-
Method Detail
-
getFileId
public long getFileId()
- Returns:
- the file id
-
getName
public java.lang.String getName()
- Returns:
- the file name
-
getPath
public java.lang.String getPath()
- Returns:
- the file path
-
getUfsPath
public java.lang.String getUfsPath()
- Returns:
- the file UFS path
-
getLength
public long getLength()
- Returns:
- the file length
-
getBlockSizeBytes
public long getBlockSizeBytes()
- Returns:
- the file block size (in bytes)
-
getCreationTimeMs
public long getCreationTimeMs()
- Returns:
- the file creation time (in milliseconds)
-
isCompleted
public boolean isCompleted()
- Returns:
- whether the file is completed
-
isFolder
public boolean isFolder()
- Returns:
- whether the file is a folder
-
isPinned
public boolean isPinned()
- Returns:
- whether the file is pinned
-
isCacheable
public boolean isCacheable()
- Returns:
- whether the file is cacheable
-
isPersisted
public boolean isPersisted()
- Returns:
- whether the file is persisted
-
getBlockIds
public java.util.List<java.lang.Long> getBlockIds()
- Returns:
- the file block ids
-
getInMemoryPercentage
public int getInMemoryPercentage()
- Returns:
- the file in memory percentage
-
getInAlluxioPercentage
public int getInAlluxioPercentage()
- Returns:
- the file in alluxio percentage
-
getLastModificationTimeMs
public long getLastModificationTimeMs()
- Returns:
- the file last modification time (in milliseconds)
-
getLastAccessTimeMs
public long getLastAccessTimeMs()
- Returns:
- the file last access time (in milliseconds)
-
getTtl
public long getTtl()
- Returns:
- the file time-to-live (in seconds)
-
getTtlAction
public alluxio.grpc.TtlAction getTtlAction()
- Returns:
- the
TtlAction
-
getOwner
public java.lang.String getOwner()
- Returns:
- the file owner
-
getGroup
public java.lang.String getGroup()
- Returns:
- the file owner group
-
getMode
public int getMode()
- Returns:
- the file mode bits
-
getPersistenceState
public java.lang.String getPersistenceState()
- Returns:
- the file persistence state
-
isMountPoint
public boolean isMountPoint()
- Returns:
- whether the file is a mount point
-
getFileBlockInfos
public java.util.List<FileBlockInfo> getFileBlockInfos()
- Returns:
- the list of file block descriptors
-
getFileBlockInfo
public FileBlockInfo getFileBlockInfo(long blockId)
- Parameters:
blockId
- the block ID- Returns:
- the corresponding block info or null
-
getReplicationMax
public int getReplicationMax()
- Returns:
- the maximum number of block replication
-
getReplicationMin
public int getReplicationMin()
- Returns:
- the minimum number of block replication
-
getMountId
public long getMountId()
- Returns:
- the id of the mount
-
getUfsFingerprint
public java.lang.String getUfsFingerprint()
- Returns:
- the ufs fingerprint for this file
-
getAcl
public AccessControlList getAcl()
- Returns:
- the ACL object for this file
-
getDefaultAcl
public DefaultAccessControlList getDefaultAcl()
- Returns:
- the default ACL object for this file
-
convertAclToStringEntries
public java.util.List<java.lang.String> convertAclToStringEntries()
- Returns:
- the ACL as string entries for this file
-
convertDefaultAclToStringEntries
public java.util.List<java.lang.String> convertDefaultAclToStringEntries()
- Returns:
- the default ACL as string entries for this file
-
getMediumTypes
public java.util.Set<java.lang.String> getMediumTypes()
- Returns:
- a set of pinned locations
-
getXAttr
@Nullable public java.util.Map<java.lang.String,byte[]> getXAttr()
- Returns:
- the extended attributes
-
setFileId
public FileInfo setFileId(long fileId)
- Parameters:
fileId
- the file id to use- Returns:
- the file information
-
setName
public FileInfo setName(java.lang.String name)
- Parameters:
name
- the file name to use- Returns:
- the file information
-
setPath
public FileInfo setPath(java.lang.String path)
- Parameters:
path
- the file path to use- Returns:
- the file information
-
setUfsPath
public FileInfo setUfsPath(java.lang.String ufsPath)
- Parameters:
ufsPath
- the file UFS path to use- Returns:
- the file information
-
setLength
public FileInfo setLength(long length)
- Parameters:
length
- the file length to use- Returns:
- the file information
-
setBlockSizeBytes
public FileInfo setBlockSizeBytes(long blockSizeBytes)
- Parameters:
blockSizeBytes
- the file block size (in bytes) to use- Returns:
- the file information
-
setCreationTimeMs
public FileInfo setCreationTimeMs(long creationTimeMs)
- Parameters:
creationTimeMs
- the file creation time (in milliseconds) to use- Returns:
- the file information
-
setCompleted
public FileInfo setCompleted(boolean completed)
- Parameters:
completed
- the completed flag value to use- Returns:
- the file information
-
setFolder
public FileInfo setFolder(boolean folder)
- Parameters:
folder
- the folder flag value to use- Returns:
- the file information
-
setPinned
public FileInfo setPinned(boolean pinned)
- Parameters:
pinned
- the pinned flag value to use- Returns:
- the file information
-
setCacheable
public FileInfo setCacheable(boolean cacheable)
- Parameters:
cacheable
- the cacheable flag value to use- Returns:
- the file information
-
setPersisted
public FileInfo setPersisted(boolean persisted)
- Parameters:
persisted
- the persisted flag value to use- Returns:
- the file information
-
setBlockIds
public FileInfo setBlockIds(java.util.List<java.lang.Long> blockIds)
- Parameters:
blockIds
- the file block ids to use- Returns:
- the file information
-
setInMemoryPercentage
public FileInfo setInMemoryPercentage(int inMemoryPercentage)
- Parameters:
inMemoryPercentage
- the file in memory percentage to use- Returns:
- the file information
-
setInAlluxioPercentage
public FileInfo setInAlluxioPercentage(int inAlluxioPercentage)
- Parameters:
inAlluxioPercentage
- the file in alluxio percentage to use- Returns:
- the file information
-
setLastModificationTimeMs
public FileInfo setLastModificationTimeMs(long lastModificationTimeMs)
- Parameters:
lastModificationTimeMs
- the last modification time (in milliseconds) to use- Returns:
- the file information
-
setLastAccessTimeMs
public FileInfo setLastAccessTimeMs(long lastAccessTimeMs)
- Parameters:
lastAccessTimeMs
- the last access time (in milliseconds) to use- Returns:
- the file information
-
setTtl
public FileInfo setTtl(long ttl)
- Parameters:
ttl
- the file time-to-live (in seconds) to use- Returns:
- the file information
-
setTtlAction
public FileInfo setTtlAction(alluxio.grpc.TtlAction ttlAction)
- Parameters:
ttlAction
- theTtlAction
to use- Returns:
- the updated options object
-
setOwner
public FileInfo setOwner(java.lang.String owner)
- Parameters:
owner
- the file owner- Returns:
- the file information
-
setGroup
public FileInfo setGroup(java.lang.String group)
- Parameters:
group
- the file group- Returns:
- the file information
-
setMode
public FileInfo setMode(int mode)
- Parameters:
mode
- the file mode bits- Returns:
- the file information
-
setPersistenceState
public FileInfo setPersistenceState(java.lang.String persistenceState)
- Parameters:
persistenceState
- the file persistence state to use- Returns:
- the file information
-
setMountPoint
public FileInfo setMountPoint(boolean mountPoint)
- Parameters:
mountPoint
- the mount point flag value to use- Returns:
- the file information
-
setFileBlockInfos
public FileInfo setFileBlockInfos(java.util.List<FileBlockInfo> fileBlockInfos)
- Parameters:
fileBlockInfos
- the file block descriptors to use- Returns:
- the file information
-
setReplicationMax
public FileInfo setReplicationMax(int replicationMax)
- Parameters:
replicationMax
- the maximum number of block replication- Returns:
- the file descriptor
-
setReplicationMin
public FileInfo setReplicationMin(int replicationMin)
- Parameters:
replicationMin
- the minimum number of block replication- Returns:
- the file descriptor
-
setMountId
public FileInfo setMountId(long mountId)
- Parameters:
mountId
- the id of mount- Returns:
- the file information
-
setUfsFingerprint
public FileInfo setUfsFingerprint(java.lang.String ufsFingerprint)
- Parameters:
ufsFingerprint
- the ufs fingerprint to use- Returns:
- the file information
-
setAcl
public FileInfo setAcl(AccessControlList acl)
- Parameters:
acl
- the ACL entries to use- Returns:
- the file information
-
setDefaultAcl
public FileInfo setDefaultAcl(DefaultAccessControlList defaultAcl)
- Parameters:
defaultAcl
- the ACL entries to use- Returns:
- the file information
-
setMediumTypes
public FileInfo setMediumTypes(java.util.Set<java.lang.String> mediumTypes)
- Parameters:
mediumTypes
- the pinned locations- Returns:
- the file information
-
setXAttr
public FileInfo setXAttr(java.util.Map<java.lang.String,byte[]> xAttr)
- Parameters:
xAttr
- the extended attributes to use- Returns:
- the updated
FileInfo
-
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
-
-