Package org.apache.hadoop.mapreduce
Class QueueInfo
java.lang.Object
org.apache.hadoop.mapreduce.QueueInfo
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
JobQueueInfo
Class that contains the information regarding the Job Queues which are
maintained by the Hadoop Map/Reduce framework.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for QueueInfo.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
Modifier and TypeMethodDescriptionGet the jobs submitted to queueGet properties.Get immediate children.Get the queue name from JobQueueInfoGets the scheduling information associated to particular job queue.getState()Return the queue statevoidreadFields(DataInput in) Deserialize the fields of this object fromin.protected voidsetJobStatuses(JobStatus[] stats) protected voidsetProperties(Properties props) protected voidsetQueueChildren(List<QueueInfo> children) protected voidsetQueueName(String queueName) Set the queue name of the JobQueueInfoprotected voidsetSchedulingInfo(String schedulingInfo) Set the scheduling information associated to particular job queueprotected voidsetState(QueueState state) Set the state of the queuevoidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
QueueInfo
public QueueInfo()Default constructor for QueueInfo. -
QueueInfo
Construct a new QueueInfo object using the queue name and the scheduling information passed.- Parameters:
queueName- Name of the job queueschedulingInfo- Scheduling Information associated with the job queue
-
QueueInfo
- Parameters:
queueName-schedulingInfo-state-stats-
-
-
Method Details
-
setQueueName
Set the queue name of the JobQueueInfo- Parameters:
queueName- Name of the job queue.
-
getQueueName
Get the queue name from JobQueueInfo- Returns:
- queue name
-
setSchedulingInfo
Set the scheduling information associated to particular job queue- Parameters:
schedulingInfo-
-
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
Set the state of the queue- Parameters:
state- state of the queue.
-
getState
Return the queue state- Returns:
- the queue state.
-
setJobStatuses
-
getQueueChildren
Get immediate children.- Returns:
- list of QueueInfo
-
setQueueChildren
-
getProperties
Get properties.- Returns:
- Properties
-
setProperties
-
getJobStatuses
Get the jobs submitted to queue- Returns:
- list of JobStatus for the submitted jobs
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-