Class QueueInfo

java.lang.Object
org.apache.hadoop.mapreduce.QueueInfo
All Implemented Interfaces:
Writable
Direct Known Subclasses:
JobQueueInfo

@Public @Evolving public class QueueInfo extends Object implements Writable
Class that contains the information regarding the Job Queues which are maintained by the Hadoop Map/Reduce framework.
  • Constructor Details

    • QueueInfo

      public QueueInfo()
      Default constructor for QueueInfo.
    • QueueInfo

      public QueueInfo(String queueName, String schedulingInfo)
      Construct a new QueueInfo object using the queue name and the scheduling information passed.
      Parameters:
      queueName - Name of the job queue
      schedulingInfo - Scheduling Information associated with the job queue
    • QueueInfo

      public QueueInfo(String queueName, String schedulingInfo, QueueState state, JobStatus[] stats)
      Parameters:
      queueName -
      schedulingInfo -
      state -
      stats -
  • Method Details

    • setQueueName

      protected void setQueueName(String queueName)
      Set the queue name of the JobQueueInfo
      Parameters:
      queueName - Name of the job queue.
    • getQueueName

      public String getQueueName()
      Get the queue name from JobQueueInfo
      Returns:
      queue name
    • setSchedulingInfo

      protected void setSchedulingInfo(String schedulingInfo)
      Set the scheduling information associated to particular job queue
      Parameters:
      schedulingInfo -
    • getSchedulingInfo

      public String getSchedulingInfo()
      Gets the scheduling information associated to particular job queue. If nothing is set would return "N/A"
      Returns:
      Scheduling information associated to particular Job Queue
    • setState

      protected void setState(QueueState state)
      Set the state of the queue
      Parameters:
      state - state of the queue.
    • getState

      public QueueState getState()
      Return the queue state
      Returns:
      the queue state.
    • setJobStatuses

      protected void setJobStatuses(JobStatus[] stats)
    • getQueueChildren

      public List<QueueInfo> getQueueChildren()
      Get immediate children.
      Returns:
      list of QueueInfo
    • setQueueChildren

      protected void setQueueChildren(List<QueueInfo> children)
    • getProperties

      public Properties getProperties()
      Get properties.
      Returns:
      Properties
    • setProperties

      protected void setProperties(Properties props)
    • getJobStatuses

      public JobStatus[] getJobStatuses()
      Get the jobs submitted to queue
      Returns:
      list of JobStatus for the submitted jobs
    • readFields

      public void readFields(DataInput in) throws IOException
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException - any other problem for write.