Package alluxio.wire

Class BlockMasterInfo

  • All Implemented Interfaces:
    java.io.Serializable

    @NotThreadSafe
    public final class BlockMasterInfo
    extends java.lang.Object
    implements java.io.Serializable
    The Alluxio block master information.
    See Also:
    Serialized Form
    • Constructor Detail

      • BlockMasterInfo

        public BlockMasterInfo()
        Creates a new instance of BlockMasterInfo.
    • Method Detail

      • getCapacityBytes

        public long getCapacityBytes()
        Returns:
        the total capacity bytes
      • getCapacityBytesOnTiers

        public java.util.Map<java.lang.String,​java.lang.Long> getCapacityBytesOnTiers()
        Returns:
        the total capacity bytes on tiers
      • getFreeBytes

        public long getFreeBytes()
        Returns:
        the free capacity in bytes
      • getLiveWorkerNum

        public int getLiveWorkerNum()
        Returns:
        the live worker number
      • getLostWorkerNum

        public int getLostWorkerNum()
        Returns:
        the lost worker number
      • getUsedBytes

        public long getUsedBytes()
        Returns:
        the used capacity bytes
      • getUsedBytesOnTiers

        public java.util.Map<java.lang.String,​java.lang.Long> getUsedBytesOnTiers()
        Returns:
        the used capacity bytes on tiers
      • setCapacityBytes

        public BlockMasterInfo setCapacityBytes​(long capacityBytes)
        Parameters:
        capacityBytes - the total capacity bytes to use
        Returns:
        the block master information
      • setCapacityBytesOnTiers

        public BlockMasterInfo setCapacityBytesOnTiers​(java.util.Map<java.lang.String,​java.lang.Long> capacityBytesOnTiers)
        Parameters:
        capacityBytesOnTiers - the total capacity bytes on tiers to use
        Returns:
        the block master information
      • setFreeBytes

        public BlockMasterInfo setFreeBytes​(long freeBytes)
        Parameters:
        freeBytes - the free capacity bytes to use
        Returns:
        the block master information
      • setLiveWorkerNum

        public BlockMasterInfo setLiveWorkerNum​(int liveWorkerNum)
        Parameters:
        liveWorkerNum - the live worker number
        Returns:
        the block master information
      • setLostWorkerNum

        public BlockMasterInfo setLostWorkerNum​(int lostWorkerNum)
        Parameters:
        lostWorkerNum - the lost worker number
        Returns:
        the block master information
      • setUsedBytes

        public BlockMasterInfo setUsedBytes​(long usedBytes)
        Parameters:
        usedBytes - the used capacity bytes to use
        Returns:
        the block master information
      • setUsedBytesOnTiers

        public BlockMasterInfo setUsedBytesOnTiers​(java.util.Map<java.lang.String,​java.lang.Long> usedBytesOnTiers)
        Parameters:
        usedBytesOnTiers - the used capacity bytes on tiers to use
        Returns:
        the block master information
      • toProto

        protected alluxio.grpc.BlockMasterInfo toProto()
        Returns:
        proto representation of the block master information
      • fromProto

        public static BlockMasterInfo fromProto​(alluxio.grpc.BlockMasterInfo info)
        Creates a new instance of BlockMasterInfo from a proto representation.
        Parameters:
        info - the proto representation of a block master information
        Returns:
        the instance
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object