Example usage for org.apache.hadoop.mapred JobClient getQueueInfo

List of usage examples for org.apache.hadoop.mapred JobClient getQueueInfo

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred JobClient getQueueInfo.

Prototype

public JobQueueInfo getQueueInfo(final String queueName) throws IOException 

Source Link

Document

Gets the queue information associated to a particular Job Queue

Usage

From source file:org.apache.ambari.servicemonitor.clients.JTListQueue.java

License:Apache License

@Override
protected Operation executeOneOperation() throws IOException {
    Operation operation = new Operation("lsqueue " + queuename);

    started(operation);//from  w w w. j a  va2 s. com
    JobClient jobClient = null;
    try {

        jobClient = new JobClient(jtAddr, getConf());
        JobQueueInfo queueInfo = jobClient.getQueueInfo(queuename);
        operation.setText("Queue " + queuename + " is in state " + queueInfo.getQueueState()
                + "; scheduling info: " + queueInfo.getSchedulingInfo());
        operation.success();
    } catch (ExitClientRunException e) {
        //propagate this up
        throw e;
    } catch (IOException e) {
        //all other outcomes are failures
        operation.failure(e);
    } finally {
        MonitorUtils.closeJobClient(jobClient);
    }
    return operation;
}