Class JobWorkerHealth


  • public class JobWorkerHealth
    extends java.lang.Object
    The job worker health information.
    • Constructor Summary

      Constructors 
      Constructor Description
      JobWorkerHealth​(long workerId, java.util.List<java.lang.Double> loadAverage, int taskPoolSize, int numActiveTasks, int unfinishedTasks, java.lang.String hostname)
      Default constructor.
      JobWorkerHealth​(alluxio.grpc.JobWorkerHealth jobWorkerHealth)
      Constructor from the grpc representation.
    • Constructor Detail

      • JobWorkerHealth

        public JobWorkerHealth​(long workerId,
                               java.util.List<java.lang.Double> loadAverage,
                               int taskPoolSize,
                               int numActiveTasks,
                               int unfinishedTasks,
                               java.lang.String hostname)
        Default constructor.
        Parameters:
        workerId - the worker id
        loadAverage - output of CentralProcessor.getSystemLoadAverage on the worker
        taskPoolSize - task pool size
        numActiveTasks - number of active tasks in the worker
        unfinishedTasks - number of unfinished tasks that the worker has
        hostname - hostname of the worker
      • JobWorkerHealth

        public JobWorkerHealth​(alluxio.grpc.JobWorkerHealth jobWorkerHealth)
        Constructor from the grpc representation.
        Parameters:
        jobWorkerHealth - grpc representation
    • Method Detail

      • getWorkerId

        public long getWorkerId()
        Returns:
        the worker id
      • getLoadAverage

        public java.util.List<java.lang.Double> getLoadAverage()
        Returns system load average for 1, 5, and 15 minutes. System load average is the sum of runnable entities. See http://oshi.github.io/oshi/apidocs/oshi/hardware/CentralProcessor.html#getSystemLoadAverage
        Returns:
        the load average for 1, 5, and 15 minutes. negative values if not available
      • getTaskPoolSize

        public int getTaskPoolSize()
        Returns:
        task pool size
      • getNumActiveTasks

        public int getNumActiveTasks()
        Returns:
        number of active tasks
      • getUnfinishedTasks

        public int getUnfinishedTasks()
        Returns:
        the number of unfinished tasks
      • getHostname

        public java.lang.String getHostname()
        Returns:
        the worker hostname
      • toProto

        public alluxio.grpc.JobWorkerHealth toProto()
        Returns:
        proto representation of JobWorkerInfo
      • hashCode

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

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

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