Class UIFileInfo


  • @ThreadSafe
    public final class UIFileInfo
    extends java.lang.Object
    Contains information about a file to be displayed in the UI.
    • Field Detail

      • PATH_STRING_COMPARE

        public static final com.google.common.collect.Ordering<UIFileInfo> PATH_STRING_COMPARE
        Provides ordering of UIFileInfo 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 of UIFileInfo.
        Parameters:
        status - underlying URIStatus
        alluxioConfiguration - the alluxio configuration
        orderedTierAliases - the ordered tier aliases
      • UIFileInfo

        public UIFileInfo​(FileInfo info,
                          AlluxioConfiguration alluxioConfiguration,
                          java.util.List<java.lang.String> orderedTierAliases)
        Creates a new instance of UIFileInfo.
        Parameters:
        info - underlying FileInfo
        alluxioConfiguration - the alluxio configuration
        orderedTierAliases - 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 alias
        blockId - the block id
        blockSize - the block size
        blockLastAccessTimeMs - 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