001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.yarn.api.records;
020
021import java.util.List;
022
023import org.apache.hadoop.classification.InterfaceAudience.Private;
024import org.apache.hadoop.classification.InterfaceAudience.Public;
025import org.apache.hadoop.classification.InterfaceStability.Stable;
026import org.apache.hadoop.classification.InterfaceStability.Unstable;
027import org.apache.hadoop.yarn.api.ClientRMProtocol;
028
029/**
030 * <p>QueueInfo is a report of the runtime information of the queue.</p>
031 * 
032 * <p>It includes information such as:
033 *   <ul>
034 *     <li>Queue name.</li>
035 *     <li>Capacity of the queue.</li>
036 *     <li>Maximum capacity of the queue.</li>
037 *     <li>Current capacity of the queue.</li>
038 *     <li>Child queues.</li>
039 *     <li>Running applications.</li>
040 *     <li>{@link QueueState} of the queue.</li>
041 *   </ul>
042 * </p>
043 *
044 * @see QueueState
045 * @see ClientRMProtocol#getQueueInfo(org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoRequest)
046 */
047@Public
048@Stable
049public interface QueueInfo {
050  /**
051   * Get the <em>name</em> of the queue.
052   * @return <em>name</em> of the queue
053   */
054  @Public
055  @Stable
056  String getQueueName();
057  
058  @Private
059  @Unstable
060  void setQueueName(String queueName);
061  
062  /**
063   * Get the <em>configured capacity</em> of the queue.
064   * @return <em>configured capacity</em> of the queue
065   */
066  @Public
067  @Stable
068  float getCapacity();
069  
070  @Private
071  @Unstable
072  void setCapacity(float capacity);
073  
074  /**
075   * Get the <em>maximum capacity</em> of the queue.
076   * @return <em>maximum capacity</em> of the queue
077   */
078  @Public
079  @Stable
080  float getMaximumCapacity();
081  
082  @Private
083  @Unstable
084  void setMaximumCapacity(float maximumCapacity);
085  
086  /**
087   * Get the <em>current capacity</em> of the queue.
088   * @return <em>current capacity</em> of the queue
089   */
090  @Public
091  @Stable
092  float getCurrentCapacity();
093  
094  @Private
095  @Unstable
096  void setCurrentCapacity(float currentCapacity);
097  
098  /**
099   * Get the <em>child queues</em> of the queue.
100   * @return <em>child queues</em> of the queue
101   */
102  @Public
103  @Stable
104  List<QueueInfo> getChildQueues();
105  
106  @Private
107  @Unstable
108  void setChildQueues(List<QueueInfo> childQueues);
109  
110  /**
111   * Get the <em>running applications</em> of the queue.
112   * @return <em>running applications</em> of the queue
113   */
114  @Public
115  @Stable
116  List<ApplicationReport> getApplications();
117  
118  @Private
119  @Unstable
120  void setApplications(List<ApplicationReport> applications);
121  
122  /**
123   * Get the <code>QueueState</code> of the queue.
124   * @return <code>QueueState</code> of the queue
125   */
126  @Public
127  @Stable
128  QueueState getQueueState();
129  
130  @Private
131  @Unstable
132  void setQueueState(QueueState queueState);
133}