org.apache.hadoop.mapreduce
Class QueueInfo

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

@InterfaceAudience.Public
@InterfaceStability.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 Summary
QueueInfo()
          Default constructor for QueueInfo.
QueueInfo(String queueName, String schedulingInfo)
          Construct a new QueueInfo object using the queue name and the scheduling information passed.
QueueInfo(String queueName, String schedulingInfo, QueueState state, JobStatus[] stats)
           
 
Method Summary
 JobStatus[] getJobStatuses()
          Get the jobs submitted to queue
 Properties getProperties()
          Get properties.
 List<QueueInfo> getQueueChildren()
          Get immediate children.
 String getQueueName()
          Get the queue name from JobQueueInfo
 String getSchedulingInfo()
          Gets the scheduling information associated to particular job queue.
 QueueState getState()
          Return the queue state
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
protected  void setJobStatuses(JobStatus[] stats)
           
protected  void setProperties(Properties props)
           
protected  void setQueueChildren(List<QueueInfo> children)
           
protected  void setQueueName(String queueName)
          Set the queue name of the JobQueueInfo
protected  void setSchedulingInfo(String schedulingInfo)
          Set the scheduling information associated to particular job queue
protected  void setState(QueueState state)
          Set the state of the queue
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

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


Copyright © 2012 Apache Software Foundation. All Rights Reserved.