Package alluxio.wire

Class WorkerInfo

  • All Implemented Interfaces:
    java.io.Serializable

    @NotThreadSafe
    public final class WorkerInfo
    extends java.lang.Object
    implements java.io.Serializable
    The worker information.
    See Also:
    Serialized Form
    • Constructor Detail

      • WorkerInfo

        public WorkerInfo()
    • Method Detail

      • getId

        public long getId()
        Returns:
        the worker id
      • getLastContactSec

        public int getLastContactSec()
        Returns:
        the worker last contact (in seconds)
      • getState

        public java.lang.String getState()
        Returns:
        the worker state
      • getCapacityBytes

        public long getCapacityBytes()
        Returns:
        the worker total capacity (in bytes)
      • getUsedBytes

        public long getUsedBytes()
        Returns:
        the worker used capacity (in bytes)
      • getStartTimeMs

        public long getStartTimeMs()
        Returns:
        the worker start time (in milliseconds)
      • getCapacityBytesOnTiers

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

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

        public java.lang.String getVersion()
        Returns:
        the project version of the worker
      • getRevision

        public java.lang.String getRevision()
        Returns:
        the git revision at the time of building the worker
      • setId

        public WorkerInfo setId​(long id)
        Parameters:
        id - the worker id to use
        Returns:
        the worker information
      • setAddress

        public WorkerInfo setAddress​(WorkerNetAddress address)
        Parameters:
        address - the worker address to use
        Returns:
        the worker information
      • setLastContactSec

        public WorkerInfo setLastContactSec​(int lastContactSec)
        Parameters:
        lastContactSec - the worker last contact (in seconds) to use
        Returns:
        the worker information
      • setState

        public WorkerInfo setState​(java.lang.String state)
        Parameters:
        state - the worker state to use
        Returns:
        the worker information
      • setCapacityBytes

        public WorkerInfo setCapacityBytes​(long capacityBytes)
        Parameters:
        capacityBytes - the worker total capacity (in bytes) to use
        Returns:
        the worker information
      • setUsedBytes

        public WorkerInfo setUsedBytes​(long usedBytes)
        Parameters:
        usedBytes - the worker used capacity (in bytes) to use
        Returns:
        the worker information
      • setStartTimeMs

        public WorkerInfo setStartTimeMs​(long startTimeMs)
        Parameters:
        startTimeMs - the worker start time (in milliseconds) to use
        Returns:
        the worker information
      • setCapacityBytesOnTiers

        public WorkerInfo setCapacityBytesOnTiers​(java.util.Map<java.lang.String,​java.lang.Long> capacityBytesOnTiers)
        Parameters:
        capacityBytesOnTiers - the total worker capacity (in bytes) to use
        Returns:
        the worker information
      • setUsedBytesOnTiers

        public WorkerInfo setUsedBytesOnTiers​(java.util.Map<java.lang.String,​java.lang.Long> usedBytesOnTiers)
        Parameters:
        usedBytesOnTiers - the used worker capacity (in bytes) to use
        Returns:
        the worker information
      • setVersion

        public WorkerInfo setVersion​(java.lang.String version)
        Parameters:
        version - the project version of the worker
        Returns:
        the worker information
      • setRevision

        public WorkerInfo setRevision​(java.lang.String revision)
        Parameters:
        revision - the git revision at the time of building the worker
        Returns:
        the worker information
      • equals

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

        public WorkerInfo setBlockCount​(long blockCount)
        Parameters:
        blockCount - the worker block count
        Returns:
        the worker information
      • getBlockCount

        public long getBlockCount()
        Returns:
        the worker block count
      • hashCode

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

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