Package alluxio.util.webui
Class UIFileInfo
- java.lang.Object
-
- alluxio.util.webui.UIFileInfo
-
@ThreadSafe public final class UIFileInfo extends java.lang.Object
Contains information about a file to be displayed in the UI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UIFileInfo.LocalFileInfo
The type Local file info.
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.Ordering<UIFileInfo>
PATH_STRING_COMPARE
Provides ordering ofUIFileInfo
based off a string comparison of the absolute paths.
-
Constructor Summary
Constructors Constructor Description UIFileInfo(URIStatus status, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.UIFileInfo(UIFileInfo.LocalFileInfo fileInfo, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.UIFileInfo(FileInfo info, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBlock(java.lang.String tierAlias, long blockId, long blockSize, long blockLastAccessTimeMs)
Adds a block to the file information.java.lang.String
getAbsolutePath()
Gets absolute path.java.util.List<java.lang.Long>
getBlockIds()
Gets BlockId List.java.lang.String
getBlockSizeBytes()
Gets block size bytes.java.util.Map<java.lang.String,java.util.List<UIFileBlockInfo>>
getBlocksOnTier()
Gets blocks on tier.java.lang.String
getCreationTime()
Gets creation time.java.util.List<java.lang.String>
getFileLocations()
Gets file locations.java.lang.String
getGroup()
Gets group.long
getId()
Gets id.boolean
getInAlluxio()
Gets in alluxio.int
getInAlluxioPercentage()
Gets in alluxio percentage.boolean
getIsDirectory()
Gets is directory.java.lang.String
getMode()
Gets mode.java.lang.String
getModificationTime()
Gets modification time.java.lang.String
getName()
Gets name.java.util.Map<java.lang.String,java.lang.Integer>
getOnTierPercentages()
Gets on-tier percentages.java.lang.String
getOwner()
Gets owner.java.lang.String
getPersistenceState()
Gets persistence state.java.lang.String
getSize()
Gets size.boolean
isPinned()
Is pinned boolean.void
setFileLocations(java.util.List<java.lang.String> fileLocations)
Sets file locations.
-
-
-
Field Detail
-
PATH_STRING_COMPARE
public static final com.google.common.collect.Ordering<UIFileInfo> PATH_STRING_COMPARE
Provides ordering ofUIFileInfo
based off a string comparison of the absolute paths.
-
-
Constructor Detail
-
UIFileInfo
public UIFileInfo(URIStatus status, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.- Parameters:
status
- underlyingURIStatus
alluxioConfiguration
- the alluxio configurationorderedTierAliases
- the ordered tier aliases
-
UIFileInfo
public UIFileInfo(FileInfo info, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.- Parameters:
info
- underlyingFileInfo
alluxioConfiguration
- the alluxio configurationorderedTierAliases
- the ordered tier aliases
-
UIFileInfo
public UIFileInfo(UIFileInfo.LocalFileInfo fileInfo, AlluxioConfiguration alluxioConfiguration, java.util.List<java.lang.String> orderedTierAliases)
Creates a new instance ofUIFileInfo
.- Parameters:
fileInfo
- underlyingUIFileInfo.LocalFileInfo
alluxioConfiguration
- the alluxio configurationorderedTierAliases
- the ordered tier aliases
-
-
Method Detail
-
addBlock
public void addBlock(java.lang.String tierAlias, long blockId, long blockSize, long blockLastAccessTimeMs)
Adds a block to the file information.- Parameters:
tierAlias
- the tier aliasblockId
- the block idblockSize
- the block sizeblockLastAccessTimeMs
- the last access time (in milliseconds)
-
getAbsolutePath
public java.lang.String getAbsolutePath()
Gets absolute path.- Returns:
- the absolute path
-
getBlockSizeBytes
public java.lang.String getBlockSizeBytes()
Gets block size bytes.- Returns:
- the block size (in bytes)
-
getBlocksOnTier
public java.util.Map<java.lang.String,java.util.List<UIFileBlockInfo>> getBlocksOnTier()
Gets blocks on tier.- Returns:
- a mapping from tiers to file blocks
-
getCreationTime
public java.lang.String getCreationTime()
Gets creation time.- Returns:
- the creation time (in milliseconds)
-
getModificationTime
public java.lang.String getModificationTime()
Gets modification time.- Returns:
- the modification time (in milliseconds)
-
getFileLocations
public java.util.List<java.lang.String> getFileLocations()
Gets file locations.- Returns:
- the file locations
-
getId
public long getId()
Gets id.- Returns:
- the file id
-
getInAlluxio
public boolean getInAlluxio()
Gets in alluxio.- Returns:
- whether the file is present in memory
-
getInAlluxioPercentage
public int getInAlluxioPercentage()
Gets in alluxio percentage.- Returns:
- the percentage of the file present in memory
-
getIsDirectory
public boolean getIsDirectory()
Gets is directory.- Returns:
- whether the object represents a directory
-
isPinned
public boolean isPinned()
Is pinned boolean.- Returns:
- whether the file is pinned
-
getPersistenceState
public java.lang.String getPersistenceState()
Gets persistence state.- Returns:
- the
PersistenceState
of the file
-
getOnTierPercentages
public java.util.Map<java.lang.String,java.lang.Integer> getOnTierPercentages()
Gets on-tier percentages.- Returns:
- the on-tier percentages
-
getName
public java.lang.String getName()
Gets name.- Returns:
- the file name
-
getSize
public java.lang.String getSize()
Gets size.- Returns:
- the file size
-
setFileLocations
public void setFileLocations(java.util.List<java.lang.String> fileLocations)
Sets file locations.- Parameters:
fileLocations
- the file locations to use
-
getOwner
public java.lang.String getOwner()
Gets owner.- Returns:
- the owner of the file
-
getGroup
public java.lang.String getGroup()
Gets group.- Returns:
- the group of the file
-
getMode
public java.lang.String getMode()
Gets mode.- Returns:
- the mode of the file
-
getBlockIds
public java.util.List<java.lang.Long> getBlockIds()
Gets BlockId List.- Returns:
- the BlockId List in worker node
-
-